MDL-82260 core_courseformat: sync subsections access restrictions

This commit is contained in:
ferranrecio
2024-07-26 16:56:58 +02:00
parent 72b154e33f
commit 9065e509da
6 changed files with 130 additions and 5 deletions
+15
View File
@@ -22,6 +22,7 @@ use section_info;
use core_courseformat\stateupdates;
use core_courseformat\output\local\content\section\controlmenu;
use core_courseformat\base as course_format;
use stdClass;
/**
* Section delegate base class.
@@ -133,4 +134,18 @@ abstract class sectiondelegate {
public function get_parent_section(): ?section_info {
return null;
}
/**
* Handler executed when a section has been updated.
*
* This method uses a record instead of a section_info object because
* section updates can be done in batch and the course_info may not be yet updated.
*
* This method does not need to recalculate the section_info object.
*
* @param stdClass $sectionrecord the new section data
*/
public function section_updated(stdClass $sectionrecord): void {
// By default, do nothing.
}
}