mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-37028 Fixed bug, orphaned modules are moved to the 0-section
This commit is contained in:
parent
7ea5f0714d
commit
e2e9cb6a14
@ -949,7 +949,7 @@ function course_integrity_check($courseid, $rawmods = null, $sections = null, $f
|
||||
}
|
||||
$sections[$modsection[$cmid]]->newsequence = trim($sections[$modsection[$cmid]]->newsequence.','.$cmid, ',');
|
||||
$messages[] = $debuggingprefix.'Course module ['.$cmid.'] is missing from sequence of section ['.
|
||||
$sectionid.']';
|
||||
$modsection[$cmid].']';
|
||||
}
|
||||
}
|
||||
foreach ($modsection as $cmid => $sectionid) {
|
||||
|
@ -1866,7 +1866,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$DB->update_record('course_sections', array('id' => $section1->id, 'sequence' => ''));
|
||||
$this->assertEquals(array(
|
||||
'Failed integrity check for course ['. $course->id. ']. Course module ['. $page->cmid.
|
||||
'] is missing from sequence of section ['. $section1->id. ']',
|
||||
'] is missing from sequence of section ['. $section0->id. ']',
|
||||
'Failed integrity check for course ['. $course->id. ']. Course module ['. $page->cmid.
|
||||
'] points to section [8765] instead of ['. $section0->id. ']'),
|
||||
course_integrity_check($course->id, null, null, true));
|
||||
|
Loading…
x
Reference in New Issue
Block a user