Permalink
Browse files

Merge branch 'MDL-26571_lesson_scale' of git://github.com/andyjdavis/…

…moodle
  • Loading branch information...
2 parents e5be555 + f51cda3 commit dca072aedc73638ee436933262e7d0ee1f27119a @skodak skodak committed Mar 21, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/lesson/lib.php
View
3 mod/lesson/lib.php
@@ -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 dca072a

Please sign in to comment.