Hi all, i read the whole thread and it helps me a lot to solve the same problem. It seems the problem is the upgrade from h5p as a plugin to core feature from moodle 3.x to 3.9. First time i tried the upgrade i deleted all h5p plugins from admin backend, and the upgrade was no problem. Serveral weeks later i mirrored my prod system and did the same upgrade procedure and it failed with Error DDL sql execution error (mod_h5pactivity).
I tried a fresh and clean install with version 3.8.3 and upgraded it to 3.9.2 without this issue. I think it's a problem with the used bitnami image. I think some of you have a dockerized environment like we have (Kubernetes). Here is a safe
way to upgrade the live system and afterwards the docker image to the desired version. We had a lot of trouble after the moodle container upgrade (official Moodle Wiki Tutorial). The container failed to start without a proper failure message. Here's our way to upgrade Bitnami
Moodle 3.x up to latest and solving the database error:
1. Download Moodle Version matching Bitnami (we need 3.9 so we catch 3.9.2) from official Moodle Repo but look at GitHub: https://github.com/bitnami/bitnami-docker-moodle/releases
for supported Bitnami releases.
2. Download it on your server beside your moodle main folder. I.e. sudo wget https://download.moodle.org/download.php/direct/stable39/moodle-3.9.2.tgz
3. Activate Maintenance Mode
in Moodle Backend or CLI
4. Backup Moodle: sudo mv moodle moodle.backup
5. Fresh Moodle folder: sudo mkdir moodle
6. sudo tar -xzvf moodle-3.9.2.tgz -C moodle --strip 1
7. Move needed files back:
8. sudo cp -a moodle.backup/config.php moodle
9. sudo cp -a moodle.backup/theme/snap moodle/theme (replace with your active theme - we use snap from blackboard)
10. (sudo cp -a moodle.backup/moodledata moodle/) make sure where' your moodledata folder. Bitnami fixed the wrong moodledata folder location with 3.9.2 version. Before that version the moodledata folder is inside the moodle folder! Keep that in mind because you have to change the config.php location if you move the moodledata folder to a different location.
11. Set permissions for Docker: sudo chown daemon:daemon -R moodle
12. sudo chmod -R g+rwX moodle
13. sudo chown root moodle/config.php
14. sudo chmod 640 moodle/config.php
15. Make DB changes:
16. if you have no phpMyAdmin
you can install it in a few seconds with docker on local machine: docker run -it -d -e PMA_ARBITRARY=1 -p 8080:80 -v phpmyadmin_data:/sessions phpmyadmin:latest
17. Browser: localhost:8080
18. Server adsress of your database server with port: i.e. 192.168.177.12:2211 and login credentials
19. klick on bitnami_moodle
20. search for h5p -> all tables -> drop all tables
21. search mdl_quizaccess_seb_quizsettings and drop
22. search mdl_quizaccess_seb_template and drop
23. Navigate to your moodle instance with /admin and do the upgrade (disable CLI Maintenance Mode
if you haven't set proper rights for admins)
24. Upgrade all plugins with a click on the check for updates button - if moodle can't find updates for mods and plugins, folder permissions are set wrong -> check step 11. to 14. and your docker user permissions
25. pull the image version used above and restart the container or bind it in kubernetes/rancher and redeploy.
We did serveral tests with UTF8/Unicode and this was not the problem, you don't need to convert tables.