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

Hide suspended users from course contacts

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.11.11
    • Course
    • None
    • MOODLE_311_STABLE

      Moodle 3.11.x, possibly 4.x

      When displaying course contacts you can see all teachers enrolled into a given course. If a user is deleted then he is not shown in course contacts, which is good. But when a user is only suspended and not deleted, then he is still shown in course contacts block.

      I suggest to hide suspended users from course contacts block.

      Need to modify SQL query in /course/classes/category.php

      public static function preload_course_contacts(&$courses)

       

      WHERE  ra.contextid ". $sql1." AND ra.roleid ". $sql2." AND u.deleted = :notdeleted

      add this to SQL query

      AND u.suspended<>1

            Unassigned Unassigned
            mamaeves mamaeves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.