mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-67057-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
d5e303f8e3
@ -51,6 +51,7 @@ class helper {
|
||||
\core_php_time_limit::raise();
|
||||
|
||||
$core = $factory->get_core();
|
||||
$core->h5pF->set_file($file);
|
||||
$path = $core->fs->getTmpPath();
|
||||
$core->h5pF->getUploadedH5pFolderPath($path);
|
||||
// Add manually the extension to the file to avoid the validation fails.
|
||||
|
@ -285,9 +285,6 @@ class player {
|
||||
// content-type libraries exist, to avoid users without the h5p:updatelibraries capability upload malicious content.
|
||||
$onlyupdatelibs = !helper::can_update_library($file);
|
||||
|
||||
// Set the .h5p file, in order to check later the permissions to update libraries.
|
||||
$this->core->h5pF->set_file($file);
|
||||
|
||||
// Validate and store the H5P content before displaying it.
|
||||
$h5pid = helper::save_h5p($this->factory, $file, $config, $onlyupdatelibs, false);
|
||||
if (!$h5pid && $file->get_userid() != $USER->id && has_capability('moodle/h5p:updatelibraries', $this->context)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user