Skip to content
Snippets Groups Projects
Commit ce2bff49 authored by Thomas Marstrander's avatar Thomas Marstrander
Browse files

Add settings

parent 526693aa
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,13 @@ class mobile { ...@@ -42,6 +42,13 @@ class mobile {
// TODO: Import js from other file // TODO: Import js from other file
$scripts = $view->getjsassets(); $scripts = $view->getjsassets();
$corescripts = $view->getcorejsassets(); $corescripts = $view->getcorejsassets();
$h5pintegration = $view->getSettings();
$jscontent = 'window.H5PIntegration = ' . json_encode($h5pintegration) . ';';
$jscontent .= file_get_contents($CFG->dirroot . '/mod/hvp/library/js/jquery.js');
$jscontent .= file_get_contents($CFG->dirroot . '/mod/hvp/library/js/h5p.js');
// $jscontent .= file_get_contents($CFG->dirroot . '/mod/hvp/library/js/h5p-event-dispatcher.js');
return array( return array(
'templates' => array( 'templates' => array(
...@@ -50,7 +57,7 @@ class mobile { ...@@ -50,7 +57,7 @@ class mobile {
'html' => $html, 'html' => $html,
), ),
), ),
'javascript' => 'console.log("Add JS here..")', 'javascript' => $jscontent,
); );
} }
} }
...@@ -5,7 +5,6 @@ $addons = array( ...@@ -5,7 +5,6 @@ $addons = array(
'coursehvp' => array( // Handler unique name (alphanumeric). 'coursehvp' => array( // Handler unique name (alphanumeric).
'delegate' => 'CoreCourseModuleDelegate', // Delegate (where to display the link to the plugin) 'delegate' => 'CoreCourseModuleDelegate', // Delegate (where to display the link to the plugin)
'method' => 'mobile_course_view', // Main function in \mod_certificate\output\mobile 'method' => 'mobile_course_view', // Main function in \mod_certificate\output\mobile
'init' => 'mobile_course_init', // TODO: Perhaps concatenate core scripts here ?
'displaydata' => array( 'displaydata' => array(
'icon' => $CFG->wwwroot . '/mod/hvp/pix/icon.svg', 'icon' => $CFG->wwwroot . '/mod/hvp/pix/icon.svg',
'class' => '', 'class' => '',
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 2018113000; $plugin->version = 2019022500;
$plugin->requires = 2013051403; $plugin->requires = 2013051403;
$plugin->cron = 0; $plugin->cron = 0;
$plugin->component = 'mod_hvp'; $plugin->component = 'mod_hvp';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment