mirror of
https://github.com/moodle/moodle.git
synced 2025-04-04 16:04:00 +02:00
Merge branch 'MDL-72753-master' of git://github.com/ilyatregubov/moodle
This commit is contained in:
commit
2ef38aa865
@ -318,11 +318,10 @@ class page_requirements_manager {
|
||||
if (!is_null($page->context)) {
|
||||
$contextid = $page->context->id;
|
||||
$contextinstanceid = $page->context->instanceid;
|
||||
$courseid = $page->course->id;
|
||||
$coursecontext = context_course::instance($courseid);
|
||||
}
|
||||
|
||||
$courseid = $page->course->id;
|
||||
$coursecontext = context_course::instance($courseid);
|
||||
|
||||
$this->M_cfg = array(
|
||||
'wwwroot' => $CFG->wwwroot,
|
||||
'sesskey' => sesskey(),
|
||||
@ -336,8 +335,8 @@ class page_requirements_manager {
|
||||
'admin' => $CFG->admin,
|
||||
'svgicons' => $page->theme->use_svg_icons(),
|
||||
'usertimezone' => usertimezone(),
|
||||
'courseId' => (int) $courseid,
|
||||
'courseContextId' => $coursecontext->id,
|
||||
'courseId' => isset($courseid) ? (int) $courseid : 0,
|
||||
'courseContextId' => isset($coursecontext) ? $coursecontext->id : 0,
|
||||
'contextid' => $contextid,
|
||||
'contextInstanceId' => (int) $contextinstanceid,
|
||||
'langrev' => get_string_manager()->get_revision(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user