Affects Version/s: 2.4.7, 2.5.3, 2.6, 3.3.5, 3.4.2, 3.5
Fix Version/s: None
Affected Branches:MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
In the activities types Feedback, Forum, Glossary and Survey
there is an explicit check for module visibility. It is not needed if require_login() is called properly indicating the $cm.
As a result the activities are not displayed when teacher views them switching the role to student. He sees "Sorry, this activity is currently hidden".
- Log in as a teacher/admin.
- Navigate to a course containing a Feedback, Forum, Glossary or Survey module (or create one).
- Hide the activity.
- Go to the activity.
- Click Administration > Switch role to... > Student
Expected result: The activity page should be shown as would be to a student, but not hidden.
Actual result: The activity states "Sorry, this activity is currently hidden".