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

calculatedmulti qtype breaks 100% on restore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not a bug
    • Affects Version/s: 1.8.13, 1.9.9
    • Fix Version/s: 1.9.11
    • Component/s: Backup, Questions
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            ppichet Pierre Pichet
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Feb/11