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

Hide users with suspended enrolments in multiple areas


      Will add link to Github repo.
      Hope it's worth integration to core.
      In this case, please review.


      NOTE: Suspended Users here mean users with suspended/inactive/expired/etc enrolments in a course.
      Just could not find any other appropriate short term.


      This adds two helper functions in lib/accesslib.php and provides with the feature to remove Suspended Users (SU's) from the following parts of Moodle:

      Course logs

      • move SU's to a separate optgroup in the dropdown list of users
      • option to exclude SU's from course logs;

      Assignment 2.2

      • submission list: add option to exclude SUs from the list
      • remove suspended users from submitted assignments count (View X submitted assignments) based on above preference
      • submission list: add SU symbol (as per current gradebook functionality)
      • bulk assignment download: use above toggle
      • individual assignment feedback: use above toggle when displaying Save and Next buttons

      Assignment 2.3

      • Same as above for Assignment 2.2


      • Gradebook: Add 'Show only active enrolments' toggle in My Report Preferences
      • Grader report: use above toggle
      • User report: use above toggle to hide SUs, if set to 'No' then move SU's to a separate optgroup in the dropdown list of users
      • Outcomes report: use above toggle
      • Export: add 'Require active enrolment' checkbox


      • Attempts table: add checkbox 'Exclude suspended users' (default: checked)
      • Quiz overview, link to Attampts table, 'Attempts: #': use above toggle
      • 'Download table data as': use above toggle
      • Quiz report graph: use above toggle
      • User override: remove suspended users from user selection
      • Quiz statistics: option to exclude SUs


      • Auto create groups: do not include suspended users in Auto create groups
      • Manually created: do not show SUs in potential members list
      • Group overview page: move SUs to a separate optgroup in group member list


      • Submission table: remove suspended users from Workshop submission table
      • Prevent from assessing submissions from SUs: remove SUs in get_all_submissions() function

      Course search:

      • Remove suspended teachers from course description


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