| @@ 945-966 (lines=22) @@ | ||
| 942 | * including users from linked courses |
|
| 943 | * @deprecate use CourseManager class |
|
| 944 | */ |
|
| 945 | public static function get_course_users() |
|
| 946 | { |
|
| 947 | //this would return only the users from real courses: |
|
| 948 | $session_id = api_get_session_id(); |
|
| 949 | if ($session_id != 0) { |
|
| 950 | $userList = CourseManager::get_real_and_linked_user_list( |
|
| 951 | api_get_course_id(), |
|
| 952 | true, |
|
| 953 | $session_id, |
|
| 954 | true |
|
| 955 | ); |
|
| 956 | } else { |
|
| 957 | $userList = CourseManager::get_real_and_linked_user_list( |
|
| 958 | api_get_course_id(), |
|
| 959 | false, |
|
| 960 | 0, |
|
| 961 | true |
|
| 962 | ); |
|
| 963 | } |
|
| 964 | ||
| 965 | return $userList; |
|
| 966 | } |
|
| 967 | ||
| 968 | /** |
|
| 969 | * this function gets all the groups of the course, |
|
| @@ 5653-5664 (lines=12) @@ | ||
| 5650 | * this function gets all the users of the course, |
|
| 5651 | * including users from linked courses |
|
| 5652 | */ |
|
| 5653 | public static function getCourseUsers() |
|
| 5654 | { |
|
| 5655 | //this would return only the users from real courses: |
|
| 5656 | $session_id = api_get_session_id(); |
|
| 5657 | if ($session_id != 0) { |
|
| 5658 | $user_list = self::get_real_and_linked_user_list(api_get_course_id(), true, $session_id); |
|
| 5659 | } else { |
|
| 5660 | $user_list = self::get_real_and_linked_user_list(api_get_course_id(), false, 0); |
|
| 5661 | } |
|
| 5662 | ||
| 5663 | return $user_list; |
|
| 5664 | } |
|
| 5665 | ||
| 5666 | /** |
|
| 5667 | * this function gets all the groups of the course, |
|