Activity completion MDL-24746 Altering grade in assignment, clearing override in grader does not alter completion value
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user