public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/userprogress.php
/**
		 * Quick function to check if the user has completed the course prerequisites.
		 *
		 * @param Integer $userID The ID of the user that is being checked.
		 *
		 * @return Boolean True if the course pre-requisites have been completed, false otherwise.
		 */
Quick function to check if the user has completed the course prerequisites.
@param Integer $userID The ID of the user that is being checked.

@return Boolean True if the course pre-requisites have been completed, false otherwise.
Quick function to check if the user has completed the course prerequisites . @param Integer $userID The ID of the user that is being checked . @return Boolean True if the course pre - requisites have been completed false otherwise .
public function hasUserCompletedCoursePrerequisites( $userID ) {
			$course_prereqs = WPCW_users_getCoursePrerequisites( $this->courseID );
			if ( is_array( $course_prereqs ) ) {
				foreach ( $course_prereqs as $prereq_key => $prereq_id ) {
					if ( 0 === absint( $prereq_id ) ) {
						$prereq_id = $prereq_key;
					}
					$course_progress = new WPCW_UserProgress( $prereq_id, $userID );
					if ( ! $course_progress->isCourseCompleted() ) {
						return false;
					}
				}
			}
			return true;
		}
public function hasUserCompletedCoursePrerequisites ( $ userID ) { $ course_prereqs = WPCW_users_getCoursePrerequisites ( $ this -> courseID ) ; if ( is_array ( $ course_prereqs ) ) { foreach ( $ course_prereqs as $ prereq_key => $ prereq_id ) { if ( 0 === absint ( $ prereq_id ) ) { $ prereq_id = $ prereq_key ; } $ course_progress = new WPCW_UserProgress ( $ prereq_id , $ userID ) ; if ( ! $ course_progress -> isCourseCompleted ( ) ) { return false ; } } } return true ; }
Quick function to check if the user has completed the course prerequisites.
Quick function to check if the user has completed the course prerequisites .
// Get Prerequisites // Check // If the courses are not completed, get out and return false