MDL-78080 course: Duplicate section: Copy custom section options

This commit is contained in:
James C 2024-04-08 19:22:16 +12:00 committed by james-cnz
parent acf5e44fde
commit 23567ce725

View File

@ -2063,6 +2063,9 @@ abstract class base {
$newsectiondata->summaryformat = $originalsection->summaryformat;
$newsectiondata->visible = $originalsection->visible;
$newsectiondata->availability = $originalsection->availability;
foreach ($this->section_format_options() as $key => $value) {
$newsectiondata->$key = $originalsection->$key;
}
course_update_section($course, $newsection, $newsectiondata);
$modinfo = $this->get_modinfo();