|
|
|
|
@ -3835,6 +3835,7 @@ class CourseManager { |
|
|
|
|
} |
|
|
|
|
return $_course; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Return a link to go to the course, validating the visibility of the |
|
|
|
|
* course and the user status |
|
|
|
|
@ -3843,7 +3844,7 @@ class CourseManager { |
|
|
|
|
* @param array List of courses to which the user is subscribed (if not provided, will be generated) |
|
|
|
|
* @return mixed 'enter' for a link to go to the course or 'register' for a link to subscribe, or false if no access |
|
|
|
|
*/ |
|
|
|
|
function get_access_link_by_user($uid, $course, $user_courses = null) { |
|
|
|
|
static function get_access_link_by_user($uid, $course, $user_courses = null) { |
|
|
|
|
if (empty($uid) or empty($course)) { return false; } |
|
|
|
|
if (!is_array($user_courses)) { |
|
|
|
|
// get the array of courses to which the user is subscribed |
|
|
|
|
|