Merge branch 'MDL-71955' of https://github.com/paulholden/moodle
This commit is contained in:
+9
-1
@@ -51,7 +51,15 @@ try {
|
||||
|
||||
if (empty($messages->error) && empty($messages->exception)) {
|
||||
// Configure page.
|
||||
$PAGE->set_context($h5pplayer->get_context());
|
||||
$context = $h5pplayer->get_context();
|
||||
if ($context instanceof context_module) {
|
||||
[$course, $cm] = get_course_and_cm_from_cmid($context->instanceid);
|
||||
$PAGE->set_cm($cm, $course);
|
||||
$PAGE->activityheader->disable();
|
||||
} else {
|
||||
$PAGE->set_context($context);
|
||||
}
|
||||
|
||||
$PAGE->set_title($h5pplayer->get_title());
|
||||
$PAGE->set_heading($h5pplayer->get_title());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user