diff --git a/filter.php b/filter.php index c476d03..ce2ae33 100644 --- a/filter.php +++ b/filter.php @@ -123,7 +123,8 @@ public function filter($text, array $options = array()) { // Collect the needed data being submitted to the template. $mustachedata = new stdClass(); $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) { $mustachedata->configurl = (new moodle_url($mustachedata->configurl))->out(); } diff --git a/templates/player.mustache b/templates/player.mustache index e94ef4b..60b5499 100644 --- a/templates/player.mustache +++ b/templates/player.mustache @@ -49,8 +49,9 @@ function init_{{playerid}}() { } else { iframeWindow.MoodlePaellaPlayer.initPaella( - '{{configurl}}', - JSON.parse('{{data}}'.replaceAll('"', '"')) + '{{{configurl}}}', + '{{{themeurl}}}', + JSON.parse('{{{data}}}') ); } } diff --git a/version.php b/version.php index 9c766ba..eeb7b4a 100644 --- a/version.php +++ b/version.php @@ -31,5 +31,5 @@ $plugin->maturity = MATURITY_ALPHA; $plugin->dependencies = array( 'tool_opencast' => 2023030100, - 'mod_opencast' => 2023030100 + 'mod_opencast' => 2023052300 );