@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | return chamilo_preprocess_results($results); |
24 | 24 | } |
25 | 25 | |
26 | +/** |
|
27 | + * @param string $query_string |
|
28 | + */ |
|
26 | 29 | function chamilo_query_simple_query($query_string, $offset=0, $length=10, $extra=NULL) { |
27 | 30 | return xapian_query($query_string, NULL, $offset, $length, $extra); |
28 | 31 | } |
@@ -30,7 +33,7 @@ discard block |
||
30 | 33 | /** |
31 | 34 | * Wrapper for getting boolean queries |
32 | 35 | * |
33 | - * @param string $query_string The term string |
|
36 | + * @param string $term |
|
34 | 37 | */ |
35 | 38 | function chamilo_get_boolean_query($term) { |
36 | 39 | return xapian_get_boolean_query($term); |
@@ -57,6 +57,7 @@ discard block |
||
57 | 57 | * Add a value to the indexed item |
58 | 58 | * @param string Key |
59 | 59 | * @param string Value |
60 | + * @param string $key |
|
60 | 61 | * @return void |
61 | 62 | */ |
62 | 63 | function addValue($key, $value) { |
@@ -101,6 +102,7 @@ discard block |
||
101 | 102 | |
102 | 103 | /** |
103 | 104 | * Let add course id term |
105 | + * @param string $course_id |
|
104 | 106 | */ |
105 | 107 | public function addCourseId($course_id) |
106 | 108 | { |
@@ -109,6 +111,7 @@ discard block |
||
109 | 111 | |
110 | 112 | /** |
111 | 113 | * Let add tool id term |
114 | + * @param string $tool_id |
|
112 | 115 | */ |
113 | 116 | public function addToolId($tool_id) |
114 | 117 | { |
@@ -273,6 +273,8 @@ |
||
273 | 273 | |
274 | 274 | /** |
275 | 275 | * Show search form |
276 | + * @param string $action |
|
277 | + * @param boolean $show_thesaurus |
|
276 | 278 | */ |
277 | 279 | function display_search_form($action, $show_thesaurus, $sf_terms, $op) { |
278 | 280 | $type = (!empty($_REQUEST['type'])? htmlentities($_REQUEST['type']): 'normal'); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | /** |
100 | 100 | * Simple getter for the db attribute |
101 | - * @return object The db attribute |
|
101 | + * @return null|XapianWritableDatabase The db attribute |
|
102 | 102 | */ |
103 | 103 | function getDb() |
104 | 104 | { |
@@ -108,6 +108,7 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * Add this chunk to the chunk array attribute |
110 | 110 | * @param string Chunk of text |
111 | + * @param IndexableChunk $chunk |
|
111 | 112 | * @return void |
112 | 113 | */ |
113 | 114 | function addChunk($chunk) |
@@ -179,7 +180,7 @@ discard block |
||
179 | 180 | * Get document data on a xapian document |
180 | 181 | * |
181 | 182 | * @param XapianDocument $doc xapian document to push into the db |
182 | - * @return mixed xapian document data or FALSE if error |
|
183 | + * @return string xapian document data or FALSE if error |
|
183 | 184 | */ |
184 | 185 | function get_document_data($doc) |
185 | 186 | { |
@@ -286,7 +287,7 @@ discard block |
||
286 | 287 | * Replace a document in the actual db |
287 | 288 | * |
288 | 289 | * @param XapianDocument $doc xapian document to push into the db |
289 | - * @param Xapian::docid $did xapian document id of the document to replace |
|
290 | + * @param integer $did xapian document id of the document to replace |
|
290 | 291 | */ |
291 | 292 | function replace_document($doc, $did) |
292 | 293 | { |
@@ -45,6 +45,8 @@ discard block |
||
45 | 45 | * checker path (directory) |
46 | 46 | * @param string Absolute path to be checked (with trailing slash) |
47 | 47 | * @param string Checker path under which the path should be (absolute path, with trailing slash, get it from api_get_path(SYS_COURSE_PATH)) |
48 | + * @param string $abs_path |
|
49 | + * @param string $checker_path |
|
48 | 50 | * @return bool True if the path is under the checker, false otherwise |
49 | 51 | */ |
50 | 52 | public static function check_abs_path($abs_path, $checker_path) |
@@ -300,6 +302,7 @@ discard block |
||
300 | 302 | * @param string The variable to filter for XSS, this params can be a string or an array (example : array(x,y)) |
301 | 303 | * @param int The user status,constant allowed (STUDENT, COURSEMANAGER, ANONYMOUS, COURSEMANAGERLOWSECURITY) |
302 | 304 | * @param bool $filter_terms |
305 | + * @param integer $user_status |
|
303 | 306 | * @return mixed Filtered string or array |
304 | 307 | */ |
305 | 308 | public static function remove_XSS($var, $user_status = null, $filter_terms = false) |
@@ -453,7 +456,7 @@ discard block |
||
453 | 456 | * This method provides specific protection (against XSS and other kinds of attacks) for static images (icons) used by the system. |
454 | 457 | * Image paths are supposed to be given by programmers - people who know what they do, anyway, this method encourages |
455 | 458 | * a safe practice for generating icon paths, without using heavy solutions based on HTMLPurifier for example. |
456 | - * @param string $img_path The input path of the image, it could be relative or absolute URL. |
|
459 | + * @param string $image_path The input path of the image, it could be relative or absolute URL. |
|
457 | 460 | * @return string Returns sanitized image path or an empty string when the image path is not secure. |
458 | 461 | * @author Ivan Tcholakov, March 2011 |
459 | 462 | */ |
@@ -1336,9 +1336,9 @@ discard block |
||
1336 | 1336 | * @param integer $sessionCategoryId |
1337 | 1337 | * @param int $visibility |
1338 | 1338 | * @param string $description |
1339 | - * @param bool $showDescription |
|
1339 | + * @param integer $showDescription |
|
1340 | 1340 | * @param int $duration |
1341 | - * @param array $extraFields |
|
1341 | + * @param boolean|null $extraFields |
|
1342 | 1342 | * @param int $sessionAdminId |
1343 | 1343 | * @param boolean $sendSubscriptionNotification Optional. |
1344 | 1344 | * Whether send a mail notification to users being subscribed |
@@ -1558,7 +1558,7 @@ discard block |
||
1558 | 1558 | * @param array $user_list |
1559 | 1559 | * @param int $session_visibility |
1560 | 1560 | * @param bool $empty_users |
1561 | - * @return bool |
|
1561 | + * @return false|null |
|
1562 | 1562 | */ |
1563 | 1563 | public static function suscribe_users_to_session( |
1564 | 1564 | $id_session, |
@@ -1830,7 +1830,7 @@ discard block |
||
1830 | 1830 | * @param array $courseInfo |
1831 | 1831 | * @param int $status |
1832 | 1832 | * @param bool $updateTotal |
1833 | - * @return bool |
|
1833 | + * @return false|null |
|
1834 | 1834 | */ |
1835 | 1835 | public static function removeUsersFromCourseSession( |
1836 | 1836 | $userList, |
@@ -1896,7 +1896,7 @@ discard block |
||
1896 | 1896 | * @param string $course_code |
1897 | 1897 | * @param int $session_visibility |
1898 | 1898 | * @param bool $removeUsersNotInList |
1899 | - * @return bool |
|
1899 | + * @return false|null |
|
1900 | 1900 | */ |
1901 | 1901 | public static function subscribe_users_to_session_course( |
1902 | 1902 | $user_list, |
@@ -2079,7 +2079,7 @@ discard block |
||
2079 | 2079 | * @param bool $removeExistingCoursesWithUsers Whether to unsubscribe |
2080 | 2080 | * existing courses and users (true, default) or not (false) |
2081 | 2081 | * @param $copyEvaluation from base course to session course |
2082 | - * @return void Nothing, or false on error |
|
2082 | + * @return false|null Nothing, or false on error |
|
2083 | 2083 | * */ |
2084 | 2084 | public static function add_courses_to_session( |
2085 | 2085 | $sessionId, |
@@ -2275,6 +2275,8 @@ discard block |
||
2275 | 2275 | * |
2276 | 2276 | * @param int Session id |
2277 | 2277 | * @param int Course id |
2278 | + * @param integer $session_id |
|
2279 | + * @param integer $course_id |
|
2278 | 2280 | * @return bool True in case of success, false otherwise |
2279 | 2281 | */ |
2280 | 2282 | public static function unsubscribe_course_from_session($session_id, $course_id) |
@@ -2330,7 +2332,7 @@ discard block |
||
2330 | 2332 | * @param string $variable Field's internal variable name |
2331 | 2333 | * @param int $fieldType Field's type |
2332 | 2334 | * @param string $displayText Field's language var name |
2333 | - * @return int new extra field id |
|
2335 | + * @return boolean new extra field id |
|
2334 | 2336 | */ |
2335 | 2337 | public static function create_session_extra_field($variable, $fieldType, $displayText) |
2336 | 2338 | { |
@@ -2349,7 +2351,7 @@ discard block |
||
2349 | 2351 | * @param integer Course ID |
2350 | 2352 | * @param string Field variable name |
2351 | 2353 | * @param string Field value |
2352 | - * @return boolean true if field updated, false otherwise |
|
2354 | + * @return boolean|null true if field updated, false otherwise |
|
2353 | 2355 | */ |
2354 | 2356 | public static function update_session_extra_field_value($sessionId, $variable, $value = '') |
2355 | 2357 | { |
@@ -2554,7 +2556,7 @@ discard block |
||
2554 | 2556 | * @param array id_checked |
2555 | 2557 | * @param bool include delete session |
2556 | 2558 | * @param bool optional, true if the function is called by a webservice, false otherwise. |
2557 | - * @return void Nothing, or false on error |
|
2559 | + * @return boolean Nothing, or false on error |
|
2558 | 2560 | * The parameters is a array to delete sessions |
2559 | 2561 | * */ |
2560 | 2562 | public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false) |
@@ -2605,7 +2607,7 @@ discard block |
||
2605 | 2607 | * @param array $conditions a list of condition example : |
2606 | 2608 | * array('status' => STUDENT) or |
2607 | 2609 | * array('s.name' => array('operator' => 'LIKE', value = '%$needle%')) |
2608 | - * @param array $order_by a list of fields on which sort |
|
2610 | + * @param string[] $order_by a list of fields on which sort |
|
2609 | 2611 | * @return array An array with all sessions of the platform. |
2610 | 2612 | * @todo optional course code parameter, optional sorting parameters... |
2611 | 2613 | */ |
@@ -3043,6 +3045,7 @@ discard block |
||
3043 | 3045 | * @param string $orderCondition |
3044 | 3046 | * @param string $keyword |
3045 | 3047 | * @param string $description |
3048 | + * @param integer $status |
|
3046 | 3049 | * @return array sessions |
3047 | 3050 | */ |
3048 | 3051 | public static function getSessionsFollowedByUser( |
@@ -3255,8 +3258,8 @@ discard block |
||
3255 | 3258 | /** |
3256 | 3259 | * Gets the list of courses by session filtered by access_url |
3257 | 3260 | * |
3258 | - * @param $userId |
|
3259 | - * @param $sessionId |
|
3261 | + * @param integer $userId |
|
3262 | + * @param null|integer $sessionId |
|
3260 | 3263 | * @param null $from |
3261 | 3264 | * @param null $limit |
3262 | 3265 | * @param null $column |
@@ -3381,6 +3384,7 @@ discard block |
||
3381 | 3384 | /** |
3382 | 3385 | * Gets the count of courses by session filtered by access_url |
3383 | 3386 | * @param int session id |
3387 | + * @param integer $session_id |
|
3384 | 3388 | * @return array list of courses |
3385 | 3389 | */ |
3386 | 3390 | public static function getCourseCountBySessionId($session_id, $keyword = null) |
@@ -3632,6 +3636,7 @@ discard block |
||
3632 | 3636 | * Updates a session status |
3633 | 3637 | * @param int session id |
3634 | 3638 | * @param int status |
3639 | + * @param integer $status |
|
3635 | 3640 | */ |
3636 | 3641 | public static function set_session_status($session_id, $status) |
3637 | 3642 | { |
@@ -3943,7 +3948,7 @@ discard block |
||
3943 | 3948 | |
3944 | 3949 | /** |
3945 | 3950 | * @param $id |
3946 | - * @return bool |
|
3951 | + * @return null|boolean |
|
3947 | 3952 | */ |
3948 | 3953 | public static function protect_teacher_session_edit($id) |
3949 | 3954 | { |
@@ -4007,7 +4012,7 @@ discard block |
||
4007 | 4012 | * true: if the session exists it will be updated. |
4008 | 4013 | * false: if session exists a new session will be created adding a counter session1, session2, etc |
4009 | 4014 | * @param int $defaultUserId |
4010 | - * @param mixed $logger |
|
4015 | + * @param Logger $logger |
|
4011 | 4016 | * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will |
4012 | 4017 | * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id') |
4013 | 4018 | * @param string $extraFieldId |
@@ -5249,7 +5254,6 @@ discard block |
||
5249 | 5254 | * @param string $lastConnectionDate |
5250 | 5255 | * @param array $sessionIdList |
5251 | 5256 | * @param array $studentIdList |
5252 | - * @param int $userStatus STUDENT|COURSEMANAGER constants |
|
5253 | 5257 | * |
5254 | 5258 | * @return array|int |
5255 | 5259 | */ |
@@ -5401,7 +5405,7 @@ discard block |
||
5401 | 5405 | /** |
5402 | 5406 | * Get the list of course tools that have to be dealt with in case of |
5403 | 5407 | * registering any course to a session |
5404 | - * @return array The list of tools to be dealt with (literal names) |
|
5408 | + * @return string[] The list of tools to be dealt with (literal names) |
|
5405 | 5409 | */ |
5406 | 5410 | public static function getCourseToolToBeManaged() |
5407 | 5411 | { |
@@ -5415,7 +5419,7 @@ discard block |
||
5415 | 5419 | * Calls the methods bound to each tool when a course is registered into a session |
5416 | 5420 | * @param int $sessionId |
5417 | 5421 | * @param int $courseId |
5418 | - * @return void |
|
5422 | + * @return boolean|null |
|
5419 | 5423 | */ |
5420 | 5424 | public static function installCourse($sessionId, $courseId) |
5421 | 5425 | { |
@@ -6055,6 +6059,7 @@ discard block |
||
6055 | 6059 | * @param int $categoryId The internal ID of the session category |
6056 | 6060 | * @param string $target Value to search for in the session field values |
6057 | 6061 | * @param array $extraFields A list of fields to be scanned and returned |
6062 | + * @param DateTime $publicationDate |
|
6058 | 6063 | * @return mixed |
6059 | 6064 | */ |
6060 | 6065 | public static function getShortSessionListAndExtraByCategory($categoryId, $target, $extraFields = null, $publicationDate = null) |
@@ -7384,7 +7389,7 @@ discard block |
||
7384 | 7389 | /** |
7385 | 7390 | * Get link to the admin page for this session |
7386 | 7391 | * @param int $id Session ID |
7387 | - * @return mixed URL to the admin page to manage the session, or false on error |
|
7392 | + * @return false|string URL to the admin page to manage the session, or false on error |
|
7388 | 7393 | */ |
7389 | 7394 | public static function getAdminPath($id) |
7390 | 7395 | { |
@@ -7401,7 +7406,7 @@ discard block |
||
7401 | 7406 | * If a course is provided, build the link to the course |
7402 | 7407 | * @param int $id Session ID |
7403 | 7408 | * @param int $courseId Course ID (optional) in case the link has to send straight to the course |
7404 | - * @return mixed URL to the page to use the session, or false on error |
|
7409 | + * @return false|string URL to the page to use the session, or false on error |
|
7405 | 7410 | */ |
7406 | 7411 | public static function getPath($id, $courseId = 0) |
7407 | 7412 | { |
@@ -7499,7 +7504,7 @@ discard block |
||
7499 | 7504 | /** |
7500 | 7505 | * Return true if coach is allowed to access this session |
7501 | 7506 | * @param int $sessionId |
7502 | - * @return bool |
|
7507 | + * @return integer |
|
7503 | 7508 | */ |
7504 | 7509 | public static function isSessionDateOkForCoach($sessionId) |
7505 | 7510 | { |
@@ -326,6 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Gets an element |
329 | + * @param integer $gradebook_id |
|
329 | 330 | */ |
330 | 331 | public function get_skill_info($skill_id, $gradebook_id) |
331 | 332 | { |
@@ -544,7 +545,7 @@ discard block |
||
544 | 545 | * Gets an element |
545 | 546 | * @param int $id |
546 | 547 | * |
547 | - * @return array|mixed |
|
548 | + * @return integer |
|
548 | 549 | */ |
549 | 550 | public function get($id) |
550 | 551 | { |
@@ -885,7 +886,7 @@ discard block |
||
885 | 886 | /** |
886 | 887 | * Get user's skills |
887 | 888 | * |
888 | - * @param int $userId User's id |
|
889 | + * @param integer $user_id User's id |
|
889 | 890 | * @param bool $get_skill_data |
890 | 891 | */ |
891 | 892 | public function get_user_skills($user_id, $get_skill_data = false) |
@@ -30,6 +30,9 @@ |
||
30 | 30 | $this->center_x = intval($offset_x + $this->canvas_x/2 - $this->block_size/2); |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $class |
|
35 | + */ |
|
33 | 36 | function prepare_skill_box($skill, $position, $class) |
34 | 37 | { |
35 | 38 | $block_id = $skill['id']; |
@@ -63,6 +63,8 @@ discard block |
||
63 | 63 | * @param int user id |
64 | 64 | * @param int user friend id |
65 | 65 | * @param string |
66 | + * @param integer $user_id |
|
67 | + * @param integer $user_friend |
|
66 | 68 | * @author isaac flores paz |
67 | 69 | */ |
68 | 70 | public static function get_relation_between_contacts($user_id, $user_friend) |
@@ -94,6 +96,8 @@ discard block |
||
94 | 96 | * @param int group id |
95 | 97 | * @param string name to search |
96 | 98 | * @param bool true will load firstname, lastname, and image name |
99 | + * @param integer $user_id |
|
100 | + * @param integer $id_group |
|
97 | 101 | * @return array |
98 | 102 | * @author Julio Montoya <[email protected]> Cleaning code, function renamed, $load_extra_info option added |
99 | 103 | * @author isaac flores paz |
@@ -170,6 +174,9 @@ discard block |
||
170 | 174 | * @param int user friend id |
171 | 175 | * @param string title of the message |
172 | 176 | * @param string content of the message |
177 | + * @param integer $user_id |
|
178 | + * @param string $message_title |
|
179 | + * @param string $message_content |
|
173 | 180 | * @return boolean |
174 | 181 | * @author isaac flores paz |
175 | 182 | * @author Julio Montoya <[email protected]> Cleaning code |
@@ -241,6 +248,7 @@ discard block |
||
241 | 248 | * Get number messages of the inbox |
242 | 249 | * @author isaac flores paz |
243 | 250 | * @param int user receiver id |
251 | + * @param integer $user_receiver_id |
|
244 | 252 | * @return int |
245 | 253 | */ |
246 | 254 | public static function get_message_number_invitation_by_user_id($user_receiver_id) |
@@ -283,6 +291,7 @@ discard block |
||
283 | 291 | * Get invitation list sent by user |
284 | 292 | * @author Julio Montoya <[email protected]> |
285 | 293 | * @param int user id |
294 | + * @param integer $user_id |
|
286 | 295 | * @return array() |
287 | 296 | */ |
288 | 297 | public static function get_list_invitation_sent_by_user_id($user_id) |
@@ -325,6 +334,7 @@ discard block |
||
325 | 334 | * Denies invitation |
326 | 335 | * @param int user sender id |
327 | 336 | * @param int user receiver id |
337 | + * @param integer $user_receiver_id |
|
328 | 338 | * @author isaac flores paz |
329 | 339 | * @author Julio Montoya <[email protected]> Cleaning code |
330 | 340 | */ |
@@ -360,7 +370,7 @@ discard block |
||
360 | 370 | * @author Isaac Flores Paz <[email protected]> |
361 | 371 | * @author Julio Montoya <[email protected]> Cleaning code |
362 | 372 | * @param void |
363 | - * @return string message invitation |
|
373 | + * @return false|null message invitation |
|
364 | 374 | */ |
365 | 375 | public static function send_invitation_friend_user($userfriend_id, $subject_message = '', $content_message = '') |
366 | 376 | { |
@@ -1229,7 +1239,7 @@ discard block |
||
1229 | 1239 | * @param string $messageContent of the message |
1230 | 1240 | * @param int $messageId id parent |
1231 | 1241 | * @param string $messageStatus status type of message |
1232 | - * @return boolean |
|
1242 | + * @return false|string |
|
1233 | 1243 | * @author Yannick Warnier |
1234 | 1244 | */ |
1235 | 1245 | public static function sendWallMessage($userId, $friendId, $messageContent, $messageId = 0, $messageStatus = '') |
@@ -1318,7 +1328,7 @@ discard block |
||
1318 | 1328 | * Gets all messages from someone's wall (within specific limits) |
1319 | 1329 | * @param int $userId id of wall shown |
1320 | 1330 | * @param string $messageStatus status wall message |
1321 | - * @param int|string $parentId id message (Post main) |
|
1331 | + * @param integer|null $parentId id message (Post main) |
|
1322 | 1332 | * @param date $start Date from which we want to show the messages, in UTC time |
1323 | 1333 | * @param int $limit Limit for the number of parent messages we want to show |
1324 | 1334 | * @param int $offset Wall message query offset |
@@ -1647,7 +1657,7 @@ discard block |
||
1647 | 1657 | /** |
1648 | 1658 | * Delete messages delete logic |
1649 | 1659 | * @param int $id id message to delete. |
1650 | - * @return bool status query |
|
1660 | + * @return Statement|null status query |
|
1651 | 1661 | */ |
1652 | 1662 | public static function deleteMessage($id) |
1653 | 1663 | { |