Closed logan-reynolds closed 1 month ago
@logan-reynolds Thank you for bringing this to my attention and apologies for stagnation on the issue, I believe I have resolved the issue in the new version of the plugin, but please let me know if it is still not working for you. Thank you!
@ADLMeganBohland thank you; just noting I pulled the latest version of this plugin, but encountered errors trying to install/upgrade it per notes in https://github.com/adlnet/Moodle-mod_cmi5launch/issues/35 and #36 . Feel free to contact if you need more specific information on either of those bug reports, and once those are addressed I'm happy to test again for resolution of this issue.
@logan-reynolds I believe those issues have been resolved if you want to test again
Thank you; it does look like the prior issue was resolved with newer mod_cmi5launch version 2024032112, however I'm still running into some problems getting the backup/restore of a course containing activity module instance to work.
Warning: Use of undefined constant FEATURE_MOD_PURPOSE - assumed 'FEATURE_MOD_PURPOSE' (this will throw an Error in a future version of PHP) in /var/www/html/mod/cmi5launch/lib.php on line 87
Table "cmi5launch_lrs" does not exist
More information about this error Debug info: Error code: ddltablenotexist Stack trace:
line 673 of /lib/dml/moodle_database.php: dml_exception thrown
line 1711 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
line 210 of /mod/cmi5launch/lib.php: call to moodle_database->get_field()
line 5207 of /lib/moodlelib.php: call to cmi5launch_delete_instance()
line 5070 of /lib/moodlelib.php: call to remove_course_contents()
line 68 of /course/delete.php: call to delete_course()```
@logan-reynolds Thankyou, I will investigate these. I started with "FEATURE_MOD_PURPOSE" as I understand it, this just enables different backgrounds on the icons. This is actually not necessary, would a acceptable fix be simply to remove this constant? Or is it required?
@logan-reynolds Thank you for your attention to this and pointing out the issues. I believe I have resolved them. I found out somehow that old table was hardcoded to be deleted even though it wasn't there. I have a question though about the purpose of "delete_instance". Should it delete ALL data associated with the activity? Such as all the separate user info about it, such as sessions, grades, etc ?
@ADLMeganBohland since the expectations for activity instance backup and restore may differ between releases I'd just refer you to the Moodle developer documentation specific to your component type, in this case for a mod at https://moodledev.io/docs/4.4/apis/plugintypes/mod . If you're confirming functionality on older versions you can switch the drop-down in the top right to get documentation appropriate for your version, or instructions on the older Moodle 3.x and lower series legacy documentation.
Plugin has been updated
On Moodle 3.11.17 (Build: 20231009) running latest 'main' branch of mod_cmi5launch version 2018110100 release 1.3RC2 (Build: 2016060300), when adding an instance of the cmi5launch activity to a course and attempting backup/restore it fails with the following exception because files need to be renamed with filename matching the frankenstyle plugin name:
Likely renaming the files under /backup/moodle2/ should be all that's needed, but may want to doublecheck there are no leftover references which statically reference incorrect plugin names/values. Expected outcome is that plugin must always allow for successful course backup/restore.