Browse: Home / Functions /

ld_course_access_from

ld_course_access_from( int $course_id,  int $user_id )

Returns the course enrollment date for a regular user in no-open courses.


Description #

It can return a future date if the course has not started yet (course with a start date). Admin users don’t have an enrollment date even if they have access to the course.

Open courses don’t have an enrollment date too unless the user is enrolled in a group. In that case, the enrollment date is the group enrollment date.


Parameters #

$course_id

(int) (Optional) Course ID to check. Default 0.

$user_id

(int) (Optional) User ID to check. Default 0.


Return #

(int|bool) The timestamp of when the course can be accessed from or false if the meta value does not exist.


Source #

File: includes/course/ld-course-user-functions.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.