diff --git a/locallib.php b/locallib.php index ca57d88e..6a719b95 100644 --- a/locallib.php +++ b/locallib.php @@ -287,6 +287,13 @@ private function process_action_start_distribution() { \core\output\notification::NOTIFY_SUCCESS); } } + $raters = $this->get_raters_in_course(); + $completion = new completion_info($this->course); + if ($completion->is_enabled($this->coursemodule)) { + foreach ($raters as $rater) { + $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); + } + } redirect(new moodle_url('/mod/ratingallocate/view.php', array('id' => $this->coursemodule->id))); return; @@ -664,6 +671,13 @@ private function process_action_manual_allocation() { array('id' => $this->coursemodule->id, 'action' => ACTION_MANUAL_ALLOCATION))); } } + $raters = $this->get_raters_in_course(); + $completion = new completion_info($this->course); + if ($completion->is_enabled($this->coursemodule)) { + foreach ($raters as $rater) { + $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); + } + } } $output .= $OUTPUT->heading(get_string('manual_allocation', RATINGALLOCATE_MOD_NAME), 2);