Elena (and whoever else may find this useful). Here is the patch that was asked for.
While it could be easily modified for use by the gradebook rather than just the assignment module, my own experience causes me to discourage using the gradebook directly for data entry except for overrides. The gradebook does not play fair with the modules, so once it takes over you are prevented from using the specialized assessment tools that each activity provides.
Also, this patch just does max and min, which I think has always suited our purposes. For example, I might have an assignment graded as not completed or completed. Once I have gone around and seen that every student has done their work, I set the whole class (or a group) to max, and then either put in no grade for absent/excused students (usually with feedback) or zero for unexcused missing work.
Later, usually after a unit is over, I go back and give zero (or minimum) to every student where late work is no longer OK, again, usually with appropriate feedback.
Hope this helps.