Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.7.2, 2.8
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_27_STABLE
-
Description
The availability function info_module->is_user_visible() checks the uservisible flag on cm's via the get_fast_modinfo() call.
However, if the cm in question is not in the list returned by get_cms(), then a coding exception is thrown and the user is presented with an entirely unusable interface.
This is quickly and easily tested by adding a mod_assign activity to a course and having a student enrolled in that course. Set the mod_assign activity as hidden under site admin and then login as the student. You'll immediately see the issue.
The reason this happens is the calendar has an event for the now hidden activity, and for each event, it calls the is_user_visible() function to see if it should be displaying it.