I'm working on extending CoursePress and I needed to calculate course progress, specifically course completion, in a wp-cron task.
Long story short, I found that when calculating for another user, "draft" units are used in the calculation when using
Student_Completion::is_course_complete( $student_id, $course_id )
I tracked the issue further down into the function get_units_from_course() in class.course.unit.php where $status is passed in, but inexplicably ignored within the function. This function calls the function get_units_with_modules() where the post_status is hard-coded to include both "publish" and "draft".
Somehow the calculations are correct (only counting published units) when calculating for the logged in user, but for the purposes of extending, the calculations should not take "draft" units into the total course progress calculation.
Hopefully this helps and can get resolved soon!