MDL-80249 course: Hide secondary menu and add breadcrumb to section page

This commit is contained in:
Sara Arjona
2024-02-14 08:03:56 +01:00
parent 9ac10c4681
commit 1ea31db81c
23 changed files with 194 additions and 104 deletions
+22
View File
@@ -880,6 +880,24 @@ class base_test extends advanced_testcase {
];
}
/**
* Test can_sections_be_removed_from_navigation().
*
* @covers ::can_sections_be_removed_from_navigation
*/
public function test_can_sections_be_removed_from_navigation(): void {
$this->resetAfterTest();
$generator = $this->getDataGenerator();
$course = $generator->create_course();
$format = course_get_format($course);
$this->assertFalse($format->can_sections_be_removed_from_navigation());
$course = $generator->create_course(['format' => 'testformatsections']);
$format = course_get_format($course);
$this->assertTrue($format->can_sections_be_removed_from_navigation());
}
}
/**
@@ -923,6 +941,10 @@ class format_testformatsections extends core_courseformat\base {
public function uses_sections() {
return true;
}
public function can_sections_be_removed_from_navigation(): bool {
return true;
}
}
/**