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

qtype_match cannot distinguish answer '0' and '0.0'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7.6, 3.8.3
    • 3.6.9, 3.7.5, 3.8.2
    • Questions
    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • Hide
      Question bank
      1. Create a new course.
      2. Go to the question bank and start creating a Matching question
      3. Put in any name and question text.
      4. Under the "Answers" section:
        Sub-question # Question Answer
        1 System.out.println(0); 0
        2 System.out.println(0.0); 0.0
        3 System.out.println(2); 2
        4 System.out.println(2.0); 2.0
      5. Save the question and Preview it.
      6. Verify that all four answers are shown in the dropdown menus.
      7. Fill in the correct answers.
      8. Verify that you get full marks.
      9. Press "Start again"
      10. For the questions with ".0" at the end, select the answers without the ".0" (e.g. match "System.out.println(0.0);" with "0")
      11. Confirm that those answers are marked wrong.
      Backup and restore
      1. Backup the course, and restore the backup to a new course.
      2. Go to the new course's question bank.
      3. Preview the matching question.
      4. Verify that all four answers are shown in the dropdown menus.
      5. Fill in the correct answers.
      6. Verify that you get full marks.
      7. Press "Start again"
      8. For the questions with ".0" at the end, select the answers without the ".0" (e.g. match "System.out.println(0.0);" with "0")
      9. Confirm that those answers are marked wrong.
      Show
      Question bank Create a new course. Go to the question bank and start creating a Matching question Put in any name and question text. Under the " Answers " section: Sub-question # Question Answer 1 System.out.println(0); 0 2 System.out.println(0.0); 0.0 3 System.out.println(2); 2 4 System.out.println(2.0); 2.0 Save the question and Preview it. Verify that all four answers are shown in the dropdown menus. Fill in the correct answers. Verify that you get full marks. Press " Start again " For the questions with ".0" at the end, select the answers without the ".0" (e.g. match " System.out.println(0.0); " with " 0 ") Confirm that those answers are marked wrong. Backup and restore Backup the course, and restore the backup to a new course. Go to the new course's question bank. Preview the matching question. Verify that all four answers are shown in the dropdown menus. Fill in the correct answers. Verify that you get full marks. Press " Start again " For the questions with ".0" at the end, select the answers without the ".0" (e.g. match " System.out.println(0.0); " with " 0 ") Confirm that those answers are marked wrong.

      As in https://moodle.org/mod/forum/discuss.php?d=398151, create a matching question with subquestions

      System.out.println(0); => 0
      System.out.println(0.0); => 0.0

      Preview the question.

      Expected: the choice drop-downs each contain two options.

      Actual: only one option is show.

        1. Screenshot_1.png
          168 kB
          Janelle Barcega
        2. Screenshot_2.png
          161 kB
          Janelle Barcega

            timhunt Tim Hunt
            timhunt Tim Hunt
            Luca Bösch Luca Bösch
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.