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

Hide suspended users from course contacts

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.11.11
    • None
    • Course
    • MOODLE_311_STABLE

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            mamaeves mamaeves
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: