-
Bug
-
Resolution: Fixed
-
Minor
-
2.1.2, 2.2
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_21_STABLE
-
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