From ddd91234fcc02a048a5dbd3e71c06784e242586d Mon Sep 17 00:00:00 2001 From: Justus Dieckmann Date: Wed, 15 Nov 2023 18:21:19 +0100 Subject: [PATCH] Adjust filter to new initPaella function signature from mod_opencast --- filter.php | 3 ++- templates/player.mustache | 5 +++-- version.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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 );