Databases: Database query for listing students that has not submitted their assingment

Databases: Database query for listing students that has not submitted their assingment

by Sami Puonti -
Number of replies: 0
Hi,

I could use some help. I want to make database-query that gives me list of students that has NOT submitted assignment.

I could do it this way:
// Get all students
$students = get_records("user_students", "course", $course->id);
// Get all submissions
$submissions = get_records("assignment_submissions", "assignment", $assignment->id);

and then loop trough submissions and remove students, that have submitted assignment, from student-list. But this would be kind of dirty way to do it.

Could any of u tell me nicer way to do this get_students_in_course_but_not_in_this_list-kind of query with datalib?

Thank you.

-Sami Puonti
Average of ratings: -