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

calculatedmulti qtype breaks 100% on restore

    XMLWordPrintable

Details

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

    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

            ppichet Pierre Pichet
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Safat Shahin, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              21/Feb/11