@@ -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, |
@@ -14,6 +14,9 @@ discard block |
||
| 14 | 14 | class Session implements \ArrayAccess |
| 15 | 15 | { |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $variable |
|
| 19 | + */ |
|
| 17 | 20 | static function read($variable, $default = null) |
| 18 | 21 | { |
| 19 | 22 | return isset($_SESSION[$variable]) ? $_SESSION[$variable] : $default; |
@@ -39,7 +42,7 @@ discard block |
||
| 39 | 42 | * Returns true if session has variable set up, false otherwise. |
| 40 | 43 | * |
| 41 | 44 | * @param string $variable |
| 42 | - * @return mixed value |
|
| 45 | + * @return boolean value |
|
| 43 | 46 | */ |
| 44 | 47 | static function has($variable) |
| 45 | 48 | { |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | /** |
| 278 | 278 | * @param string |
| 279 | 279 | * @param string |
| 280 | - * @return true if the user is allowed to see the document, false otherwise |
|
| 280 | + * @return boolean if the user is allowed to see the document, false otherwise |
|
| 281 | 281 | * @author Sergio A Kessler, first version |
| 282 | 282 | * @author Roan Embrechts, bugfix |
| 283 | 283 | * @todo not only check if a file is visible, but also check if the user is allowed to see the file?? |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | * Gets the paths of all folders in a course |
| 737 | 737 | * can show all folders (except for the deleted ones) or only visible ones |
| 738 | 738 | * |
| 739 | - * @param array $_course |
|
| 739 | + * @param Chamilo\CoreBundle\Entity\Course $_course |
|
| 740 | 740 | * @param int $to_group_id |
| 741 | 741 | * @param boolean $can_see_invisible |
| 742 | 742 | * |
@@ -1544,7 +1544,7 @@ discard block |
||
| 1544 | 1544 | * Return true if the documentpath have visibility=1 as |
| 1545 | 1545 | * item_property (you should use the is_visible_by_id) |
| 1546 | 1546 | * |
| 1547 | - * @param string $document_path the relative complete path of the document |
|
| 1547 | + * @param string $doc_path the relative complete path of the document |
|
| 1548 | 1548 | * @param array $course the _course array info of the document's course |
| 1549 | 1549 | * @param int |
| 1550 | 1550 | * @param string |
@@ -1629,6 +1629,8 @@ discard block |
||
| 1629 | 1629 | * @param int |
| 1630 | 1630 | * @param int |
| 1631 | 1631 | * @param bool |
| 1632 | + * @param integer $session_id |
|
| 1633 | + * @param integer $user_id |
|
| 1632 | 1634 | * @return bool |
| 1633 | 1635 | */ |
| 1634 | 1636 | public static function is_visible_by_id( |
@@ -2116,6 +2118,7 @@ discard block |
||
| 2116 | 2118 | * @param bool is file or string html |
| 2117 | 2119 | * @param string type (one of the app tools) - optional (otherwise takes the current item's type) |
| 2118 | 2120 | * @param int level of recursivity we're in |
| 2121 | + * @param string $source_html |
|
| 2119 | 2122 | * @return array List of file paths. An additional field containing 'local' or 'remote' helps determine |
| 2120 | 2123 | * if the file should be copied into the zip or just linked |
| 2121 | 2124 | */ |
@@ -2942,6 +2945,7 @@ discard block |
||
| 2942 | 2945 | |
| 2943 | 2946 | /** |
| 2944 | 2947 | * Obtains the text inside the file with the right parser |
| 2948 | + * @param string $doc_path |
|
| 2945 | 2949 | */ |
| 2946 | 2950 | public static function get_text_content($doc_path, $doc_mime) |
| 2947 | 2951 | { |
@@ -3192,6 +3196,7 @@ discard block |
||
| 3192 | 3196 | * Shows a play icon next to the document title in the document list |
| 3193 | 3197 | * @param int |
| 3194 | 3198 | * @param string |
| 3199 | + * @param integer|null $i |
|
| 3195 | 3200 | * @return string html content |
| 3196 | 3201 | */ |
| 3197 | 3202 | static function generate_media_preview($i, $type = 'simple') |
@@ -4082,7 +4087,7 @@ discard block |
||
| 4082 | 4087 | } |
| 4083 | 4088 | |
| 4084 | 4089 | /** |
| 4085 | - * @return array |
|
| 4090 | + * @return string[] |
|
| 4086 | 4091 | */ |
| 4087 | 4092 | public static function get_web_odf_extension_list() |
| 4088 | 4093 | { |
@@ -4091,10 +4096,10 @@ discard block |
||
| 4091 | 4096 | |
| 4092 | 4097 | /** |
| 4093 | 4098 | * Set of extension allowed to use Jodconverter |
| 4094 | - * @param $mode 'from' |
|
| 4099 | + * @param string $mode 'from' |
|
| 4095 | 4100 | * 'to' |
| 4096 | 4101 | * 'all' |
| 4097 | - * @param $format 'text' |
|
| 4102 | + * @param string $format 'text' |
|
| 4098 | 4103 | * 'spreadsheet' |
| 4099 | 4104 | * 'presentation' |
| 4100 | 4105 | * 'drawing' |
@@ -4298,7 +4303,7 @@ discard block |
||
| 4298 | 4303 | } |
| 4299 | 4304 | |
| 4300 | 4305 | /** |
| 4301 | - * @return array |
|
| 4306 | + * @return string[] |
|
| 4302 | 4307 | */ |
| 4303 | 4308 | public static function get_system_folders() |
| 4304 | 4309 | { |
@@ -4316,7 +4321,7 @@ discard block |
||
| 4316 | 4321 | } |
| 4317 | 4322 | |
| 4318 | 4323 | /** |
| 4319 | - * @return array |
|
| 4324 | + * @return string[] |
|
| 4320 | 4325 | */ |
| 4321 | 4326 | public static function getProtectedFolderFromStudent() |
| 4322 | 4327 | { |
@@ -4472,7 +4477,7 @@ discard block |
||
| 4472 | 4477 | * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg |
| 4473 | 4478 | * @param string $wavFile |
| 4474 | 4479 | * @param bool $removeWavFileIfSuccess |
| 4475 | - * @return bool |
|
| 4480 | + * @return string|false |
|
| 4476 | 4481 | */ |
| 4477 | 4482 | public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false) |
| 4478 | 4483 | { |
@@ -5561,9 +5566,6 @@ discard block |
||
| 5561 | 5566 | /** |
| 5562 | 5567 | * Creates the row of edit icons for a file/folder |
| 5563 | 5568 | * |
| 5564 | - * @param string $curdirpath current path (cfr open folder) |
|
| 5565 | - * @param string $type (file/folder) |
|
| 5566 | - * @param string $path dbase path of file/folder |
|
| 5567 | 5569 | * @param int $visibility (1/0) |
| 5568 | 5570 | * @param int $id dbase id of the document |
| 5569 | 5571 | * @return string html img tags with hyperlinks |
@@ -5893,7 +5895,7 @@ discard block |
||
| 5893 | 5895 | /** |
| 5894 | 5896 | * Gets the path translated with title of docs and folders |
| 5895 | 5897 | * @param string $path the real path |
| 5896 | - * @return the path which should be displayed |
|
| 5898 | + * @return string path which should be displayed |
|
| 5897 | 5899 | */ |
| 5898 | 5900 | public static function get_titles_of_path($path) |
| 5899 | 5901 | { |
@@ -5948,7 +5950,8 @@ discard block |
||
| 5948 | 5950 | |
| 5949 | 5951 | /** |
| 5950 | 5952 | * Checks whether the user is in shared folder |
| 5951 | - * @return return bool Return true when user is into shared folder |
|
| 5953 | + * @param integer $current_session_id |
|
| 5954 | + * @return boolean bool Return true when user is into shared folder |
|
| 5952 | 5955 | */ |
| 5953 | 5956 | public static function is_shared_folder($curdirpath, $current_session_id) |
| 5954 | 5957 | { |
@@ -5964,7 +5967,7 @@ discard block |
||
| 5964 | 5967 | |
| 5965 | 5968 | /** |
| 5966 | 5969 | * Checks whether the user is into any user shared folder |
| 5967 | - * @return return bool Return true when user is in any user shared folder |
|
| 5970 | + * @return boolean bool Return true when user is in any user shared folder |
|
| 5968 | 5971 | */ |
| 5969 | 5972 | public static function is_any_user_shared_folder($path, $current_session_id) |
| 5970 | 5973 | { |
@@ -6178,7 +6181,7 @@ discard block |
||
| 6178 | 6181 | * @param int $id |
| 6179 | 6182 | * @param array $courseInfo |
| 6180 | 6183 | * @param int $sessionId |
| 6181 | - * @return bool |
|
| 6184 | + * @return boolean|null |
|
| 6182 | 6185 | */ |
| 6183 | 6186 | public static function downloadDeletedDocument($id, $courseInfo, $sessionId) |
| 6184 | 6187 | { |
@@ -6197,7 +6200,7 @@ discard block |
||
| 6197 | 6200 | * @param array $courseInfo |
| 6198 | 6201 | * @param int $sessionId |
| 6199 | 6202 | * |
| 6200 | - * @return bool |
|
| 6203 | + * @return false|null |
|
| 6201 | 6204 | */ |
| 6202 | 6205 | public static function downloadAllDeletedDocument($courseInfo, $sessionId) |
| 6203 | 6206 | { |
@@ -6236,7 +6239,7 @@ discard block |
||
| 6236 | 6239 | * @param array $courseInfo |
| 6237 | 6240 | * @param int $sessionId |
| 6238 | 6241 | * |
| 6239 | - * @return bool |
|
| 6242 | + * @return false|null |
|
| 6240 | 6243 | */ |
| 6241 | 6244 | public function deleteDocumentsFromSession($courseInfo, $sessionId) |
| 6242 | 6245 | { |
@@ -2240,7 +2240,7 @@ discard block |
||
| 2240 | 2240 | |
| 2241 | 2241 | /** |
| 2242 | 2242 | * Creates a file called mysql_dump.sql in the course folder |
| 2243 | - * @param $course_code The code of the course |
|
| 2243 | + * @param string $course_code The code of the course |
|
| 2244 | 2244 | * @todo Implementation for single database |
| 2245 | 2245 | */ |
| 2246 | 2246 | public static function create_database_dump($course_code) |
@@ -2966,6 +2966,7 @@ discard block |
||
| 2966 | 2966 | * @param int $limit |
| 2967 | 2967 | * @param string $column |
| 2968 | 2968 | * @param string $direction |
| 2969 | + * @param integer $status |
|
| 2969 | 2970 | * @return array courses |
| 2970 | 2971 | */ |
| 2971 | 2972 | public static function get_courses_followed_by_drh( |
@@ -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) |
@@ -5354,7 +5355,7 @@ discard block |
||
| 5354 | 5355 | * Gets the access url info in an array |
| 5355 | 5356 | * @param int $id Id of the access url |
| 5356 | 5357 | * @param bool $returnDefault Set to false if you want the real URL if URL 1 is still 'http://localhost/' |
| 5357 | - * @return array All the info (url, description, active, created_by, tms) |
|
| 5358 | + * @return string All the info (url, description, active, created_by, tms) |
|
| 5358 | 5359 | * from the access_url table |
| 5359 | 5360 | * @author Julio Montoya |
| 5360 | 5361 | */ |
@@ -6803,7 +6804,7 @@ discard block |
||
| 6803 | 6804 | /** |
| 6804 | 6805 | * Returns an array of global configuration settings which should be ignored |
| 6805 | 6806 | * when printing the configuration settings screens |
| 6806 | - * @return array Array of strings, each identifying one of the excluded settings |
|
| 6807 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
| 6807 | 6808 | */ |
| 6808 | 6809 | function api_get_locked_settings() { |
| 6809 | 6810 | return array( |
@@ -6846,6 +6847,7 @@ discard block |
||
| 6846 | 6847 | * false if he isn't. If the user ID is given and is an integer, then the same |
| 6847 | 6848 | * ID is simply returned |
| 6848 | 6849 | * @param integer User ID |
| 6850 | + * @param integer $user_id |
|
| 6849 | 6851 | * @return boolean Integer User ID is logged in, or false otherwise |
| 6850 | 6852 | */ |
| 6851 | 6853 | function api_user_is_login($user_id = null) { |
@@ -7290,6 +7292,7 @@ discard block |
||
| 7290 | 7292 | /** |
| 7291 | 7293 | * Gets memory limit in bytes |
| 7292 | 7294 | * @param string The memory size (128M, 1G, 1000K, etc) |
| 7295 | + * @param string $mem |
|
| 7293 | 7296 | * @return int |
| 7294 | 7297 | * @assert (null) === false |
| 7295 | 7298 | * @assert ('1t') === 1099511627776 |
@@ -8201,7 +8204,7 @@ discard block |
||
| 8201 | 8204 | /** |
| 8202 | 8205 | * Like strip_tags(), but leaves an additional space and removes only the given tags |
| 8203 | 8206 | * @param string $string |
| 8204 | - * @param array $tags Tags to be removed |
|
| 8207 | + * @param string[] $tags Tags to be removed |
|
| 8205 | 8208 | * @return string The original string without the given tags |
| 8206 | 8209 | */ |
| 8207 | 8210 | function stripGivenTags($string, $tags) { |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * Save a participant in a meeting room |
| 280 | 280 | * @param int $meetingId |
| 281 | 281 | * @param int $participantId |
| 282 | - * @return false|int The last inserted ID. Otherwise return false |
|
| 282 | + * @return false|string The last inserted ID. Otherwise return false |
|
| 283 | 283 | */ |
| 284 | 284 | public function saveParticipant($meetingId, $participantId) |
| 285 | 285 | { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | /** |
| 353 | 353 | * Returns a meeting "join" URL |
| 354 | 354 | * @param string The name of the meeting (usually the course code) |
| 355 | - * @return mixed The URL to join the meeting, or false on error |
|
| 355 | + * @return false|string The URL to join the meeting, or false on error |
|
| 356 | 356 | * @todo implement moderator pass |
| 357 | 357 | * @assert ('') === false |
| 358 | 358 | * @assert ('abcdefghijklmnopqrstuvwxyzabcdefghijklmno') === false |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | * Closes a meeting (usually when the user click on the close button from |
| 661 | 661 | * the conferences listing. |
| 662 | 662 | * @param string The internal ID of the meeting (id field for this meeting) |
| 663 | - * @return void |
|
| 663 | + * @return false|null |
|
| 664 | 664 | * @assert (0) === false |
| 665 | 665 | */ |
| 666 | 666 | public function endMeeting($id) |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | * @param array $recordInfo |
| 1078 | 1078 | * @param bool $isGlobal |
| 1079 | 1079 | * @param bool $isAdminReport |
| 1080 | - * @return array |
|
| 1080 | + * @return string[] |
|
| 1081 | 1081 | */ |
| 1082 | 1082 | private function getActionLinks($meetingInfo, $recordInfo, $isGlobal = false, $isAdminReport = false) |
| 1083 | 1083 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @param string $course Course code |
| 87 | 87 | * @param integer $lp_id |
| 88 | 88 | * @param integer $user_id |
| 89 | - * @return mixed True on success, false on error |
|
| 89 | + * @return boolean True on success, false on error |
|
| 90 | 90 | */ |
| 91 | 91 | public function __construct($course, $lp_id, $user_id) |
| 92 | 92 | { |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | * @param int $max_time_allowed |
| 488 | 488 | * @param int $userId |
| 489 | 489 | * |
| 490 | - * @return int |
|
| 490 | + * @return false|string |
|
| 491 | 491 | */ |
| 492 | 492 | public function add_item( |
| 493 | 493 | $parent, |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | * @param array $courseInfo |
| 1039 | 1039 | * @param integer Learnpath ID |
| 1040 | 1040 | * @param string Whether to delete data or keep it (default: 'keep', others: 'remove') |
| 1041 | - * @return boolean True on success, false on failure (might change that to return number of elements deleted) |
|
| 1041 | + * @return false|null True on success, false on failure (might change that to return number of elements deleted) |
|
| 1042 | 1042 | */ |
| 1043 | 1043 | public function delete($courseInfo = null, $id = null, $delete = 'keep') |
| 1044 | 1044 | { |
@@ -1172,7 +1172,7 @@ discard block |
||
| 1172 | 1172 | * @param integer $id Elem ID (0 if first) |
| 1173 | 1173 | * @param integer $remove Whether to remove the resource/data from the |
| 1174 | 1174 | * system or leave it (default: 'keep', others 'remove') |
| 1175 | - * @return integer Number of elements moved |
|
| 1175 | + * @return false|null Number of elements moved |
|
| 1176 | 1176 | * @todo implement resource removal |
| 1177 | 1177 | */ |
| 1178 | 1178 | public function delete_item($id, $remove = 'keep') |
@@ -1254,7 +1254,7 @@ discard block |
||
| 1254 | 1254 | * @param array $audio The array resulting of the $_FILES[mp3] element |
| 1255 | 1255 | * @param int $max_time_allowed |
| 1256 | 1256 | * @param string $url |
| 1257 | - * @return boolean True on success, false on error |
|
| 1257 | + * @return false|null True on success, false on error |
|
| 1258 | 1258 | */ |
| 1259 | 1259 | public function edit_item( |
| 1260 | 1260 | $id, |
@@ -1785,7 +1785,7 @@ discard block |
||
| 1785 | 1785 | |
| 1786 | 1786 | /** |
| 1787 | 1787 | * Gets the first element URL. |
| 1788 | - * @return string URL to load into the viewer |
|
| 1788 | + * @return false|null URL to load into the viewer |
|
| 1789 | 1789 | */ |
| 1790 | 1790 | public function first() |
| 1791 | 1791 | { |
@@ -2301,6 +2301,7 @@ discard block |
||
| 2301 | 2301 | * @param int $student_id |
| 2302 | 2302 | * @param string Course code (optional) |
| 2303 | 2303 | * @param int $sessionId |
| 2304 | + * @param string $courseCode |
|
| 2304 | 2305 | * @return bool |
| 2305 | 2306 | */ |
| 2306 | 2307 | public static function is_lp_visible_for_student( |
@@ -2600,7 +2601,7 @@ discard block |
||
| 2600 | 2601 | |
| 2601 | 2602 | /** |
| 2602 | 2603 | * Gets the learnpath session id |
| 2603 | - * @return string Learnpath theme |
|
| 2604 | + * @return integer Learnpath theme |
|
| 2604 | 2605 | */ |
| 2605 | 2606 | public function get_lp_session_id() |
| 2606 | 2607 | { |
@@ -2633,7 +2634,7 @@ discard block |
||
| 2633 | 2634 | /** |
| 2634 | 2635 | * @param string $size |
| 2635 | 2636 | * @param string $path_type |
| 2636 | - * @return bool|string |
|
| 2637 | + * @return string|false |
|
| 2637 | 2638 | */ |
| 2638 | 2639 | public function get_preview_image_path($size = null, $path_type = 'web') |
| 2639 | 2640 | { |
@@ -2779,6 +2780,8 @@ discard block |
||
| 2779 | 2780 | * Returns the XML DOM document's node |
| 2780 | 2781 | * @param resource Reference to a list of objects to search for the given ITEM_* |
| 2781 | 2782 | * @param string The identifier to look for |
| 2783 | + * @param DOMNodeList $children |
|
| 2784 | + * @param string $id |
|
| 2782 | 2785 | * @return mixed The reference to the element found with that identifier. False if not found |
| 2783 | 2786 | */ |
| 2784 | 2787 | public function get_scorm_xml_node(& $children, $id) |
@@ -3026,7 +3029,7 @@ discard block |
||
| 3026 | 3029 | /** |
| 3027 | 3030 | * Generate and return the table of contents for this learnpath. The (flat) table returned can be |
| 3028 | 3031 | * used by get_html_toc() to be ready to display |
| 3029 | - * @return array TOC as a table with 4 elements per row: title, link, status and level |
|
| 3032 | + * @return boolean TOC as a table with 4 elements per row: title, link, status and level |
|
| 3030 | 3033 | */ |
| 3031 | 3034 | public function get_toc() |
| 3032 | 3035 | { |
@@ -3162,7 +3165,7 @@ discard block |
||
| 3162 | 3165 | } |
| 3163 | 3166 | |
| 3164 | 3167 | /** |
| 3165 | - * @return array |
|
| 3168 | + * @return string[] |
|
| 3166 | 3169 | */ |
| 3167 | 3170 | public static function getChapterTypes() |
| 3168 | 3171 | { |
@@ -4065,7 +4068,7 @@ discard block |
||
| 4065 | 4068 | * Open a resource = initialise all local variables relative to this resource. Depending on the child |
| 4066 | 4069 | * class, this might be redefined to allow several behaviours depending on the document type. |
| 4067 | 4070 | * @param integer Resource ID |
| 4068 | - * @return boolean True on success, false otherwise |
|
| 4071 | + * @return boolean|null True on success, false otherwise |
|
| 4069 | 4072 | */ |
| 4070 | 4073 | public function open($id) |
| 4071 | 4074 | { |
@@ -4194,7 +4197,7 @@ discard block |
||
| 4194 | 4197 | * Can be used as abstract |
| 4195 | 4198 | * @param integer $lp_id Learnpath id |
| 4196 | 4199 | * @param string $set_visibility New visibility (v/i - visible/invisible) |
| 4197 | - * @return bool |
|
| 4200 | + * @return false|null |
|
| 4198 | 4201 | */ |
| 4199 | 4202 | public static function toggle_publish($lp_id, $set_visibility = 'v') |
| 4200 | 4203 | { |
@@ -4279,7 +4282,7 @@ discard block |
||
| 4279 | 4282 | * Make sure the results are saved with anoter method. This method should probably be |
| 4280 | 4283 | * redefined in children classes. |
| 4281 | 4284 | * To use a similar method statically, use the create_new_attempt() method |
| 4282 | - * @return string URL to load in the viewer |
|
| 4285 | + * @return boolean URL to load in the viewer |
|
| 4283 | 4286 | */ |
| 4284 | 4287 | public function restart() |
| 4285 | 4288 | { |
@@ -4357,6 +4360,7 @@ discard block |
||
| 4357 | 4360 | * Saves the given item |
| 4358 | 4361 | * @param integer $item_id. Optional (will take from $_REQUEST if null) |
| 4359 | 4362 | * @param boolean $from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true |
| 4363 | + * @param integer $item_id |
|
| 4360 | 4364 | * @return boolean |
| 4361 | 4365 | */ |
| 4362 | 4366 | public function save_item($item_id = null, $from_outside = true) |
@@ -4854,7 +4858,7 @@ discard block |
||
| 4854 | 4858 | |
| 4855 | 4859 | /** |
| 4856 | 4860 | * Sets use_max_score |
| 4857 | - * @param string $use_max_score Optional string giving the new location of this learnpath |
|
| 4861 | + * @param integer $use_max_score Optional string giving the new location of this learnpath |
|
| 4858 | 4862 | * @return boolean True on success / False on error |
| 4859 | 4863 | */ |
| 4860 | 4864 | public function set_use_max_score($use_max_score = 1) |
@@ -5255,6 +5259,7 @@ discard block |
||
| 5255 | 5259 | * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags |
| 5256 | 5260 | * |
| 5257 | 5261 | * @param string 'seriousgame', 'single' or 'multiple' |
| 5262 | + * @param string $mode |
|
| 5258 | 5263 | * @return boolean |
| 5259 | 5264 | * @author ndiechburg <[email protected]> |
| 5260 | 5265 | **/ |
@@ -5297,7 +5302,7 @@ discard block |
||
| 5297 | 5302 | /** |
| 5298 | 5303 | * Switch between multiple attempt, single attempt or serious_game mode (only for scorm) |
| 5299 | 5304 | * |
| 5300 | - * @return boolean |
|
| 5305 | + * @return boolean|null |
|
| 5301 | 5306 | * @author ndiechburg <[email protected]> |
| 5302 | 5307 | **/ |
| 5303 | 5308 | public function switch_attempt_mode() |
@@ -5488,7 +5493,6 @@ discard block |
||
| 5488 | 5493 | /** |
| 5489 | 5494 | * Function that creates a html list of learning path items so that we can add audio files to them |
| 5490 | 5495 | * @author Kevin Van Den Haute |
| 5491 | - * @param int $lp_id |
|
| 5492 | 5496 | * @return string |
| 5493 | 5497 | */ |
| 5494 | 5498 | public function overview() |
@@ -5860,7 +5864,7 @@ discard block |
||
| 5860 | 5864 | /** |
| 5861 | 5865 | * This function builds the action menu |
| 5862 | 5866 | * @param bool $returnContent |
| 5863 | - * @return void |
|
| 5867 | + * @return string|null |
|
| 5864 | 5868 | */ |
| 5865 | 5869 | public function build_action_menu($returnContent = false) |
| 5866 | 5870 | { |
@@ -6379,7 +6383,7 @@ discard block |
||
| 6379 | 6383 | /** |
| 6380 | 6384 | * Function that displays a list with al the resources that |
| 6381 | 6385 | * could be added to the learning path |
| 6382 | - * @return string |
|
| 6386 | + * @return boolean |
|
| 6383 | 6387 | */ |
| 6384 | 6388 | public function display_resources() |
| 6385 | 6389 | { |
@@ -6426,6 +6430,7 @@ discard block |
||
| 6426 | 6430 | /** |
| 6427 | 6431 | * Returns the extension of a document |
| 6428 | 6432 | * @param string filename |
| 6433 | + * @param string $filename |
|
| 6429 | 6434 | * @return string Extension (part after the last dot) |
| 6430 | 6435 | */ |
| 6431 | 6436 | public function get_extension($filename) |
@@ -8886,7 +8891,7 @@ discard block |
||
| 8886 | 8891 | |
| 8887 | 8892 | /** |
| 8888 | 8893 | * Creates a list with all the student publications in it |
| 8889 | - * @return unknown |
|
| 8894 | + * @return string |
|
| 8890 | 8895 | */ |
| 8891 | 8896 | public function get_student_publications() |
| 8892 | 8897 | { |
@@ -9932,7 +9937,7 @@ discard block |
||
| 9932 | 9937 | |
| 9933 | 9938 | /** |
| 9934 | 9939 | * @param int $lp_id |
| 9935 | - * @return bool |
|
| 9940 | + * @return false|null |
|
| 9936 | 9941 | */ |
| 9937 | 9942 | public function scorm_export_to_pdf($lp_id) |
| 9938 | 9943 | { |
@@ -10449,6 +10454,7 @@ discard block |
||
| 10449 | 10454 | } |
| 10450 | 10455 | |
| 10451 | 10456 | /** |
| 10457 | + * @param string $courseCode |
|
| 10452 | 10458 | * @return \learnpath |
| 10453 | 10459 | */ |
| 10454 | 10460 | public static function getLpFromSession($courseCode, $lp_id, $user_id) |
@@ -10468,7 +10474,7 @@ discard block |
||
| 10468 | 10474 | |
| 10469 | 10475 | /** |
| 10470 | 10476 | * @param int $itemId |
| 10471 | - * @return learnpathItem|false |
|
| 10477 | + * @return string |
|
| 10472 | 10478 | */ |
| 10473 | 10479 | public function getItem($itemId) |
| 10474 | 10480 | { |
@@ -10518,7 +10524,6 @@ discard block |
||
| 10518 | 10524 | /** |
| 10519 | 10525 | * Set whether this is a learning path with the possibility to subscribe |
| 10520 | 10526 | * users or not |
| 10521 | - * @param int $subscribeUsers (0 = false, 1 = true) |
|
| 10522 | 10527 | */ |
| 10523 | 10528 | public function setSubscribeUsers($value) |
| 10524 | 10529 | { |
@@ -10643,7 +10648,7 @@ discard block |
||
| 10643 | 10648 | |
| 10644 | 10649 | /** |
| 10645 | 10650 | * Get the item of exercise type (evaluation type) |
| 10646 | - * @return array The final evaluation. Otherwise return false |
|
| 10651 | + * @return integer The final evaluation. Otherwise return false |
|
| 10647 | 10652 | */ |
| 10648 | 10653 | public function getFinalEvaluationItem() |
| 10649 | 10654 | { |
@@ -10867,7 +10872,7 @@ discard block |
||
| 10867 | 10872 | /** |
| 10868 | 10873 | * Create a forum for this learning path |
| 10869 | 10874 | * @param type $forumCategoryId |
| 10870 | - * @return int The forum ID if was created. Otherwise return false |
|
| 10875 | + * @return false|string The forum ID if was created. Otherwise return false |
|
| 10871 | 10876 | */ |
| 10872 | 10877 | public function createForum($forumCategoryId) |
| 10873 | 10878 | { |
@@ -10916,7 +10921,7 @@ discard block |
||
| 10916 | 10921 | /** |
| 10917 | 10922 | * Get the LP Final Item Template |
| 10918 | 10923 | * |
| 10919 | - * @return html |
|
| 10924 | + * @return string |
|
| 10920 | 10925 | */ |
| 10921 | 10926 | private function getFinalItemTemplate() |
| 10922 | 10927 | { |
@@ -10939,7 +10944,7 @@ discard block |
||
| 10939 | 10944 | /** |
| 10940 | 10945 | * Get the LP Final Item form |
| 10941 | 10946 | * |
| 10942 | - * @return html |
|
| 10947 | + * @return string |
|
| 10943 | 10948 | */ |
| 10944 | 10949 | public function getFinalItemForm() |
| 10945 | 10950 | { |