@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * Create a group of select from a date |
159 | 159 | * @param FormValidator $form |
160 | 160 | * @param string $prefix |
161 | - * @return array |
|
161 | + * @return HTML_QuickForm_element[] |
|
162 | 162 | */ |
163 | 163 | function create_group_date_select($form, $prefix = '') |
164 | 164 | { |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | * @author Bert Vanderkimpen |
753 | 753 | * @author Yannick Warnier <[email protected]> Adaptation for work tool |
754 | 754 | * @param string $base_work_dir Base work dir (.../work) |
755 | - * @param string $desiredDirName complete path of the desired name |
|
755 | + * @param string $desired_dir_name complete path of the desired name |
|
756 | 756 | * |
757 | 757 | * @return string actual directory name if it succeeds, boolean false otherwise |
758 | 758 | */ |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | /** |
775 | 775 | * Delete a work-tool directory |
776 | 776 | * @param int $id work directory id to delete |
777 | - * @return integer -1 on error |
|
777 | + * @return boolean|null -1 on error |
|
778 | 778 | */ |
779 | 779 | function deleteDirWork($id) |
780 | 780 | { |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | * Update the url of a dir in the student_publication table |
918 | 918 | * @param array $work_data work original data |
919 | 919 | * @param string $newPath Example: "folder1" |
920 | - * @return bool |
|
920 | + * @return boolean|null |
|
921 | 921 | */ |
922 | 922 | function updateDirName($work_data, $newPath) |
923 | 923 | { |
@@ -974,6 +974,7 @@ discard block |
||
974 | 974 | /** |
975 | 975 | * Transform an all directory structure (only directories) in an array |
976 | 976 | * @param string path of the directory |
977 | + * @param string $directory |
|
977 | 978 | * @return array the directory structure into an array |
978 | 979 | * @author Julio Montoya Dokeos |
979 | 980 | * @version April 2008 |
@@ -1043,7 +1044,7 @@ discard block |
||
1043 | 1044 | * @param string the path of the directory |
1044 | 1045 | * @param boolean true if we want the total quantity of files |
1045 | 1046 | * include in others child directories, false only files in the directory |
1046 | - * @return array the first element is an integer with the number of files |
|
1047 | + * @return integer[] the first element is an integer with the number of files |
|
1047 | 1048 | * in the folder, the second element is the number of directories |
1048 | 1049 | * @author Julio Montoya |
1049 | 1050 | * @version April 2008 |
@@ -2318,7 +2319,7 @@ discard block |
||
2318 | 2319 | } |
2319 | 2320 | |
2320 | 2321 | /** |
2321 | - * @param $name |
|
2322 | + * @param string $name |
|
2322 | 2323 | * @param $values |
2323 | 2324 | * @param string $checked |
2324 | 2325 | * @return string |
@@ -2844,7 +2845,7 @@ discard block |
||
2844 | 2845 | * @param int $userId |
2845 | 2846 | * @param int $workId |
2846 | 2847 | * @param int $courseId |
2847 | - * @return bool |
|
2848 | + * @return boolean|null |
|
2848 | 2849 | */ |
2849 | 2850 | function allowOnlySubscribedUser($userId, $workId, $courseId) |
2850 | 2851 | { |
@@ -3121,6 +3122,7 @@ discard block |
||
3121 | 3122 | * @param int $parentId |
3122 | 3123 | * @param array $courseInfo |
3123 | 3124 | * @param int $sessionId |
3125 | + * @param integer $userId |
|
3124 | 3126 | * @return int |
3125 | 3127 | */ |
3126 | 3128 | function getLastWorkStudentFromParentByUser( |
@@ -3757,12 +3759,11 @@ discard block |
||
3757 | 3759 | |
3758 | 3760 | /** |
3759 | 3761 | * Creates a new task (directory) in the assignment tool |
3760 | - * @param array $params |
|
3761 | 3762 | * @param int $user_id |
3762 | 3763 | * @param array $courseInfo |
3763 | 3764 | * @param int $group_id |
3764 | 3765 | * @param int $session_id |
3765 | - * @return bool|int |
|
3766 | + * @return string|false |
|
3766 | 3767 | * @note $params can have the following elements, but should at least have the 2 first ones: ( |
3767 | 3768 | * 'new_dir' => 'some-name', |
3768 | 3769 | * 'description' => 'some-desc', |
@@ -4258,7 +4259,7 @@ discard block |
||
4258 | 4259 | } |
4259 | 4260 | |
4260 | 4261 | /** |
4261 | - * @return array |
|
4262 | + * @return string[] |
|
4262 | 4263 | */ |
4263 | 4264 | function getUploadDocumentType() |
4264 | 4265 | { |
@@ -4630,7 +4631,7 @@ discard block |
||
4630 | 4631 | * @param int Session ID |
4631 | 4632 | * @param $correction |
4632 | 4633 | * |
4633 | - * @return array|bool |
|
4634 | + * @return boolean |
|
4634 | 4635 | */ |
4635 | 4636 | function getFileContents($id, $course_info, $sessionId = 0, $correction = false) |
4636 | 4637 | { |
@@ -4748,7 +4749,7 @@ discard block |
||
4748 | 4749 | * @param int $userId |
4749 | 4750 | * @param array $courseInfo |
4750 | 4751 | * @param string $format |
4751 | - * @return bool |
|
4752 | + * @return false|null |
|
4752 | 4753 | */ |
4753 | 4754 | function exportAllWork($userId, $courseInfo, $format = 'pdf') |
4754 | 4755 | { |
@@ -4796,7 +4797,7 @@ discard block |
||
4796 | 4797 | * @param array $courseInfo |
4797 | 4798 | * @param int $sessionId |
4798 | 4799 | * @param string $format |
4799 | - * @return bool |
|
4800 | + * @return false|null |
|
4800 | 4801 | */ |
4801 | 4802 | function exportAllStudentWorkFromPublication( |
4802 | 4803 | $workId, |
@@ -4934,7 +4935,7 @@ discard block |
||
4934 | 4935 | * Downloads all user files per user |
4935 | 4936 | * @param int $userId |
4936 | 4937 | * @param array $courseInfo |
4937 | - * @return bool |
|
4938 | + * @return false|null |
|
4938 | 4939 | */ |
4939 | 4940 | function downloadAllFilesPerUser($userId, $courseInfo) |
4940 | 4941 | { |
@@ -5048,7 +5049,7 @@ discard block |
||
5048 | 5049 | /** |
5049 | 5050 | * @param array $courseInfo |
5050 | 5051 | * @param int $workId |
5051 | - * @return bool |
|
5052 | + * @return boolean|null |
|
5052 | 5053 | */ |
5053 | 5054 | function protectWork($courseInfo, $workId) |
5054 | 5055 | { |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | * Set description |
507 | 507 | * |
508 | 508 | * @param string $description |
509 | - * @return Groups |
|
509 | + * @return Session |
|
510 | 510 | */ |
511 | 511 | public function setDescription($description) |
512 | 512 | { |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | } |
840 | 840 | |
841 | 841 | /** |
842 | - * @return array |
|
842 | + * @return string[] |
|
843 | 843 | */ |
844 | 844 | public static function getStatusList() |
845 | 845 | { |
@@ -306,7 +306,7 @@ |
||
306 | 306 | * @param int Whether the announcement should be visible to anonymous users (1) or not (0) |
307 | 307 | * @param string The language for which the announvement should be shown. Leave null for all langages |
308 | 308 | * @param int Whether to send an e-mail to all users (1) or not (0) |
309 | - * @return mixed insert_id on success, false on failure |
|
309 | + * @return false|string insert_id on success, false on failure |
|
310 | 310 | */ |
311 | 311 | public static function add_announcement( |
312 | 312 | $title, |
@@ -905,6 +905,9 @@ |
||
905 | 905 | } |
906 | 906 | } |
907 | 907 | |
908 | +/** |
|
909 | + * @param string $filePath |
|
910 | + */ |
|
908 | 911 | function isQtiQuestionBank($filePath) { |
909 | 912 | $data = file_get_contents($filePath); |
910 | 913 | if (!empty($data)) { |
@@ -1359,6 +1359,7 @@ discard block |
||
1359 | 1359 | * Gets the list of courses a specific user is subscribed to |
1360 | 1360 | * @param int User ID |
1361 | 1361 | * @param boolean $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED |
1362 | + * @param integer $userid |
|
1362 | 1363 | * @return array Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d) |
1363 | 1364 | */ |
1364 | 1365 | function api_get_user_courses($userid, $fetch_session = true) |
@@ -6733,7 +6734,7 @@ discard block |
||
6733 | 6734 | /** |
6734 | 6735 | * Returns an array of global configuration settings which should be ignored |
6735 | 6736 | * when printing the configuration settings screens |
6736 | - * @return array Array of strings, each identifying one of the excluded settings |
|
6737 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
6737 | 6738 | */ |
6738 | 6739 | function api_get_locked_settings() { |
6739 | 6740 | return array( |
@@ -6776,6 +6777,7 @@ discard block |
||
6776 | 6777 | * false if he isn't. If the user ID is given and is an integer, then the same |
6777 | 6778 | * ID is simply returned |
6778 | 6779 | * @param integer User ID |
6780 | + * @param integer $user_id |
|
6779 | 6781 | * @return boolean Integer User ID is logged in, or false otherwise |
6780 | 6782 | */ |
6781 | 6783 | function api_user_is_login($user_id = null) { |
@@ -7220,6 +7222,7 @@ discard block |
||
7220 | 7222 | /** |
7221 | 7223 | * Gets memory limit in bytes |
7222 | 7224 | * @param string The memory size (128M, 1G, 1000K, etc) |
7225 | + * @param string $mem |
|
7223 | 7226 | * @return int |
7224 | 7227 | * @assert (null) === false |
7225 | 7228 | * @assert ('1t') === 1099511627776 |
@@ -8131,7 +8134,7 @@ discard block |
||
8131 | 8134 | /** |
8132 | 8135 | * Like strip_tags(), but leaves an additional space and removes only the given tags |
8133 | 8136 | * @param string $string |
8134 | - * @param array $tags Tags to be removed |
|
8137 | + * @param string[] $tags Tags to be removed |
|
8135 | 8138 | * @return string The original string without the given tags |
8136 | 8139 | */ |
8137 | 8140 | function stripGivenTags($string, $tags) { |