Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.2.5
-
Component/s: Questions
-
Labels:None
-
Testing Instructions:
-
Affected Branches:MOODLE_22_STABLE
-
Fixed Branches:MOODLE_22_STABLE, MOODLE_23_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
If you try to use the number 0 as an answer in a multiple-choice question, Moodle will not accept it. Looks like misuse of a comparison operator in the code.
Steps to reproduce
==================
1. Create a new multiple-choice question. Give it a name and question text.
2. Insert answers: 2, 1, 0, -1
3. Insert 100% grade for one of them
4. Save changes
Expected result
===============
Question should be created successfully.
Actual result
=============
Moodle returns to the form, and the answer 0 has an error message: "Grade set, but the Answer is blank"