Dear all,
my question concerns the gradebook in Moodle 1.9 and later:

Should a module remove the grade item for an activity
if the grade for that activity will always be zero?
I am particularly interested in the HotPot module (yay!), but the question definitely applies to the Quiz module and the Glossary module too, and probably some other modules.
When these modules create an instance of the activity, they all call a function called something like "modulename_grade_item_update()". This function sets up some parameters and then calls the standard "grade_update()" function.
If the activity always has a grade of zero, e.g. $glossary->scale==0 or $quiz->grade==0 or $hotpot->grade==0, then these modules all use the following parameter setting:
- $params['gradetype'] = GRADE_TYPE_NONE;
As a result, no grade item is created for the activity. Fair enough, so far.
Later on the activity may be edited and a non-zero grade becomes possible. The modules then use the following parameter setting:
- $params['gradetype'] = GRADE_TYPE_VALUE;
At this point a grade item activity gets created. Great! That's what we would want.
But what happens if the activity is then edited again and the grade set back to zero? The "modulename_grade_item_update()" will again set "gradetype" to GRADE_TYPE_NONE and call "grade_update()", but the grade item will not be deleted from the gradebook and as a result the gradebook contains an entry for an activity that can only ever get a zero grade.
It seems to me that this could be confusing to the teachers. They may not remember or know the history of how an activity came to have a zero grade. They will just see that where one Quiz/Glossary/HotPot has a zero grade and no gradebook entry, another Quiz/Glossary/HotPot has a zero grade and does have an entry in the gradebook.
Does anyone know why we allow these activities which initially had a grade but later were edited to receive no grade, to remain in the gradebook?
thanks in advance
Gordon