diff --git a/locallib.php b/locallib.php index c1754b47..259604fa 100644 --- a/locallib.php +++ b/locallib.php @@ -306,7 +306,7 @@ private function process_action_start_distribution() { } $raters = $this->get_raters_in_course(); $completion = new completion_info($this->course); - if ($completion->is_enabled($this->coursemodule)) { + if ($completion->is_enabled($this->coursemodule) == COMPLETION_TRACKING_AUTOMATIC) { foreach ($raters as $rater) { $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); } @@ -745,7 +745,7 @@ private function process_action_manual_allocation() { } $raters = $this->get_raters_in_course(); $completion = new completion_info($this->course); - if ($completion->is_enabled($this->coursemodule)) { + if ($completion->is_enabled($this->coursemodule) == COMPLETION_TRACKING_AUTOMATIC) { foreach ($raters as $rater) { $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); } @@ -1045,7 +1045,7 @@ public function distribute_users_without_choice(string $distributionalgorithm): $transaction->allow_commit(); $completion = new completion_info($this->course); - if ($completion->is_enabled($this->coursemodule)) { + if ($completion->is_enabled($this->coursemodule) == COMPLETION_TRACKING_AUTOMATIC) { foreach ($possibleusers as $userid) { $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $userid); } @@ -1445,7 +1445,7 @@ public function distrubute_choices() { $completion = new completion_info($this->course); $raters = $this->get_raters_in_course(); - if ($completion->is_enabled($this->coursemodule)) { + if ($completion->is_enabled($this->coursemodule) == COMPLETION_TRACKING_AUTOMATIC) { foreach ($raters as $rater) { $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); } @@ -1956,7 +1956,7 @@ public function save_ratings_to_db($userid, array $data) { $transaction->allow_commit(); $completion = new completion_info($this->course); - if ($completion->is_enabled()) { + if ($completion->is_enabled() == COMPLETION_TRACKING_AUTOMATIC) { $completion->set_module_viewed($this->coursemodule, $userid); $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $userid); } @@ -2099,7 +2099,7 @@ public function save_manual_allocation_form($allocdata, $userdata) { $transaction->allow_commit(); $completion = new completion_info($this->course); - if ($completion->is_enabled($this->coursemodule)) { + if ($completion->is_enabled($this->coursemodule) == COMPLETION_TRACKING_AUTOMATIC) { foreach ($allusers as $rater) { $completion->update_state($this->coursemodule, COMPLETION_UNKNOWN, $rater->id); }