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

calculatedmulti qtype breaks 100% on restore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Critical Critical
    • 1.9.11
    • 1.8.13, 1.9.9
    • Backup, Questions
    • None
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      While working on 2.0 backup & restore of questions (MDL-22138), I've detected that, apparently, the calculatedmulti qtype is missing the restore_recode_answer() method that performs the recoding of question_sessions->answer. Note that the rest of calculated qtypes don't need any recoding, but calculatedmulti does.

      Though I haven't tested it (not sure if there is any "dark magic" under 1.9 doing that or no), I think it leads to broken restores of any attempt containing questions of that type.

      Here it is the implementation I've done for 2.0, basically, delegating the recode to the multichoice qtype:

      http://cvs.moodle.org/moodle/question/type/calculatedmulti/backup/moodle2/restore_qtype_calculatedmulti_plugin.class.php?hideattic=1&view=markup

      Ciao

            ppichet Pierre Pichet (Inactive)
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody (Inactive)
            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.