Skip to content
Snippets Groups Projects
Commit b59874ee authored by Frode Petterson's avatar Frode Petterson
Browse files

Merge branch 'content-hub' of github.com:h5p/moodle-mod_hvp into content-hub

parents 64c97759 b9c7d86d
No related branches found
No related tags found
No related merge requests found
...@@ -71,9 +71,6 @@ try { ...@@ -71,9 +71,6 @@ try {
$context = context_module::instance($cm->id); $context = context_module::instance($cm->id);
require_capability('mod/hvp:view', $context); require_capability('mod/hvp:view', $context);
// Unlock session during embed.
core\session\manager::write_close();
// Set up view assets. // Set up view assets.
$view = new \mod_hvp\view_assets($cm, $course, [ $view = new \mod_hvp\view_assets($cm, $course, [
'disabledownload' => $disabledownload, 'disabledownload' => $disabledownload,
...@@ -82,6 +79,9 @@ $view = new \mod_hvp\view_assets($cm, $course, [ ...@@ -82,6 +79,9 @@ $view = new \mod_hvp\view_assets($cm, $course, [
$content = $view->getcontent(); $content = $view->getcontent();
$view->validatecontent(); $view->validatecontent();
// Release session while loading the rest of our assets.
core\session\manager::write_close();
// Configure page. // Configure page.
$PAGE->set_url(new \moodle_url('/mod/hvp/embed.php', array('id' => $id))); $PAGE->set_url(new \moodle_url('/mod/hvp/embed.php', array('id' => $id)));
$PAGE->set_title(format_string($content['title'])); $PAGE->set_title(format_string($content['title']));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment