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);
$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