Permalink
Browse files

Merge branch 'MDL-37563-23' of git://github.com/damyon/moodle into MO…

…ODLE_23_STABLE
  • Loading branch information...
2 parents 9d2f746 + 7a6d23e commit 8f3ae32b888d57cf7cf66276eb94833b2df31161 Sam Hemelryk committed Jan 21, 2013
Showing with 14 additions and 0 deletions.
  1. +14 −0 mod/assign/upgradelib.php
View
@@ -156,6 +156,20 @@ public function upgrade_assignment($oldassignmentid, & $log) {
$gradingdefinitions = $DB->get_records('grading_definitions', array('areaid'=>$gradingarea->id));
}
+ // Upgrade availability data.
+ $DB->set_field('course_modules_availability',
+ 'coursemoduleid',
+ $newcoursemodule->id,
+ array('coursemoduleid'=>$oldcoursemodule->id));
+ $DB->set_field('course_modules_availability',
+ 'sourcecmid',
+ $newcoursemodule->id,
+ array('sourcecmid'=>$oldcoursemodule->id));
+ $DB->set_field('course_sections_availability',
+ 'sourcecmid',
+ $newcoursemodule->id,
+ array('sourcecmid'=>$oldcoursemodule->id));
+
// upgrade completion data
$DB->set_field('course_modules_completion', 'coursemoduleid', $newcoursemodule->id, array('coursemoduleid'=>$oldcoursemodule->id));
$allcriteria = $DB->get_records('course_completion_criteria', array('moduleinstance'=>$oldcoursemodule->id));

0 comments on commit 8f3ae32

Please sign in to comment.