Gradebook API: Difference between revisions
Andrew Davis (talk | contribs) No edit summary |
Andrew Davis (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
gradebook callbacks in /mod/xxx/lib.php | gradebook callbacks in /mod/xxx/lib.php | ||
$modinstance->modname.'_update_grades'; | |||
Get module to update all grade items | |||
$modinstance->modname.'_grade_item_update'; | |||
Create/update grade item for given activity module instance | |||
What is the difference between these methods exactly? Both are required by lib/gradelib.php grade_update_mod_grades() which calls both of them but all our implementations of %modname%_update_grades() just seem to call %modname%_grade_item_update(). Are we updating the grade twice for every call to grade_update_mod_grades()? |
Revision as of 08:02, 14 January 2012
The Gradebook API allows you to read and write from the gradebook. It also allows you to provide an interface for detailed grading information.
/lib/gradelib.php
/mod/xxx/grade.php
gradebook callbacks in /mod/xxx/lib.php
$modinstance->modname.'_update_grades'; Get module to update all grade items
$modinstance->modname.'_grade_item_update'; Create/update grade item for given activity module instance
What is the difference between these methods exactly? Both are required by lib/gradelib.php grade_update_mod_grades() which calls both of them but all our implementations of %modname%_update_grades() just seem to call %modname%_grade_item_update(). Are we updating the grade twice for every call to grade_update_mod_grades()?