@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | * @author Bert Vanderkimpen |
697 | 697 | * @author Yannick Warnier <[email protected]> Adaptation for work tool |
698 | 698 | * @param string $base_work_dir Base work dir (.../work) |
699 | - * @param string $desiredDirName complete path of the desired name |
|
699 | + * @param string $desired_dir_name complete path of the desired name |
|
700 | 700 | * |
701 | 701 | * @return string actual directory name if it succeeds, boolean false otherwise |
702 | 702 | */ |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | /** |
719 | 719 | * Delete a work-tool directory |
720 | 720 | * @param int $id work directory id to delete |
721 | - * @return integer -1 on error |
|
721 | + * @return boolean|null -1 on error |
|
722 | 722 | */ |
723 | 723 | function deleteDirWork($id) |
724 | 724 | { |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | * Update the url of a dir in the student_publication table |
862 | 862 | * @param array $work_data work original data |
863 | 863 | * @param string $newPath Example: "folder1" |
864 | - * @return bool |
|
864 | + * @return boolean|null |
|
865 | 865 | */ |
866 | 866 | function updateDirName($work_data, $newPath) |
867 | 867 | { |
@@ -922,6 +922,7 @@ discard block |
||
922 | 922 | /** |
923 | 923 | * Transform an all directory structure (only directories) in an array |
924 | 924 | * @param string path of the directory |
925 | + * @param string $directory |
|
925 | 926 | * @return array the directory structure into an array |
926 | 927 | * @author Julio Montoya Dokeos |
927 | 928 | * @version April 2008 |
@@ -991,7 +992,7 @@ discard block |
||
991 | 992 | * @param string the path of the directory |
992 | 993 | * @param boolean true if we want the total quantity of files |
993 | 994 | * include in others child directories, false only files in the directory |
994 | - * @return array the first element is an integer with the number of files |
|
995 | + * @return integer[] the first element is an integer with the number of files |
|
995 | 996 | * in the folder, the second element is the number of directories |
996 | 997 | * @author Julio Montoya |
997 | 998 | * @version April 2008 |
@@ -2724,7 +2725,7 @@ discard block |
||
2724 | 2725 | * @param int $userId |
2725 | 2726 | * @param int $workId |
2726 | 2727 | * @param int $courseId |
2727 | - * @return bool |
|
2728 | + * @return boolean|null |
|
2728 | 2729 | */ |
2729 | 2730 | function allowOnlySubscribedUser($userId, $workId, $courseId) |
2730 | 2731 | { |
@@ -2998,6 +2999,7 @@ discard block |
||
2998 | 2999 | * @param int $parentId |
2999 | 3000 | * @param array $courseInfo |
3000 | 3001 | * @param int $sessionId |
3002 | + * @param integer $userId |
|
3001 | 3003 | * @return int |
3002 | 3004 | */ |
3003 | 3005 | function getLastWorkStudentFromParentByUser( |
@@ -4140,7 +4142,7 @@ discard block |
||
4140 | 4142 | } |
4141 | 4143 | |
4142 | 4144 | /** |
4143 | - * @return array |
|
4145 | + * @return string[] |
|
4144 | 4146 | */ |
4145 | 4147 | function getUploadDocumentType() |
4146 | 4148 | { |
@@ -4513,7 +4515,7 @@ discard block |
||
4513 | 4515 | * @param int Session ID |
4514 | 4516 | * @param $correction |
4515 | 4517 | * |
4516 | - * @return array|bool |
|
4518 | + * @return boolean |
|
4517 | 4519 | */ |
4518 | 4520 | function getFileContents($id, $course_info, $sessionId = 0, $correction = false) |
4519 | 4521 | { |
@@ -4631,7 +4633,7 @@ discard block |
||
4631 | 4633 | * @param int $userId |
4632 | 4634 | * @param array $courseInfo |
4633 | 4635 | * @param string $format |
4634 | - * @return bool |
|
4636 | + * @return false|null |
|
4635 | 4637 | */ |
4636 | 4638 | function exportAllWork($userId, $courseInfo, $format = 'pdf') |
4637 | 4639 | { |
@@ -4677,7 +4679,7 @@ discard block |
||
4677 | 4679 | * @param array $courseInfo |
4678 | 4680 | * @param int $sessionId |
4679 | 4681 | * @param string $format |
4680 | - * @return bool |
|
4682 | + * @return false|null |
|
4681 | 4683 | */ |
4682 | 4684 | function exportAllStudentWorkFromPublication( |
4683 | 4685 | $workId, |
@@ -4815,7 +4817,7 @@ discard block |
||
4815 | 4817 | * Downloads all user files per user |
4816 | 4818 | * @param int $userId |
4817 | 4819 | * @param array $courseInfo |
4818 | - * @return bool |
|
4820 | + * @return false|null |
|
4819 | 4821 | */ |
4820 | 4822 | function downloadAllFilesPerUser($userId, $courseInfo) |
4821 | 4823 | { |
@@ -4929,7 +4931,7 @@ discard block |
||
4929 | 4931 | /** |
4930 | 4932 | * @param array $courseInfo |
4931 | 4933 | * @param int $workId |
4932 | - * @return bool |
|
4934 | + * @return boolean|null |
|
4933 | 4935 | */ |
4934 | 4936 | function protectWork($courseInfo, $workId) |
4935 | 4937 | { |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | } |
373 | 373 | |
374 | 374 | /** |
375 | - * @param $courses |
|
375 | + * @param ArrayCollection $courses |
|
376 | 376 | */ |
377 | 377 | public function setCourses($courses) |
378 | 378 | { |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | * Set description |
515 | 515 | * |
516 | 516 | * @param string $description |
517 | - * @return Groups |
|
517 | + * @return Session |
|
518 | 518 | */ |
519 | 519 | public function setDescription($description) |
520 | 520 | { |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | } |
848 | 848 | |
849 | 849 | /** |
850 | - * @return array |
|
850 | + * @return string[] |
|
851 | 851 | */ |
852 | 852 | public static function getStatusList() |
853 | 853 | { |
@@ -907,7 +907,7 @@ discard block |
||
907 | 907 | /** |
908 | 908 | * Get pictureUri |
909 | 909 | * |
910 | - * @return Media |
|
910 | + * @return string |
|
911 | 911 | */ |
912 | 912 | public function getPictureUri() |
913 | 913 | { |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | } |
1285 | 1285 | |
1286 | 1286 | /** |
1287 | - * @return Media |
|
1287 | + * @return string |
|
1288 | 1288 | */ |
1289 | 1289 | public function getAvatar() |
1290 | 1290 | { |
@@ -2051,7 +2051,7 @@ discard block |
||
2051 | 2051 | /** |
2052 | 2052 | * Returns the user roles |
2053 | 2053 | * |
2054 | - * @return array The roles |
|
2054 | + * @return string[] The roles |
|
2055 | 2055 | */ |
2056 | 2056 | public function getRoles() |
2057 | 2057 | { |
@@ -995,7 +995,7 @@ discard block |
||
995 | 995 | /** |
996 | 996 | * Get pictureUri |
997 | 997 | * |
998 | - * @return Media |
|
998 | + * @return string |
|
999 | 999 | */ |
1000 | 1000 | public function getPictureUri() |
1001 | 1001 | { |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | } |
1304 | 1304 | |
1305 | 1305 | /** |
1306 | - * @return Media |
|
1306 | + * @return string |
|
1307 | 1307 | */ |
1308 | 1308 | public function getAvatar() |
1309 | 1309 | { |
@@ -2078,7 +2078,7 @@ discard block |
||
2078 | 2078 | /** |
2079 | 2079 | * Returns the user roles |
2080 | 2080 | * |
2081 | - * @return array The roles |
|
2081 | + * @return string[] The roles |
|
2082 | 2082 | */ |
2083 | 2083 | public function getRoles() |
2084 | 2084 | { |
@@ -2403,7 +2403,7 @@ discard block |
||
2403 | 2403 | /** |
2404 | 2404 | * Check if the user has the skill |
2405 | 2405 | * @param Skill $skill The skill |
2406 | - * @return boolean |
|
2406 | + * @return boolean|null |
|
2407 | 2407 | */ |
2408 | 2408 | public function hasSkill(Skill $skill) |
2409 | 2409 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param string $course Course code |
88 | 88 | * @param integer $lp_id |
89 | 89 | * @param integer $user_id |
90 | - * @return mixed True on success, false on error |
|
90 | + * @return boolean True on success, false on error |
|
91 | 91 | */ |
92 | 92 | public function __construct($course, $lp_id, $user_id) |
93 | 93 | { |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | * @param int $max_time_allowed |
492 | 492 | * @param int $userId |
493 | 493 | * |
494 | - * @return int |
|
494 | + * @return false|string |
|
495 | 495 | */ |
496 | 496 | public function add_item( |
497 | 497 | $parent, |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | * @param array $courseInfo |
1044 | 1044 | * @param integer Learnpath ID |
1045 | 1045 | * @param string Whether to delete data or keep it (default: 'keep', others: 'remove') |
1046 | - * @return boolean True on success, false on failure (might change that to return number of elements deleted) |
|
1046 | + * @return false|null True on success, false on failure (might change that to return number of elements deleted) |
|
1047 | 1047 | */ |
1048 | 1048 | public function delete($courseInfo = null, $id = null, $delete = 'keep') |
1049 | 1049 | { |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | * @param integer $id Elem ID (0 if first) |
1183 | 1183 | * @param integer $remove Whether to remove the resource/data from the |
1184 | 1184 | * system or leave it (default: 'keep', others 'remove') |
1185 | - * @return integer Number of elements moved |
|
1185 | + * @return false|null Number of elements moved |
|
1186 | 1186 | * @todo implement resource removal |
1187 | 1187 | */ |
1188 | 1188 | public function delete_item($id, $remove = 'keep') |
@@ -1264,7 +1264,7 @@ discard block |
||
1264 | 1264 | * @param array $audio The array resulting of the $_FILES[mp3] element |
1265 | 1265 | * @param int $max_time_allowed |
1266 | 1266 | * @param string $url |
1267 | - * @return boolean True on success, false on error |
|
1267 | + * @return false|null True on success, false on error |
|
1268 | 1268 | */ |
1269 | 1269 | public function edit_item( |
1270 | 1270 | $id, |
@@ -1783,7 +1783,7 @@ discard block |
||
1783 | 1783 | |
1784 | 1784 | /** |
1785 | 1785 | * Gets the first element URL. |
1786 | - * @return string URL to load into the viewer |
|
1786 | + * @return false|null URL to load into the viewer |
|
1787 | 1787 | */ |
1788 | 1788 | public function first() |
1789 | 1789 | { |
@@ -2297,6 +2297,7 @@ discard block |
||
2297 | 2297 | * @param int $student_id |
2298 | 2298 | * @param string Course code (optional) |
2299 | 2299 | * @param int $sessionId |
2300 | + * @param string $courseCode |
|
2300 | 2301 | * @return bool |
2301 | 2302 | */ |
2302 | 2303 | public static function is_lp_visible_for_student( |
@@ -2594,7 +2595,7 @@ discard block |
||
2594 | 2595 | |
2595 | 2596 | /** |
2596 | 2597 | * Gets the learnpath session id |
2597 | - * @return string Learnpath theme |
|
2598 | + * @return integer Learnpath theme |
|
2598 | 2599 | */ |
2599 | 2600 | public function get_lp_session_id() |
2600 | 2601 | { |
@@ -2627,7 +2628,7 @@ discard block |
||
2627 | 2628 | /** |
2628 | 2629 | * @param string $size |
2629 | 2630 | * @param string $path_type |
2630 | - * @return bool|string |
|
2631 | + * @return string|false |
|
2631 | 2632 | */ |
2632 | 2633 | public function get_preview_image_path($size = null, $path_type = 'web') |
2633 | 2634 | { |
@@ -2773,6 +2774,8 @@ discard block |
||
2773 | 2774 | * Returns the XML DOM document's node |
2774 | 2775 | * @param resource Reference to a list of objects to search for the given ITEM_* |
2775 | 2776 | * @param string The identifier to look for |
2777 | + * @param DOMNodeList $children |
|
2778 | + * @param string $id |
|
2776 | 2779 | * @return mixed The reference to the element found with that identifier. False if not found |
2777 | 2780 | */ |
2778 | 2781 | public function get_scorm_xml_node(& $children, $id) |
@@ -3020,7 +3023,7 @@ discard block |
||
3020 | 3023 | /** |
3021 | 3024 | * Generate and return the table of contents for this learnpath. The (flat) table returned can be |
3022 | 3025 | * used by get_html_toc() to be ready to display |
3023 | - * @return array TOC as a table with 4 elements per row: title, link, status and level |
|
3026 | + * @return boolean TOC as a table with 4 elements per row: title, link, status and level |
|
3024 | 3027 | */ |
3025 | 3028 | public function get_toc() |
3026 | 3029 | { |
@@ -3156,7 +3159,7 @@ discard block |
||
3156 | 3159 | } |
3157 | 3160 | |
3158 | 3161 | /** |
3159 | - * @return array |
|
3162 | + * @return string[] |
|
3160 | 3163 | */ |
3161 | 3164 | public static function getChapterTypes() |
3162 | 3165 | { |
@@ -4062,7 +4065,7 @@ discard block |
||
4062 | 4065 | * Open a resource = initialise all local variables relative to this resource. Depending on the child |
4063 | 4066 | * class, this might be redefined to allow several behaviours depending on the document type. |
4064 | 4067 | * @param integer Resource ID |
4065 | - * @return boolean True on success, false otherwise |
|
4068 | + * @return boolean|null True on success, false otherwise |
|
4066 | 4069 | */ |
4067 | 4070 | public function open($id) |
4068 | 4071 | { |
@@ -4191,7 +4194,7 @@ discard block |
||
4191 | 4194 | * Can be used as abstract |
4192 | 4195 | * @param integer $lp_id Learnpath id |
4193 | 4196 | * @param string $set_visibility New visibility (v/i - visible/invisible) |
4194 | - * @return bool |
|
4197 | + * @return false|null |
|
4195 | 4198 | */ |
4196 | 4199 | public static function toggle_publish($lp_id, $set_visibility = 'v') |
4197 | 4200 | { |
@@ -4276,7 +4279,7 @@ discard block |
||
4276 | 4279 | * Make sure the results are saved with anoter method. This method should probably be |
4277 | 4280 | * redefined in children classes. |
4278 | 4281 | * To use a similar method statically, use the create_new_attempt() method |
4279 | - * @return string URL to load in the viewer |
|
4282 | + * @return boolean URL to load in the viewer |
|
4280 | 4283 | */ |
4281 | 4284 | public function restart() |
4282 | 4285 | { |
@@ -4354,6 +4357,7 @@ discard block |
||
4354 | 4357 | * Saves the given item |
4355 | 4358 | * @param integer $item_id. Optional (will take from $_REQUEST if null) |
4356 | 4359 | * @param boolean $from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true |
4360 | + * @param integer $item_id |
|
4357 | 4361 | * @return boolean |
4358 | 4362 | */ |
4359 | 4363 | public function save_item($item_id = null, $from_outside = true) |
@@ -4851,7 +4855,7 @@ discard block |
||
4851 | 4855 | |
4852 | 4856 | /** |
4853 | 4857 | * Sets use_max_score |
4854 | - * @param string $use_max_score Optional string giving the new location of this learnpath |
|
4858 | + * @param integer $use_max_score Optional string giving the new location of this learnpath |
|
4855 | 4859 | * @return boolean True on success / False on error |
4856 | 4860 | */ |
4857 | 4861 | public function set_use_max_score($use_max_score = 1) |
@@ -5254,6 +5258,7 @@ discard block |
||
5254 | 5258 | * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags |
5255 | 5259 | * |
5256 | 5260 | * @param string 'seriousgame', 'single' or 'multiple' |
5261 | + * @param string $mode |
|
5257 | 5262 | * @return boolean |
5258 | 5263 | * @author ndiechburg <[email protected]> |
5259 | 5264 | **/ |
@@ -5296,7 +5301,7 @@ discard block |
||
5296 | 5301 | /** |
5297 | 5302 | * Switch between multiple attempt, single attempt or serious_game mode (only for scorm) |
5298 | 5303 | * |
5299 | - * @return boolean |
|
5304 | + * @return boolean|null |
|
5300 | 5305 | * @author ndiechburg <[email protected]> |
5301 | 5306 | **/ |
5302 | 5307 | public function switch_attempt_mode() |
@@ -5487,7 +5492,6 @@ discard block |
||
5487 | 5492 | /** |
5488 | 5493 | * Function that creates a html list of learning path items so that we can add audio files to them |
5489 | 5494 | * @author Kevin Van Den Haute |
5490 | - * @param int $lp_id |
|
5491 | 5495 | * @return string |
5492 | 5496 | */ |
5493 | 5497 | public function overview() |
@@ -6501,7 +6505,7 @@ discard block |
||
6501 | 6505 | /** |
6502 | 6506 | * Function that displays a list with al the resources that |
6503 | 6507 | * could be added to the learning path |
6504 | - * @return string |
|
6508 | + * @return boolean |
|
6505 | 6509 | */ |
6506 | 6510 | public function display_resources() |
6507 | 6511 | { |
@@ -10046,7 +10050,7 @@ discard block |
||
10046 | 10050 | |
10047 | 10051 | /** |
10048 | 10052 | * @param int $lp_id |
10049 | - * @return bool |
|
10053 | + * @return false|null |
|
10050 | 10054 | */ |
10051 | 10055 | public function scorm_export_to_pdf($lp_id) |
10052 | 10056 | { |
@@ -10581,7 +10585,7 @@ discard block |
||
10581 | 10585 | |
10582 | 10586 | /** |
10583 | 10587 | * @param int $itemId |
10584 | - * @return learnpathItem|false |
|
10588 | + * @return string |
|
10585 | 10589 | */ |
10586 | 10590 | public function getItem($itemId) |
10587 | 10591 | { |
@@ -10631,7 +10635,6 @@ discard block |
||
10631 | 10635 | /** |
10632 | 10636 | * Set whether this is a learning path with the possibility to subscribe |
10633 | 10637 | * users or not |
10634 | - * @param int $subscribeUsers (0 = false, 1 = true) |
|
10635 | 10638 | */ |
10636 | 10639 | public function setSubscribeUsers($value) |
10637 | 10640 | { |
@@ -10756,7 +10759,7 @@ discard block |
||
10756 | 10759 | |
10757 | 10760 | /** |
10758 | 10761 | * Get the item of exercise type (evaluation type) |
10759 | - * @return array The final evaluation. Otherwise return false |
|
10762 | + * @return integer The final evaluation. Otherwise return false |
|
10760 | 10763 | */ |
10761 | 10764 | public function getFinalEvaluationItem() |
10762 | 10765 | { |
@@ -10980,7 +10983,7 @@ discard block |
||
10980 | 10983 | /** |
10981 | 10984 | * Create a forum for this learning path |
10982 | 10985 | * @param type $forumCategoryId |
10983 | - * @return int The forum ID if was created. Otherwise return false |
|
10986 | + * @return false|string The forum ID if was created. Otherwise return false |
|
10984 | 10987 | */ |
10985 | 10988 | public function createForum($forumCategoryId) |
10986 | 10989 | { |
@@ -666,7 +666,6 @@ discard block |
||
666 | 666 | * @param int $sessionId The session ID |
667 | 667 | * @param int $courseId The course ID |
668 | 668 | * @param int $exerciseId The quiz ID |
669 | - * @param int $answer Answer status (0 = incorrect, 1 = correct, 2 = both) |
|
670 | 669 | * @return string HTML array of results formatted for gridJS |
671 | 670 | * @author César Perales <[email protected]>, Beeznest Team |
672 | 671 | */ |
@@ -1254,6 +1253,7 @@ discard block |
||
1254 | 1253 | * @param int Number of items to select |
1255 | 1254 | * @param string Column to order on |
1256 | 1255 | * @param string Order direction |
1256 | + * @param integer $number_of_items |
|
1257 | 1257 | * @return array Results |
1258 | 1258 | */ |
1259 | 1259 | public static function get_course_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1588,6 +1588,7 @@ discard block |
||
1588 | 1588 | * @param int Number of items to select |
1589 | 1589 | * @param string Column to order on |
1590 | 1590 | * @param string Order direction |
1591 | + * @param integer $number_of_items |
|
1591 | 1592 | * @return array Results |
1592 | 1593 | */ |
1593 | 1594 | public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1608,7 +1609,6 @@ discard block |
||
1608 | 1609 | /** |
1609 | 1610 | * Fills in session reporting data |
1610 | 1611 | * |
1611 | - * @param integer $user_id the id of the user |
|
1612 | 1612 | * @param array $url_params additonal url parameters |
1613 | 1613 | * @param array $row the row information (the other columns) |
1614 | 1614 | * @return string html code |
@@ -2239,6 +2239,7 @@ discard block |
||
2239 | 2239 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
2240 | 2240 | * @version Dokeos 1.8.6 |
2241 | 2241 | * @since October 2008 |
2242 | + * @param integer $number_of_items |
|
2242 | 2243 | */ |
2243 | 2244 | public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction) |
2244 | 2245 | { |
@@ -2341,7 +2342,6 @@ discard block |
||
2341 | 2342 | /** |
2342 | 2343 | * Checks if there are repeted users in a given array |
2343 | 2344 | * @param array $usernames list of the usernames in the uploaded file |
2344 | - * @param array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2 |
|
2345 | 2345 | * @return array with the $usernames array and the $user_array array |
2346 | 2346 | * @author Julio Montoya Armas |
2347 | 2347 | */ |
@@ -2516,6 +2516,7 @@ discard block |
||
2516 | 2516 | |
2517 | 2517 | /** |
2518 | 2518 | * Adds missing user-information (which isn't required, like password, etc). |
2519 | + * @return integer |
|
2519 | 2520 | */ |
2520 | 2521 | function complete_missing_data($user) { |
2521 | 2522 | // 1. Generate a password if it is necessary. |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | /** |
140 | 140 | * Validates the password |
141 | 141 | * |
142 | - * @param $encoded |
|
142 | + * @param string $encoded |
|
143 | 143 | * @param $raw |
144 | 144 | * @param $salt |
145 | 145 | * @return bool |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * @param string $raw |
157 | 157 | * @param User $user |
158 | 158 | * |
159 | - * @return bool |
|
159 | + * @return string |
|
160 | 160 | */ |
161 | 161 | public static function encryptPassword($raw, User $user) |
162 | 162 | { |
@@ -1012,6 +1012,7 @@ discard block |
||
1012 | 1012 | * Disables or enables a user |
1013 | 1013 | * @param int user_id |
1014 | 1014 | * @param int Enable or disable |
1015 | + * @param integer $active |
|
1015 | 1016 | * @return void |
1016 | 1017 | * @assert (-1,0) === false |
1017 | 1018 | * @assert (1,1) === true |
@@ -1042,6 +1043,7 @@ discard block |
||
1042 | 1043 | /** |
1043 | 1044 | * Disables a user |
1044 | 1045 | * @param int User id |
1046 | + * @param integer $user_id |
|
1045 | 1047 | * @return bool |
1046 | 1048 | * @uses UserManager::change_active_state() to actually disable the user |
1047 | 1049 | * @assert (0) === false |
@@ -1058,6 +1060,7 @@ discard block |
||
1058 | 1060 | /** |
1059 | 1061 | * Enable a user |
1060 | 1062 | * @param int User id |
1063 | + * @param integer $user_id |
|
1061 | 1064 | * @return bool |
1062 | 1065 | * @uses UserManager::change_active_state() to actually disable the user |
1063 | 1066 | * @assert (0) === false |
@@ -1223,6 +1226,7 @@ discard block |
||
1223 | 1226 | * Checks whether the user id exists in the database |
1224 | 1227 | * |
1225 | 1228 | * @param int User id |
1229 | + * @param integer $userId |
|
1226 | 1230 | * @return bool True if user id was found, false otherwise |
1227 | 1231 | */ |
1228 | 1232 | public static function is_user_id_valid($userId) |
@@ -1420,7 +1424,7 @@ discard block |
||
1420 | 1424 | * @param array $userInfo user information to avoid query the DB |
1421 | 1425 | * returns the /main/img/unknown.jpg image set it at true |
1422 | 1426 | * |
1423 | - * @return array Array of 2 elements: 'dir' and 'file' which contain |
|
1427 | + * @return integer Array of 2 elements: 'dir' and 'file' which contain |
|
1424 | 1428 | * the dir and file as the name implies if image does not exist it will |
1425 | 1429 | * return the unknow image if anonymous parameter is true if not it returns an empty array |
1426 | 1430 | */ |
@@ -1830,7 +1834,7 @@ discard block |
||
1830 | 1834 | /** |
1831 | 1835 | * Returns an array with the user's productions. |
1832 | 1836 | * |
1833 | - * @param $user_id User id |
|
1837 | + * @param integer $user_id User id |
|
1834 | 1838 | * @return array An array containing the user's productions |
1835 | 1839 | */ |
1836 | 1840 | public static function get_user_productions($user_id) |
@@ -1985,7 +1989,7 @@ discard block |
||
1985 | 1989 | |
1986 | 1990 | /** |
1987 | 1991 | * Build a list of extra file already uploaded in $user_folder/{$extra_field}/ |
1988 | - * @param $user_id |
|
1992 | + * @param integer $user_id |
|
1989 | 1993 | * @param $extra_field |
1990 | 1994 | * @param bool $force |
1991 | 1995 | * @param bool $showDelete |
@@ -2090,7 +2094,7 @@ discard block |
||
2090 | 2094 | * @param int $fieldType Field's type |
2091 | 2095 | * @param string $displayText Field's language var name |
2092 | 2096 | * @param string $default Field's default value |
2093 | - * @return int |
|
2097 | + * @return boolean |
|
2094 | 2098 | */ |
2095 | 2099 | public static function create_extra_field($variable, $fieldType, $displayText, $default) |
2096 | 2100 | { |
@@ -2124,6 +2128,7 @@ discard block |
||
2124 | 2128 | * @param boolean Whether to prefix the fields indexes with "extra_" (might be used by formvalidator) |
2125 | 2129 | * @param boolean Whether to return invisible fields as well |
2126 | 2130 | * @param boolean Whether to split multiple-selection fields or not |
2131 | + * @param boolean $field_filter |
|
2127 | 2132 | * @return array Array of fields => value for the given user |
2128 | 2133 | */ |
2129 | 2134 | public static function get_extra_user_data( |
@@ -2398,6 +2403,7 @@ discard block |
||
2398 | 2403 | /** |
2399 | 2404 | * Get extra user data by field variable |
2400 | 2405 | * @param string field variable |
2406 | + * @param string $field_variable |
|
2401 | 2407 | * @return array data |
2402 | 2408 | */ |
2403 | 2409 | public static function get_extra_user_data_by_field_variable($field_variable) |
@@ -2962,7 +2968,7 @@ discard block |
||
2962 | 2968 | * @param string $user_id User ID |
2963 | 2969 | * @param string $course course directory |
2964 | 2970 | * @param string $resourcetype resourcetype: images, all |
2965 | - * @return int User ID (or false if not found) |
|
2971 | + * @return string User ID (or false if not found) |
|
2966 | 2972 | */ |
2967 | 2973 | public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all') |
2968 | 2974 | { |
@@ -3043,7 +3049,7 @@ discard block |
||
3043 | 3049 | /** |
3044 | 3050 | * Adds a new API key to the users' account |
3045 | 3051 | * @param int Optional user ID (defaults to the results of api_get_user_id()) |
3046 | - * @return boolean True on success, false on failure |
|
3052 | + * @return false|string True on success, false on failure |
|
3047 | 3053 | */ |
3048 | 3054 | public static function add_api_key($user_id = null, $api_service = 'dokeos') |
3049 | 3055 | { |
@@ -3098,6 +3104,7 @@ discard block |
||
3098 | 3104 | * Regenerate an API key from the user's account |
3099 | 3105 | * @param int user ID (defaults to the results of api_get_user_id()) |
3100 | 3106 | * @param string API key's internal ID |
3107 | + * @param string $api_service |
|
3101 | 3108 | * @return int num |
3102 | 3109 | */ |
3103 | 3110 | public static function update_api_key($user_id, $api_service) |
@@ -3127,6 +3134,7 @@ discard block |
||
3127 | 3134 | /** |
3128 | 3135 | * @param int user ID (defaults to the results of api_get_user_id()) |
3129 | 3136 | * @param string API key's internal ID |
3137 | + * @param string $api_service |
|
3130 | 3138 | * @return int row ID, or return false if not found |
3131 | 3139 | */ |
3132 | 3140 | public static function get_api_key_id($user_id, $api_service) |
@@ -3342,7 +3350,7 @@ discard block |
||
3342 | 3350 | * @param int $field_id |
3343 | 3351 | * @param bool $show_links show links or not |
3344 | 3352 | * |
3345 | - * @return array |
|
3353 | + * @return string |
|
3346 | 3354 | */ |
3347 | 3355 | public static function get_user_tags_to_string($user_id, $field_id, $show_links = true) |
3348 | 3356 | { |
@@ -3439,7 +3447,7 @@ discard block |
||
3439 | 3447 | * @param mixed $tag |
3440 | 3448 | * @param int $user_id |
3441 | 3449 | * @param int $field_id field id of the tag |
3442 | - * @return bool |
|
3450 | + * @return boolean|null |
|
3443 | 3451 | */ |
3444 | 3452 | public static function add_tag($tag, $user_id, $field_id) |
3445 | 3453 | { |
@@ -4881,7 +4889,7 @@ discard block |
||
4881 | 4889 | } |
4882 | 4890 | |
4883 | 4891 | /** |
4884 | - * @return array |
|
4892 | + * @return string[] |
|
4885 | 4893 | */ |
4886 | 4894 | public static function get_user_field_types() |
4887 | 4895 | { |
@@ -5173,7 +5181,7 @@ discard block |
||
5173 | 5181 | |
5174 | 5182 | /** |
5175 | 5183 | * Get the boss user ID from a followed user id |
5176 | - * @param $userId |
|
5184 | + * @param integer $userId |
|
5177 | 5185 | * @return bool |
5178 | 5186 | */ |
5179 | 5187 | public static function getStudentBossList($userId) |
@@ -5225,7 +5233,7 @@ discard block |
||
5225 | 5233 | * Get either a Gravatar URL or complete image tag for a specified email address. |
5226 | 5234 | * |
5227 | 5235 | * @param string $email The email address |
5228 | - * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
5236 | + * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
5229 | 5237 | * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
5230 | 5238 | * @param string $r Maximum rating (inclusive) [ g | pg | r | x ] |
5231 | 5239 | * @param boole $img True to return a complete IMG tag False for just the URL |
@@ -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 = false, $moveContent = false) |
@@ -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) |
@@ -1090,7 +1091,7 @@ discard block |
||
1090 | 1091 | * @param bool return a flat array or not |
1091 | 1092 | * @param int depth of the skills |
1092 | 1093 | * @param bool filter status |
1093 | - * @return json |
|
1094 | + * @return string |
|
1094 | 1095 | */ |
1095 | 1096 | public function get_skills_tree_json($user_id = null, $skill_id = null, $return_flat_array = false, $main_depth = 2, $filter_status = false) |
1096 | 1097 | { |