'$c_date' OR Lab_Report_ID IN (SELECT Lab_Report_ID FROM extended_deadlines_table WHERE Student_ID=$student_id AND Extended_Deadline_Date > '$c_date' AND Lab_Report_ID IN (SELECT Lab_Report_ID FROM lab_reports_table WHERE Course_ID=$course_id)))
AND Lab_Report_ID NOT IN (SELECT Lab_Report_ID FROM lab_report_submissions WHERE Course_Group_id IN (SELECT Course_Group_id FROM course_group_members_table WHERE Student_ID=$student_id))
ORDER BY Lab_Report_ID DESC";
$result1 = mysqli_query($con, $sql_stmt);
if(mysqli_num_rows($result1) == 0) {
echo "
";
$rs2 = mysqli_query($con,"SELECT Course_Group_id, users_table.Student_ID, course_group_members_table.Status, users_table.Full_Name
FROM course_group_members_table
INNER JOIN users_table ON users_table.Student_ID=course_group_members_table.Student_ID
WHERE course_group_members_table.Student_ID AND course_group_members_table.Course_Group_id=$id");
# Check whether the current user in session is the creator of the group
$rs3 = mysqli_query($con, "SELECT Status from course_group_members_table where Student_ID = $student_id");
$flag = mysqli_fetch_assoc($rs3)['Status'] == "Created";
while ($row = mysqli_fetch_assoc($rs2)) {
$name = $row['Full_Name'];
$id = $row['Course_Group_id'];
$status = $row['Status'];
$Student_ID = $row['Student_ID'];
# Show group members + Kick out button next to each member except the creator of the group
if ($flag) {
echo "