mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
Merge branch 'MDL-80919' of https://github.com/paulholden/moodle
This commit is contained in:
commit
d567ba9a81
@ -2012,9 +2012,13 @@ abstract class base {
|
||||
course_update_section($course, $newsection, $newsection);
|
||||
|
||||
$modinfo = $this->get_modinfo();
|
||||
foreach ($modinfo->sections[$originalsection->section] as $modnumber) {
|
||||
$originalcm = $modinfo->cms[$modnumber];
|
||||
duplicate_module($course, $originalcm, $newsection->id, false);
|
||||
|
||||
// Duplicate the section modules, should they exist.
|
||||
if (array_key_exists($originalsection->section, $modinfo->sections)) {
|
||||
foreach ($modinfo->sections[$originalsection->section] as $modnumber) {
|
||||
$originalcm = $modinfo->cms[$modnumber];
|
||||
duplicate_module($course, $originalcm, $newsection->id, false);
|
||||
}
|
||||
}
|
||||
|
||||
return get_fast_modinfo($course)->get_section_info_by_id($newsection->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user