-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.4.9, 3.5.13, 3.7.7, 3.8.4, 3.9.1, 3.9.18, 3.10, 3.11.11, 4.0.5, 4.0.11, 4.1, 4.1.6, 4.2.3, 4.3, 4.4.5, 5.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_500_STABLE
-
mdl-66780_404
-
mdl-66780_405
-
mdl-66780_main
-
-
FULL STEPS
With a given course and section:
Set the course setting "Format" to "Custom sections" or "Weekly sections".
Set the course setting "Hidden sections" to "Hidden sections are shown as not available".
Turn editing on.
Set the section setting "Access restrictions" to something unavailable, e.g. "Must match Date until 1 January 2000".
Set the section setting "Access restrictions" visibility to "Hidden entirely if user does not meet this condition".
Ensure the section is set to show.
Switch role to Student.
The section does not appear.
Return to normal role.
Turn editing on.
Set the section to hidden.
Switch role to Student again.
The section now does appear.
WHAT I EXPECTED
Hiding a section should not make it show under any circumstances.
WHAT ACTUALLY HAPPENS
Hiding a section does make it show in specific circumstances.
TO FIX
In course/format/classes/base.php function is_section_visible(),
change:
return $section->uservisible ||
($section->visible && !$section->available && !empty($section->availableinfo)) ||
(!$section->visible && !$hidesections);
to:
return $section->uservisible ||
($section->visible || !$hidesections)
&& ($section->available || !empty($section->availableinfo));
- has a non-specific relationship to
-
MDL-79918 Simplify the course settings by removing the setting Hidden sections
- Open