diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index d5fe8246e3..edac3d65ba 100644 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -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