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

Selecting variants in a quiz can fail if later questions have fewer variants

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.9.6, 3.0.4, 3.2.3, 3.3.1
    • Questions
    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • Hide
      1. Create a quiz
      2. Add a calculated question
      3. This question should be setup to have a shared wildcard X with 10 datasets with the set synchronized
      4. Add another calculated question
      5. This question should be setup to have a shared wildcard Y with at least 2 datasets (or some number less than X has. The bigger the difference the more likely to trip the error) with the set synchronized.
      6. Have the X and Y wildcards in each questions text body so you can verify different values for X being chosen when previewing.
      7. Preview the quiz - keep clicking the start new preview button

      Expected outcome:

      1. Quiz is displayed

      Actual outcome:

      1. As soon as variant is picked for Q1 that is higher than the number available for Q2, you'll get a fatal error.
      Show
      Create a quiz Add a calculated question This question should be setup to have a shared wildcard X with 10 datasets with the set synchronized Add another calculated question This question should be setup to have a shared wildcard Y with at least 2 datasets (or some number less than X has. The bigger the difference the more likely to trip the error) with the set synchronized. Have the X and Y wildcards in each questions text body so you can verify different values for X being chosen when previewing. Preview the quiz - keep clicking the start new preview button Expected outcome: Quiz is displayed Actual outcome: As soon as variant is picked for Q1 that is higher than the number available for Q2, you'll get a fatal error.

      When starting a quiz, a variant is chosen for each question. The strategy then reuses that same variant no matter how many are actually available in alter questions.

      Example
      Q1 has shared wildcard X with 10 datasets
      Q2 has shared wildcard Y with 5 datasets

      When starting the quiz, a variant is chosen for Q1. If it happens to choose anything larger than 5, you'll just end up with a moodle exception (cannotgetdsfordependent, question).

            tlock Tim Lock
            aolley Adam Olley
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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