mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Merge branch 'MDL-77461-master' of https://github.com/andrewnicols/moodle
This commit is contained in:
commit
32fd742690
@ -763,8 +763,6 @@ class behat_navigation extends behat_base {
|
||||
* @throws Exception with a meaningful error message if the specified page cannot be found.
|
||||
*/
|
||||
protected function resolve_core_page_instance_url(string $type, string $identifier): moodle_url {
|
||||
global $DB;
|
||||
|
||||
$type = strtolower($type);
|
||||
|
||||
switch ($type) {
|
||||
@ -920,9 +918,8 @@ class behat_navigation extends behat_base {
|
||||
* @return void
|
||||
*/
|
||||
public function i_am_on_course_homepage($coursefullname) {
|
||||
global $DB;
|
||||
$course = $DB->get_record("course", array("fullname" => $coursefullname), 'id', MUST_EXIST);
|
||||
$url = new moodle_url('/course/view.php', ['id' => $course->id]);
|
||||
$courseid = $this->get_course_id($coursefullname);
|
||||
$url = new moodle_url('/course/view.php', ['id' => $courseid]);
|
||||
$this->execute('behat_general::i_visit', [$url]);
|
||||
}
|
||||
|
||||
@ -944,10 +941,8 @@ class behat_navigation extends behat_base {
|
||||
* @param string $onoroff Whehter to switch editing on, or off.
|
||||
*/
|
||||
public function i_am_on_course_homepage_with_editing_mode_set_to(string $coursefullname, string $onoroff): void {
|
||||
global $DB;
|
||||
|
||||
$course = $DB->get_record("course", array("fullname" => $coursefullname), 'id', MUST_EXIST);
|
||||
$url = new moodle_url('/course/view.php', ['id' => $course->id]);
|
||||
$courseid = $this->get_course_id($coursefullname);
|
||||
$url = new moodle_url('/course/view.php', ['id' => $courseid]);
|
||||
|
||||
// Visit the course page.
|
||||
$this->execute('behat_general::i_visit', [$url]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user