remove these functions from gradelib.php ASAP:
- grade_exists() - activities may have several grades, instead we need status: submitted/graded/returned, etc. (needs db changes, 2.0)
- grade_get_grade_items_for_activity() - activities MUST use $courseid, $itemtype, $itemmodule, $iteminstance, $itemnumber, or it could use $cm and $itemnumber; anyway this returns too much information which would definitely break in 2.0
- grade_get_grade_activities() - nothing like this should be allowed outside of gradebook!
- grade_get_grade_items() - again this breaks the separation rule, gradebook is not a list of items
- grade_get_user_grade() - raw float is useless, grade is much, much more than float value - it does not even check if item needs update
- grade_get_course_grade() - we must define course grade and completion properly first before we expose it
The problem is that modules should access only own grades and these function return too much/invalid information.
API for all gradebook plugins must be stored in grade/lib.php - we already have there several useful classes and methods
API for gradebook reports must be in grade/report/lib.php - we have the abstract report class there.