You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: classes/Utils.php
+7-11Lines changed: 7 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3494,11 +3494,11 @@ public function get_students_by_instructor( int $instructor_id, int $offset, int
3494
3494
$students = $wpdb->get_results(
3495
3495
$wpdb->prepare(
3496
3496
"SELECT COUNT(enrollment.post_author) AS course_taken, user.*, (SELECT post_date FROM {$wpdb->posts} WHERE post_author = user.ID LIMIT 1) AS enroll_date
3497
-
FROM {$wpdb->posts} enrollment
3498
-
INNER JOIN {$wpdb->posts} AS course
3499
-
ON enrollment.post_parent=course.ID
3500
-
INNER JOIN {$wpdb->users} AS user
3501
-
ON user.ID = enrollment.post_author
3497
+
FROM {$wpdb->posts} enrollment
3498
+
INNER JOIN {$wpdb->posts} AS course
3499
+
ON enrollment.post_parent=course.ID
3500
+
INNER JOIN {$wpdb->users} AS user
3501
+
ON user.ID = enrollment.post_author
3502
3502
WHERE course.post_type = %s
3503
3503
AND course.post_status IN ({$post_status})
3504
3504
AND enrollment.post_type = %s
@@ -3507,11 +3507,9 @@ public function get_students_by_instructor( int $instructor_id, int $offset, int
3507
3507
{$course_query}
3508
3508
{$date_query}
3509
3509
AND ( user.display_name LIKE %s OR user.user_nicename LIKE %s OR user.user_email = %s OR user.user_login LIKE %s )
3510
-
3511
3510
GROUP BY enrollment.post_author
3512
3511
ORDER BY {$order_by}{$order}
3513
-
LIMIT %d, %d
3514
-
",
3512
+
LIMIT %d, %d",
3515
3513
$course_post_type,
3516
3514
'tutor_enrolled',
3517
3515
'completed',
@@ -3540,9 +3538,7 @@ public function get_students_by_instructor( int $instructor_id, int $offset, int
0 commit comments