Skip to content
Snippets Groups Projects
Commit ddd91234 authored by Justus Dieckmann's avatar Justus Dieckmann
Browse files

Adjust filter to new initPaella function signature from mod_opencast

parent 2864cbe5
Branches
No related tags found
No related merge requests found
...@@ -123,7 +123,8 @@ class filter_opencast extends moodle_text_filter { ...@@ -123,7 +123,8 @@ class filter_opencast extends moodle_text_filter {
// Collect the needed data being submitted to the template. // Collect the needed data being submitted to the template.
$mustachedata = new stdClass(); $mustachedata = new stdClass();
$mustachedata->playerid = 'ocplayer_' . $i++; $mustachedata->playerid = 'ocplayer_' . $i++;
$mustachedata->configurl = get_config('filter_opencast', 'configurl_' . $ocinstance->id); $mustachedata->configurl = (new moodle_url(get_config('filter_opencast', 'configurl_' . $ocinstance->id)))->out(false);
$mustachedata->themeurl = (new moodle_url(get_config('mod_opencast', 'themeurl_' . $ocinstance->id)))->out(false);
if (strpos($mustachedata->configurl, 'http') === false) { if (strpos($mustachedata->configurl, 'http') === false) {
$mustachedata->configurl = (new moodle_url($mustachedata->configurl))->out(); $mustachedata->configurl = (new moodle_url($mustachedata->configurl))->out();
} }
......
...@@ -49,8 +49,9 @@ function init_{{playerid}}() { ...@@ -49,8 +49,9 @@ function init_{{playerid}}() {
} }
else { else {
iframeWindow.MoodlePaellaPlayer.initPaella( iframeWindow.MoodlePaellaPlayer.initPaella(
'{{configurl}}', '{{{configurl}}}',
JSON.parse('{{data}}'.replaceAll('"', '"')) '{{{themeurl}}}',
JSON.parse('{{{data}}}')
); );
} }
} }
......
...@@ -31,5 +31,5 @@ $plugin->requires = 2020061500; // Requires Moodle 3.9+. ...@@ -31,5 +31,5 @@ $plugin->requires = 2020061500; // Requires Moodle 3.9+.
$plugin->maturity = MATURITY_ALPHA; $plugin->maturity = MATURITY_ALPHA;
$plugin->dependencies = array( $plugin->dependencies = array(
'tool_opencast' => 2023030100, 'tool_opencast' => 2023030100,
'mod_opencast' => 2023030100 'mod_opencast' => 2023052300
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment