The problem
Right now, grades that need to be computed for display in reports are handled in multiple ways and in multiple locations. Reports get grade_grade::get_hiding_affected() and then each report uses it in a different way. Leading to different and inconsistent displays.
Proposal
I am proposing moving the computation layer deeper into the API, so that all computations are done at the same point in the code. New class *grade_report_grade*. This would be a sub-class grade_grade, but would represent the computed grade for display. You would specify when it is "computed" what the re-computation behavior, and the user visibility behavior is.
Possible methods:
- static compute_report_grades() - would recursively compute grade_report_grades based on a passed node, or user/courseid
- user_visible() - Should the item be visible to the user