New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ewallah issue #4 #5
Conversation
filter_user_list
code review
coverage
code review
code review
code fix
$sql = "SELECT DISTINCT userid | ||
FROM {course_completions} | ||
WHERE timecompleted IS $cond NULL AND course = ?"; | ||
$compusers = $DB->get_records_sql($sql, [$course->id]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not test it but is it possible that a student does not have any records in the 'course_completions' table at all?
In this case the SQL for the "not completed" case would be wrong.
In fact, you check $not again below, so you kind of inverse it?
Why would it be wrong? The function only removes users (https://github.com/moodle/moodle/blob/master/availability/classes/tree.php#L298), so if there are no records in the course_completions table, they will be removed if the $not parameter is true. This second $not is needed, first I collect the users who did complete the course or did not (based on what is stored in the condition), next I apply the $not, the same way it happens with availability group: |
Improve integration with Moodle Workplace Certificates