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

Notice when upgrading multianswer question type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: Questions, Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a new course and in default course question category
      2. Build a question bank with many types of questions, including at least multianswer question with a text similar to this one.

        REGULAR
        MCH
        {1:MULTICHOICE_H:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong}
        MCV
        {1:MULTICHOICE_V:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong}
        MC
        {1:MULTICHOICE:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong}
        

      3. Put the question in a quiz where you set quiz shuffle ON.
      4. Do a version bump and run the upgrade.
      5. Make sure you don't get any offset errors.
      6. Backup this course and execute the restore.
      7. Make sure you don't get any offset errors.
      Show
      Create a new course and in default course question category Build a question bank with many types of questions, including at least multianswer question with a text similar to this one. REGULAR MCH {1:MULTICHOICE_H:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong} MCV {1:MULTICHOICE_V:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong} MC {1:MULTICHOICE:=First one#OK~Second one#Wrong~Third one#Wrong~Fourth one#Wrong} Put the question in a quiz where you set quiz shuffle ON . Do a version bump and run the upgrade. Make sure you don't get any offset errors. Backup this course and execute the restore. Make sure you don't get any offset errors.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51855-master

      Description

      I noticed this when upgrading:

      Notice: Undefined offset: 4 in /home/fred/www/repositories/sm/moodle/question/type/multianswer/db/upgrade.php on line 79
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0020	243192	{main}( )	../index.php:0
      2	12.1848	26163776	upgrade_noncore( )	../index.php:677
      3	12.6323	26203368	upgrade_plugins( )	../upgradelib.php:1641
      4	12.7008	26570120	xmldb_qtype_multianswer_upgrade( )	../upgradelib.php:545
      

      Is that taken care of or should I raise an issue for it?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              fred Frédéric Massart
              Peer reviewer:
              Tim Hunt
              Integrator:
              Dan Poltawski
              Tester:
              cameron1729
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                16/Nov/15