MDL-37028 Fixed bug, orphaned modules are moved to the 0-section

This commit is contained in:
Marina Glancy 2013-09-13 10:28:52 +10:00
parent 7ea5f0714d
commit e2e9cb6a14
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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));