mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
Merge branch 'MDL-71795-master' of git://github.com/ferranrecio/moodle
This commit is contained in:
commit
8b7fb0f7ab
11 changed files with 151 additions and 17 deletions
|
@ -314,10 +314,15 @@ class page_requirements_manager {
|
|||
|
||||
// It is possible that the $page->context is null, so we can't use $page->context->id.
|
||||
$contextid = null;
|
||||
$contextinstanceid = null;
|
||||
if (!is_null($page->context)) {
|
||||
$contextid = $page->context->id;
|
||||
$contextinstanceid = $page->context->instanceid;
|
||||
}
|
||||
|
||||
$courseid = $page->course->id;
|
||||
$coursecontext = context_course::instance($courseid);
|
||||
|
||||
$this->M_cfg = array(
|
||||
'wwwroot' => $CFG->wwwroot,
|
||||
'sesskey' => sesskey(),
|
||||
|
@ -331,8 +336,10 @@ class page_requirements_manager {
|
|||
'admin' => $CFG->admin,
|
||||
'svgicons' => $page->theme->use_svg_icons(),
|
||||
'usertimezone' => usertimezone(),
|
||||
'courseId' => (int) $page->course->id,
|
||||
'courseId' => (int) $courseid,
|
||||
'courseContextId' => $coursecontext->id,
|
||||
'contextid' => $contextid,
|
||||
'contextInstanceId' => (int) $contextinstanceid,
|
||||
'langrev' => get_string_manager()->get_revision(),
|
||||
'templaterev' => $this->get_templaterev()
|
||||
);
|
||||
|
|
|
@ -1119,7 +1119,7 @@ class behat_navigation extends behat_base {
|
|||
"//nav[@aria-label='Navigation bar']/ol/li[last()][contains(normalize-space(.), '" . $pagename . "')]"
|
||||
);
|
||||
if (!$link) {
|
||||
$this->execute("behat_general::click_link", $pagename);
|
||||
$this->execute("behat_general::i_click_on_in_the", [$pagename, 'link', 'page', 'region']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue