@@ -1240,6 +1240,7 @@ discard block |
||
1240 | 1240 | * Gets the list of courses a specific user is subscribed to |
1241 | 1241 | * @param int User ID |
1242 | 1242 | * @param boolean $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED |
1243 | + * @param integer $userid |
|
1243 | 1244 | * @return array Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d) |
1244 | 1245 | */ |
1245 | 1246 | function api_get_user_courses($userid, $fetch_session = true) |
@@ -2955,7 +2956,7 @@ discard block |
||
2955 | 2956 | * on the session visibility |
2956 | 2957 | * @param bool $tutor Whether to check if the user has the tutor role |
2957 | 2958 | * @param bool $coach Whether to check if the user has the coach role |
2958 | -* @return boolean true: the user has the rights to edit, false: he does not |
|
2959 | +* @return boolean|null true: the user has the rights to edit, false: he does not |
|
2959 | 2960 | */ |
2960 | 2961 | function api_is_allowed_to_session_edit($tutor = false, $coach = false) |
2961 | 2962 | { |
@@ -5188,6 +5189,7 @@ discard block |
||
5188 | 5189 | * @param string Whether we want a simple list (display a category) or |
5189 | 5190 | * a grouped list (group by variable as in settings.php default). Values: 'list' or 'group' |
5190 | 5191 | * @param int Access URL's ID. Optional. Uses 1 by default, which is the unique URL |
5192 | + * @param string $cat |
|
5191 | 5193 | * @return array Array of database results for the current settings of the current access URL |
5192 | 5194 | */ |
5193 | 5195 | function & api_get_settings($cat = null, $ordering = 'list', $access_url = 1, $url_changeable = 0) |
@@ -6614,7 +6616,7 @@ discard block |
||
6614 | 6616 | /** |
6615 | 6617 | * Returns an array of global configuration settings which should be ignored |
6616 | 6618 | * when printing the configuration settings screens |
6617 | - * @return array Array of strings, each identifying one of the excluded settings |
|
6619 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
6618 | 6620 | */ |
6619 | 6621 | function api_get_locked_settings() { |
6620 | 6622 | return array( |
@@ -6655,6 +6657,7 @@ discard block |
||
6655 | 6657 | * false if he isn't. If the user ID is given and is an integer, then the same |
6656 | 6658 | * ID is simply returned |
6657 | 6659 | * @param integer User ID |
6660 | + * @param integer $user_id |
|
6658 | 6661 | * @return boolean Integer User ID is logged in, or false otherwise |
6659 | 6662 | */ |
6660 | 6663 | function api_user_is_login($user_id = null) { |
@@ -7099,6 +7102,7 @@ discard block |
||
7099 | 7102 | /** |
7100 | 7103 | * Gets memory limit in bytes |
7101 | 7104 | * @param string The memory size (128M, 1G, 1000K, etc) |
7105 | + * @param string $mem |
|
7102 | 7106 | * @return int |
7103 | 7107 | * @assert (null) === false |
7104 | 7108 | * @assert ('1t') === 1099511627776 |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | * @author Bert Vanderkimpen |
696 | 696 | * @author Yannick Warnier <[email protected]> Adaptation for work tool |
697 | 697 | * @param string $base_work_dir Base work dir (.../work) |
698 | - * @param string $desiredDirName complete path of the desired name |
|
698 | + * @param string $desired_dir_name complete path of the desired name |
|
699 | 699 | * |
700 | 700 | * @return string actual directory name if it succeeds, boolean false otherwise |
701 | 701 | */ |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | /** |
718 | 718 | * Delete a work-tool directory |
719 | 719 | * @param int $id work directory id to delete |
720 | - * @return integer -1 on error |
|
720 | + * @return boolean|null -1 on error |
|
721 | 721 | */ |
722 | 722 | function deleteDirWork($id) |
723 | 723 | { |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | * Update the url of a dir in the student_publication table |
861 | 861 | * @param array $work_data work original data |
862 | 862 | * @param string $newPath Example: "folder1" |
863 | - * @return bool |
|
863 | + * @return boolean|null |
|
864 | 864 | */ |
865 | 865 | function updateDirName($work_data, $newPath) |
866 | 866 | { |
@@ -921,6 +921,7 @@ discard block |
||
921 | 921 | /** |
922 | 922 | * Transform an all directory structure (only directories) in an array |
923 | 923 | * @param string path of the directory |
924 | + * @param string $directory |
|
924 | 925 | * @return array the directory structure into an array |
925 | 926 | * @author Julio Montoya Dokeos |
926 | 927 | * @version April 2008 |
@@ -990,7 +991,7 @@ discard block |
||
990 | 991 | * @param string the path of the directory |
991 | 992 | * @param boolean true if we want the total quantity of files |
992 | 993 | * include in others child directories, false only files in the directory |
993 | - * @return array the first element is an integer with the number of files |
|
994 | + * @return integer[] the first element is an integer with the number of files |
|
994 | 995 | * in the folder, the second element is the number of directories |
995 | 996 | * @author Julio Montoya |
996 | 997 | * @version April 2008 |
@@ -2723,7 +2724,7 @@ discard block |
||
2723 | 2724 | * @param int $userId |
2724 | 2725 | * @param int $workId |
2725 | 2726 | * @param int $courseId |
2726 | - * @return bool |
|
2727 | + * @return boolean|null |
|
2727 | 2728 | */ |
2728 | 2729 | function allowOnlySubscribedUser($userId, $workId, $courseId) |
2729 | 2730 | { |
@@ -2997,6 +2998,7 @@ discard block |
||
2997 | 2998 | * @param int $parentId |
2998 | 2999 | * @param array $courseInfo |
2999 | 3000 | * @param int $sessionId |
3001 | + * @param integer $userId |
|
3000 | 3002 | * @return int |
3001 | 3003 | */ |
3002 | 3004 | function getLastWorkStudentFromParentByUser( |
@@ -3668,7 +3670,7 @@ discard block |
||
3668 | 3670 | * @param array $formValues |
3669 | 3671 | * @param int $user_id |
3670 | 3672 | * @param array $courseInfo |
3671 | - * @param int $group_id |
|
3673 | + * @param integer $groupId |
|
3672 | 3674 | * @param int $session_id |
3673 | 3675 | * @return bool|int |
3674 | 3676 | * @note $params can have the following elements, but should at least have the 2 first ones: ( |
@@ -4173,7 +4175,7 @@ discard block |
||
4173 | 4175 | } |
4174 | 4176 | |
4175 | 4177 | /** |
4176 | - * @return array |
|
4178 | + * @return string[] |
|
4177 | 4179 | */ |
4178 | 4180 | function getUploadDocumentType() |
4179 | 4181 | { |
@@ -4546,7 +4548,7 @@ discard block |
||
4546 | 4548 | * @param int Session ID |
4547 | 4549 | * @param $correction |
4548 | 4550 | * |
4549 | - * @return array|bool |
|
4551 | + * @return boolean |
|
4550 | 4552 | */ |
4551 | 4553 | function getFileContents($id, $course_info, $sessionId = 0, $correction = false) |
4552 | 4554 | { |
@@ -4664,7 +4666,7 @@ discard block |
||
4664 | 4666 | * @param int $userId |
4665 | 4667 | * @param array $courseInfo |
4666 | 4668 | * @param string $format |
4667 | - * @return bool |
|
4669 | + * @return false|null |
|
4668 | 4670 | */ |
4669 | 4671 | function exportAllWork($userId, $courseInfo, $format = 'pdf') |
4670 | 4672 | { |
@@ -4710,7 +4712,7 @@ discard block |
||
4710 | 4712 | * @param array $courseInfo |
4711 | 4713 | * @param int $sessionId |
4712 | 4714 | * @param string $format |
4713 | - * @return bool |
|
4715 | + * @return false|null |
|
4714 | 4716 | */ |
4715 | 4717 | function exportAllStudentWorkFromPublication( |
4716 | 4718 | $workId, |
@@ -4848,7 +4850,7 @@ discard block |
||
4848 | 4850 | * Downloads all user files per user |
4849 | 4851 | * @param int $userId |
4850 | 4852 | * @param array $courseInfo |
4851 | - * @return bool |
|
4853 | + * @return false|null |
|
4852 | 4854 | */ |
4853 | 4855 | function downloadAllFilesPerUser($userId, $courseInfo) |
4854 | 4856 | { |
@@ -4962,7 +4964,7 @@ discard block |
||
4962 | 4964 | /** |
4963 | 4965 | * @param array $courseInfo |
4964 | 4966 | * @param int $workId |
4965 | - * @return bool |
|
4967 | + * @return boolean|null |
|
4966 | 4968 | */ |
4967 | 4969 | function protectWork($courseInfo, $workId) |
4968 | 4970 | { |
@@ -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 | { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * @param int $courseId |
184 | 184 | * @param int $userId |
185 | 185 | * |
186 | - * @return array |
|
186 | + * @return integer |
|
187 | 187 | */ |
188 | 188 | public static function getAnnouncementInfoById($announcementId, $courseId, $userId) |
189 | 189 | { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * @param array uploaded file $_FILES |
385 | 385 | * @param string Comment describing the attachment |
386 | 386 | * @param bool $sendToUsersInSession |
387 | - * @return int false on failure, ID of the announcement on success |
|
387 | + * @return false|string false on failure, ID of the announcement on success |
|
388 | 388 | */ |
389 | 389 | public static function add_announcement( |
390 | 390 | $emailTitle, |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | * @param string $file_comment |
496 | 496 | * @param bool $sendToUsersInSession |
497 | 497 | * |
498 | - * @return bool|int |
|
498 | + * @return false|string |
|
499 | 499 | */ |
500 | 500 | public static function add_group_announcement( |
501 | 501 | $emailTitle, |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | |
740 | 740 | /** |
741 | 741 | * @param int $insert_id |
742 | - * @return bool |
|
742 | + * @return false|null |
|
743 | 743 | */ |
744 | 744 | public static function update_mail_sent($insert_id) |
745 | 745 | { |
@@ -759,6 +759,7 @@ discard block |
||
759 | 759 | * Gets all announcements from a user by course |
760 | 760 | * @param string course db |
761 | 761 | * @param int user id |
762 | + * @param integer $user_id |
|
762 | 763 | * @return array html with the content and count of announcements or false otherwise |
763 | 764 | */ |
764 | 765 | public static function get_all_annoucement_by_user_course($course_code, $user_id) |
@@ -1224,6 +1225,7 @@ discard block |
||
1224 | 1225 | * has been sent to |
1225 | 1226 | * @param string The tool (announcement, agenda, ...) |
1226 | 1227 | * @param int ID of the element of the corresponding type |
1228 | + * @param string $tool |
|
1227 | 1229 | * @return array Array of users and groups to whom the element has been sent |
1228 | 1230 | */ |
1229 | 1231 | public static function sent_to($tool, $id) |
@@ -1348,6 +1350,8 @@ discard block |
||
1348 | 1350 | * @param int attach id |
1349 | 1351 | * @param array uploaded file $_FILES |
1350 | 1352 | * @param string file comment |
1353 | + * @param integer $id_attach |
|
1354 | + * @param string $file_comment |
|
1351 | 1355 | * @return int |
1352 | 1356 | */ |
1353 | 1357 | public static function edit_announcement_attachment_file($id_attach, $file, $file_comment) |
@@ -318,7 +318,6 @@ |
||
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
321 | - * @param int $courseId |
|
322 | 321 | * @return array |
323 | 322 | * @throws Exception |
324 | 323 | */ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * @return array |
|
48 | + * @return string[] |
|
49 | 49 | */ |
50 | 50 | public static function getFoldersToDelete() |
51 | 51 | { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * @return array |
|
98 | + * @return string[] |
|
99 | 99 | */ |
100 | 100 | public static function getFilesToDelete() |
101 | 101 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * Get the class instance |
27 | 27 | * @staticvar MsiLtiPlugin $result |
28 | - * @return MsiLtiPlugin |
|
28 | + * @return ImsLtiPlugin |
|
29 | 29 | */ |
30 | 30 | public static function create() |
31 | 31 | { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | return $this->id; |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @return string |
|
25 | + */ |
|
23 | 26 | public function getName() |
24 | 27 | { |
25 | 28 | return $this->name; |
@@ -334,6 +334,9 @@ |
||
334 | 334 | return preg_replace('/, $/','',$result); |
335 | 335 | } |
336 | 336 | |
337 | + /** |
|
338 | + * @param string $paramString |
|
339 | + */ |
|
337 | 340 | private function _parseParameterString ($paramString) |
338 | 341 | { |
339 | 342 | $elements = explode('&',$paramString); |
@@ -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 | { |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | * @param array $courseInfo |
1026 | 1026 | * @param array $userInfo |
1027 | 1027 | * @param array $uploaded_file - follows the $_FILES Structure |
1028 | - * @param string $upload_path - destination of the upload. |
|
1028 | + * @param string $uploadPath - destination of the upload. |
|
1029 | 1029 | * This path is to append to $base_work_dir |
1030 | 1030 | * @param string $base_work_dir - base working directory of the module |
1031 | 1031 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | * @param int $session_id Session ID, if any |
1213 | 1213 | * @param int $userId creator id |
1214 | 1214 | * |
1215 | - * @return int id if inserted document |
|
1215 | + * @return string|false id if inserted document |
|
1216 | 1216 | */ |
1217 | 1217 | function add_document( |
1218 | 1218 | $_course, |
@@ -1346,7 +1346,7 @@ discard block |
||
1346 | 1346 | * |
1347 | 1347 | * @author Olivier Cauberghe <[email protected]> |
1348 | 1348 | * @param path+filename eg: /main/document/document.php |
1349 | - * @return The directory depth |
|
1349 | + * @return integer directory depth |
|
1350 | 1350 | */ |
1351 | 1351 | function get_levels($filename) { |
1352 | 1352 | $levels = explode('/', $filename); |
@@ -1363,6 +1363,8 @@ discard block |
||
1363 | 1363 | * @author Olivier Cauberghe <[email protected]> |
1364 | 1364 | * @param path,filename |
1365 | 1365 | * action: Adds an entry to the document table with the default settings. |
1366 | + * @param string $upload_path |
|
1367 | + * @param string $filename |
|
1366 | 1368 | */ |
1367 | 1369 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
1368 | 1370 | { |
@@ -1818,7 +1820,6 @@ discard block |
||
1818 | 1820 | * @param int $groupId |
1819 | 1821 | * @param bool $output |
1820 | 1822 | * @param array $parent |
1821 | - * @param string $uploadPath |
|
1822 | 1823 | * |
1823 | 1824 | */ |
1824 | 1825 | function add_all_documents_in_folder_to_database( |