MDL-58523 mod_feedback: deleting response should reset completion

This commit is contained in:
Marina Glancy
2017-06-13 14:35:08 +08:00
parent 4c6063bff9
commit c3c97e2ee2
2 changed files with 14 additions and 11 deletions
+2 -1
View File
@@ -561,7 +561,8 @@ class mod_feedback_completion extends mod_feedback_structure {
// Update completion state.
$completion = new completion_info($this->cm->get_course());
if (isloggedin() && !isguestuser() && $completion->is_enabled($this->cm) && $this->feedback->completionsubmit) {
if (isloggedin() && !isguestuser() && $completion->is_enabled($this->cm) &&
$this->cm->completion == COMPLETION_TRACKING_AUTOMATIC && $this->feedback->completionsubmit) {
$completion->update_state($this->cm, COMPLETION_COMPLETE);
}
}