Gradebook API: Difference between revisions
Andrew Davis (talk | contribs) No edit summary |
Andrew Davis (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
==Overview== | |||
This document explains how custom additions to Moodle may make use of the Gradebook API to read and write student grades. | |||
The Gradebook API allows you to read and write from the gradebook. It also allows you to provide an interface for detailed grading information. | 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 | ==File Locations== | ||
==Functions== | |||
The main file of interest for the gradebook API is /lib/gradelib.php | |||
==Examples== | |||
/mod/xxx/grade.php | /mod/xxx/grade.php |
Revision as of 07:23, 17 January 2012
Overview
This document explains how custom additions to Moodle may make use of the Gradebook API to read and write student grades.
The Gradebook API allows you to read and write from the gradebook. It also allows you to provide an interface for detailed grading information.
File Locations
Functions
The main file of interest for the gradebook API is /lib/gradelib.php
Examples
/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()?