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

Deprecated implemention breaks subscription service when using custom roles.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.9.1
    • 1.9.4
    • Forum
    • None
    • MySQL
    • MOODLE_19_STABLE
    • 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

              skodak Petr Skoda
              vf Valery Fremaux
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/Jan/09