mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-68116 filter_h5p: remove h5p.org from allowed sources
h5p.org has to be removed as default value for the allowedsources in the "Display H5P" filter because H5P is going to close it down completely so that only the author can see the test content.
This commit is contained in:
parent
f2fc4a9fa1
commit
728f0fb587
@ -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;
|
||||
}
|
||||
|
@ -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.';
|
||||
|
@ -30,5 +30,5 @@ if ($ADMIN->fulltree) {
|
||||
get_string('allowedsourceslist',
|
||||
'filter_displayh5p'),
|
||||
get_string('allowedsourceslistdesc', 'filter_displayh5p'),
|
||||
"https://h5p.org/h5p/embed/[id]"));
|
||||
''));
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2019111800;
|
||||
$plugin->version = 2020031700;
|
||||
$plugin->requires = 2019111200;
|
||||
$plugin->component = 'filter_displayh5p';
|
||||
|
Loading…
x
Reference in New Issue
Block a user