From c87e52f5778cf4a7ab9c911e4eeb0ebf5814aca0 Mon Sep 17 00:00:00 2001 From: ferranrecio Date: Fri, 19 Jul 2024 06:25:18 +0200 Subject: [PATCH] MDL-82260 course: add behat section settings page url --- course/tests/behat/behat_course.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index 28a0ca7eb1e..5caedc4b850 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -178,7 +178,11 @@ class behat_course extends behat_base { */ protected function resolve_page_instance_url(string $type, string $identifier): moodle_url { $type = strtolower($type); + + $sectionpage = 'section.php'; switch ($type) { + case 'section settings': + $sectionpage = 'editsection.php'; case 'section': $identifiers = explode('>', $identifier); $identifiers = array_map('trim', $identifiers); @@ -196,7 +200,7 @@ class behat_course extends behat_base { if (!$section) { throw new Exception("The specified section $identifier does not exist."); } - return new moodle_url('/course/section.php', ['id' => $section->id]); + return new moodle_url('/course/' . $sectionpage, ['id' => $section->id]); } throw new Exception('Unrecognised core page type "' . $type . '."'); }