-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5
-
MOODLE_405_STABLE
I am having trouble getting the moodle2-backup restore process to work. I have a question type with an extra answer table and NO extra question fields table. I am trying to use the class backup_qtype_extrafields_plugin to backup questions of my questions types (which works fine), but I cant get restoring using the class restore_qtype_extrafields_plugin to work. Specifically whenever I restore a test containing questions of my type. It restores the question itself, but the extra answers fields always reset to the default values.
My Code can be found on github: https://github.com/lni-dev/moodle-qtype_regexmatch. See edit message below.
Reproduce:
Install my plugin regexmatch, create a test with a regexmatch question and change the extra answers (tick any chechbox of the answers). Create backup, restore in a different moodle instance.
Expected:
Question is the same in both moodle instance.
Actual:
Restored question's extra answer fields are all at their default value.
I am not sure if this is a bug in moodle or if something is wrong with my code, but some help would be appreciated as the documentation of the class restore_qtype_extrafields_plugin is very sparse. Thank you in advance.
Edit: I have changed my Plugin to not use the extra answer fields table.