Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
m1r0 committed Dec 11, 2023
1 parent 4fd9487 commit 645ceb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/class-sensei-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ public static function user_complete_course( $course_id = 0, $user_id = 0, $trig
$course_progress->start();
}

$lessons_completed = 0;
$lessons_completed = 0;

// Grab all of this Courses' lessons, looping through each...
$lesson_ids = Sensei()->course->course_lessons( $course_id, 'publish', 'ids' );
Expand All @@ -1503,11 +1503,11 @@ public static function user_complete_course( $course_id = 0, $user_id = 0, $trig
// .........then the lesson is 'passed'
// ...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_progress_args = array(
$lesson_progress_args = array(
'user_id' => $user_id,
'lesson_id' => $lesson_ids,
);
$all_lesson_progress = Sensei()->lesson_progress_repository->find( $lesson_progress_args );
$all_lesson_progress = Sensei()->lesson_progress_repository->find( $lesson_progress_args );

foreach ( $all_lesson_progress as $lesson_progress ) {
if ( $lesson_progress->is_complete() ) {
Expand Down

0 comments on commit 645ceb9

Please sign in to comment.