@@ -1271,6 +1271,7 @@ discard block |
||
1271 | 1271 | * Gets the list of courses a specific user is subscribed to |
1272 | 1272 | * @param int User ID |
1273 | 1273 | * @param boolean $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED |
1274 | + * @param integer $userid |
|
1274 | 1275 | * @return array Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d) |
1275 | 1276 | */ |
1276 | 1277 | function api_get_user_courses($userid, $fetch_session = true) |
@@ -3016,7 +3017,7 @@ discard block |
||
3016 | 3017 | * on the session visibility |
3017 | 3018 | * @param bool $tutor Whether to check if the user has the tutor role |
3018 | 3019 | * @param bool $coach Whether to check if the user has the coach role |
3019 | -* @return boolean true: the user has the rights to edit, false: he does not |
|
3020 | +* @return boolean|null true: the user has the rights to edit, false: he does not |
|
3020 | 3021 | */ |
3021 | 3022 | function api_is_allowed_to_session_edit($tutor = false, $coach = false) |
3022 | 3023 | { |
@@ -5197,6 +5198,7 @@ discard block |
||
5197 | 5198 | * @param string Whether we want a simple list (display a category) or |
5198 | 5199 | * a grouped list (group by variable as in settings.php default). Values: 'list' or 'group' |
5199 | 5200 | * @param int Access URL's ID. Optional. Uses 1 by default, which is the unique URL |
5201 | + * @param string $cat |
|
5200 | 5202 | * @return array Array of database results for the current settings of the current access URL |
5201 | 5203 | */ |
5202 | 5204 | function &api_get_settings($cat = null, $ordering = 'list', $access_url = 1, $url_changeable = 0) |
@@ -6590,7 +6592,7 @@ discard block |
||
6590 | 6592 | /** |
6591 | 6593 | * Returns an array of global configuration settings which should be ignored |
6592 | 6594 | * when printing the configuration settings screens |
6593 | - * @return array Array of strings, each identifying one of the excluded settings |
|
6595 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
6594 | 6596 | */ |
6595 | 6597 | function api_get_locked_settings() { |
6596 | 6598 | return array( |
@@ -6631,6 +6633,7 @@ discard block |
||
6631 | 6633 | * false if he isn't. If the user ID is given and is an integer, then the same |
6632 | 6634 | * ID is simply returned |
6633 | 6635 | * @param integer User ID |
6636 | + * @param integer $user_id |
|
6634 | 6637 | * @return boolean Integer User ID is logged in, or false otherwise |
6635 | 6638 | */ |
6636 | 6639 | function api_user_is_login($user_id = null) { |
@@ -7051,6 +7054,7 @@ discard block |
||
7051 | 7054 | /** |
7052 | 7055 | * Gets memory limit in bytes |
7053 | 7056 | * @param string The memory size (128M, 1G, 1000K, etc) |
7057 | + * @param string $mem |
|
7054 | 7058 | * @return int |
7055 | 7059 | * @assert (null) === false |
7056 | 7060 | * @assert ('1t') === 1099511627776 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * @return array |
|
89 | + * @return string[] |
|
90 | 90 | */ |
91 | 91 | public function get_status_list() |
92 | 92 | { |
@@ -435,6 +435,12 @@ |
||
435 | 435 | |
436 | 436 | /** |
437 | 437 | * Additional functions needed for fast integration |
438 | + * @param integer $status |
|
439 | + * @param string $section |
|
440 | + * @param string $title |
|
441 | + * @param string $url |
|
442 | + * @param string|null $formatter |
|
443 | + * @param string $comment |
|
438 | 444 | */ |
439 | 445 | public function build_setting( |
440 | 446 | $status, |
@@ -59,7 +59,7 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return array |
|
62 | + * @return string[] |
|
63 | 63 | */ |
64 | 64 | public function get_status_list() |
65 | 65 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * @param string $event_name |
15 | 15 | * @param array $event_data |
16 | - * @return bool |
|
16 | + * @return false|null |
|
17 | 17 | */ |
18 | 18 | public static function events($event_name, $event_data = array()) |
19 | 19 | { |
@@ -1276,6 +1276,7 @@ discard block |
||
1276 | 1276 | |
1277 | 1277 | /** |
1278 | 1278 | * Validates the time control key |
1279 | + * @param integer $exercise_id |
|
1279 | 1280 | */ |
1280 | 1281 | public static function exercise_time_control_is_valid( |
1281 | 1282 | $exercise_id, |
@@ -1412,7 +1413,7 @@ discard block |
||
1412 | 1413 | * @param int $in_direction |
1413 | 1414 | * @param string $in_hotpot_path |
1414 | 1415 | * @param bool $in_get_count |
1415 | - * @param null $where_condition |
|
1416 | + * @param string $where_condition |
|
1416 | 1417 | * @return array|int |
1417 | 1418 | */ |
1418 | 1419 | public static function get_exam_results_hotpotatoes_data( |
@@ -2215,7 +2216,7 @@ discard block |
||
2215 | 2216 | /** |
2216 | 2217 | * Return true if pass_pourcentage activated (we use the pass pourcentage feature |
2217 | 2218 | * return false if pass_percentage = 0 (we don't use the pass pourcentage feature |
2218 | - * @param $in_pass_pourcentage |
|
2219 | + * @param string $in_pass_pourcentage |
|
2219 | 2220 | * @return boolean |
2220 | 2221 | * In this version, pass_percentage and show_success_message are disabled if |
2221 | 2222 | * pass_percentage is set to 0 |
@@ -2228,7 +2229,7 @@ discard block |
||
2228 | 2229 | /** |
2229 | 2230 | * Converts a numeric value in a percentage example 0.66666 to 66.67 % |
2230 | 2231 | * @param $value |
2231 | - * @return float Converted number |
|
2232 | + * @return string Converted number |
|
2232 | 2233 | */ |
2233 | 2234 | public static function convert_to_percentage($value) |
2234 | 2235 | { |
@@ -2244,7 +2245,7 @@ discard block |
||
2244 | 2245 | * @param float $score |
2245 | 2246 | * @param float $weight |
2246 | 2247 | * @deprecated seem not to be used |
2247 | - * @return float the score rounded converted to the new range |
|
2248 | + * @return string|null the score rounded converted to the new range |
|
2248 | 2249 | */ |
2249 | 2250 | public static function convert_score($score, $weight) |
2250 | 2251 | { |
@@ -2801,6 +2802,7 @@ discard block |
||
2801 | 2802 | * @param int exercise id |
2802 | 2803 | * @param int $courseId |
2803 | 2804 | * @param int session id |
2805 | + * @param integer $user_count |
|
2804 | 2806 | * @return float Best average score |
2805 | 2807 | */ |
2806 | 2808 | public static function get_best_average_score_by_exercise( |
@@ -3230,8 +3232,9 @@ discard block |
||
3230 | 3232 | } |
3231 | 3233 | |
3232 | 3234 | /** |
3233 | - * @param array $answer |
|
3235 | + * @param string|null $answer |
|
3234 | 3236 | * @param string $user_answer |
3237 | + * @param string|null $current_answer |
|
3235 | 3238 | * @return array |
3236 | 3239 | */ |
3237 | 3240 | public static function check_fill_in_blanks($answer, $user_answer, $current_answer) |
@@ -3858,7 +3861,7 @@ discard block |
||
3858 | 3861 | |
3859 | 3862 | /** |
3860 | 3863 | * @param int $countLetter |
3861 | - * @return mixed |
|
3864 | + * @return string |
|
3862 | 3865 | */ |
3863 | 3866 | public static function detectInputAppropriateClass($countLetter) |
3864 | 3867 | { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * This function is used with $extraField->addElements() |
76 | 76 | * @param array $params array for the insertion into the *_field_values table |
77 | 77 | * @param bool $showQuery |
78 | - * @return mixed false on empty params, void otherwise |
|
78 | + * @return false|null false on empty params, void otherwise |
|
79 | 79 | * @assert (array()) === false |
80 | 80 | */ |
81 | 81 | public function saveFieldValues($params, $showQuery = false) |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
532 | 532 | * @param int $field_id Field ID (the ID from the *_field table) |
533 | 533 | * @param bool $transform Whether to transform the result to a human readable strings |
534 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
534 | + * @return string A structured array with the field_id and field_value, or false on error |
|
535 | 535 | * @assert (-1,-1) === false |
536 | 536 | */ |
537 | 537 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | * @param int $item_id Item ID from the original table |
625 | 625 | * @param string $field_variable The name of the field we are looking for |
626 | 626 | * @param bool $transform |
627 | - * @param bool $allVisibility |
|
627 | + * @param bool $visibility |
|
628 | 628 | * |
629 | 629 | * @return mixed Array of results, or false on error or not found |
630 | 630 | * @assert (-1,'') === false |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * Deletes a file or a directory |
40 | 40 | * |
41 | 41 | * @author - Hugues Peeters |
42 | - * @param $file (String) - the path of file or directory to delete |
|
43 | - * @return boolean - true if the delete succeed, false otherwise. |
|
42 | + * @param string $file (String) - the path of file or directory to delete |
|
43 | + * @return boolean|null - true if the delete succeed, false otherwise. |
|
44 | 44 | * @see - delete() uses check_name_exist() and removeDir() functions |
45 | 45 | */ |
46 | 46 | function my_delete($file) |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @author Hugues Peeters <[email protected]> |
128 | 128 | * @param string $file_path complete path of the file or the directory |
129 | 129 | * @param string $new_file_name new name for the file or the directory |
130 | - * @return boolean true if succeed, false otherwise |
|
130 | + * @return string|false true if succeed, false otherwise |
|
131 | 131 | * @see rename() uses the check_name_exist() and php2phps() functions |
132 | 132 | */ |
133 | 133 | function my_rename($file_path, $new_file_name) { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @param string $target the path of the new area |
175 | 175 | * @param bool $forceMove Whether to force a move or to make a copy (safer but slower) and then delete the original |
176 | 176 | * @param bool $moveContent In some cases (including migrations), we need to move the *content* and not the folder itself |
177 | - * @return bool true if the move succeed, false otherwise. |
|
177 | + * @return boolean|null true if the move succeed, false otherwise. |
|
178 | 178 | * @see move() uses check_name_exist() and copyDirTo() functions |
179 | 179 | */ |
180 | 180 | function move($source, $target, $forceMove = true, $moveContent = false) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * Returns the name without extension, used for the title |
54 | 54 | * |
55 | 55 | * @param string $name |
56 | - * @return name without the extension |
|
56 | + * @return string without the extension |
|
57 | 57 | */ |
58 | 58 | function get_document_title($name) |
59 | 59 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * This function checks if the upload succeeded |
68 | 68 | * |
69 | 69 | * @param array $uploaded_file ($_FILES) |
70 | - * @return true if upload succeeded |
|
70 | + * @return boolean if upload succeeded |
|
71 | 71 | */ |
72 | 72 | function process_uploaded_file($uploaded_file, $show_output = true) |
73 | 73 | { |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | * @param array $courseInfo |
1033 | 1033 | * @param array $userInfo |
1034 | 1034 | * @param array $uploaded_file - follows the $_FILES Structure |
1035 | - * @param string $upload_path - destination of the upload. |
|
1035 | + * @param string $uploadPath - destination of the upload. |
|
1036 | 1036 | * This path is to append to $base_work_dir |
1037 | 1037 | * @param string $base_work_dir - base working directory of the module |
1038 | 1038 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | * @param int $session_id Session ID, if any |
1220 | 1220 | * @param int $userId creator id |
1221 | 1221 | * |
1222 | - * @return int id if inserted document |
|
1222 | + * @return string|false id if inserted document |
|
1223 | 1223 | */ |
1224 | 1224 | function add_document( |
1225 | 1225 | $_course, |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | * |
1361 | 1361 | * @author Olivier Cauberghe <[email protected]> |
1362 | 1362 | * @param path+filename eg: /main/document/document.php |
1363 | - * @return The directory depth |
|
1363 | + * @return integer directory depth |
|
1364 | 1364 | */ |
1365 | 1365 | function get_levels($filename) { |
1366 | 1366 | $levels = explode('/', $filename); |
@@ -1377,6 +1377,8 @@ discard block |
||
1377 | 1377 | * @author Olivier Cauberghe <[email protected]> |
1378 | 1378 | * @param path,filename |
1379 | 1379 | * action: Adds an entry to the document table with the default settings. |
1380 | + * @param string $upload_path |
|
1381 | + * @param string $filename |
|
1380 | 1382 | */ |
1381 | 1383 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
1382 | 1384 | { |
@@ -1838,7 +1840,6 @@ discard block |
||
1838 | 1840 | * @param int $groupId group.id |
1839 | 1841 | * @param bool $output |
1840 | 1842 | * @param array $parent |
1841 | - * @param string $uploadPath |
|
1842 | 1843 | * |
1843 | 1844 | */ |
1844 | 1845 | function add_all_documents_in_folder_to_database( |