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:
ferranrecio
2024-07-26 11:16:38 +02:00
parent c87e52f577
commit 72b154e33f
+3
View File
@@ -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);