@@ -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, |
@@ -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 | { |
@@ -342,6 +342,7 @@ |
||
342 | 342 | * @param string User id value |
343 | 343 | * @param int Set to 1 to subscribe, 0 to unsubscribe |
344 | 344 | * @param int Status (STUDENT or TEACHER) Used for subscription only |
345 | + * @param integer $state |
|
345 | 346 | * @return mixed True if subscription or unsubscription was successful, false otherwise |
346 | 347 | */ |
347 | 348 | protected function changeUserSubscription($course_id_field_name, $course_id_value, $user_id_field_name, $user_id_value, $state, $status = STUDENT) { |
@@ -327,7 +327,7 @@ |
||
327 | 327 | * @param array $arr1 first array |
328 | 328 | * @param array $arr2 second array |
329 | 329 | * |
330 | - * @return array difference between the two arrays |
|
330 | + * @return string difference between the two arrays |
|
331 | 331 | */ |
332 | 332 | function diff($arr1, $arr2) |
333 | 333 | { |
@@ -272,6 +272,7 @@ |
||
272 | 272 | } |
273 | 273 | /** |
274 | 274 | * Get dummy titles, descriptions and texts |
275 | + * @param string $type |
|
275 | 276 | */ |
276 | 277 | function get_dummy_content($type) |
277 | 278 | { |
@@ -1003,7 +1003,6 @@ |
||
1003 | 1003 | /** |
1004 | 1004 | * Processes an IMS/QTI manifest file: store links to new files to be able to transform them into the questions text |
1005 | 1005 | * @param string $filePath The absolute filepath |
1006 | - * @param array $links List of filepaths changes |
|
1007 | 1006 | * @return bool |
1008 | 1007 | */ |
1009 | 1008 | function qtiProcessManifest($filePath) |
@@ -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 string $file_comment |
461 | 461 | * @param bool $sendToUsersInSession |
462 | 462 | * |
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) |
@@ -17,6 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @author - Hugues Peeters <[email protected]> |
19 | 19 | * @param - file_name (string) name of a file |
20 | + * @param string $file_name |
|
20 | 21 | * @return - the filenam phps'ized |
21 | 22 | */ |
22 | 23 | function php2phps($file_name) { |
@@ -73,7 +74,7 @@ discard block |
||
73 | 74 | * Returns the name without extension, used for the title |
74 | 75 | * |
75 | 76 | * @param string $name |
76 | - * @return name without the extension |
|
77 | + * @return string without the extension |
|
77 | 78 | */ |
78 | 79 | function get_document_title($name) { |
79 | 80 | // If they upload .htaccess... |
@@ -86,7 +87,7 @@ discard block |
||
86 | 87 | * This function checks if the upload succeeded |
87 | 88 | * |
88 | 89 | * @param array $uploaded_file ($_FILES) |
89 | - * @return true if upload succeeded |
|
90 | + * @return boolean if upload succeeded |
|
90 | 91 | */ |
91 | 92 | function process_uploaded_file($uploaded_file, $show_output = true) |
92 | 93 | { |
@@ -738,6 +739,8 @@ discard block |
||
738 | 739 | * @param - dir (string) - Path of the directory |
739 | 740 | * whe the file should be added |
740 | 741 | * @param - max_dir_space (int) - maximum size of the diretory in byte |
742 | + * @param string $dir |
|
743 | + * @param integer $max_dir_space |
|
741 | 744 | * @return - boolean true if there is enough space, |
742 | 745 | * boolean false otherwise |
743 | 746 | * |
@@ -1062,7 +1065,7 @@ discard block |
||
1062 | 1065 | * @param array $courseInfo |
1063 | 1066 | * @param array $userInfo |
1064 | 1067 | * @param array $uploaded_file - follows the $_FILES Structure |
1065 | - * @param string $upload_path - destination of the upload. |
|
1068 | + * @param string $uploadPath - destination of the upload. |
|
1066 | 1069 | * This path is to append to $base_work_dir |
1067 | 1070 | * @param string $base_work_dir - base working directory of the module |
1068 | 1071 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1243,7 +1246,7 @@ discard block |
||
1243 | 1246 | * @param int $session_id Session ID, if any |
1244 | 1247 | * @param int $userId creator id |
1245 | 1248 | * |
1246 | - * @return int id if inserted document |
|
1249 | + * @return string|false id if inserted document |
|
1247 | 1250 | */ |
1248 | 1251 | function add_document( |
1249 | 1252 | $_course, |
@@ -1377,7 +1380,7 @@ discard block |
||
1377 | 1380 | * |
1378 | 1381 | * @author Olivier Cauberghe <[email protected]> |
1379 | 1382 | * @param path+filename eg: /main/document/document.php |
1380 | - * @return The directory depth |
|
1383 | + * @return integer directory depth |
|
1381 | 1384 | */ |
1382 | 1385 | function get_levels($filename) { |
1383 | 1386 | $levels = explode('/', $filename); |
@@ -1394,6 +1397,7 @@ discard block |
||
1394 | 1397 | * @author Olivier Cauberghe <[email protected]> |
1395 | 1398 | * @param path,filename |
1396 | 1399 | * action: Adds an entry to the document table with the default settings. |
1400 | + * @param string $upload_path |
|
1397 | 1401 | */ |
1398 | 1402 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
1399 | 1403 | { |
@@ -1818,6 +1822,7 @@ discard block |
||
1818 | 1822 | |
1819 | 1823 | @author Roan Embrechts |
1820 | 1824 | @version 0.6 |
1825 | + * @param string $buffer |
|
1821 | 1826 | */ |
1822 | 1827 | function api_replace_links_in_string($upload_path, $buffer) { |
1823 | 1828 | // Search for hyperlinks |
@@ -2053,7 +2058,6 @@ discard block |
||
2053 | 2058 | * @param int $groupId |
2054 | 2059 | * @param bool $output |
2055 | 2060 | * @param array $parent |
2056 | - * @param string $uploadPath |
|
2057 | 2061 | * |
2058 | 2062 | */ |
2059 | 2063 | function add_all_documents_in_folder_to_database( |
@@ -234,7 +234,7 @@ |
||
234 | 234 | * @param object &$caller calling object |
235 | 235 | * @since 1.0 |
236 | 236 | * @access public |
237 | - * @return void |
|
237 | + * @return boolean |
|
238 | 238 | */ |
239 | 239 | function onQuickFormEvent($event, $arg, &$caller) |
240 | 240 | { |