Details
Description
If you do not choose an answer, but leave the select box at the option 'Choose...' the following PHP notice displays.
Notice: Undefined index: in /var/www/mstorage/i24/moodle/mod/lesson/pagetypes/matching.php on line 188
|
Notice: Trying to get property of non-object in /var/www/mstorage/i24/moodle/mod/lesson/pagetypes/matching.php on line 188
|
Replication steps:
- Create a lesson activity.
- Add a Question page of type 'Matching'.
- Fill in a title, description, correct answer response and wrong answer response.
- Add to the first 'Answer' field 'Blue is a...'.
- Add to the first 'Matches with answer' field 'Colour'.
- Add to the second 'Answer' field 'Cold is a...'
- Add to the second 'Matches with answer' field 'Temperature'.
- Save the question.
- Select the 'Preview' icon.
- On the next page leave the select boxes at 'Choose...'.
- Submit
Expected result: you get a message telling you to select an option
Actual result: an error is shown
Attachments
Issue Links
- Discovered while testing
-
MDL-38714 Lesson edit page not calling setType for hidden and text inputs
-
- Closed
-
- Testing discovered
-
MDL-34050 Matching Question in lesson does not recognise HTML format in answer text
-
- Closed
-
- will be (partly) resolved by
-
MDL-39488 Match question throws PHP error if one or more options have not been selected
-
- Closed
-