@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * |
18 | 18 | * @param int|array $course |
19 | - * @param int|array $annoucement |
|
19 | + * @param integer $announcement |
|
20 | 20 | * |
21 | 21 | * @return AnnouncementEmail |
22 | 22 | */ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @param string $key |
52 | 52 | * |
53 | - * @return array |
|
53 | + * @return string|null |
|
54 | 54 | */ |
55 | 55 | public function course($key = '') |
56 | 56 | { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
21 | - * @return array |
|
21 | + * @return string[] |
|
22 | 22 | */ |
23 | 23 | public static function get_tags() |
24 | 24 | { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param string $course_code |
41 | 41 | * @param int $session_id |
42 | 42 | * |
43 | - * @return mixed |
|
43 | + * @return string |
|
44 | 44 | */ |
45 | 45 | public static function parse_content($userId, $content, $course_code, $session_id = 0) |
46 | 46 | { |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | * @param array uploaded file $_FILES |
350 | 350 | * @param string Comment describing the attachment |
351 | 351 | * @param bool $sendToUsersInSession |
352 | - * @return int false on failure, ID of the announcement on success |
|
352 | + * @return false|string false on failure, ID of the announcement on success |
|
353 | 353 | */ |
354 | 354 | public static function add_announcement( |
355 | 355 | $emailTitle, |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | * @param $to_users |
461 | 461 | * @param array $file |
462 | 462 | * @param string $file_comment |
463 | - * @return bool|int |
|
463 | + * @return false|string |
|
464 | 464 | */ |
465 | 465 | public static function add_group_announcement( |
466 | 466 | $emailTitle, |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | |
700 | 700 | /** |
701 | 701 | * @param int $insert_id |
702 | - * @return bool |
|
702 | + * @return false|null |
|
703 | 703 | */ |
704 | 704 | public static function update_mail_sent($insert_id) |
705 | 705 | { |
@@ -719,6 +719,7 @@ discard block |
||
719 | 719 | * Gets all announcements from a user by course |
720 | 720 | * @param string course db |
721 | 721 | * @param int user id |
722 | + * @param integer $user_id |
|
722 | 723 | * @return array html with the content and count of announcements or false otherwise |
723 | 724 | */ |
724 | 725 | public static function get_all_annoucement_by_user_course($course_code, $user_id) |
@@ -1184,6 +1185,7 @@ discard block |
||
1184 | 1185 | * has been sent to |
1185 | 1186 | * @param string The tool (announcement, agenda, ...) |
1186 | 1187 | * @param int ID of the element of the corresponding type |
1188 | + * @param string $tool |
|
1187 | 1189 | * @return array Array of users and groups to whom the element has been sent |
1188 | 1190 | */ |
1189 | 1191 | public static function sent_to($tool, $id) |
@@ -1308,6 +1310,8 @@ discard block |
||
1308 | 1310 | * @param int attach id |
1309 | 1311 | * @param array uploaded file $_FILES |
1310 | 1312 | * @param string file comment |
1313 | + * @param integer $id_attach |
|
1314 | + * @param string $file_comment |
|
1311 | 1315 | * @return int |
1312 | 1316 | */ |
1313 | 1317 | public static function edit_announcement_attachment_file($id_attach, $file, $file_comment) |
@@ -18,6 +18,7 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Constructor, init tool path for rendering |
20 | 20 | * @param string tool name (optional) |
21 | + * @param string $template_path |
|
21 | 22 | */ |
22 | 23 | public function __construct($toolname = '', $template_path=null) |
23 | 24 | { |
@@ -50,6 +51,7 @@ discard block |
||
50 | 51 | /** |
51 | 52 | * Set layout view sent from a controller |
52 | 53 | * @param string layout view |
54 | + * @param string $layout |
|
53 | 55 | */ |
54 | 56 | public function set_layout( $layout ) |
55 | 57 | { |
@@ -59,6 +61,7 @@ discard block |
||
59 | 61 | /** |
60 | 62 | * Set template view sent from a controller |
61 | 63 | * @param string template view |
64 | + * @param string $template |
|
62 | 65 | */ |
63 | 66 | public function set_template($template) |
64 | 67 | { |
@@ -147,6 +147,9 @@ discard block |
||
147 | 147 | return $customTabs; |
148 | 148 | } |
149 | 149 | |
150 | +/** |
|
151 | + * @param string $theme |
|
152 | + */ |
|
150 | 153 | function return_logo($theme) |
151 | 154 | { |
152 | 155 | $_course = api_get_course_info(); |
@@ -497,6 +500,9 @@ discard block |
||
497 | 500 | return $menu; |
498 | 501 | } |
499 | 502 | |
503 | +/** |
|
504 | + * @param string $nameTools |
|
505 | + */ |
|
500 | 506 | function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) |
501 | 507 | { |
502 | 508 | $session_id = api_get_session_id(); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | /** |
160 | 160 | * Set the name of the browser |
161 | - * @param $browser string The name of the Browser |
|
161 | + * @param string $browser string The name of the Browser |
|
162 | 162 | */ |
163 | 163 | public function setBrowser($browser) |
164 | 164 | { |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | |
267 | 267 | /** |
268 | 268 | * Set the browser to be from AOL |
269 | - * @param $isAol |
|
269 | + * @param boolean $isAol |
|
270 | 270 | */ |
271 | 271 | public function setAol($isAol) |
272 | 272 | { |
@@ -41,6 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Set user chat status |
43 | 43 | * @param int 0 if disconnected, 1 if connected |
44 | + * @param integer $status |
|
44 | 45 | * |
45 | 46 | * @return void |
46 | 47 | */ |
@@ -164,6 +165,7 @@ discard block |
||
164 | 165 | /** |
165 | 166 | * Saves into session the fact that a chat window exists with the given user |
166 | 167 | * @param int The ID of the user with whom the current user is chatting |
168 | + * @param integer $user_id |
|
167 | 169 | * @return void |
168 | 170 | */ |
169 | 171 | public function save_window($user_id) |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | * @param int $status (optional) The user's status in the course |
717 | 717 | * @param int The user category in which this subscription will be classified |
718 | 718 | * |
719 | - * @return boolean true if subscription succeeds, boolean false otherwise. |
|
719 | + * @return false|string true if subscription succeeds, boolean false otherwise. |
|
720 | 720 | * @assert ('', '') === false |
721 | 721 | */ |
722 | 722 | public static function add_user_to_course($user_id, $courseCode, $status = STUDENT, $userCourseCategoryId = 0) |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | * Checks wether a parameter exists. |
789 | 789 | * If it doesn't, the function displays an error message. |
790 | 790 | * |
791 | - * @return true if parameter is set and not empty, false otherwise |
|
791 | + * @return boolean if parameter is set and not empty, false otherwise |
|
792 | 792 | * @todo move function to better place, main_api ? |
793 | 793 | */ |
794 | 794 | public static function check_parameter($parameter, $error_message) |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | } |
813 | 813 | |
814 | 814 | /** |
815 | - * @return true if there already are one or more courses |
|
815 | + * @return boolean if there already are one or more courses |
|
816 | 816 | * with the same code OR visual_code (visualcode), false otherwise |
817 | 817 | */ |
818 | 818 | public static function course_code_exists($wanted_course_code) |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | /** |
986 | 986 | * @param int $userId |
987 | 987 | * @param array $courseInfo |
988 | - * @return bool |
|
988 | + * @return boolean|null |
|
989 | 989 | */ |
990 | 990 | public static function isUserSubscribedInCourseAsDrh($userId, $courseInfo) |
991 | 991 | { |
@@ -1091,10 +1091,10 @@ discard block |
||
1091 | 1091 | /** |
1092 | 1092 | * Is the user a teacher in the given course? |
1093 | 1093 | * |
1094 | - * @param $user_id , the id (int) of the user |
|
1094 | + * @param integer $user_id , the id (int) of the user |
|
1095 | 1095 | * @param $course_code , the course code |
1096 | 1096 | * |
1097 | - * @return true if the user is a teacher in the course, false otherwise |
|
1097 | + * @return boolean if the user is a teacher in the course, false otherwise |
|
1098 | 1098 | */ |
1099 | 1099 | public static function is_course_teacher($user_id, $course_code) |
1100 | 1100 | { |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | * @param int the id of the user |
1124 | 1124 | * @param int $courseId |
1125 | 1125 | * @deprecated linked_courses definition doesn't exists |
1126 | - * @return true if the user is registered in the real course or linked courses, false otherwise |
|
1126 | + * @return boolean if the user is registered in the real course or linked courses, false otherwise |
|
1127 | 1127 | */ |
1128 | 1128 | public static function is_user_subscribed_in_real_or_linked_course($user_id, $courseId, $session_id = '') |
1129 | 1129 | { |
@@ -1194,9 +1194,9 @@ discard block |
||
1194 | 1194 | * @param string $order_by the field to order the users by. |
1195 | 1195 | * Valid values are 'lastname', 'firstname', 'username', 'email', 'official_code' OR a part of a SQL statement |
1196 | 1196 | * that starts with ORDER BY ... |
1197 | - * @param null $filter_by_status if using the session_id: 0 or 2 (student, coach), |
|
1197 | + * @param integer|null $filter_by_status if using the session_id: 0 or 2 (student, coach), |
|
1198 | 1198 | * if using session_id = 0 STUDENT or COURSEMANAGER |
1199 | - * @param null $return_count |
|
1199 | + * @param boolean|null $return_count |
|
1200 | 1200 | * @param bool $add_reports |
1201 | 1201 | * @param bool $resumed_report |
1202 | 1202 | * @param array $extra_field |
@@ -1943,7 +1943,7 @@ discard block |
||
1943 | 1943 | * @param int $courseId |
1944 | 1944 | * @param string $separator |
1945 | 1945 | * @param bool $add_link_to_profile |
1946 | - * @return null|string |
|
1946 | + * @return string |
|
1947 | 1947 | */ |
1948 | 1948 | public static function get_coachs_from_course_to_string( |
1949 | 1949 | $session_id = 0, |
@@ -2016,7 +2016,7 @@ discard block |
||
2016 | 2016 | * Get the list of groups from the course |
2017 | 2017 | * @param string $course_code |
2018 | 2018 | * @param int $session_id Session ID (optional) |
2019 | - * @param boolean $in_get_empty_group get empty groups (optional) |
|
2019 | + * @param integer $in_get_empty_group get empty groups (optional) |
|
2020 | 2020 | * @return array List of groups info |
2021 | 2021 | */ |
2022 | 2022 | public static function get_group_list_of_course($course_code, $session_id = 0, $in_get_empty_group = 0) |
@@ -2072,6 +2072,7 @@ discard block |
||
2072 | 2072 | * course. |
2073 | 2073 | * |
2074 | 2074 | * @param string The code of the course to delete |
2075 | + * @param string $code |
|
2075 | 2076 | * @todo When deleting a virtual course: unsubscribe users from that virtual |
2076 | 2077 | * course from the groups in the real course if they are not subscribed in |
2077 | 2078 | * that real course. |
@@ -2283,6 +2284,7 @@ discard block |
||
2283 | 2284 | * Sort courses for a specific user ?? |
2284 | 2285 | * @param int User ID |
2285 | 2286 | * @param string Course code |
2287 | + * @param integer $user_id |
|
2286 | 2288 | * @return int Minimum course order |
2287 | 2289 | * @todo Review documentation |
2288 | 2290 | */ |
@@ -2360,7 +2362,7 @@ discard block |
||
2360 | 2362 | * check if course exists |
2361 | 2363 | * @param string course_code |
2362 | 2364 | * @param string whether to accept virtual course codes or not |
2363 | - * @return true if exists, false else |
|
2365 | + * @return integer if exists, false else |
|
2364 | 2366 | */ |
2365 | 2367 | public static function course_exists($course_code, $accept_virtual = false) |
2366 | 2368 | { |
@@ -2379,9 +2381,9 @@ discard block |
||
2379 | 2381 | * Send an email to tutor after the auth-suscription of a student in your course |
2380 | 2382 | * @author Carlos Vargas <[email protected]>, Dokeos Latino |
2381 | 2383 | * @param int $user_id the id of the user |
2382 | - * @param string $course_code the course code |
|
2384 | + * @param string $courseId the course code |
|
2383 | 2385 | * @param bool $send_to_tutor_also |
2384 | - * @return string we return the message that is displayed when the action is successful |
|
2386 | + * @return false|null we return the message that is displayed when the action is successful |
|
2385 | 2387 | */ |
2386 | 2388 | public static function email_to_tutor($user_id, $courseId, $send_to_tutor_also = false) |
2387 | 2389 | { |
@@ -2624,6 +2626,7 @@ discard block |
||
2624 | 2626 | /** |
2625 | 2627 | * Get emails of tutors to course |
2626 | 2628 | * @param string Visual code |
2629 | + * @param integer $courseId |
|
2627 | 2630 | * @return array List of emails of tutors to course |
2628 | 2631 | * @author @author Carlos Vargas <[email protected]>, Dokeos Latino |
2629 | 2632 | * */ |
@@ -2647,6 +2650,7 @@ discard block |
||
2647 | 2650 | * Get coaches emails by session |
2648 | 2651 | * @param int session id |
2649 | 2652 | * @param int $courseId |
2653 | + * @param integer $session_id |
|
2650 | 2654 | * @return array array(email => name_tutor) by coach |
2651 | 2655 | * @author Carlos Vargas <[email protected]> |
2652 | 2656 | */ |
@@ -2695,7 +2699,9 @@ discard block |
||
2695 | 2699 | * @param string Field's internal variable name |
2696 | 2700 | * @param int Field's type |
2697 | 2701 | * @param string Field's language var name |
2698 | - * @return int new extra field id |
|
2702 | + * @param integer $fieldType |
|
2703 | + * @param string $default |
|
2704 | + * @return boolean new extra field id |
|
2699 | 2705 | */ |
2700 | 2706 | public static function create_course_extra_field($variable, $fieldType, $displayText, $default) |
2701 | 2707 | { |
@@ -2717,7 +2723,7 @@ discard block |
||
2717 | 2723 | * @param int Course id |
2718 | 2724 | * @param string Attribute name |
2719 | 2725 | * @param string Attribute value |
2720 | - * @return bool True if attribute was successfully updated, |
|
2726 | + * @return Doctrine\DBAL\Driver\Statement|null True if attribute was successfully updated, |
|
2721 | 2727 | * false if course was not found or attribute name is invalid |
2722 | 2728 | */ |
2723 | 2729 | public static function update_attribute($id, $name, $value) |
@@ -2735,7 +2741,7 @@ discard block |
||
2735 | 2741 | * |
2736 | 2742 | * @param int Course id |
2737 | 2743 | * @param array Associative array with field names as keys and field values as values |
2738 | - * @return bool True if update was successful, false otherwise |
|
2744 | + * @return Doctrine\DBAL\Driver\Statement|null True if update was successful, false otherwise |
|
2739 | 2745 | */ |
2740 | 2746 | public static function update_attributes($id, $attributes) |
2741 | 2747 | { |
@@ -2761,7 +2767,7 @@ discard block |
||
2761 | 2767 | * @param integer Course ID |
2762 | 2768 | * @param string Field variable name |
2763 | 2769 | * @param string Field value |
2764 | - * @return boolean true if field updated, false otherwise |
|
2770 | + * @return boolean|null true if field updated, false otherwise |
|
2765 | 2771 | */ |
2766 | 2772 | public static function update_course_extra_field_value($course_code, $variable, $value = '') |
2767 | 2773 | { |
@@ -3483,6 +3489,7 @@ discard block |
||
3483 | 3489 | * @uses displayCoursesInCategory() to display the courses themselves |
3484 | 3490 | * @param int user id |
3485 | 3491 | * @param bool Whether to show the document quick-loader or not |
3492 | + * @param integer $user_id |
|
3486 | 3493 | * @return string |
3487 | 3494 | */ |
3488 | 3495 | public static function display_courses($user_id, $load_dirs = false) |
@@ -4057,6 +4064,8 @@ discard block |
||
4057 | 4064 | * @param int source session id |
4058 | 4065 | * @param string destination course code |
4059 | 4066 | * @param int destination session id |
4067 | + * @param integer $source_session_id |
|
4068 | + * @param integer $destination_session_id |
|
4060 | 4069 | * @return bool |
4061 | 4070 | */ |
4062 | 4071 | public static function copy_course( |
@@ -4091,6 +4100,7 @@ discard block |
||
4091 | 4100 | * @param int source session id |
4092 | 4101 | * @param int destination session id |
4093 | 4102 | * @param bool new copied tools (Exercises and LPs)will be set to invisible by default? |
4103 | + * @param string $new_title |
|
4094 | 4104 | * |
4095 | 4105 | * @return array |
4096 | 4106 | */ |
@@ -4344,6 +4354,7 @@ discard block |
||
4344 | 4354 | * @param int course id |
4345 | 4355 | * @param int session id |
4346 | 4356 | * @param id url id |
4357 | + * @param integer $session_id |
|
4347 | 4358 | * @return array |
4348 | 4359 | **/ |
4349 | 4360 | public static function update_course_ranking( |
@@ -4426,7 +4437,7 @@ discard block |
||
4426 | 4437 | * @param int course id |
4427 | 4438 | * @param int session id |
4428 | 4439 | * @param int url id (access_url_id) |
4429 | - * @return mixed 'added', 'updated' or 'nothing' |
|
4440 | + * @return false|string 'added', 'updated' or 'nothing' |
|
4430 | 4441 | */ |
4431 | 4442 | public static function add_course_vote($user_id, $vote, $course_id, $session_id = null, $url_id = null) |
4432 | 4443 | { |
@@ -4681,6 +4692,7 @@ discard block |
||
4681 | 4692 | * Get courses count |
4682 | 4693 | * @param int Access URL ID (optional) |
4683 | 4694 | * @param int $visibility |
4695 | + * @param integer $access_url_id |
|
4684 | 4696 | * |
4685 | 4697 | * @return int Number of courses |
4686 | 4698 | */ |
@@ -4737,6 +4749,7 @@ discard block |
||
4737 | 4749 | /** |
4738 | 4750 | * Get available le courses count |
4739 | 4751 | * @param int Access URL ID (optional) |
4752 | + * @param integer $accessUrlId |
|
4740 | 4753 | * @return int Number of courses |
4741 | 4754 | */ |
4742 | 4755 | public static function countAvailableCourses($accessUrlId = null) |
@@ -4781,6 +4794,7 @@ discard block |
||
4781 | 4794 | * @param int User ID |
4782 | 4795 | * @param array Course details array |
4783 | 4796 | * @param array List of courses to which the user is subscribed (if not provided, will be generated) |
4797 | + * @param integer $uid |
|
4784 | 4798 | * @return mixed 'enter' for a link to go to the course or 'register' for a link to subscribe, or false if no access |
4785 | 4799 | */ |
4786 | 4800 | static function get_access_link_by_user($uid, $course, $user_courses = array()) |
@@ -4851,7 +4865,7 @@ discard block |
||
4851 | 4865 | * @param bool $deleteTeachersNotInList |
4852 | 4866 | * @param bool $editTeacherInSessions |
4853 | 4867 | * @param bool $deleteSessionTeacherNotInList |
4854 | - * @return bool |
|
4868 | + * @return false|null |
|
4855 | 4869 | */ |
4856 | 4870 | public static function updateTeachers( |
4857 | 4871 | $courseId, |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @param string $canHaveCourses |
112 | 112 | * @param int $parent_id |
113 | 113 | * |
114 | - * @return bool |
|
114 | + * @return false|string |
|
115 | 115 | */ |
116 | 116 | function addNode($code, $name, $canHaveCourses, $parent_id) |
117 | 117 | { |
@@ -306,8 +306,7 @@ discard block |
||
306 | 306 | /** |
307 | 307 | * Counts the number of children categories a category has |
308 | 308 | * @param int $categoryId The ID of the category of which we want to count the children |
309 | - * @param int $count The number of subcategories we counted this far |
|
310 | - * @return mixed The number of subcategories this category has |
|
309 | + * @return integer The number of subcategories this category has |
|
311 | 310 | */ |
312 | 311 | function courseCategoryChildrenCount($categoryId) |
313 | 312 | { |
@@ -474,7 +473,7 @@ discard block |
||
474 | 473 | /** |
475 | 474 | * @param int $id |
476 | 475 | * |
477 | - * @return bool |
|
476 | + * @return false|null |
|
478 | 477 | */ |
479 | 478 | function addToUrl($id) |
480 | 479 | { |
@@ -970,7 +969,7 @@ discard block |
||
970 | 969 | * Get Pagination HTML div |
971 | 970 | * @param $pageCurrent |
972 | 971 | * @param $pageLength |
973 | - * @param $pageTotal |
|
972 | + * @param integer $pageTotal |
|
974 | 973 | * @return string |
975 | 974 | */ |
976 | 975 | function getCataloguePagination($pageCurrent, $pageLength, $pageTotal) |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Get all data by description and session id, |
96 | 96 | * first you must set session_id property with the object CourseDescription |
97 | 97 | * @param int $description_type Description type |
98 | - * @param string $course_code Course code (optional) |
|
98 | + * @param string $courseId Course code (optional) |
|
99 | 99 | * @param int $session_id Session id (optional) |
100 | 100 | * @return array List of fields from the descriptions found of the given type |
101 | 101 | */ |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | |
360 | 360 | /** |
361 | 361 | * Get description titles by default |
362 | - * @return array |
|
362 | + * @return string[] |
|
363 | 363 | */ |
364 | 364 | public function get_default_description_title() |
365 | 365 | { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | /** |
380 | 380 | * Get description titles editable by default |
381 | - * @return array |
|
381 | + * @return boolean[] |
|
382 | 382 | */ |
383 | 383 | public function get_default_description_title_editable() |
384 | 384 | { |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | /** |
399 | 399 | * Get description icons by default |
400 | - * @return array |
|
400 | + * @return string[] |
|
401 | 401 | */ |
402 | 402 | public function get_default_description_icon() |
403 | 403 | { |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | |
418 | 418 | /** |
419 | 419 | * Get questions by default for help |
420 | - * @return array |
|
420 | + * @return string[] |
|
421 | 421 | */ |
422 | 422 | public function get_default_question() |
423 | 423 | { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | /** |
438 | 438 | * Get informations by default for help |
439 | - * @return array |
|
439 | + * @return string[] |
|
440 | 440 | */ |
441 | 441 | public function get_default_information() |
442 | 442 | { |