Skip to content

Commit

Permalink
Fixes learnweb#306
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Thoms committed Nov 4, 2024
1 parent de61f8d commit 6cf115e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 6cf115e

Please sign in to comment.