Moodle
  1. Moodle
  2. MDL-35055

Import Multiple choice question from 1.9 to 2.3

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Import the attached Moodle XML file.

      2. Edit the imported question. Verify that three of the choices have grade 33.33333%, and the other have grade -100%

      Show
      1. Import the attached Moodle XML file. 2. Edit the imported question. Verify that three of the choices have grade 33.33333%, and the other have grade -100%
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      43671

      Description

      When bring in questions from 1.9 to 2.3.1 Multiple choice questions with multiple answers not all of the answer grade values come in.

      Questions are from Moodle 1.9.18+ (Build: 20120624) being imported to Moodle 2.3.1+ (Build: 20120802)

      The error shows up with restore course backup and import from Moodle XML.

      Settings in exported question:
      Multiple choice question
      Multiple answers allowed
      Choice 1 grade 33.3333%
      Choice 2 grade 33.3333%
      Choice 3 grade 33.3333%
      Choice 4 grade -100%
      Choice 5 grade -100%
      Choice 6 grade -100%

      When imported to 2.3.1 settings:
      Multiple choice question
      Multiple answers allowed
      Choice 1 grade 0%
      Choice 2 grade 0%
      Choice 3 grade 0%
      Choice 4 grade -100%
      Choice 5 grade -100%
      Choice 6 grade -100%

      The -100% on some answers keeps the students from just marking all of the choices to get full credit.

      Additional note: This looks to not be an issue with questions that the correct answers are 25% so it may have something to do with the 33.3333% value.

        Activity

        Hide
        Tim Hunt added a comment -

        Actually, if you look directly in the database, you will find that the fraction is being imported almost correctly. The value in the file is imported as 0.3333330.

        However, that is not one of the options on the editing form. The closest equivalent is 0.3333333. Therefore, when you are looking at the editing form, it shows the first option in the menu as the selected choice. If you click save on the form, then that will overwrite what is in the database.

        It looks like the "Match grades" option for imports is not working properly.

        Show
        Tim Hunt added a comment - Actually, if you look directly in the database, you will find that the fraction is being imported almost correctly. The value in the file is imported as 0.3333330. However, that is not one of the options on the editing form. The closest equivalent is 0.3333333. Therefore, when you are looking at the editing form, it shows the first option in the menu as the selected choice. If you click save on the form, then that will overwrite what is in the database. It looks like the "Match grades" option for imports is not working properly.
        Hide
        Jeff Church added a comment -

        That follows what I am seeing. On looking further the other values 83.33333, 66.66667, 16.66667, 14.27851, and 11.11111 are not working. I didn't test 12.5 to see if it is broken.

        Show
        Jeff Church added a comment - That follows what I am seeing. On looking further the other values 83.33333, 66.66667, 16.66667, 14.27851, and 11.11111 are not working. I didn't test 12.5 to see if it is broken.
        Hide
        Tim Hunt added a comment -

        Fix done. That was a subtle issue.

        Show
        Tim Hunt added a comment - Fix done. That was a subtle issue.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks! (22, 23 & master)

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (22, 23 & master)
        Hide
        Adrian Greeve added a comment -

        Tested in 2.2, 2.3 and Master.
        The question imported with the grades of 33.3333333%
        No problems encountered.
        Test passed.

        Show
        Adrian Greeve added a comment - Tested in 2.2, 2.3 and Master. The question imported with the grades of 33.3333333% No problems encountered. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        I'm so proud...of you, many thanks!

        http://youtu.be/n64CdfDRnZY

        Closing as fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - I'm so proud...of you, many thanks! http://youtu.be/n64CdfDRnZY Closing as fixed, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: