@@ -31,6 +31,10 @@ |
||
31 | 31 | return $method == 'GET'; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $key |
|
36 | + * @param string $default |
|
37 | + */ |
|
34 | 38 | public static function post($key, $default = null) |
35 | 39 | { |
36 | 40 | return isset($_POST[$key]) ? $_POST[$key] : $default; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | * @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC) |
81 | 81 | * @param array $column_show The columns that we will show in the table i.e: $column_show = array('1','0','1') we will show the 1st and the 3th column. |
82 | 82 | * @param array $column_order Changes how the columns will be sorted ie. $column_order = array('0','3','2','3') The column [1] will be sorted like the column [3] |
83 | - * @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
83 | + * @param integer $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
84 | 84 | * @return array The sorted dataset |
85 | 85 | * @author [email protected] |
86 | 86 | */ |
@@ -330,6 +330,7 @@ discard block |
||
330 | 330 | /** |
331 | 331 | * Sets the footer visibility |
332 | 332 | * @param bool true if we show the footer |
333 | + * @param boolean $status |
|
333 | 334 | */ |
334 | 335 | public function set_footer($status) |
335 | 336 | { |
@@ -370,6 +371,7 @@ discard block |
||
370 | 371 | /** |
371 | 372 | * Sets the header visibility |
372 | 373 | * @param bool true if we show the header |
374 | + * @param boolean $status |
|
373 | 375 | */ |
374 | 376 | public function set_header($status) |
375 | 377 | { |
@@ -52,6 +52,7 @@ discard block |
||
52 | 52 | * Converts the text of a html-document to a given encoding, the meta-tag is changed accordingly. |
53 | 53 | * @param string $string The input full-html document. |
54 | 54 | * @param string The new encoding value to be set. |
55 | + * @param string $encoding |
|
55 | 56 | */ |
56 | 57 | function api_set_encoding_html(&$string, $encoding) { |
57 | 58 | $old_encoding = api_detect_encoding_html($string); |
@@ -74,7 +75,7 @@ discard block |
||
74 | 75 | * Returns the title of a html document. |
75 | 76 | * @param string $string The contents of the input document. |
76 | 77 | * @param string $input_encoding The encoding of the input document. If the value is not set, it is detected. |
77 | - * @param string $$output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | + * @param string $output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | 79 | * @return string The retrieved title, html-entities and extra-whitespace between the words are cleaned. |
79 | 80 | */ |
80 | 81 | function api_get_title_html(&$string, $output_encoding = null, $input_encoding = null) { |
@@ -433,7 +434,7 @@ discard block |
||
433 | 434 | * @since wordpress 2.8.1 |
434 | 435 | * @access private |
435 | 436 | * |
436 | - * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | + * @param string[] $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | 438 | * @param string $subject The string being searched and replaced on, otherwise known as the haystack. |
438 | 439 | * @return string The string with the replaced svalues. |
439 | 440 | */ |
@@ -628,6 +629,7 @@ discard block |
||
628 | 629 | * @param string The text to "cut" |
629 | 630 | * @param int Count of chars |
630 | 631 | * @param bool Whether to embed in a <span title="...">...</span> |
632 | + * @param integer $maxchar |
|
631 | 633 | * @return string |
632 | 634 | * */ |
633 | 635 | function cut($text, $maxchar, $embed = false) { |
@@ -645,7 +647,7 @@ discard block |
||
645 | 647 | * |
646 | 648 | * @param mixed Number to convert |
647 | 649 | * @param int Decimal points 0=never, 1=if needed, 2=always |
648 | - * @return mixed An integer or a float depends on the parameter |
|
650 | + * @return string|null An integer or a float depends on the parameter |
|
649 | 651 | */ |
650 | 652 | function float_format($number, $flag = 1) { |
651 | 653 | if (is_numeric($number)) { |
@@ -689,7 +691,7 @@ discard block |
||
689 | 691 | /** |
690 | 692 | * Gets the week from a day |
691 | 693 | * @param string Date in UTC (2010-01-01 12:12:12) |
692 | - * @return int Returns an integer with the week number of the year |
|
694 | + * @return string Returns an integer with the week number of the year |
|
693 | 695 | */ |
694 | 696 | function get_week_from_day($date) { |
695 | 697 | if (!empty($date)) { |
@@ -739,6 +741,9 @@ discard block |
||
739 | 741 | return $output.$end; |
740 | 742 | } |
741 | 743 | |
744 | +/** |
|
745 | + * @param string $glue |
|
746 | + */ |
|
742 | 747 | function implode_with_key($glue, $array) { |
743 | 748 | if (!empty($array)) { |
744 | 749 | $string = ''; |
@@ -817,7 +822,7 @@ discard block |
||
817 | 822 | /** |
818 | 823 | * @param string $string |
819 | 824 | * @param bool $capitalizeFirstCharacter |
820 | - * @return mixed |
|
825 | + * @return string |
|
821 | 826 | */ |
822 | 827 | function underScoreToCamelCase($string, $capitalizeFirstCharacter = true) |
823 | 828 | { |
@@ -73,7 +73,7 @@ |
||
73 | 73 | * @todo the form should be auto generated |
74 | 74 | * @param string url |
75 | 75 | * @param string action add, edit |
76 | - * @return obj form validator obj |
|
76 | + * @return FormValidator form validator obj |
|
77 | 77 | */ |
78 | 78 | public function return_form($url, $action) |
79 | 79 | { |
@@ -1287,6 +1287,8 @@ discard block |
||
1287 | 1287 | * @param string type of time filter: 'last_week' or 'custom' |
1288 | 1288 | * @param string start date date('Y-m-d H:i:s') |
1289 | 1289 | * @param string end date date('Y-m-d H:i:s') |
1290 | + * @param string $start_date |
|
1291 | + * @param string $end_date |
|
1290 | 1292 | * @return timestamp $nb_seconds |
1291 | 1293 | */ |
1292 | 1294 | public static function get_time_spent_on_the_platform( |
@@ -1390,7 +1392,7 @@ discard block |
||
1390 | 1392 | * Get first connection date for a student |
1391 | 1393 | * @param int $student_id |
1392 | 1394 | * |
1393 | - * @return string|bool Date format long without day or false if there are no connections |
|
1395 | + * @return string|false Date format long without day or false if there are no connections |
|
1394 | 1396 | */ |
1395 | 1397 | public static function get_first_connection_date($student_id) |
1396 | 1398 | { |
@@ -1420,7 +1422,7 @@ discard block |
||
1420 | 1422 | * @param int $student_id |
1421 | 1423 | * @param bool $warning_message Show a warning message (optional) |
1422 | 1424 | * @param bool $return_timestamp True for returning results in timestamp (optional) |
1423 | - * @return string|int|bool Date format long without day, false if there are no connections or |
|
1425 | + * @return string Date format long without day, false if there are no connections or |
|
1424 | 1426 | * timestamp if parameter $return_timestamp is true |
1425 | 1427 | */ |
1426 | 1428 | public static function get_last_connection_date($student_id, $warning_message = false, $return_timestamp = false) |
@@ -2667,6 +2669,9 @@ discard block |
||
2667 | 2669 | * @param array Limit average to listed lp ids |
2668 | 2670 | * @param int Session id (optional), if param $session_id is |
2669 | 2671 | * null(default) it'll return results including sessions, 0 = session is not filtered |
2672 | + * @param integer $student_id |
|
2673 | + * @param string $course_code |
|
2674 | + * @param integer $session_id |
|
2670 | 2675 | * @return int Total time |
2671 | 2676 | */ |
2672 | 2677 | public static function get_time_spent_in_lp($student_id, $course_code, $lp_ids = array(), $session_id = null) |
@@ -2733,6 +2738,8 @@ discard block |
||
2733 | 2738 | * @param int|array Student id(s) |
2734 | 2739 | * @param string Course code |
2735 | 2740 | * @param int Learning path id |
2741 | + * @param integer $student_id |
|
2742 | + * @param string $course_code |
|
2736 | 2743 | * @return int Total time |
2737 | 2744 | */ |
2738 | 2745 | public static function get_last_connection_time_in_lp($student_id, $course_code, $lp_id, $session_id = 0) |
@@ -5400,7 +5407,7 @@ discard block |
||
5400 | 5407 | |
5401 | 5408 | /** |
5402 | 5409 | * @param FormValidator $form |
5403 | - * @return mixed |
|
5410 | + * @return FormValidator |
|
5404 | 5411 | */ |
5405 | 5412 | public static function setUserSearchForm($form) |
5406 | 5413 | { |
@@ -5439,7 +5446,6 @@ discard block |
||
5439 | 5446 | * @param int $sessionId The session ID (session.id) |
5440 | 5447 | * @param int $courseId The course ID (course.id) |
5441 | 5448 | * @param int $exerciseId The quiz ID (c_quiz.id) |
5442 | - * @param int $answer The answer status (0 = incorrect, 1 = correct, 2 = both) |
|
5443 | 5449 | * @param array $options An array of options you can pass to the query (limit, where and order) |
5444 | 5450 | * @return array An array with the data of exercise(s) progress |
5445 | 5451 | */ |
@@ -6876,7 +6882,7 @@ discard block |
||
6876 | 6882 | * @param int $user_id |
6877 | 6883 | * @param int $course_id |
6878 | 6884 | * @param int $session_id |
6879 | - * @return array |
|
6885 | + * @return string[] |
|
6880 | 6886 | */ |
6881 | 6887 | public function display_login_tracking_info($view, $user_id, $course_id, $session_id = 0) |
6882 | 6888 | { |
@@ -6922,9 +6928,9 @@ discard block |
||
6922 | 6928 | /** |
6923 | 6929 | * Displays the exercise results for a specific user in a specific course. |
6924 | 6930 | * @param string $view |
6925 | - * @param int $user_id User ID |
|
6931 | + * @param int $userId User ID |
|
6926 | 6932 | * @param string $courseCode Course code |
6927 | - * @return array |
|
6933 | + * @return string[] |
|
6928 | 6934 | * @todo remove globals |
6929 | 6935 | */ |
6930 | 6936 | public function display_exercise_tracking_info($view, $userId, $courseCode) |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param string $url The URL of the site |
19 | 19 | * @param string $description The description of the site |
20 | 20 | * @param int $active is active or not |
21 | - * @return boolean if success |
|
21 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
22 | 22 | */ |
23 | 23 | public static function add($url, $description, $active) |
24 | 24 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param string $url |
44 | 44 | * @param string $description The description of the site |
45 | 45 | * @param int $active is active or not |
46 | - * @return boolean if success |
|
46 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
47 | 47 | */ |
48 | 48 | public static function update($url_id, $url, $description, $active) |
49 | 49 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @author Julio Montoya |
68 | 68 | * @param int $id url id |
69 | 69 | * |
70 | - * @return boolean true if success |
|
70 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
71 | 71 | * */ |
72 | 72 | public static function delete($id) |
73 | 73 | { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * @author Julio Montoya |
367 | 367 | * @param int user id |
368 | 368 | * @param int url id |
369 | - * @return boolean true if success |
|
369 | + * @return integer true if success |
|
370 | 370 | * */ |
371 | 371 | public static function relation_url_user_exist($user_id, $url_id) |
372 | 372 | { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * @author Julio Montoya |
385 | 385 | * @param int $courseId |
386 | 386 | * @param int $urlId |
387 | - * @return boolean true if success |
|
387 | + * @return integer true if success |
|
388 | 388 | * */ |
389 | 389 | public static function relation_url_course_exist($courseId, $urlId) |
390 | 390 | { |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * @author Julio Montoya |
406 | 406 | * @param int $userGroupId |
407 | 407 | * @param int $urlId |
408 | - * @return boolean true if success |
|
408 | + * @return integer true if success |
|
409 | 409 | * */ |
410 | 410 | public static function relationUrlUsergroupExist($userGroupId, $urlId) |
411 | 411 | { |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @author Julio Montoya |
425 | 425 | * @param int user id |
426 | 426 | * @param int url id |
427 | - * @return boolean true if success |
|
427 | + * @return integer true if success |
|
428 | 428 | * */ |
429 | 429 | public static function relation_url_session_exist($session_id, $url_id) |
430 | 430 | { |
@@ -545,6 +545,8 @@ discard block |
||
545 | 545 | * @author Julio Montoya |
546 | 546 | * @param array of course ids |
547 | 547 | * @param array of url_ids |
548 | + * @param integer[] $courseCategoryList |
|
549 | + * @param integer[] $urlList |
|
548 | 550 | * @return array |
549 | 551 | **/ |
550 | 552 | public static function addCourseCategoryListToUrl($courseCategoryList, $urlList) |
@@ -575,7 +577,7 @@ discard block |
||
575 | 577 | * @author Julio Montoya |
576 | 578 | * @param int $categoryCourseId |
577 | 579 | * @param int $urlId |
578 | - * @return boolean true if success |
|
580 | + * @return integer true if success |
|
579 | 581 | * */ |
580 | 582 | public static function relationUrlCourseCategoryExist($categoryCourseId, $urlId) |
581 | 583 | { |
@@ -592,7 +594,7 @@ discard block |
||
592 | 594 | /** |
593 | 595 | * @param int $userGroupId |
594 | 596 | * @param int $urlId |
595 | - * @return int |
|
597 | + * @return string |
|
596 | 598 | */ |
597 | 599 | public static function addUserGroupToUrl($userGroupId, $urlId) |
598 | 600 | { |
@@ -692,7 +694,7 @@ discard block |
||
692 | 694 | * @param int $courseId |
693 | 695 | * @param int $url_id |
694 | 696 | * |
695 | - * @return resource |
|
697 | + * @return boolean |
|
696 | 698 | */ |
697 | 699 | public static function add_course_to_url($courseId, $url_id = 1) |
698 | 700 | { |
@@ -763,7 +765,7 @@ discard block |
||
763 | 765 | * @param int $courseId |
764 | 766 | * @param int $urlId |
765 | 767 | * |
766 | - * @return boolean true if success |
|
768 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
767 | 769 | * */ |
768 | 770 | public static function delete_url_rel_course($courseId, $urlId) |
769 | 771 | { |
@@ -781,7 +783,7 @@ discard block |
||
781 | 783 | * @param int $userGroupId |
782 | 784 | * @param int $urlId |
783 | 785 | * |
784 | - * @return boolean true if success |
|
786 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
785 | 787 | * */ |
786 | 788 | public static function delete_url_rel_usergroup($userGroupId, $urlId) |
787 | 789 | { |
@@ -800,7 +802,7 @@ discard block |
||
800 | 802 | * @param int $userGroupId |
801 | 803 | * @param int $urlId |
802 | 804 | * |
803 | - * @return boolean true if success |
|
805 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
804 | 806 | * */ |
805 | 807 | public static function deleteUrlRelCourseCategory($userGroupId, $urlId) |
806 | 808 | { |
@@ -819,7 +821,7 @@ discard block |
||
819 | 821 | * @param char course code |
820 | 822 | * @param int url id |
821 | 823 | * |
822 | - * @return boolean true if success |
|
824 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
823 | 825 | * */ |
824 | 826 | public static function delete_url_rel_session($session_id, $url_id) |
825 | 827 | { |
@@ -1013,7 +1013,7 @@ discard block |
||
1013 | 1013 | * @param int $groupId |
1014 | 1014 | * @param string $picture |
1015 | 1015 | * |
1016 | - * @return bool|string |
|
1016 | + * @return false|string |
|
1017 | 1017 | */ |
1018 | 1018 | public function manageFileUpload($groupId, $picture) |
1019 | 1019 | { |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | } |
1156 | 1156 | |
1157 | 1157 | /** |
1158 | - * @return mixed |
|
1158 | + * @return integer |
|
1159 | 1159 | */ |
1160 | 1160 | public function getGroupType() |
1161 | 1161 | { |
@@ -1359,6 +1359,8 @@ discard block |
||
1359 | 1359 | * @param string height |
1360 | 1360 | * @param string picture size it can be small_, medium_ or big_ |
1361 | 1361 | * @param string style css |
1362 | + * @param integer $height |
|
1363 | + * @param integer $size_picture |
|
1362 | 1364 | * @return array with the file and the style of an image i.e $array['file'] $array['style'] |
1363 | 1365 | */ |
1364 | 1366 | public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '') |
@@ -1420,7 +1422,7 @@ discard block |
||
1420 | 1422 | * @param string Type of path to return (can be 'none', 'system', 'rel', 'web') |
1421 | 1423 | * @param bool Whether we want to have the directory name returned 'as if' there was a file or not (in the case we want to know which directory to create - otherwise no file means no split subdir) |
1422 | 1424 | * @param bool If we want that the function returns the /main/img/unknown.jpg image set it at true |
1423 | - * @return array Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's |
|
1425 | + * @return integer Array of 2 elements: 'dir' and 'file' which contain the dir and file as the name implies if image does not exist it will return the unknow image if anonymous parameter is true if not it returns an empty er's |
|
1424 | 1426 | */ |
1425 | 1427 | public function get_group_picture_path_by_id($id, $type = 'none', $preview = false, $anonymous = false) |
1426 | 1428 | { |
@@ -1470,7 +1472,7 @@ discard block |
||
1470 | 1472 | } |
1471 | 1473 | |
1472 | 1474 | /** |
1473 | - * @return array |
|
1475 | + * @return string[] |
|
1474 | 1476 | */ |
1475 | 1477 | public function getAllowedPictureExtensions() |
1476 | 1478 | { |
@@ -1660,7 +1662,7 @@ discard block |
||
1660 | 1662 | * @author Julio Montoya |
1661 | 1663 | * @param int $user_id |
1662 | 1664 | * @param int $group_id |
1663 | - * @return boolean true if success |
|
1665 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
1664 | 1666 | * */ |
1665 | 1667 | public function delete_user_rel_group($user_id, $group_id) |
1666 | 1668 | { |
@@ -1872,6 +1874,8 @@ discard block |
||
1872 | 1874 | * @param int from value |
1873 | 1875 | * @param int limit |
1874 | 1876 | * @param array image configuration, i.e array('height'=>'20px', 'size'=> '20px') |
1877 | + * @param integer $from |
|
1878 | + * @param integer $limit |
|
1875 | 1879 | * @return array list of users in a group |
1876 | 1880 | */ |
1877 | 1881 | public function get_users_by_group( |
@@ -1970,6 +1974,8 @@ discard block |
||
1970 | 1974 | * Shows the left column of the group page |
1971 | 1975 | * @param int group id |
1972 | 1976 | * @param int user id |
1977 | + * @param integer $group_id |
|
1978 | + * @param integer $user_id |
|
1973 | 1979 | * |
1974 | 1980 | */ |
1975 | 1981 | public function show_group_column_information($group_id, $user_id, $show = '') |
@@ -2323,7 +2329,7 @@ discard block |
||
2323 | 2329 | * @param int $group_id |
2324 | 2330 | * @param int $parent_group_id if 0, we delete the parent_group association |
2325 | 2331 | * @param int $relation_type |
2326 | - * @return resource |
|
2332 | + * @return Doctrine\DBAL\Driver\Statement|null |
|
2327 | 2333 | **/ |
2328 | 2334 | public static function set_parent_group($group_id, $parent_group_id, $relation_type = 1) |
2329 | 2335 | { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * @return bool|mixed |
|
89 | + * @return string |
|
90 | 90 | */ |
91 | 91 | public static function getPasswordEncryption() |
92 | 92 | { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @param string $raw |
162 | 162 | * @param User $user |
163 | 163 | * |
164 | - * @return bool |
|
164 | + * @return string |
|
165 | 165 | */ |
166 | 166 | public static function encryptPassword($raw, User $user) |
167 | 167 | { |
@@ -965,6 +965,7 @@ discard block |
||
965 | 965 | * Disables or enables a user |
966 | 966 | * @param int user_id |
967 | 967 | * @param int Enable or disable |
968 | + * @param integer $active |
|
968 | 969 | * @return void |
969 | 970 | * @assert (-1,0) === false |
970 | 971 | * @assert (1,1) === true |
@@ -995,6 +996,7 @@ discard block |
||
995 | 996 | /** |
996 | 997 | * Disables a user |
997 | 998 | * @param int User id |
999 | + * @param integer $user_id |
|
998 | 1000 | * @return bool |
999 | 1001 | * @uses UserManager::change_active_state() to actually disable the user |
1000 | 1002 | * @assert (0) === false |
@@ -1011,6 +1013,7 @@ discard block |
||
1011 | 1013 | /** |
1012 | 1014 | * Enable a user |
1013 | 1015 | * @param int User id |
1016 | + * @param integer $user_id |
|
1014 | 1017 | * @return bool |
1015 | 1018 | * @uses UserManager::change_active_state() to actually disable the user |
1016 | 1019 | * @assert (0) === false |
@@ -1175,6 +1178,7 @@ discard block |
||
1175 | 1178 | * Checks whether the user id exists in the database |
1176 | 1179 | * |
1177 | 1180 | * @param int User id |
1181 | + * @param integer $userId |
|
1178 | 1182 | * @return bool True if user id was found, false otherwise |
1179 | 1183 | */ |
1180 | 1184 | public static function is_user_id_valid($userId) |
@@ -1357,7 +1361,7 @@ discard block |
||
1357 | 1361 | * @param array $userInfo user information to avoid query the DB |
1358 | 1362 | * returns the /main/img/unknown.jpg image set it at true |
1359 | 1363 | * |
1360 | - * @return array Array of 2 elements: 'dir' and 'file' which contain |
|
1364 | + * @return integer Array of 2 elements: 'dir' and 'file' which contain |
|
1361 | 1365 | * the dir and file as the name implies if image does not exist it will |
1362 | 1366 | * return the unknow image if anonymous parameter is true if not it returns an empty array |
1363 | 1367 | */ |
@@ -1729,7 +1733,7 @@ discard block |
||
1729 | 1733 | * @param int $user_id User id |
1730 | 1734 | * @param $force Optional parameter to force building after a removal request |
1731 | 1735 | * |
1732 | - * @return A string containing the XHTML code to dipslay the production list, or FALSE |
|
1736 | + * @return boolean|string string containing the XHTML code to dipslay the production list, or FALSE |
|
1733 | 1737 | */ |
1734 | 1738 | public static function build_production_list($user_id, $force = false, $showdelete = false) |
1735 | 1739 | { |
@@ -1765,7 +1769,7 @@ discard block |
||
1765 | 1769 | /** |
1766 | 1770 | * Returns an array with the user's productions. |
1767 | 1771 | * |
1768 | - * @param $user_id User id |
|
1772 | + * @param integer $user_id User id |
|
1769 | 1773 | * @return array An array containing the user's productions |
1770 | 1774 | */ |
1771 | 1775 | public static function get_user_productions($user_id) |
@@ -1920,7 +1924,7 @@ discard block |
||
1920 | 1924 | |
1921 | 1925 | /** |
1922 | 1926 | * Build a list of extra file already uploaded in $user_folder/{$extra_field}/ |
1923 | - * @param $user_id |
|
1927 | + * @param integer $user_id |
|
1924 | 1928 | * @param $extra_field |
1925 | 1929 | * @param bool $force |
1926 | 1930 | * @param bool $showdelete |
@@ -2023,7 +2027,7 @@ discard block |
||
2023 | 2027 | * @param int $fieldType Field's type |
2024 | 2028 | * @param string $displayText Field's language var name |
2025 | 2029 | * @param string $default Field's default value |
2026 | - * @return int |
|
2030 | + * @return boolean |
|
2027 | 2031 | */ |
2028 | 2032 | public static function create_extra_field($variable, $fieldType, $displayText, $default) |
2029 | 2033 | { |
@@ -2056,6 +2060,7 @@ discard block |
||
2056 | 2060 | * @param boolean Whether to prefix the fields indexes with "extra_" (might be used by formvalidator) |
2057 | 2061 | * @param boolean Whether to return invisible fields as well |
2058 | 2062 | * @param boolean Whether to split multiple-selection fields or not |
2063 | + * @param boolean $field_filter |
|
2059 | 2064 | * @return array Array of fields => value for the given user |
2060 | 2065 | */ |
2061 | 2066 | public static function get_extra_user_data( |
@@ -2242,7 +2247,6 @@ discard block |
||
2242 | 2247 | /** |
2243 | 2248 | * Get all the extra field information of a certain field (also the options) |
2244 | 2249 | * |
2245 | - * @param int $field_name the name of the field we want to know everything of |
|
2246 | 2250 | * @return array $return containing all th information about the extra profile field |
2247 | 2251 | * @author Julio Montoya |
2248 | 2252 | * @deprecated |
@@ -2285,6 +2289,7 @@ discard block |
||
2285 | 2289 | /** |
2286 | 2290 | * Get extra user data by field variable |
2287 | 2291 | * @param string field variable |
2292 | + * @param string $field_variable |
|
2288 | 2293 | * @return array data |
2289 | 2294 | */ |
2290 | 2295 | public static function get_extra_user_data_by_field_variable($field_variable) |
@@ -2829,7 +2834,7 @@ discard block |
||
2829 | 2834 | * @param string User ID |
2830 | 2835 | * @param string course directory |
2831 | 2836 | * @param string resourcetype: images, all |
2832 | - * @return int User ID (or false if not found) |
|
2837 | + * @return string User ID (or false if not found) |
|
2833 | 2838 | */ |
2834 | 2839 | public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all') |
2835 | 2840 | { |
@@ -2909,7 +2914,7 @@ discard block |
||
2909 | 2914 | /** |
2910 | 2915 | * Adds a new API key to the users' account |
2911 | 2916 | * @param int Optional user ID (defaults to the results of api_get_user_id()) |
2912 | - * @return boolean True on success, false on failure |
|
2917 | + * @return false|string True on success, false on failure |
|
2913 | 2918 | */ |
2914 | 2919 | public static function add_api_key($user_id = null, $api_service = 'dokeos') |
2915 | 2920 | { |
@@ -2964,6 +2969,7 @@ discard block |
||
2964 | 2969 | * Regenerate an API key from the user's account |
2965 | 2970 | * @param int user ID (defaults to the results of api_get_user_id()) |
2966 | 2971 | * @param string API key's internal ID |
2972 | + * @param string $api_service |
|
2967 | 2973 | * @return int num |
2968 | 2974 | */ |
2969 | 2975 | public static function update_api_key($user_id, $api_service) |
@@ -2993,6 +2999,7 @@ discard block |
||
2993 | 2999 | /** |
2994 | 3000 | * @param int user ID (defaults to the results of api_get_user_id()) |
2995 | 3001 | * @param string API key's internal ID |
3002 | + * @param string $api_service |
|
2996 | 3003 | * @return int row ID, or return false if not found |
2997 | 3004 | */ |
2998 | 3005 | public static function get_api_key_id($user_id, $api_service) |
@@ -3204,7 +3211,8 @@ discard block |
||
3204 | 3211 | * @param int user_id |
3205 | 3212 | * @param int field_id |
3206 | 3213 | * @param bool show links or not |
3207 | - * @return array |
|
3214 | + * @param integer $user_id |
|
3215 | + * @return string |
|
3208 | 3216 | */ |
3209 | 3217 | public static function get_user_tags_to_string($user_id, $field_id, $show_links = true) |
3210 | 3218 | { |
@@ -3249,6 +3257,8 @@ discard block |
||
3249 | 3257 | * Get the tag id |
3250 | 3258 | * @param int tag |
3251 | 3259 | * @param int field_id |
3260 | + * @param string $tag |
|
3261 | + * @param integer $field_id |
|
3252 | 3262 | * @return int returns 0 if fails otherwise the tag id |
3253 | 3263 | */ |
3254 | 3264 | public static function get_tag_id($tag, $field_id) |
@@ -3295,7 +3305,7 @@ discard block |
||
3295 | 3305 | * @param mixed tag |
3296 | 3306 | * @param int The user id |
3297 | 3307 | * @param int field id of the tag |
3298 | - * @return bool |
|
3308 | + * @return boolean|null |
|
3299 | 3309 | */ |
3300 | 3310 | public static function add_tag($tag, $user_id, $field_id) |
3301 | 3311 | { |
@@ -4101,7 +4111,7 @@ discard block |
||
4101 | 4111 | * Add subscribed users to a user by relation type |
4102 | 4112 | * @param int $userId The user id |
4103 | 4113 | * @param array $subscribedUsersId The id of suscribed users |
4104 | - * @param action $relationType The relation type |
|
4114 | + * @param integer $relationType The relation type |
|
4105 | 4115 | */ |
4106 | 4116 | public static function subscribeUsersToUser($userId, $subscribedUsersId, $relationType) |
4107 | 4117 | { |
@@ -4158,6 +4168,8 @@ discard block |
||
4158 | 4168 | * This function check if an user is followed by human resources manager |
4159 | 4169 | * @param int User id |
4160 | 4170 | * @param int Human resources manager |
4171 | + * @param integer $user_id |
|
4172 | + * @param integer $hr_dept_id |
|
4161 | 4173 | * @return bool |
4162 | 4174 | */ |
4163 | 4175 | public static function is_user_followed_by_drh($user_id, $hr_dept_id) |
@@ -4230,6 +4242,8 @@ discard block |
||
4230 | 4242 | * Determines if a user is a gradebook certified |
4231 | 4243 | * @param int The category id of gradebook |
4232 | 4244 | * @param int The user id |
4245 | + * @param integer $cat_id |
|
4246 | + * @param integer $user_id |
|
4233 | 4247 | * @return boolean |
4234 | 4248 | */ |
4235 | 4249 | public static function is_user_certified($cat_id, $user_id) |
@@ -4252,6 +4266,8 @@ discard block |
||
4252 | 4266 | * Gets the info about a gradebook certificate for a user by course |
4253 | 4267 | * @param string The course code |
4254 | 4268 | * @param int The user id |
4269 | + * @param integer $course_code |
|
4270 | + * @param integer $user_id |
|
4255 | 4271 | * @return array if there is not information return false |
4256 | 4272 | */ |
4257 | 4273 | public static function get_info_gradebook_certificate($course_code, $user_id) |
@@ -4715,7 +4731,7 @@ discard block |
||
4715 | 4731 | } |
4716 | 4732 | |
4717 | 4733 | /** |
4718 | - * @return array |
|
4734 | + * @return string[] |
|
4719 | 4735 | */ |
4720 | 4736 | static function get_user_field_types() |
4721 | 4737 | { |
@@ -4967,7 +4983,7 @@ discard block |
||
4967 | 4983 | * Get either a Gravatar URL or complete image tag for a specified email address. |
4968 | 4984 | * |
4969 | 4985 | * @param string $email The email address |
4970 | - * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
4986 | + * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
4971 | 4987 | * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
4972 | 4988 | * @param string $r Maximum rating (inclusive) [ g | pg | r | x ] |
4973 | 4989 | * @param boole $img True to return a complete IMG tag False for just the URL |