Skip to content

Commit

Permalink
MDL-18403: Completion system can cause problems if grade completion i…
Browse files Browse the repository at this point in the history
…s somehow enabled when completion is set to manual
  • Loading branch information
sam_marshall committed Feb 27, 2009
1 parent 27eef3b commit ca6b2d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/completionlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,11 @@ public function get_progress_all($sortfirstname=false, $groupid=0,
}

public function inform_grade_changed($cm, $item, $grade, $deleted) {
// Bail out now if completion is not enabled for course-module, grade
// is not used to compute completion, or this is a different numbered
// grade
// Bail out now if completion is not enabled for course-module, it is enabled
// but is set to manual, grade is not used to compute completion, or this
// is a different numbered grade
if (!$this->is_enabled($cm) ||
$cm->completion == COMPLETION_TRACKING_MANUAL ||
is_null($cm->completiongradeitemnumber) ||
$item->itemnumber != $cm->completiongradeitemnumber) {

Expand Down

0 comments on commit ca6b2d6

Please sign in to comment.