diff --git a/filter/displayh5p/db/upgrade.php b/filter/displayh5p/db/upgrade.php index 97c4a3b8191..734f1c19b17 100644 --- a/filter/displayh5p/db/upgrade.php +++ b/filter/displayh5p/db/upgrade.php @@ -45,5 +45,17 @@ function xmldb_filter_displayh5p_upgrade($oldversion) { // Automatically generated Moodle v3.8.0 release upgrade line. // Put any upgrade step following this. + if ($oldversion < 2020031700) { + // References to h5p.org has to be removed as default value for the allowedsources in the filter because H5P is going + // to close it down completely so that only the author can see the test content. + $h5porgurl = 'https://h5p.org/h5p/embed/[id]'; + $config = get_config('filter_displayh5p', 'allowedsources'); + if (strpos($config, $h5porgurl) !== false) { + set_config('allowedsources', str_replace($h5porgurl, '', $config), 'filter_displayh5p'); + } + + upgrade_plugin_savepoint(true, 2020031700, 'filter', 'displayh5p'); + } + return true; } diff --git a/filter/displayh5p/lang/en/filter_displayh5p.php b/filter/displayh5p/lang/en/filter_displayh5p.php index dfb1f12c938..d8fc4313d10 100644 --- a/filter/displayh5p/lang/en/filter_displayh5p.php +++ b/filter/displayh5p/lang/en/filter_displayh5p.php @@ -27,6 +27,10 @@ defined('MOODLE_INTERNAL') || die; $string['allowedsourceslist'] = 'Allowed sources'; $string['allowedsourceslistdesc'] = 'A list of URLs from which users can embed H5P content. If none are specified, all URLs will remain as links and not be displayed as embedded H5P content. -\'[id]\' is a placeholder for the H5P content ID in the external source.'; +\'[id]\' is a placeholder for the H5P content ID in the external source. +For example: + +- H5P.com: https://[xxxxxx].h5p.com/content/[id] +- Wordpress: http://myserver/wp-admin/admin-ajax.php?action=h5p_embed&id=[id]'; $string['filtername'] = 'Display H5P'; $string['privacy:metadata'] = 'The display H5P filter does not store any personal data.'; diff --git a/filter/displayh5p/settings.php b/filter/displayh5p/settings.php index 3bed622ac2e..329155a6b73 100644 --- a/filter/displayh5p/settings.php +++ b/filter/displayh5p/settings.php @@ -30,5 +30,5 @@ if ($ADMIN->fulltree) { get_string('allowedsourceslist', 'filter_displayh5p'), get_string('allowedsourceslistdesc', 'filter_displayh5p'), - "https://h5p.org/h5p/embed/[id]")); + '')); } diff --git a/filter/displayh5p/version.php b/filter/displayh5p/version.php index 88a30383656..e936737a100 100644 --- a/filter/displayh5p/version.php +++ b/filter/displayh5p/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2019111800; +$plugin->version = 2020031700; $plugin->requires = 2019111200; $plugin->component = 'filter_displayh5p';