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

Review Options - During Attempt problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.5, 2.5
    • Fix Version/s: 2.4.8, 2.5.4, 2.6.1
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Start creating a new quiz, so you are looking at the quiz settings form.
      2. Type in a name.
      3. Select How questions behave: Interactive with multiple tries.
      4. Under the review options, turn on some "During the attempt" options. (Note which ones.)
      5. Now enable the Open and Close date settings, and set a close date before the open date. (This is intentionally invalid.)
      6. Now click one of the Save buttons.
      7. The form will reload, with the validation error with the dates hilighted.
      8. Scroll down to the Review options, and verify that "During the attempt" checkboxes pretty much are as you left them.
        • The attempt - disabled, it becomes unchecked, but this does not matter.
        • Overall feedback - not checked and disabled.
        • The rest - enabled, and checked or not as you set them.
      9. Now fix the date problems, and Save.
      10. Edit the settings on your new quiz, change How questions behave: to Deferred feedback, and save.
      11. Edit the settings again, and repeat steps 3. - 9. (The point is to check editing an existing quiz, rather then creating a new one.)
      Show
      Start creating a new quiz, so you are looking at the quiz settings form. Type in a name. Select How questions behave: Interactive with multiple tries. Under the review options, turn on some "During the attempt" options. (Note which ones.) Now enable the Open and Close date settings, and set a close date before the open date. (This is intentionally invalid.) Now click one of the Save buttons. The form will reload, with the validation error with the dates hilighted. Scroll down to the Review options, and verify that "During the attempt" checkboxes pretty much are as you left them. The attempt - disabled, it becomes unchecked, but this does not matter. Overall feedback - not checked and disabled. The rest - enabled, and checked or not as you set them. Now fix the date problems, and Save. Edit the settings on your new quiz, change How questions behave: to Deferred feedback, and save. Edit the settings again, and repeat steps 3. - 9. (The point is to check editing an existing quiz, rather then creating a new one.)
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      There's a bug when a "form error" occurs on editing/adding a quiz.

      if you select the question behavior type of "interactive with multiple tries"
      The during attempt options are un-disabled and a user can select some of those options.
      If you make a form error, like no quiz name, or duplicate ID number, and save the form, the form reloads, and then the "During the attempt" under review options, those form options are disabled, even though "The attempt" checkbox is checked.

      I'd expect those to be unchecked due to the question behavior type chosen, and because "The attempt" is checked.

      After going through some of the mod_form.php file for the quiz module, the rules are added for each of those option groups, and then "The attempt" and "overall feedback" are always disabled for "During the attempt" section.

      It seems like the javascript that does the disabling can't read the already disabled "The attempt" checkbox and so therefore disables the other form elements.

      You could add a conditional in php to remove those rules for "During the attempt" section, or would that be something to fix in javascript?

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14