Affects Version/s: 1.9.11, 2.2.1
Fix Version/s: None
Component/s: Module: HotPot
Affected Branches:MOODLE_19_STABLE, MOODLE_22_STABLE
It is possible to have grade items in the gradebook for activities which can only ever have a zero grade and this is potentially confusing to teachers.
Consider the following sequence of actions:
1. If you create a HotPot/Quiz/Glossary which initially has no grade, then no grade item is created.
2. If you then change the grade to a non-zero grade, a grade item is created.
3. However, if you then change the grade back to zero, the grade item is not deleted from the grade book
After step 1, the activity has no grade, and there is no grade item in the grade book.
After step 3, the activity has no grade and there is a grade item in the grade book.
I think this is confusing for teachers.
I have described this issue more clearly on the moodle.org forums:
Removing unused grade items
As a temporary solution, I have added a form element to "mod/hotpot.mod_form.php", which will allow a teacher to force the removal of the grade item if the maximum grade is set to zero. However, a more comprehensive solution would be to modify "update_grade()" to remove the grade_item for zer-grade activities.