dozent_is_completed_course( int $course_ID, int $user_ID )
Determine if given course has been completed or not.
Parameters
- $user_ID
-
(int) (Required)
- $course_ID
-
(int) (Required)
Return
(array|object|void|null)
Source
File: includes/core-functions.php
function dozent_is_completed_course( $course_ID = 0, $user_ID = 0 ) { global $wpdb; $course_ID = dozent_get_post_id( $course_ID ); $user_ID = dozent_get_user_id( $user_ID ); $is_completed = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->dozent_completes where completed_course_id = %d AND user_id = %d ;", [ $course_ID, $user_ID ] ) ); return $is_completed; }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |