mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
grade_update now supports more grade_item properties
This commit is contained in:
parent
83d606dd74
commit
e648f890ef
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ require_once($CFG->libdir . '/grade/grade_tree.php');
|
|||
* or key means do not change existing.
|
||||
*
|
||||
* Only following grade item properties can be changed 'itemname', 'idnumber', 'gradetype', 'grademax',
|
||||
* 'grademin', 'scaleid', 'deleted'.
|
||||
* 'grademin', 'scaleid', 'multfactor', 'plusfactor', 'deleted'.
|
||||
*
|
||||
* @param string $source source of the grade such as 'mod/assignment', often used to prevent infinite loops when processing grade_updated events
|
||||
* @param int $courseid id of course
|
||||
|
@ -88,7 +88,7 @@ require_once($CFG->libdir . '/grade/grade_tree.php');
|
|||
function grade_update($source, $courseid, $itemtype, $itemmodule, $iteminstance, $itemnumber, $grades=NULL, $itemdetails=NULL) {
|
||||
|
||||
// only following grade_item properties can be changed in this function
|
||||
$allowed = array('itemname', 'idnumber', 'gradetype', 'grademax', 'grademin', 'scaleid', 'deleted');
|
||||
$allowed = array('itemname', 'idnumber', 'gradetype', 'grademax', 'grademin', 'scaleid', 'multfactor', 'plusfactor', 'deleted');
|
||||
|
||||
if (is_null($courseid) or is_null($itemtype)) {
|
||||
debugging('Missing courseid or itemtype');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue