mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-37028 fixed course-module generation
still conditionlib should be using API functions and not inserting the data directly in DB but will fix in another issue
This commit is contained in:
parent
749ce98e63
commit
aba4d0090d
@ -218,6 +218,9 @@ class core_conditionlib_testcase extends advanced_testcase {
|
||||
$record->{$name} = $value;
|
||||
}
|
||||
$sectionid = $DB->insert_record('course_sections', $record);
|
||||
foreach ($cmids as $cmid) {
|
||||
$DB->update_record('course_modules', array('section' => $sectionid, 'id' => $cmid));
|
||||
}
|
||||
rebuild_course_cache($courseid, true);
|
||||
return $sectionid;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user