Activity completion MDL-24746 Altering grade in assignment, clearing override in grader does not alter completion value

This commit is contained in:
Sam Marshall
2010-10-18 17:02:58 +00:00
parent fde29fa59c
commit fd546aaadd
+9 -3
View File
@@ -1232,7 +1232,7 @@ class completion_info {
} else {
$possibleresult = $this->internal_get_grade_state($item, $grade);
}
// OK, let's update state based on this
$this->update_state($cm, $possibleresult, $grade->userid);
}
@@ -1270,8 +1270,14 @@ class completion_info {
return COMPLETION_COMPLETE_FAIL;
}
} else {
// Not displaying pass/fail, but we know grade exists b/c we got here
return COMPLETION_COMPLETE;
// Not displaying pass/fail, so just if there is a grade
if (!is_null($grade->finalgrade) || !is_null($grade->rawgrade)) {
// Grade exists, so maybe complete now
return COMPLETION_COMPLETE;
} else {
// Grade does not exist, so maybe incomplete now
return COMPLETION_INCOMPLETE;
}
}
}