Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.8, 3.9
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-67095-master -
Description
When deploying a new H5P resource we need to ensure that we don't start deploying the same H5P in another thread (e.g. for another session/user).
At the moment this is possible:
- Login as a user and upload the course-presentation.h5p
- Use the test-h5p.html file to test it
- Whilst it unpacks open a different browser or a private browsing tab
- Log in at the same user (or a different one) and view the same h5p file again
- Wait
- Observe that in the 2nd and all subsequent loads we get a warning:
Error: mdb->get_record() found more than one record!
line 1599 of /lib/dml/moodle_database.php: call to debugging()
line 1559 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1538 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 235 of /h5p/classes/player.php: call to moodle_database->get_record()
line 101 of /h5p/classes/player.php: call to core_h5p\player->get_h5p_id()
line 39 of /h5p/embed.php: call to core_h5p\player->__construct()