MDL-82260 course: add hidden course field to edit section form
A course id hidden field is needed to edit availability conditions directly from behat. This fields is not relevant to normal execution but it is not harmfull as section update will ignore it.
This commit is contained in:
@@ -47,6 +47,9 @@ class editsection_form extends moodleform {
|
||||
$mform->addElement('hidden', 'id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'course', 0);
|
||||
$mform->setType('course', PARAM_INT);
|
||||
|
||||
// additional fields that course format has defined
|
||||
$courseformat = course_get_format($course);
|
||||
$formatoptions = $courseformat->section_format_options(true);
|
||||
|
||||
Reference in New Issue
Block a user