Details
Description
Because of the current architecture of the gradebook, whenever a graded activity is created and then changed to a non-graded activity, it still appears as an item in the gradebook.
We changed the gradebook to ignore activities that are "not graded." If data was entered for a graded activity and then the activity is modified to "no grade", then the data will be retained should the activity switch back to a graded activity, but the item will not be displayed in the gradebook. Please see the attached diff file for more details.
Basically it changed the:
$items = get_records('grade_items', 'courseid', $this->courseid);
to
$items = get_records_select('grade_items', "courseid = $this->courseid AND gradetype <> 0");
I also tested with the latest 1.9.4+ codes (build 20090223), still behave the same. So I'm sure that this problem also exist in all major 1.9.x builds right now. Not sure if this is something that we should maintain in our own customization or people would be interested to see this in the core. The fixed behavior would make better sense though, IMHO.
Would love to hear some comments about this fix, and if Martin OK'ed with it I could go ahead to commit it into MOODLE19_STABLE and HEAD
Attachments
Issue Links
| This issue has a non-specific relationship to: | ||||
| MDL-18770 | Non-graded Assignment and Quizzes appear in the gradebook and have Max Grade assigned |
|
|
|
| This issue has been marked as being related by: | ||||
| MDL-12496 | When an activity is created win "no grade" as maximum grade, it does not appear in gradebook 1.9Beta3 (WITH PATCH) |
|
|
|
Wen:
I agree with you that items that have no grade should not be in the gradebook and we have also patched it locally.
When we reported the problem, the fix was to allow for removal, but I would agree that this manual maintenance should not be needed.
--Gary