@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * This function return the value of a php.ini setting if not "" or if exists, |
98 | 98 | * otherwise return false |
99 | 99 | * @param string $phpSetting The name of a PHP setting |
100 | - * @return mixed The value of the setting, or false if not found |
|
100 | + * @return string|false The value of the setting, or false if not found |
|
101 | 101 | */ |
102 | 102 | function checkPhpSettingExists($phpSetting) |
103 | 103 | { |
@@ -1268,6 +1268,10 @@ discard block |
||
1268 | 1268 | * @param string Extra notice (to show on the right side) |
1269 | 1269 | * @param boolean Whether to display in update mode |
1270 | 1270 | * @param string Additional attribute for the <tr> element |
1271 | + * @param string $installType |
|
1272 | + * @param string $parameterName |
|
1273 | + * @param string $formFieldName |
|
1274 | + * @param string $extra_notice |
|
1271 | 1275 | * @return void Direct output |
1272 | 1276 | */ |
1273 | 1277 | function displayDatabaseParameter( |
@@ -1481,6 +1485,11 @@ discard block |
||
1481 | 1485 | |
1482 | 1486 | <?php |
1483 | 1487 | } |
1488 | +/** |
|
1489 | + * @param string $content |
|
1490 | + * @param string $title |
|
1491 | + * @param string $id |
|
1492 | + */ |
|
1484 | 1493 | function panel($content = null, $title = null, $id = null, $style = null) { |
1485 | 1494 | $html = ''; |
1486 | 1495 | if (empty($style)) { |
@@ -1837,8 +1846,8 @@ discard block |
||
1837 | 1846 | } |
1838 | 1847 | |
1839 | 1848 | /** |
1840 | - * @param $current_value |
|
1841 | - * @param $wanted_value |
|
1849 | + * @param string $current_value |
|
1850 | + * @param string $wanted_value |
|
1842 | 1851 | * @return string |
1843 | 1852 | */ |
1844 | 1853 | function compare_setting_values($current_value, $wanted_value) |
@@ -1855,8 +1864,8 @@ discard block |
||
1855 | 1864 | } |
1856 | 1865 | |
1857 | 1866 | /** |
1858 | - * @param $course_dir |
|
1859 | - * @param $course_attempt_name |
|
1867 | + * @param string $course_dir |
|
1868 | + * @param string $course_attempt_name |
|
1860 | 1869 | * @param string $file |
1861 | 1870 | * @return bool |
1862 | 1871 | */ |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | /** |
217 | 217 | * Import the aicc object (as a result from the parse_config_files function) into the database structure |
218 | 218 | * @param string $course_code |
219 | - * @return bool Returns -1 on error |
|
219 | + * @return false|null Returns -1 on error |
|
220 | 220 | */ |
221 | 221 | public function import_aicc($course_code) |
222 | 222 | { |
@@ -780,7 +780,8 @@ discard block |
||
780 | 780 | * Static function to parse AICC ini files. |
781 | 781 | * Based on work by sinedeo at gmail dot com published on php.net (parse_ini_file()). |
782 | 782 | * @param string File path |
783 | - * @return array Structured array |
|
783 | + * @param string $f |
|
784 | + * @return string Structured array |
|
784 | 785 | */ |
785 | 786 | function parse_ini_file_quotes_safe($f) { |
786 | 787 | $null = ''; |
@@ -831,7 +832,7 @@ discard block |
||
831 | 832 | * Based on work by sinedeo at gmail dot com published on php.net (parse_ini_file()). |
832 | 833 | * @param string INI File string |
833 | 834 | * @param array List of names of sections that should be considered as containing only hard string data (no variables), provided in lower case |
834 | - * @return array Structured array |
|
835 | + * @return string Structured array |
|
835 | 836 | */ |
836 | 837 | function parse_ini_string_quotes_safe($s, $pure_strings = array()) { |
837 | 838 | $null = ''; |
@@ -894,6 +895,7 @@ discard block |
||
894 | 895 | * @param string CSV delimiter |
895 | 896 | * @param string CSV enclosure |
896 | 897 | * @param boolean Might one field name happen more than once on the same line? (then split by comma in the values) |
898 | + * @param string $f |
|
897 | 899 | * @return array Simple structured array |
898 | 900 | */ |
899 | 901 | function parse_csv_file($f, $delim = ',', $enclosure = '"', $multiples = false) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param string $course Course code |
85 | 85 | * @param integer $lp_id |
86 | 86 | * @param integer $user_id |
87 | - * @return mixed True on success, false on error |
|
87 | + * @return boolean True on success, false on error |
|
88 | 88 | */ |
89 | 89 | public function __construct($course, $lp_id, $user_id) |
90 | 90 | { |
@@ -482,7 +482,8 @@ discard block |
||
482 | 482 | * @param string $description |
483 | 483 | * @param int $prerequisites |
484 | 484 | * @param int $max_time_allowed |
485 | - * @return int |
|
485 | + * @param string $id |
|
486 | + * @return false|string |
|
486 | 487 | */ |
487 | 488 | public function add_item( |
488 | 489 | $parent, |
@@ -1021,7 +1022,7 @@ discard block |
||
1021 | 1022 | * @param array $courseInfo |
1022 | 1023 | * @param integer Learnpath ID |
1023 | 1024 | * @param string Whether to delete data or keep it (default: 'keep', others: 'remove') |
1024 | - * @return boolean True on success, false on failure (might change that to return number of elements deleted) |
|
1025 | + * @return false|null True on success, false on failure (might change that to return number of elements deleted) |
|
1025 | 1026 | */ |
1026 | 1027 | public function delete($courseInfo = null, $id = null, $delete = 'keep') |
1027 | 1028 | { |
@@ -1155,7 +1156,7 @@ discard block |
||
1155 | 1156 | * @param integer $id Elem ID (0 if first) |
1156 | 1157 | * @param integer $remove Whether to remove the resource/data from the |
1157 | 1158 | * system or leave it (default: 'keep', others 'remove') |
1158 | - * @return integer Number of elements moved |
|
1159 | + * @return false|null Number of elements moved |
|
1159 | 1160 | * @todo implement resource removal |
1160 | 1161 | */ |
1161 | 1162 | public function delete_item($id, $remove = 'keep') |
@@ -1237,7 +1238,7 @@ discard block |
||
1237 | 1238 | * @param array $audio The array resulting of the $_FILES[mp3] element |
1238 | 1239 | * @param int $max_time_allowed |
1239 | 1240 | * @param string $url |
1240 | - * @return boolean True on success, false on error |
|
1241 | + * @return false|null True on success, false on error |
|
1241 | 1242 | */ |
1242 | 1243 | public function edit_item( |
1243 | 1244 | $id, |
@@ -1760,7 +1761,7 @@ discard block |
||
1760 | 1761 | |
1761 | 1762 | /** |
1762 | 1763 | * Gets the first element URL. |
1763 | - * @return string URL to load into the viewer |
|
1764 | + * @return false|null URL to load into the viewer |
|
1764 | 1765 | */ |
1765 | 1766 | public function first() |
1766 | 1767 | { |
@@ -2276,6 +2277,7 @@ discard block |
||
2276 | 2277 | * @param int $student_id |
2277 | 2278 | * @param string Course code (optional) |
2278 | 2279 | * @param int $sessionId |
2280 | + * @param string $courseCode |
|
2279 | 2281 | * @return bool |
2280 | 2282 | */ |
2281 | 2283 | public static function is_lp_visible_for_student( |
@@ -2575,7 +2577,7 @@ discard block |
||
2575 | 2577 | |
2576 | 2578 | /** |
2577 | 2579 | * Gets the learnpath session id |
2578 | - * @return string Learnpath theme |
|
2580 | + * @return integer Learnpath theme |
|
2579 | 2581 | */ |
2580 | 2582 | public function get_lp_session_id() |
2581 | 2583 | { |
@@ -2608,7 +2610,7 @@ discard block |
||
2608 | 2610 | /** |
2609 | 2611 | * @param string $size |
2610 | 2612 | * @param string $path_type |
2611 | - * @return bool|string |
|
2613 | + * @return string|false |
|
2612 | 2614 | */ |
2613 | 2615 | public function get_preview_image_path($size = null, $path_type = 'web') |
2614 | 2616 | { |
@@ -2754,6 +2756,8 @@ discard block |
||
2754 | 2756 | * Returns the XML DOM document's node |
2755 | 2757 | * @param resource Reference to a list of objects to search for the given ITEM_* |
2756 | 2758 | * @param string The identifier to look for |
2759 | + * @param DOMNodeList $children |
|
2760 | + * @param string $id |
|
2757 | 2761 | * @return mixed The reference to the element found with that identifier. False if not found |
2758 | 2762 | */ |
2759 | 2763 | public function get_scorm_xml_node(& $children, $id) |
@@ -3001,7 +3005,7 @@ discard block |
||
3001 | 3005 | /** |
3002 | 3006 | * Generate and return the table of contents for this learnpath. The (flat) table returned can be |
3003 | 3007 | * used by get_html_toc() to be ready to display |
3004 | - * @return array TOC as a table with 4 elements per row: title, link, status and level |
|
3008 | + * @return boolean TOC as a table with 4 elements per row: title, link, status and level |
|
3005 | 3009 | */ |
3006 | 3010 | public function get_toc() |
3007 | 3011 | { |
@@ -3137,7 +3141,7 @@ discard block |
||
3137 | 3141 | } |
3138 | 3142 | |
3139 | 3143 | /** |
3140 | - * @return array |
|
3144 | + * @return string[] |
|
3141 | 3145 | */ |
3142 | 3146 | public static function getChapterTypes() |
3143 | 3147 | { |
@@ -4050,7 +4054,7 @@ discard block |
||
4050 | 4054 | * Open a resource = initialise all local variables relative to this resource. Depending on the child |
4051 | 4055 | * class, this might be redefined to allow several behaviours depending on the document type. |
4052 | 4056 | * @param integer Resource ID |
4053 | - * @return boolean True on success, false otherwise |
|
4057 | + * @return boolean|null True on success, false otherwise |
|
4054 | 4058 | */ |
4055 | 4059 | public function open($id) |
4056 | 4060 | { |
@@ -4179,7 +4183,7 @@ discard block |
||
4179 | 4183 | * Can be used as abstract |
4180 | 4184 | * @param integer $lp_id Learnpath id |
4181 | 4185 | * @param string $set_visibility New visibility (v/i - visible/invisible) |
4182 | - * @return bool |
|
4186 | + * @return false|null |
|
4183 | 4187 | */ |
4184 | 4188 | public static function toggle_publish($lp_id, $set_visibility = 'v') |
4185 | 4189 | { |
@@ -4264,7 +4268,7 @@ discard block |
||
4264 | 4268 | * Make sure the results are saved with anoter method. This method should probably be |
4265 | 4269 | * redefined in children classes. |
4266 | 4270 | * To use a similar method statically, use the create_new_attempt() method |
4267 | - * @return string URL to load in the viewer |
|
4271 | + * @return boolean URL to load in the viewer |
|
4268 | 4272 | */ |
4269 | 4273 | public function restart() |
4270 | 4274 | { |
@@ -4342,6 +4346,7 @@ discard block |
||
4342 | 4346 | * Saves the given item |
4343 | 4347 | * @param integer $item_id. Optional (will take from $_REQUEST if null) |
4344 | 4348 | * @param boolean $from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true |
4349 | + * @param integer $item_id |
|
4345 | 4350 | * @return boolean |
4346 | 4351 | */ |
4347 | 4352 | public function save_item($item_id = null, $from_outside = true) |
@@ -4839,7 +4844,7 @@ discard block |
||
4839 | 4844 | |
4840 | 4845 | /** |
4841 | 4846 | * Sets use_max_score |
4842 | - * @param string $use_max_score Optional string giving the new location of this learnpath |
|
4847 | + * @param integer $use_max_score Optional string giving the new location of this learnpath |
|
4843 | 4848 | * @return boolean True on success / False on error |
4844 | 4849 | */ |
4845 | 4850 | public function set_use_max_score($use_max_score = 1) |
@@ -5240,6 +5245,7 @@ discard block |
||
5240 | 5245 | * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags |
5241 | 5246 | * |
5242 | 5247 | * @param string 'seriousgame', 'single' or 'multiple' |
5248 | + * @param string $mode |
|
5243 | 5249 | * @return boolean |
5244 | 5250 | * @author ndiechburg <[email protected]> |
5245 | 5251 | **/ |
@@ -5282,7 +5288,7 @@ discard block |
||
5282 | 5288 | /** |
5283 | 5289 | * Switch between multiple attempt, single attempt or serious_game mode (only for scorm) |
5284 | 5290 | * |
5285 | - * @return boolean |
|
5291 | + * @return boolean|null |
|
5286 | 5292 | * @author ndiechburg <[email protected]> |
5287 | 5293 | **/ |
5288 | 5294 | public function switch_attempt_mode() |
@@ -5473,7 +5479,6 @@ discard block |
||
5473 | 5479 | /** |
5474 | 5480 | * Function that creates a html list of learning path items so that we can add audio files to them |
5475 | 5481 | * @author Kevin Van Den Haute |
5476 | - * @param int $lp_id |
|
5477 | 5482 | * @return string |
5478 | 5483 | */ |
5479 | 5484 | public function overview() |
@@ -5844,7 +5849,7 @@ discard block |
||
5844 | 5849 | /** |
5845 | 5850 | * This function builds the action menu |
5846 | 5851 | * @param bool $returnContent |
5847 | - * @return void |
|
5852 | + * @return string|null |
|
5848 | 5853 | */ |
5849 | 5854 | public function build_action_menu($returnContent = false) |
5850 | 5855 | { |
@@ -6335,7 +6340,7 @@ discard block |
||
6335 | 6340 | /** |
6336 | 6341 | * Function that displays a list with al the resources that |
6337 | 6342 | * could be added to the learning path |
6338 | - * @return string |
|
6343 | + * @return boolean |
|
6339 | 6344 | */ |
6340 | 6345 | public function display_resources() |
6341 | 6346 | { |
@@ -8770,7 +8775,7 @@ discard block |
||
8770 | 8775 | |
8771 | 8776 | /** |
8772 | 8777 | * Creates a list with all the student publications in it |
8773 | - * @return unknown |
|
8778 | + * @return string |
|
8774 | 8779 | */ |
8775 | 8780 | public function get_student_publications() |
8776 | 8781 | { |
@@ -9715,7 +9720,7 @@ discard block |
||
9715 | 9720 | |
9716 | 9721 | /** |
9717 | 9722 | * @param int $lp_id |
9718 | - * @return bool |
|
9723 | + * @return false|null |
|
9719 | 9724 | */ |
9720 | 9725 | public function scorm_export_to_pdf($lp_id) |
9721 | 9726 | { |
@@ -10232,6 +10237,7 @@ discard block |
||
10232 | 10237 | } |
10233 | 10238 | |
10234 | 10239 | /** |
10240 | + * @param string $courseCode |
|
10235 | 10241 | * @return \learnpath |
10236 | 10242 | */ |
10237 | 10243 | public static function getLpFromSession($courseCode, $lp_id, $user_id) |
@@ -10251,7 +10257,7 @@ discard block |
||
10251 | 10257 | |
10252 | 10258 | /** |
10253 | 10259 | * @param int $itemId |
10254 | - * @return learnpathItem|false |
|
10260 | + * @return string |
|
10255 | 10261 | */ |
10256 | 10262 | public function getItem($itemId) |
10257 | 10263 | { |
@@ -10301,7 +10307,6 @@ discard block |
||
10301 | 10307 | /** |
10302 | 10308 | * Set whether this is a learning path with the possibility to subscribe |
10303 | 10309 | * users or not |
10304 | - * @param int $subscribeUsers (0 = false, 1 = true) |
|
10305 | 10310 | */ |
10306 | 10311 | public function setSubscribeUsers($value) |
10307 | 10312 | { |
@@ -10426,7 +10431,7 @@ discard block |
||
10426 | 10431 | |
10427 | 10432 | /** |
10428 | 10433 | * Get the item of exercise type (evaluation type) |
10429 | - * @return array The final evaluation. Otherwise return false |
|
10434 | + * @return integer The final evaluation. Otherwise return false |
|
10430 | 10435 | */ |
10431 | 10436 | public function getFinalEvaluationItem() |
10432 | 10437 | { |
@@ -10650,7 +10655,7 @@ discard block |
||
10650 | 10655 | /** |
10651 | 10656 | * Create a forum for this learning path |
10652 | 10657 | * @param type $forumCategoryId |
10653 | - * @return int The forum ID if was created. Otherwise return false |
|
10658 | + * @return false|string The forum ID if was created. Otherwise return false |
|
10654 | 10659 | */ |
10655 | 10660 | public function createForum($forumCategoryId) |
10656 | 10661 | { |
@@ -60,6 +60,7 @@ |
||
60 | 60 | /** |
61 | 61 | * This function deletes an entire directory |
62 | 62 | * @param string The directory path |
63 | + * @param string $dir |
|
63 | 64 | * @return boolean True on success, false on failure |
64 | 65 | */ |
65 | 66 | function deldir($dir) { |
@@ -1869,7 +1869,7 @@ discard block |
||
1869 | 1869 | |
1870 | 1870 | /** |
1871 | 1871 | * Get the extra terms (tags) that identify this item |
1872 | - * @return mixed |
|
1872 | + * @return string |
|
1873 | 1873 | */ |
1874 | 1874 | public function get_terms() |
1875 | 1875 | { |
@@ -2069,7 +2069,7 @@ discard block |
||
2069 | 2069 | |
2070 | 2070 | /** |
2071 | 2071 | * Opens/launches the item. Initialises runtime values. |
2072 | - * @return boolean True on success, false on failure. |
|
2072 | + * @return boolean|null True on success, false on failure. |
|
2073 | 2073 | */ |
2074 | 2074 | public function open($allow_new_attempt = false) |
2075 | 2075 | { |
@@ -3494,7 +3494,7 @@ discard block |
||
3494 | 3494 | |
3495 | 3495 | /** |
3496 | 3496 | * Checks if the current status is part of the list of status given |
3497 | - * @param array $list An array of status to check for. |
|
3497 | + * @param string[] $list An array of status to check for. |
|
3498 | 3498 | * If the current status is one of the strings, return true |
3499 | 3499 | * |
3500 | 3500 | * @return boolean True if the status was one of the given strings, |
@@ -3671,7 +3671,7 @@ discard block |
||
3671 | 3671 | /** |
3672 | 3672 | * Write objectives to DB. This method is separate from write_to_db() because otherwise |
3673 | 3673 | * objectives are lost as a side effect to AJAX and session concurrent access |
3674 | - * @return boolean True or false on error |
|
3674 | + * @return boolean|null True or false on error |
|
3675 | 3675 | */ |
3676 | 3676 | public function write_objectives_to_db() |
3677 | 3677 | { |
@@ -4312,7 +4312,7 @@ discard block |
||
4312 | 4312 | * Removes the relation between the current item and an audio file. The file |
4313 | 4313 | * is only removed from the lp_item table, but remains in the document table |
4314 | 4314 | * and directory |
4315 | - * @return bool |
|
4315 | + * @return false|null |
|
4316 | 4316 | */ |
4317 | 4317 | public function remove_audio() |
4318 | 4318 | { |
@@ -4333,7 +4333,7 @@ discard block |
||
4333 | 4333 | * @param $status |
4334 | 4334 | * @param bool $decorate |
4335 | 4335 | * @param string $type classic|simple |
4336 | - * @return array|string |
|
4336 | + * @return string |
|
4337 | 4337 | */ |
4338 | 4338 | static function humanize_status($status, $decorate = true, $type = 'classic') |
4339 | 4339 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param int $categoryId |
35 | 35 | * @param bool $ignoreCategoryFilter |
36 | 36 | * |
37 | - * @return void |
|
37 | + * @return false|null |
|
38 | 38 | */ |
39 | 39 | public function __construct( |
40 | 40 | $user_id, |
@@ -20,9 +20,9 @@ |
||
20 | 20 | * @param int $user_id User ID |
21 | 21 | * @param int $view_id View ID |
22 | 22 | * @param int $item_id Item ID |
23 | - * @param float $score Current score |
|
24 | - * @param float $max Maximum score |
|
25 | - * @param float $min Minimum score |
|
23 | + * @param integer $score Current score |
|
24 | + * @param integer $max Maximum score |
|
25 | + * @param integer $min Minimum score |
|
26 | 26 | * @param string $status Lesson status |
27 | 27 | * @param int $time Session time |
28 | 28 | * @param string $suspend Suspend data |
@@ -171,7 +171,8 @@ |
||
171 | 171 | /** |
172 | 172 | * Get images files from remote host (with webservices) |
173 | 173 | * @param array current ppt file |
174 | - * @return array images files |
|
174 | + * @param string $file |
|
175 | + * @return string images files |
|
175 | 176 | */ |
176 | 177 | private function _get_remote_ppt2lp_files($file) |
177 | 178 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Gets html pages and compose them into a learning path |
40 | 40 | * @param array The files that will compose the generated learning path. Unused so far. |
41 | - * @return boolean False if file does not exit. Nothing otherwise. |
|
41 | + * @return false|null False if file does not exit. Nothing otherwise. |
|
42 | 42 | */ |
43 | 43 | public function make_lp($files = array()) |
44 | 44 | { |
@@ -92,6 +92,7 @@ discard block |
||
92 | 92 | * Manages chapter splitting |
93 | 93 | * @param string Chapter header |
94 | 94 | * @param string Content |
95 | + * @param string $content |
|
95 | 96 | * @return void |
96 | 97 | */ |
97 | 98 | function dealPerChapter($header, $content) |
@@ -164,6 +165,7 @@ discard block |
||
164 | 165 | * Manages page splitting |
165 | 166 | * @param string Page header |
166 | 167 | * @param string Page body |
168 | + * @param string $body |
|
167 | 169 | * @return void |
168 | 170 | */ |
169 | 171 | function dealPerPage($header, $body) |