Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17727

RSS not generating if forum/course is hidden

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4
    • Component/s: Forum, RSS
    • Labels:
      None
    • Environment:
      Any.
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When forum or course is hidden, RSS feeds from the forum are not being generated.

      This is caused by wrong capability check in rss/file.php:
      //Check for "security" if the course is hidden or the activity is hidden
      if (Unable to render embedded object: File ($isblog and () not found.$course->visible || !$cm->visible) && (!has_capability('moodle/course:viewhiddenactivities', $context))) {

      User ID should be passed to has_capability because current user ($USER) is overwritten at the beginning of the rss/file.php file.

      Patch attached.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            tmuras Tomasz Muras
            Tester:
            Andrew Davis
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              28/Jan/09