MDL-68068 core_h5p: Replace $_SESSION by $SESSION
[moodle.git] / h5p / h5plib / v124 / joubel / core / readme_moodle.txt
CommitLineData
45899564
AA
1H5P PHP library
2---------------
3
4Downloaded last release from: https://github.com/h5p/h5p-php-library/releases
5
6Import procedure:
7
8- Copy all the files from the folder repository in this directory.
9
10Removed:
11 * composer.json
12 * .gitignore
13
14Added:
15 * readme_moodle.txt
16
5da7a7fc
SA
17Downloaded version: 1.24 release
18
254add38 19Changes:
5da7a7fc 201. In order to allow the dependency path to be overridden by child H5PCore classes, a couple of minor changes have been added to the
6faafc0c
AN
21h5p.classes.php file:
22 - Into the getDependenciesFiles method, the line 2435:
23 $dependency['path'] = 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
24
25 has been changed to:
5da7a7fc 26 $dependency['path'] = $this->getDependencyPath($dependency);
6faafc0c
AN
27
28 - The method getDependencyPath has been added (line 2455). It might be rewritten by child classes.
29A PR has been sent to the H5P library with these changes:
30https://github.com/h5p/h5p-php-library/compare/master...andrewnicols:libraryPathSubclass
5da7a7fc
SA
31Hopefully, when upgrading, these patch won't be needed because it will be included in the H5P library by default.
32
33
342. As the mbstring extension is optional in Moodle, the following changes have been hardcoded to the library:
352.1. Comment the following methods in h5p.classes.php file where the extension_loaded('mbstring') is called:
36 * isValidPackage
37 * checkSetupErrorMessage
38 * validateText
39 * validateContentFiles
40
412.2. Change all the mb_uses straight to the core_text() alternatives. Version 1.24 has 3 ocurrences in h5p.classes.php
42and 1 ocurrence in h5p-metadata.class.php.
43
712a321d
EL
443. Another PR has been sent to H5P library (https://github.com/h5p/h5p-php-library/pull/69) to fix some php74 minor problems. The same fix is being applied locally by MDL-67077. Once we import a new version, if it includes de fix, this won't be needed to reapply and can be removed.
45
254add38 464. Replace the $_SESSION references to $SESSION. That implies that the information is saved to backends, so only the Moodle one should be used by core (core should be free from $_SESSION and always use $SESSION).
47h5p.classes.php file:
48 - Into hashToken method:
49 Declare the global $SESSION.
50 Change all the $_SESSION by $SESSION.
51A script for testing this part can be found in MDL-68068
5da7a7fc
SA
52
53The point 2 from above won't be needed once the mbstring extension becomes mandatory in Moodle. A request has been
254add38 54sent to MDL-65809.