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

Error in essay question preview

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2
    • Fix Version/s: 2.1.3
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Create an Essay question
      2. Click the preview icon
      3. In the preview pop-up window, verify that the button "Fill in correct responses" is disabled.
      4. Use Firebug (or similar) to hack the DOM to enable the button.
      5. Click the button, and verify that there is no error message. (The page should reload with no changes.)

      Show
      1. Create an Essay question 2. Click the preview icon 3. In the preview pop-up window, verify that the button "Fill in correct responses" is disabled. 4. Use Firebug (or similar) to hack the DOM to enable the button. 5. Click the button, and verify that there is no error message. (The page should reload with no changes.)
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Steps to reproduce

      1. Create an Essay question
      2. Click the preview icon
      3. In the preview pop-up windows, click the button "Fill in correct responses"

      Expected behaviour

      a) Either the button is not displayed at all as the essay question does not have correct responses predefined
      b) or pressing the button does nothing

      What actually happens

      Debugging error is displayed

      • line 1041 of /question/engine/questionattempt.php: call to question_attempt_step->__construct()
      • line 539 of /question/engine/questionusage.php: call to question_attempt->process_action()
      • line 148 of /question/preview.php: call to question_usage_by_activity->process_action()

      Warning: array_key_exists() expects parameter 2 to be array, null given in .../question/engine/questionattemptstep.php on line 283

      Warning: array_key_exists() expects parameter 2 to be array, null given in .../question/engine/questionattemptstep.php on line 283

      Warning: Invalid argument supplied for foreach() in .../question/engine/questionattemptstep.php on line 270

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11