MDL-37966 Assignment: put upgraded modules where the originals were
authorJonathon Fowler <fowlerj@usq.edu.au>
Wed, 27 Mar 2013 02:40:28 +0000 (12:40 +1000)
committerJonathon Fowler <fowlerj@usq.edu.au>
Wed, 27 Mar 2013 02:40:28 +0000 (12:40 +1000)
mod/assign/upgradelib.php

index 12baafb..65e0b51 100644 (file)
@@ -396,7 +396,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.