MDL-74475 behat: Option to jump to course edit page

This commit is contained in:
Amaia Anabitarte
2022-08-03 10:29:39 +02:00
parent 3436523f17
commit b3fab1d80e
+9
View File
@@ -718,6 +718,7 @@ class behat_navigation extends behat_base {
* | Page type | Identifier meaning | description |
* | Category | category idnumber | List of courses in that category. |
* | Course | course shortname | Main course home pag |
* | Course editing | course shortname | Edit settings page for the course |
* | Activity | activity idnumber | Start page for that activity |
* | Activity editing | activity idnumber | Edit settings page for that activity |
* | [modname] Activity | activity name or idnumber | Start page for that activity |
@@ -745,6 +746,14 @@ class behat_navigation extends behat_base {
}
return new moodle_url('/course/index.php', ['categoryid' => $categoryid]);
case 'course editing':
$courseid = $this->get_course_id($identifier);
if (!$courseid) {
throw new Exception('The specified course with shortname, fullname, or idnumber "' .
$identifier . '" does not exist');
}
return new moodle_url('/course/edit.php', ['id' => $courseid]);
case 'course':
$courseid = $this->get_course_id($identifier);
if (!$courseid) {