Permalink
Browse files

lesson MDL-26571 made lesson accept a custom scale

  • Loading branch information...
1 parent 2b37004 commit f51cda3d097d1cce253c554ddf3e5acb4f12299b @andyjdavis andyjdavis committed Mar 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/lesson/lib.php
View
@@ -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;
}

0 comments on commit f51cda3

Please sign in to comment.