From 72b154e33fa263cd041d068083e87dc23bc3caec Mon Sep 17 00:00:00 2001 From: ferranrecio Date: Fri, 19 Jul 2024 06:25:41 +0200 Subject: [PATCH] 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. --- course/editsection_form.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/course/editsection_form.php b/course/editsection_form.php index 2e4f5babafd..4ea413b5f3e 100644 --- a/course/editsection_form.php +++ b/course/editsection_form.php @@ -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);