Skip to content

Commit

Permalink
Merge pull request #37 from justusdieckmann/update/403
Browse files Browse the repository at this point in the history
Adjust filter to new initPaella function signature from mod_opencast
  • Loading branch information
NinaHerrmann authored Nov 16, 2023
2 parents 2864cbe + ddd9123 commit ca66e20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
5 changes: 3 additions & 2 deletions templates/player.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ function init_{{playerid}}() {
}
else {
iframeWindow.MoodlePaellaPlayer.initPaella(
'{{configurl}}',
JSON.parse('{{data}}'.replaceAll('"', '"'))
'{{{configurl}}}',
'{{{themeurl}}}',
JSON.parse('{{{data}}}')
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
$plugin->maturity = MATURITY_ALPHA;
$plugin->dependencies = array(
'tool_opencast' => 2023030100,
'mod_opencast' => 2023030100
'mod_opencast' => 2023052300
);

0 comments on commit ca66e20

Please sign in to comment.