Moodle
  1. Moodle
  2. MDL-29528

typo in multichoice question upgrade from 1.9

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Questions
    • Labels:
      None
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. In a 1.9 site, create some multichoice questions with and without combined (overall) feedback.
      2. Upgrade this site to Moodle 2.x
      3. Verify that the combined feedback has been upgraded correctly.

      Also,

      1. In a 1.9 site, create some multichoice questions with and without combined (overall) feedback.
      2. Backup this course and restore it into a 2.1 site.
      3. Verify that the combined feedback has been upgraded correctly.

      Show
      1. In a 1.9 site, create some multichoice questions with and without combined (overall) feedback. 2. Upgrade this site to Moodle 2.x 3. Verify that the combined feedback has been upgraded correctly. Also, 1. In a 1.9 site, create some multichoice questions with and without combined (overall) feedback. 2. Backup this course and restore it into a 2.1 site. 3. Verify that the combined feedback has been upgraded correctly.
    • Workaround:
      Hide

      as this field was nonexistant in Moodle 1.9 there is not any risk of data loss and it is easy to fix this issue with a single sql query to correct already migrated questions

      Show
      as this field was nonexistant in Moodle 1.9 there is not any risk of data loss and it is easy to fix this issue with a single sql query to correct already migrated questions
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      19242

      Description

      Hello, I just moticed all my multichoice questions upgraded from 1.9 to 2.1 have a 1 as content and Moodle as format.
      This seems to be caused by the line :
      $record->partiallycorrectfeedback = $record->oldquestiontextformat;
      in question/type/multichoice/db/upgrade.php line 121
      should be
      $record->partiallycorrectfeedbackformat = $record->oldquestiontextformat;

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          Wow! I can't believe no-one else has noticed this before.

          Note that there is some similar code in calculated, but I don't think it is ever used, since calculatedmulti qtype did not exist in 1.9. This may have been used upgrading from 2.0 dev to 2.0 final, so I fixed it.

          I also cannot believe that whoever made question/type/multichoice/backup/moodle1/lib.php just copied the error without noticing. (That's most unlike you David.)

          Show
          Tim Hunt added a comment - Wow! I can't believe no-one else has noticed this before. Note that there is some similar code in calculated, but I don't think it is ever used, since calculatedmulti qtype did not exist in 1.9. This may have been used upgrading from 2.0 dev to 2.0 final, so I fixed it. I also cannot believe that whoever made question/type/multichoice/backup/moodle1/lib.php just copied the error without noticing. (That's most unlike you David.)
          Hide
          Petr Škoda added a comment -

          Makes sense, thanks a lot.

          Show
          Petr Škoda added a comment - Makes sense, thanks a lot.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks! Amazing how that escaped till now!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks! Amazing how that escaped till now!
          Hide
          Sam Hemelryk added a comment -

          Thanks guys - tested and passed

          Show
          Sam Hemelryk added a comment - Thanks guys - tested and passed
          Hide
          Aparup Banerjee added a comment -

          fixes have been rolled merrily up the stream! Thanks everybody!

          Show
          Aparup Banerjee added a comment - fixes have been rolled merrily up the stream! Thanks everybody!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: