Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83387

restore_qtype_plugin not working with an extra answer table and NO extra question fields table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5
    • Backup
    • 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.

            Unassigned Unassigned
            LinusDev LinusDev
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.