mirror of
https://github.com/moodle/moodle.git
synced 2025-07-17 04:11:29 +02:00
MDL-37028 Fixed bug, orphaned modules are moved to the 0-section
This commit is contained in:
@@ -949,7 +949,7 @@ function course_integrity_check($courseid, $rawmods = null, $sections = null, $f
|
|||||||
}
|
}
|
||||||
$sections[$modsection[$cmid]]->newsequence = trim($sections[$modsection[$cmid]]->newsequence.','.$cmid, ',');
|
$sections[$modsection[$cmid]]->newsequence = trim($sections[$modsection[$cmid]]->newsequence.','.$cmid, ',');
|
||||||
$messages[] = $debuggingprefix.'Course module ['.$cmid.'] is missing from sequence of section ['.
|
$messages[] = $debuggingprefix.'Course module ['.$cmid.'] is missing from sequence of section ['.
|
||||||
$sectionid.']';
|
$modsection[$cmid].']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($modsection as $cmid => $sectionid) {
|
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' => ''));
|
$DB->update_record('course_sections', array('id' => $section1->id, 'sequence' => ''));
|
||||||
$this->assertEquals(array(
|
$this->assertEquals(array(
|
||||||
'Failed integrity check for course ['. $course->id. ']. Course module ['. $page->cmid.
|
'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.
|
'Failed integrity check for course ['. $course->id. ']. Course module ['. $page->cmid.
|
||||||
'] points to section [8765] instead of ['. $section0->id. ']'),
|
'] points to section [8765] instead of ['. $section0->id. ']'),
|
||||||
course_integrity_check($course->id, null, null, true));
|
course_integrity_check($course->id, null, null, true));
|
||||||
|
Reference in New Issue
Block a user