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

Deprecated implemention breaks subscription service when using custom roles.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.4
    • Component/s: Forum
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      in mod/forum/subscription.php §144 uses

      $users = get_course_users($course->id, 'firstname ASC, lastname ASC', $subscriberlist);

      deprecated call. When using non standard roles that have capabilities for forum, no users are shown in subscription list.

      following code :

      $coursecontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
      $users = get_users_by_capability($coursecontext, 'mod/forum:initialsubscriptions', '');

      fixes the issue, at least as expected behaviour, but may have functionnal side effects I do not imagine.

      do the get_group_users generate same problem ?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              vf Valery Fremaux
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

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