lesson MDL-26571 made lesson accept a custom scale

This commit is contained in:
Andrew Davis (andyjdavis)
2011-03-16 17:27:59 +08:00
parent 2b37004c28
commit f51cda3d09
+3
View File
@@ -469,6 +469,9 @@ function lesson_grade_item_update($lesson, $grades=NULL) {
$params['gradetype'] = GRADE_TYPE_VALUE;
$params['grademax'] = $lesson->grade;
$params['grademin'] = 0;
} else if ($lesson->grade < 0) {
$params['gradetype'] = GRADE_TYPE_SCALE;
$params['scaleid'] = -$lesson->grade;
} else {
$params['gradetype'] = GRADE_TYPE_NONE;
}