mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-83331' of https://github.com/timhunt/moodle
This commit is contained in:
commit
374ce36695
@ -937,10 +937,12 @@ class behat_navigation extends behat_base {
|
||||
]);
|
||||
}
|
||||
|
||||
// This next section handles page types starting with an activity name. For example:
|
||||
// "forum activity" or "quiz activity editing".
|
||||
$parts = explode(' ', $type);
|
||||
if (count($parts) > 1) {
|
||||
$modname = $parts[0];
|
||||
if ($parts[1] === 'activity') {
|
||||
$modname = $parts[0];
|
||||
$cm = $this->get_cm_by_activity_name($modname, $identifier);
|
||||
|
||||
if (count($parts) == 2) {
|
||||
@ -962,6 +964,13 @@ class behat_navigation extends behat_base {
|
||||
// Permissions page.
|
||||
return new moodle_url('/admin/roles/permissions.php', ['contextid' => $cm->context->id]);
|
||||
}
|
||||
|
||||
} else if ($parts[1] === 'index' && count($parts) == 2) {
|
||||
$courseid = $this->get_course_id($identifier);
|
||||
if (!$courseid) {
|
||||
throw $coursenotfoundexception;
|
||||
}
|
||||
return new moodle_url("/mod/$modname/index.php", ['id' => $courseid]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,10 @@ Feature: Add forum activities and discussions
|
||||
And I follow "Edit"
|
||||
And the field "Attachment" matches value "empty.txt"
|
||||
|
||||
# Check the page that lists all the forums in a course.
|
||||
And I am on the "C1" "forum index" page
|
||||
And I should see "Test forum name"
|
||||
|
||||
Scenario: Test forum settings validation
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
|
Loading…
x
Reference in New Issue
Block a user