Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…ODLE_24_STABLE
  • Loading branch information...
commit dc5e0d1665545002462f1fa7f5155b7d2d574008 2 parents be8bc2d + f213003
@samhemelryk samhemelryk authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 mod/assign/upgradelib.php
View
18 mod/assign/upgradelib.php
@@ -165,6 +165,24 @@ public function upgrade_assignment($oldassignmentid, & $log) {
$gradingdefinitions = $DB->get_records('grading_definitions', array('areaid'=>$gradingarea->id));
}
+ // Upgrade availability data.
+ $DB->set_field('course_modules_avail_fields',
+ 'coursemoduleid',
+ $newcoursemodule->id,
+ array('coursemoduleid'=>$oldcoursemodule->id));
+ $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));
Please sign in to comment.
Something went wrong with that request. Please try again.