Skip to content

Commit

Permalink
Issue #142: Get config id for nextresettime
Browse files Browse the repository at this point in the history
  • Loading branch information
guillogo committed Jan 23, 2024
1 parent d71ed55 commit 9f06f9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/task/check_recompletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ public function execute() {
if (!isset($updateresettimes[$course->id]) && isset($user->schedule)) {
// Update next reset time.
$newconfig = new \stdClass();
if (isset($rc['nextresettime'])) {
$newconfig->id = $rc['nextresettime']->id;
if (isset($config->nextresettime)) {
$newconfig->id = $DB->get_field('local_recompletion_config', 'id',
['course' => $course->id, 'name' => 'nextresettime']);
}
$newconfig->course = $course->id;
$newconfig->name = 'nextresettime';
Expand Down

0 comments on commit 9f06f9c

Please sign in to comment.