mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merge branch 'MDL-62666-master' of git://github.com/junpataleta/moodle
This commit is contained in:
commit
4de1ac1613
@ -3433,6 +3433,13 @@ function duplicate_module($course, $cm) {
|
||||
$rc = new restore_controller($backupid, $course->id,
|
||||
backup::INTERACTIVE_NO, backup::MODE_IMPORT, $USER->id, backup::TARGET_CURRENT_ADDING);
|
||||
|
||||
// Make sure that the restore_general_groups setting is always enabled when duplicating an activity.
|
||||
$plan = $rc->get_plan();
|
||||
$groupsetting = $plan->get_setting('groups');
|
||||
if (empty($groupsetting->get_value())) {
|
||||
$groupsetting->set_value(true);
|
||||
}
|
||||
|
||||
$cmcontext = context_module::instance($cm->id);
|
||||
if (!$rc->execute_precheck()) {
|
||||
$precheckresults = $rc->get_precheck_results();
|
||||
|
Loading…
x
Reference in New Issue
Block a user