-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.0.6
-
MOODLE_400_STABLE
Hallo,
We want to automate updating h5p content. We had a idee to achieve this via file system repository and "link to file". But when we tried that we got a error.
Steps to reproduce
- Setup a File system repository: https://docs.moodle.org/401/en/File_system_repository (we picked this so we can upate h5p content via scripts)
- When creating a course. and pick a h5p activity from the file system repository. We select "link to file". (In the hope that if that files is updated. it will pick the latest version.)
https://drive.google.com/file/d/1uOhRRSwXAdJQhIMQ4LooiDTXgqroy0uO/view - After i click "save and display i get to following error:
error/filereferenceproblem
|
More information about this error |
Debug info: Invalid base64 format
|
Error code: filereferenceproblem
|
$a contents: stdClass Object
|
(
|
[repositoryid] =>
|
[reference] => /link.h5p
|
[referencefileid] =>
|
[fileid] =>
|
)
|
Stack trace:
|
|
line 1957 of /lib/filestorage/file_storage.php: file_reference_exception thrown |
line 250 of /h5p/classes/api.php: call to file_storage::unpack_reference() line 182 of /h5p/classes/player.php: call to core_h5p\api::get_original_content_from_pluginfile_url() |
line 79 of /mod/h5pactivity/view.php: call to core_h5p\player::display( |
https://drive.google.com/file/d/1XWfw-INvPXuI_I7Ns_cJwQLMBbSponUL/view?usp=sharing
The version of Moodle I am using is: moodle 4.0.3 (build: 20220822). via bitnami container.
# What i expect
That you can use "link to file" from a File system repository to h5p content.
And when I use link to file, and the file is updated in file system repository, the h5p content is updated.
# P.S.
Is there a alternative for updating h5p content via script. without manual actions?