@@ -242,6 +242,9 @@ discard block |
||
242 | 242 | return $hmac; |
243 | 243 | } |
244 | 244 | |
245 | +/** |
|
246 | + * @param string|false $text |
|
247 | + */ |
|
245 | 248 | function _openid_sha1($text) { |
246 | 249 | $hex = sha1($text); |
247 | 250 | $raw = ''; |
@@ -404,6 +407,10 @@ discard block |
||
404 | 407 | */ |
405 | 408 | if (!function_exists('bcpowmod')) { |
406 | 409 | |
410 | + /** |
|
411 | + * @param string $exp |
|
412 | + * @param string $mod |
|
413 | + */ |
|
407 | 414 | function bcpowmod($base, $exp, $mod) { |
408 | 415 | $square = bcmod($base, $mod); |
409 | 416 | $result = 1; |
@@ -230,7 +230,7 @@ |
||
230 | 230 | /** |
231 | 231 | * Get id |
232 | 232 | * |
233 | - * @return boolean |
|
233 | + * @return integer |
|
234 | 234 | */ |
235 | 235 | public function getId() |
236 | 236 | { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
94 | - * @param array $array |
|
94 | + * @param string[] $array |
|
95 | 95 | */ |
96 | 96 | public function set_tools_to_build($array) |
97 | 97 | { |
@@ -3054,7 +3054,7 @@ |
||
3054 | 3054 | * @param integer $thread_qualify |
3055 | 3055 | * @param integer $qualify_time |
3056 | 3056 | * @param integer $session_id |
3057 | - * @return array optional |
|
3057 | + * @return string|null optional |
|
3058 | 3058 | * @author Isaac Flores <[email protected]>, U.N.A.S University |
3059 | 3059 | * @version October 2008, dokeos 1.8.6 |
3060 | 3060 | */ |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * @param string $objetives |
52 | 52 | * @param string $target_audience |
53 | 53 | * @param int $user_id |
54 | - * @return mixed The database id of the newly created course request or FALSE on failure. |
|
54 | + * @return false|string The database id of the newly created course request or FALSE on failure. |
|
55 | 55 | */ |
56 | 56 | public static function create_course_request( |
57 | 57 | $wanted_code, |
@@ -1333,6 +1333,8 @@ discard block |
||
1333 | 1333 | * @param string type of time filter: 'last_week' or 'custom' |
1334 | 1334 | * @param string start date date('Y-m-d H:i:s') |
1335 | 1335 | * @param string end date date('Y-m-d H:i:s') |
1336 | + * @param string $start_date |
|
1337 | + * @param string $end_date |
|
1336 | 1338 | * @return timestamp $nb_seconds |
1337 | 1339 | */ |
1338 | 1340 | public static function get_time_spent_on_the_platform( |
@@ -1435,7 +1437,7 @@ discard block |
||
1435 | 1437 | * Get first connection date for a student |
1436 | 1438 | * @param int $student_id |
1437 | 1439 | * |
1438 | - * @return string|bool Date format long without day or false if there are no connections |
|
1440 | + * @return string|false Date format long without day or false if there are no connections |
|
1439 | 1441 | */ |
1440 | 1442 | public static function get_first_connection_date($student_id) |
1441 | 1443 | { |
@@ -1465,7 +1467,7 @@ discard block |
||
1465 | 1467 | * @param int $student_id |
1466 | 1468 | * @param bool $warning_message Show a warning message (optional) |
1467 | 1469 | * @param bool $return_timestamp True for returning results in timestamp (optional) |
1468 | - * @return string|int|bool Date format long without day, false if there are no connections or |
|
1470 | + * @return string Date format long without day, false if there are no connections or |
|
1469 | 1471 | * timestamp if parameter $return_timestamp is true |
1470 | 1472 | */ |
1471 | 1473 | public static function get_last_connection_date($student_id, $warning_message = false, $return_timestamp = false) |
@@ -2762,6 +2764,9 @@ discard block |
||
2762 | 2764 | * @param array Limit average to listed lp ids |
2763 | 2765 | * @param int Session id (optional), if param $session_id is |
2764 | 2766 | * null(default) it'll return results including sessions, 0 = session is not filtered |
2767 | + * @param integer $student_id |
|
2768 | + * @param string $course_code |
|
2769 | + * @param integer $session_id |
|
2765 | 2770 | * @return int Total time |
2766 | 2771 | */ |
2767 | 2772 | public static function get_time_spent_in_lp($student_id, $course_code, $lp_ids = array(), $session_id = null) |
@@ -2831,6 +2836,8 @@ discard block |
||
2831 | 2836 | * @param int|array Student id(s) |
2832 | 2837 | * @param string Course code |
2833 | 2838 | * @param int Learning path id |
2839 | + * @param integer $student_id |
|
2840 | + * @param string $course_code |
|
2834 | 2841 | * @return int Total time |
2835 | 2842 | */ |
2836 | 2843 | public static function get_last_connection_time_in_lp($student_id, $course_code, $lp_id, $session_id = 0) |
@@ -5504,7 +5511,7 @@ discard block |
||
5504 | 5511 | |
5505 | 5512 | /** |
5506 | 5513 | * @param FormValidator $form |
5507 | - * @return mixed |
|
5514 | + * @return FormValidator |
|
5508 | 5515 | */ |
5509 | 5516 | public static function setUserSearchForm($form) |
5510 | 5517 | { |
@@ -6985,7 +6992,7 @@ discard block |
||
6985 | 6992 | * @param int $user_id |
6986 | 6993 | * @param int $course_id |
6987 | 6994 | * @param int $session_id |
6988 | - * @return array |
|
6995 | + * @return string[] |
|
6989 | 6996 | */ |
6990 | 6997 | public function display_login_tracking_info($view, $user_id, $course_id, $session_id = 0) |
6991 | 6998 | { |
@@ -7031,9 +7038,9 @@ discard block |
||
7031 | 7038 | /** |
7032 | 7039 | * Displays the exercise results for a specific user in a specific course. |
7033 | 7040 | * @param string $view |
7034 | - * @param int $user_id User ID |
|
7041 | + * @param int $userId User ID |
|
7035 | 7042 | * @param string $courseCode Course code |
7036 | - * @return array |
|
7043 | + * @return string[] |
|
7037 | 7044 | * @todo remove globals |
7038 | 7045 | */ |
7039 | 7046 | public function display_exercise_tracking_info($view, $userId, $courseCode) |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * This function is used with $extraField->addElements() |
74 | 74 | * @param array $params array for the insertion into the *_field_values table |
75 | 75 | * |
76 | - * @return mixed false on empty params, void otherwise |
|
76 | + * @return false|null false on empty params, void otherwise |
|
77 | 77 | * @assert (array()) === false |
78 | 78 | */ |
79 | 79 | public function saveFieldValues($params) |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
531 | 531 | * @param int $field_id Field ID (the ID from the *_field table) |
532 | 532 | * @param bool $transform Whether to transform the result to a human readable strings |
533 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
533 | + * @return string A structured array with the field_id and field_value, or false on error |
|
534 | 534 | * @assert (-1,-1) === false |
535 | 535 | */ |
536 | 536 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | * @param int $item_id Item ID from the original table |
624 | 624 | * @param string $field_variable The name of the field we are looking for |
625 | 625 | * @param bool $transform |
626 | - * @param bool $allVisibility |
|
626 | + * @param bool $visibility |
|
627 | 627 | * |
628 | 628 | * @return mixed Array of results, or false on error or not found |
629 | 629 | * @assert (-1,'') === false |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * Returns the name without extension, used for the title |
74 | 74 | * |
75 | 75 | * @param string $name |
76 | - * @return name without the extension |
|
76 | + * @return string without the extension |
|
77 | 77 | */ |
78 | 78 | function get_document_title($name) { |
79 | 79 | // If they upload .htaccess... |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * This function checks if the upload succeeded |
87 | 87 | * |
88 | 88 | * @param array $uploaded_file ($_FILES) |
89 | - * @return true if upload succeeded |
|
89 | + * @return boolean if upload succeeded |
|
90 | 90 | */ |
91 | 91 | function process_uploaded_file($uploaded_file, $show_output = true) |
92 | 92 | { |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | * @param array $courseInfo |
1020 | 1020 | * @param array $userInfo |
1021 | 1021 | * @param array $uploaded_file - follows the $_FILES Structure |
1022 | - * @param string $upload_path - destination of the upload. |
|
1022 | + * @param string $uploadPath - destination of the upload. |
|
1023 | 1023 | * This path is to append to $base_work_dir |
1024 | 1024 | * @param string $base_work_dir - base working directory of the module |
1025 | 1025 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1200,7 +1200,7 @@ discard block |
||
1200 | 1200 | * @param int $session_id Session ID, if any |
1201 | 1201 | * @param int $userId creator id |
1202 | 1202 | * |
1203 | - * @return int id if inserted document |
|
1203 | + * @return string|false id if inserted document |
|
1204 | 1204 | */ |
1205 | 1205 | function add_document( |
1206 | 1206 | $_course, |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | * |
1335 | 1335 | * @author Olivier Cauberghe <[email protected]> |
1336 | 1336 | * @param path+filename eg: /main/document/document.php |
1337 | - * @return The directory depth |
|
1337 | + * @return integer directory depth |
|
1338 | 1338 | */ |
1339 | 1339 | function get_levels($filename) { |
1340 | 1340 | $levels = explode('/', $filename); |
@@ -1351,6 +1351,8 @@ discard block |
||
1351 | 1351 | * @author Olivier Cauberghe <[email protected]> |
1352 | 1352 | * @param path,filename |
1353 | 1353 | * action: Adds an entry to the document table with the default settings. |
1354 | + * @param string $upload_path |
|
1355 | + * @param string $filename |
|
1354 | 1356 | */ |
1355 | 1357 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
1356 | 1358 | { |
@@ -1777,6 +1779,7 @@ discard block |
||
1777 | 1779 | |
1778 | 1780 | @author Roan Embrechts |
1779 | 1781 | @version 0.6 |
1782 | + * @param string $buffer |
|
1780 | 1783 | */ |
1781 | 1784 | function api_replace_links_in_string($upload_path, $buffer) { |
1782 | 1785 | // Search for hyperlinks |
@@ -2012,7 +2015,6 @@ discard block |
||
2012 | 2015 | * @param int $groupId |
2013 | 2016 | * @param bool $output |
2014 | 2017 | * @param array $parent |
2015 | - * @param string $uploadPath |
|
2016 | 2018 | * |
2017 | 2019 | */ |
2018 | 2020 | function add_all_documents_in_folder_to_database( |
@@ -25,8 +25,6 @@ |
||
25 | 25 | * Get allowed tags |
26 | 26 | * @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML, |
27 | 27 | * STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE |
28 | - * @param boolean $fullpage If true, the allowed tags for full-page editing |
|
29 | - * are returned. |
|
30 | 28 | */ |
31 | 29 | static function get_allowed_tags($mode) |
32 | 30 | { |