setup_hasrestrictions_scenario($format, $addcanviewhidden, $rolename, $hasavailability, $available);
+ $data = $this->setup_hasrestrictions_scenario($format, $rolename, $hasavailability, $available);
// Get the cm state.
$courseformat = $data->courseformat;
@@ -78,14 +76,13 @@ class cm_test extends \advanced_testcase {
);
$state = $cmstate->export_for_template($renderer);
- $this->assertEquals($expected, $state->hascmrectrictions);
+ $this->assertEquals($expected, $state->hascmrestrictions);
}
/**
* Setup section or cm has restrictions scenario.
*
* @param string $format the course format
- * @param bool $addcanviewhidden if the canviewhidden capabilities must be added to the role.
* @param string $rolename the user role name (editingteacher or student)
* @param bool $hasavailability if the activity|section has availability
* @param bool $available if the activity availability condition is available or not to the user
@@ -93,7 +90,6 @@ class cm_test extends \advanced_testcase {
*/
private function setup_hasrestrictions_scenario(
string $format = 'topics',
- bool $addcanviewhidden = false,
string $rolename = 'editingteacher',
bool $hasavailability = false,
bool $available = false
@@ -101,6 +97,8 @@ class cm_test extends \advanced_testcase {
global $PAGE, $DB;
$this->resetAfterTest();
+ set_config('enableavailability', 1);
+
$course = $this->getDataGenerator()->create_course(['numsections' => 1, 'format' => $format]);
// Create and enrol user.
@@ -112,13 +110,6 @@ class cm_test extends \advanced_testcase {
);
$this->setUser($user);
- // Add capabilities if necessary.
- if ($addcanviewhidden) {
- $roleid = $DB->get_field('role', 'id', array('shortname' => $rolename), MUST_EXIST);
- $coursecontext = context_course::instance($course->id);
- assign_capability('moodle/course:viewhiddenactivities', CAP_ALLOW, $roleid, $coursecontext->id);
- }
-
// Create an activity.
$activity = $this->getDataGenerator()->create_module('page', ['course' => $course->id], [
'section' => 1,
@@ -165,225 +156,198 @@ class cm_test extends \advanced_testcase {
public function hasrestrictions_state_provider(): array {
return [
// Teacher scenarios (topics).
- 'Topics, can edit, has availability and is available' => [
+ 'Teacher, Topics, can edit, has availability and is available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Topics, can edit, has availability and is not available' => [
+ 'Teacher, Topics, can edit, has availability and is not available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Topics, can edit and has not availability' => [
+ 'Teacher, Topics, can edit and has not availability' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Teacher scenarios (weeks).
- 'Weeks, can edit, has availability and is available' => [
+ 'Teacher, Weeks, can edit, has availability and is available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Weeks, can edit, has availability and is not available' => [
+ 'Teacher, Weeks, can edit, has availability and is not available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Weeks, can edit and has not availability' => [
+ 'Teacher, Weeks, can edit and has not availability' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Teacher scenarios (mock format).
- 'Mock format, can edit, has availability and is available' => [
+ 'Teacher, Mock format, can edit, has availability and is available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Mock format, can edit, has availability and is not available' => [
+ 'Teacher, Mock format, can edit, has availability and is not available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Mock format, can edit and has not availability' => [
+ 'Teacher, Mock format, can edit and has not availability' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
+ // Non editing teacher scenarios (topics).
+ 'Non editing teacher, Topics, can edit, has availability and is available' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Topics, can edit, has availability and is not available' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Topics, can edit and has not availability' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ // Non editing teacher scenarios (weeks).
+ 'Non editing teacher, Weeks, can edit, has availability and is available' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Weeks, can edit, has availability and is not available' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Weeks, can edit and has not availability' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ // Non editing teacher scenarios (mock format).
+ 'Non editing teacher, Mock format, can edit, has availability and is available' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Mock format, can edit, has availability and is not available' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => true,
+ ],
+ 'Non editing teacher, Mock format, can edit and has not availability' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
// Student scenarios (topics).
- 'Topics, cannot edit, has availability and is available' => [
+ 'Student, Topics, cannot edit, has availability and is available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
'expected' => false,
],
- 'Topics, cannot edit, has availability and is not available' => [
+ 'Student, Topics, cannot edit, has availability and is not available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Topics, cannot edit and has not availability' => [
+ 'Student, Topics, cannot edit and has not availability' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Student scenarios (weeks).
- 'Weeks, cannot edit, has availability and is available' => [
+ 'Student, Weeks, cannot edit, has availability and is available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
'expected' => false,
],
- 'Weeks, cannot edit, has availability and is not available' => [
+ 'Student, Weeks, cannot edit, has availability and is not available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Weeks, cannot edit and has not availability' => [
+ 'Student, Weeks, cannot edit and has not availability' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Student scenarios (mock format).
- 'Mock format, cannot edit, has availability and is available' => [
+ 'Student, Mock format, cannot edit, has availability and is available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
'expected' => false,
],
- 'Mock format, cannot edit, has availability and is not available' => [
+ 'Student, Mock format, cannot edit, has availability and is not available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Mock format, cannot edit and has not availability' => [
+ 'Student, Mock format, cannot edit and has not availability' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (topics).
- 'Topics, can view hidden but not edit, has availability and is available' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Topics, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Topics, can view hidden but not edit and has not availability' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (weeks).
- 'Weeks, can view hidden but not edit, has availability and is available' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Weeks, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Weeks, can view hidden but not edit and has not availability' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (mock format).
- 'Mock format, can view hidden but not edit, has availability and is available' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Mock format, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Mock format, can view hidden but not edit and has not availability' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
diff --git a/course/format/tests/output/local/state/section_test.php b/course/format/tests/output/local/state/section_test.php
index c7a5fcdf0ad..ef12f894a75 100644
--- a/course/format/tests/output/local/state/section_test.php
+++ b/course/format/tests/output/local/state/section_test.php
@@ -49,7 +49,6 @@ class section_test extends \advanced_testcase {
* @covers ::export_for_template
*
* @param string $format the course format
- * @param bool $addcanviewhidden if the canviewhidden capabilities must be added to the role.
* @param string $rolename the user role name (editingteacher or student)
* @param bool $hasavailability if the activity|section has availability
* @param bool $available if the activity availability condition is available or not to the user
@@ -57,13 +56,12 @@ class section_test extends \advanced_testcase {
*/
public function test_section_hasrestrictions_state(
string $format = 'topics',
- bool $addcanviewhidden = false,
string $rolename = 'editingteacher',
bool $hasavailability = false,
bool $available = false,
bool $expected = false
) {
- $data = $this->setup_hasrestrictions_scenario($format, $addcanviewhidden, $rolename, $hasavailability, $available);
+ $data = $this->setup_hasrestrictions_scenario($format, $rolename, $hasavailability, $available);
// Get the cm state.
$courseformat = $data->courseformat;
@@ -84,7 +82,6 @@ class section_test extends \advanced_testcase {
* Setup section or cm has restrictions scenario.
*
* @param string $format the course format
- * @param bool $addcanviewhidden if the canviewhidden capabilities must be added to the role.
* @param string $rolename the user role name (editingteacher or student)
* @param bool $hasavailability if the section has availability
* @param bool $available if the section availability condition is available or not to the user
@@ -92,7 +89,6 @@ class section_test extends \advanced_testcase {
*/
private function setup_hasrestrictions_scenario(
string $format = 'topics',
- bool $addcanviewhidden = false,
string $rolename = 'editingteacher',
bool $hasavailability = false,
bool $available = false
@@ -111,13 +107,6 @@ class section_test extends \advanced_testcase {
);
$this->setUser($user);
- // Add capabilities if necessary.
- if ($addcanviewhidden) {
- $roleid = $DB->get_field('role', 'id', array('shortname' => $rolename), MUST_EXIST);
- $coursecontext = context_course::instance($course->id);
- assign_capability('moodle/course:viewhiddenactivities', CAP_ALLOW, $roleid, $coursecontext->id);
- }
-
// Set up the availability settings.
if ($hasavailability) {
$operation = ($available) ? condition::DIRECTION_UNTIL : condition::DIRECTION_FROM;
@@ -159,84 +148,140 @@ class section_test extends \advanced_testcase {
public function hasrestrictions_state_provider(): array {
return [
// Teacher scenarios (topics).
- 'Topics, can edit, has availability and is available' => [
+ 'Teacher, Topics, can edit, has availability and is available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Topics, can edit, has availability and is not available' => [
+ 'Teacher, Topics, can edit, has availability and is not available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Topics, can edit and has not availability' => [
+ 'Teacher, Topics, can edit and has not availability' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Teacher scenarios (weeks).
- 'Weeks, can edit, has availability and is available' => [
+ 'Teacher, Weeks, can edit, has availability and is available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Weeks, can edit, has availability and is not available' => [
+ 'Teacher, Weeks, can edit, has availability and is not available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Weeks, can edit and has not availability' => [
+ 'Teacher, Weeks, can edit and has not availability' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
// Teacher scenarios (mock format).
- 'Mock format, can edit, has availability and is available' => [
+ 'Teacher, Mock format, can edit, has availability and is available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => true,
'expected' => true,
],
- 'Mock format, can edit, has availability and is not available' => [
+ 'Teacher, Mock format, can edit, has availability and is not available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => true,
'available' => false,
'expected' => true,
],
- 'Mock format, can edit and has not availability' => [
+ 'Teacher, Mock format, can edit and has not availability' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'editingteacher',
'hasavailability' => false,
'available' => true,
'expected' => false,
],
+ // Non editing teacher scenarios (topics).
+ 'Non editing teacher, Topics, can edit, has availability and is available' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Topics, can edit, has availability and is not available' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Topics, can edit and has not availability' => [
+ 'format' => 'topics',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ // Non editing teacher scenarios (weeks).
+ 'Non editing teacher, Weeks, can edit, has availability and is available' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Weeks, can edit, has availability and is not available' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Weeks, can edit and has not availability' => [
+ 'format' => 'weeks',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ // Non editing teacher scenarios (mock format).
+ 'Non editing teacher, Mock format, can edit, has availability and is available' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => true,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Mock format, can edit, has availability and is not available' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => true,
+ 'available' => false,
+ 'expected' => false,
+ ],
+ 'Non editing teacher, Mock format, can edit and has not availability' => [
+ 'format' => 'theunittest',
+ 'rolename' => 'teacher',
+ 'hasavailability' => false,
+ 'available' => true,
+ 'expected' => false,
+ ],
// Student scenarios (topics).
'Topics, cannot edit, has availability and is available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
@@ -244,7 +289,6 @@ class section_test extends \advanced_testcase {
],
'Topics, cannot edit, has availability and is not available' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
@@ -252,7 +296,6 @@ class section_test extends \advanced_testcase {
],
'Topics, cannot edit and has not availability' => [
'format' => 'topics',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
@@ -261,7 +304,6 @@ class section_test extends \advanced_testcase {
// Student scenarios (weeks).
'Weeks, cannot edit, has availability and is available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
@@ -269,7 +311,6 @@ class section_test extends \advanced_testcase {
],
'Weeks, cannot edit, has availability and is not available' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
@@ -277,7 +318,6 @@ class section_test extends \advanced_testcase {
],
'Weeks, cannot edit and has not availability' => [
'format' => 'weeks',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
@@ -286,7 +326,6 @@ class section_test extends \advanced_testcase {
// Student scenarios (mock format).
'Mock format, cannot edit, has availability and is available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => true,
@@ -294,7 +333,6 @@ class section_test extends \advanced_testcase {
],
'Mock format, cannot edit, has availability and is not available' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
'rolename' => 'student',
'hasavailability' => true,
'available' => false,
@@ -302,82 +340,6 @@ class section_test extends \advanced_testcase {
],
'Mock format, cannot edit and has not availability' => [
'format' => 'theunittest',
- 'addcanviewhidden' => false,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (topics).
- 'Topics, can view hidden but not edit, has availability and is available' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Topics, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Topics, can view hidden but not edit and has not availability' => [
- 'format' => 'topics',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (weeks).
- 'Weeks, can view hidden but not edit, has availability and is available' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Weeks, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Weeks, can view hidden but not edit and has not availability' => [
- 'format' => 'weeks',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => false,
- 'available' => true,
- 'expected' => false,
- ],
- // Students with view hidden activities capabilities (mock format).
- 'Mock format, can view hidden but not edit, has availability and is available' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => true,
- 'expected' => false,
- ],
- 'Mock format, can view hidden but not edit, has availability and is not available' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
- 'rolename' => 'student',
- 'hasavailability' => true,
- 'available' => false,
- 'expected' => true,
- ],
- 'Mock format, can view hidden but not edit and has not availability' => [
- 'format' => 'theunittest',
- 'addcanviewhidden' => true,
'rolename' => 'student',
'hasavailability' => false,
'available' => true,
diff --git a/theme/boost/scss/moodle/courseindex.scss b/theme/boost/scss/moodle/courseindex.scss
index 35d587c533a..8a7715a2054 100644
--- a/theme/boost/scss/moodle/courseindex.scss
+++ b/theme/boost/scss/moodle/courseindex.scss
@@ -89,7 +89,7 @@ $courseindex-item-current: $primary !default;
.courseindex-locked {
display: none;
}
- &.rectrictions {
+ &.restrictions {
.courseindex-locked {
display: block;
}
diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css
index 75e798e952f..d76da133bb7 100644
--- a/theme/boost/style/moodle.css
+++ b/theme/boost/style/moodle.css
@@ -21376,7 +21376,7 @@ div.editor_atto_toolbar button .icon {
color: #6a737b; }
.courseindex .courseindex-item .courseindex-locked {
display: none; }
- .courseindex .courseindex-item.rectrictions .courseindex-locked {
+ .courseindex .courseindex-item.restrictions .courseindex-locked {
display: block; }
.courseindex .courseindex-item.pageitem {
background-color: #0f6cbf;
diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css
index e162bbc2b86..97b73c15b7f 100644
--- a/theme/classic/style/moodle.css
+++ b/theme/classic/style/moodle.css
@@ -21322,7 +21322,7 @@ div.editor_atto_toolbar button .icon {
color: #6a737b; }
.courseindex .courseindex-item .courseindex-locked {
display: none; }
- .courseindex .courseindex-item.rectrictions .courseindex-locked {
+ .courseindex .courseindex-item.restrictions .courseindex-locked {
display: block; }
.courseindex .courseindex-item.pageitem {
background-color: #0f6cbf;