Merge branch 'MDL-37966' of git://github.com/jonof/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 30 Apr 2013 04:26:47 +0000 (12:26 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 30 Apr 2013 04:26:47 +0000 (12:26 +0800)
mod/assign/upgradelib.php

index 9415f47..e3899dd 100644 (file)
@@ -405,7 +405,7 @@ class assign_upgrade_manager {
             return false;
         }
 
-        $newcm->section = course_add_cm_to_section($newcm->course, $newcm->id, $section->section);
+        $newcm->section = course_add_cm_to_section($newcm->course, $newcm->id, $section->section, $cm->id);
 
         // Make sure visibility is set correctly (in particular in calendar).
         // Note: Allow them to set it even without moodle/course:activityvisibility.