Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6787

Restore doesn't recreate question dependencies properly in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.2
    • 3.2
    • Module: Questionnaire
    • None

      From github issue #80:

      Import/Restore not working for dependencies, if the parent question (RADIO or DROPDOWN) was created after the child question and has been moved before the to-be-child afterwards.
      The parent-question is stored AFTER the child question due to its higher ID in the Backup-XML-File inside the mbz-File. While iterating through the file, moodle can't get the new mappingid for the depending record, because it doesn't exist yet.

      This leads to the result: dependquestion = 0, dependchoice = old choice ID

      Example:
      Create a questionnaire with some questions (IDs 1 2 3 4 5). Move the last question (ID 5) somewhere before the second last question (ID 4). Set the new last question to be dependend on the answer in (ID 5).

      Now create a backup. The questions in the questionnaire are stored sequentially according to the question-ID.

      Now import the mbz-File and restore the questionnaire. The questionnaire gets importet smoothly, but misses the correct dependency between former ID4 to ID5.

      Tested with MOODLE_32_STABLE.

            mchurch Mike Churchward
            mchurch Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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