Skip to content

RSS: wrong text-format constant and categories never emitted #17

Description

@nihaalshaikh

Summary

Several RSS defects in rsslib.php:

  1. :155-159 format_text($desc, 'HTML', ['trusted' => true]) - the string 'HTML' is not FORMAT_HTML (it resolves to FORMAT_MOODLE), and trusted => true disables cleaning for student-authored summaries regardless of the episode's own trust flag. (This line was touched by the most recent commit but the format arg was not fixed.)
  2. :161-169, :517 $item->topcategory is never assigned, so <itunes:category> is never emitted; the per-item category lookup is pure overhead.
  3. :512 $item->course === SITEID compares a string to int(1) and is always false, so front-page feeds drop items.
  4. :683 !empty($category->subtitle) should read $pcast->subtitle.

Location

rsslib.php:155-159, 161-169, 512, 517, 683

Suggested fix

Select and pass e.summaryformat; assign/emit the category; cast course to int; fix the subtitle source.


Found during the mod_pcast review/test pass (ClickUp 86cb46r9t). Line numbers are against master @ 73bb255.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmediumMedium: maintainability concern

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions