diff --git a/includes/class-sensei-utils.php b/includes/class-sensei-utils.php index ca0c1e47e9a..941baaa1db0 100644 --- a/includes/class-sensei-utils.php +++ b/includes/class-sensei-utils.php @@ -1432,7 +1432,7 @@ public static function user_complete_course( $course_id = 0, $user_id = 0, $trig // ...if all lessons 'passed' then update the course status to complete // The below checks if a lesson is fully completed, though maybe should be Utils::user_completed_lesson() $lesson_status_args['post__in'] = $lesson_ids; - $lesson_progress_args = array( + $lesson_progress_args = array( 'user_id' => $user_id, 'lesson_id' => $lesson_ids, ); diff --git a/includes/internal/student-progress/course-progress/repositories/class-comments-based-course-progress-repository.php b/includes/internal/student-progress/course-progress/repositories/class-comments-based-course-progress-repository.php index be7018e435d..0687480a2d5 100644 --- a/includes/internal/student-progress/course-progress/repositories/class-comments-based-course-progress-repository.php +++ b/includes/internal/student-progress/course-progress/repositories/class-comments-based-course-progress-repository.php @@ -269,6 +269,7 @@ private function assert_comments_based_course_progress( Course_Progress_Interfac * * @param array $args The arguments. * @return Course_Progress_Interface[] The course progress. + * @throws \InvalidArgumentException If the order by argument is not supported. */ public function find( array $args ): array { $comments_args = array( diff --git a/includes/internal/student-progress/lesson-progress/repositories/class-comments-based-lesson-progress-repository.php b/includes/internal/student-progress/lesson-progress/repositories/class-comments-based-lesson-progress-repository.php index 04d0a6f270a..93d71ce1db8 100644 --- a/includes/internal/student-progress/lesson-progress/repositories/class-comments-based-lesson-progress-repository.php +++ b/includes/internal/student-progress/lesson-progress/repositories/class-comments-based-lesson-progress-repository.php @@ -264,6 +264,7 @@ private function assert_comments_based_lesson_progress( Lesson_Progress_Interfac * * @param array $args The arguments. * @return Lesson_Progress_Interface[] + * @throws InvalidArgumentException When the ordering is not supported. */ public function find( array $args ): array { $comments_args = array( diff --git a/includes/internal/student-progress/quiz-progress/repositories/class-comments-based-quiz-progress-repository.php b/includes/internal/student-progress/quiz-progress/repositories/class-comments-based-quiz-progress-repository.php index 2a5c872fffd..164a0d6702a 100644 --- a/includes/internal/student-progress/quiz-progress/repositories/class-comments-based-quiz-progress-repository.php +++ b/includes/internal/student-progress/quiz-progress/repositories/class-comments-based-quiz-progress-repository.php @@ -204,6 +204,7 @@ private function assert_comments_based_quiz_progress( Quiz_Progress_Interface $q * * @param array $args The arguments. * @return Quiz_Progress_Interface[] The course progress. + * @throws \InvalidArgumentException When ordering is not supported. */ public function find( array $args ): array { $comments_args = array(