Skip to content

Commit

Permalink
fixed change of completion status for manual allocation and allocatio…
Browse files Browse the repository at this point in the history
…n by cron
  • Loading branch information
irinahpe committed Feb 2, 2024
1 parent 15968ee commit 64341f8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 64341f8

Please sign in to comment.