Skip to content

Commit

Permalink
Update condition.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ewallah committed Aug 26, 2023
1 parent c1bf08f commit d884a7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ public function filter_user_list(
}

$course = $info->get_course();
$cond = $this->coursecompleted ? 'NOT' : '';
$sql = "SELECT DISTINCT userid
FROM {course_completions}
WHERE course = ? AND timecompleted IS " . $this->coursecompleted ? "NOT NULL" : "NULL";
WHERE timecompleted IS $cond NULL AND course = ?";
$compusers = $DB->get_records_sql($sql, [$course->id]);

// List users who have access to the completion report.
Expand Down

0 comments on commit d884a7e

Please sign in to comment.