mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Revert "Merge branch 'MDL-45229-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE"
This reverts commitd6eb354664
, reversing changes made to93b2d3baca
.
This commit is contained in:
parent
a632d590f3
commit
cb5260014a
2 changed files with 1 additions and 18 deletions
|
@ -1744,10 +1744,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
|||
array(
|
||||
'objectid' => $section->id,
|
||||
'courseid' => $course->id,
|
||||
'context' => context_course::instance($course->id),
|
||||
'other' => array(
|
||||
'sectionnum' => $section->section
|
||||
)
|
||||
'context' => context_course::instance($course->id)
|
||||
)
|
||||
);
|
||||
$event->add_record_snapshot('course_sections', $section);
|
||||
|
@ -1764,7 +1761,6 @@ class core_course_courselib_testcase extends advanced_testcase {
|
|||
$this->assertEquals($section->id, $event->objectid);
|
||||
$this->assertEquals($course->id, $event->courseid);
|
||||
$this->assertEquals($coursecontext->id, $event->contextid);
|
||||
$this->assertEquals($section->section, $event->other['sectionnum']);
|
||||
$expecteddesc = 'Course ' . $event->courseid . ' section ' . $event->other['sectionnum'] . ' updated by user ' . $event->userid;
|
||||
$this->assertEquals($expecteddesc, $event->get_description());
|
||||
$this->assertEquals($section, $event->get_record_snapshot('course_sections', $event->objectid));
|
||||
|
|
|
@ -83,17 +83,4 @@ class course_section_updated extends base {
|
|||
$sectiondata = $this->get_record_snapshot('course_sections', $this->objectid);
|
||||
return array($this->courseid, 'course', 'editsection', 'editsection.php?id=' . $this->objectid, $sectiondata->section);
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
parent::validate_data();
|
||||
if (!isset($this->other['sectionnum'])) {
|
||||
throw new \coding_exception('The sectionnum must be set in $other');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue