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

Error in essay question preview

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.3
    • 2.1.2, 2.2
    • Questions
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE
    • 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.)

      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

            timhunt Tim Hunt
            mudrd8mz David Mudrák (@mudrd8mz)
            Charles Fulton Charles Fulton
            Aparup Banerjee Aparup Banerjee
            Rajesh Taneja Rajesh Taneja
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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