public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Get the enrollment date for a user from the courses database.
 *
 * @since 1.0.0
 *
 * @param integer $userID The ID of the user to get the details for.
 * @param integer $courseID The ID of the course to get the enrollment date for.
 *
 * @return integer The course enrolement date as a timestamp, or false if the user wasn't found.
 */
Get the enrollment date for a user from the courses database.

@param integer $userID The ID of the user to get the details for.
@param integer $courseID The ID of the course to get the enrollment date for.

@return integer The course enrolement date as a timestamp, or false if the user wasn't found.
Get the enrollment date for a user from the courses database . @param integer $userID The ID of the user to get the details for . @param integer $courseID The ID of the course to get the enrollment date for . @return integer The course enrolement date as a timestamp or false if the user wasn ' t found .
function WPCW_users_getCourseEnrolmentDate( $userID, $courseID ) {
	global $wpcwdb, $wpdb;
	$wpdb->show_errors();
	$thedate = $wpdb->get_var( $wpdb->prepare( "
		SELECT course_enrolment_date
		FROM $wpcwdb->user_courses
		WHERE user_id = %d AND course_id = %d
	", $userID, $courseID ) );
	if ( $thedate ) {
		return strtotime( $thedate );
	}
	return false;
}
function WPCW_users_getCourseEnrolmentDate ( $ userID , $ courseID ) { global $ wpcwdb , $ wpdb ; $ wpdb -> show_errors ( ) ; $ thedate = $ wpdb -> get_var ( $ wpdb -> prepare ( " 
		SELECT course_enrolment_date
		FROM  $ wpcwdb -> user_courses 
		WHERE user_id = %d AND course_id = %d
	 " , $ userID , $ courseID ) ) ; if ( $ thedate ) { return strtotime ( $ thedate ) ; } return false ; }
Get the enrollment date for a user from the courses database.
Get the enrollment date for a user from the courses database .
// Convert into a timestamp with no timezone conversion.