@@ -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 | { |
@@ -484,8 +484,9 @@ discard block |
||
484 | 484 | * @param int $prerequisites |
485 | 485 | * @param int $max_time_allowed |
486 | 486 | * @param int $userId |
487 | + * @param string $id |
|
487 | 488 | * |
488 | - * @return int |
|
489 | + * @return false|string |
|
489 | 490 | */ |
490 | 491 | public function add_item( |
491 | 492 | $parent, |
@@ -1036,7 +1037,7 @@ discard block |
||
1036 | 1037 | * @param array $courseInfo |
1037 | 1038 | * @param integer Learnpath ID |
1038 | 1039 | * @param string Whether to delete data or keep it (default: 'keep', others: 'remove') |
1039 | - * @return boolean True on success, false on failure (might change that to return number of elements deleted) |
|
1040 | + * @return false|null True on success, false on failure (might change that to return number of elements deleted) |
|
1040 | 1041 | */ |
1041 | 1042 | public function delete($courseInfo = null, $id = null, $delete = 'keep') |
1042 | 1043 | { |
@@ -1170,7 +1171,7 @@ discard block |
||
1170 | 1171 | * @param integer $id Elem ID (0 if first) |
1171 | 1172 | * @param integer $remove Whether to remove the resource/data from the |
1172 | 1173 | * system or leave it (default: 'keep', others 'remove') |
1173 | - * @return integer Number of elements moved |
|
1174 | + * @return false|null Number of elements moved |
|
1174 | 1175 | * @todo implement resource removal |
1175 | 1176 | */ |
1176 | 1177 | public function delete_item($id, $remove = 'keep') |
@@ -1252,7 +1253,7 @@ discard block |
||
1252 | 1253 | * @param array $audio The array resulting of the $_FILES[mp3] element |
1253 | 1254 | * @param int $max_time_allowed |
1254 | 1255 | * @param string $url |
1255 | - * @return boolean True on success, false on error |
|
1256 | + * @return false|null True on success, false on error |
|
1256 | 1257 | */ |
1257 | 1258 | public function edit_item( |
1258 | 1259 | $id, |
@@ -1775,7 +1776,7 @@ discard block |
||
1775 | 1776 | |
1776 | 1777 | /** |
1777 | 1778 | * Gets the first element URL. |
1778 | - * @return string URL to load into the viewer |
|
1779 | + * @return false|null URL to load into the viewer |
|
1779 | 1780 | */ |
1780 | 1781 | public function first() |
1781 | 1782 | { |
@@ -2291,6 +2292,7 @@ discard block |
||
2291 | 2292 | * @param int $student_id |
2292 | 2293 | * @param string Course code (optional) |
2293 | 2294 | * @param int $sessionId |
2295 | + * @param string $courseCode |
|
2294 | 2296 | * @return bool |
2295 | 2297 | */ |
2296 | 2298 | public static function is_lp_visible_for_student( |
@@ -2590,7 +2592,7 @@ discard block |
||
2590 | 2592 | |
2591 | 2593 | /** |
2592 | 2594 | * Gets the learnpath session id |
2593 | - * @return string Learnpath theme |
|
2595 | + * @return integer Learnpath theme |
|
2594 | 2596 | */ |
2595 | 2597 | public function get_lp_session_id() |
2596 | 2598 | { |
@@ -2623,7 +2625,7 @@ discard block |
||
2623 | 2625 | /** |
2624 | 2626 | * @param string $size |
2625 | 2627 | * @param string $path_type |
2626 | - * @return bool|string |
|
2628 | + * @return string|false |
|
2627 | 2629 | */ |
2628 | 2630 | public function get_preview_image_path($size = null, $path_type = 'web') |
2629 | 2631 | { |
@@ -2769,6 +2771,8 @@ discard block |
||
2769 | 2771 | * Returns the XML DOM document's node |
2770 | 2772 | * @param resource Reference to a list of objects to search for the given ITEM_* |
2771 | 2773 | * @param string The identifier to look for |
2774 | + * @param DOMNodeList $children |
|
2775 | + * @param string $id |
|
2772 | 2776 | * @return mixed The reference to the element found with that identifier. False if not found |
2773 | 2777 | */ |
2774 | 2778 | public function get_scorm_xml_node(& $children, $id) |
@@ -3016,7 +3020,7 @@ discard block |
||
3016 | 3020 | /** |
3017 | 3021 | * Generate and return the table of contents for this learnpath. The (flat) table returned can be |
3018 | 3022 | * used by get_html_toc() to be ready to display |
3019 | - * @return array TOC as a table with 4 elements per row: title, link, status and level |
|
3023 | + * @return boolean TOC as a table with 4 elements per row: title, link, status and level |
|
3020 | 3024 | */ |
3021 | 3025 | public function get_toc() |
3022 | 3026 | { |
@@ -3152,7 +3156,7 @@ discard block |
||
3152 | 3156 | } |
3153 | 3157 | |
3154 | 3158 | /** |
3155 | - * @return array |
|
3159 | + * @return string[] |
|
3156 | 3160 | */ |
3157 | 3161 | public static function getChapterTypes() |
3158 | 3162 | { |
@@ -4054,7 +4058,7 @@ discard block |
||
4054 | 4058 | * Open a resource = initialise all local variables relative to this resource. Depending on the child |
4055 | 4059 | * class, this might be redefined to allow several behaviours depending on the document type. |
4056 | 4060 | * @param integer Resource ID |
4057 | - * @return boolean True on success, false otherwise |
|
4061 | + * @return boolean|null True on success, false otherwise |
|
4058 | 4062 | */ |
4059 | 4063 | public function open($id) |
4060 | 4064 | { |
@@ -4183,7 +4187,7 @@ discard block |
||
4183 | 4187 | * Can be used as abstract |
4184 | 4188 | * @param integer $lp_id Learnpath id |
4185 | 4189 | * @param string $set_visibility New visibility (v/i - visible/invisible) |
4186 | - * @return bool |
|
4190 | + * @return false|null |
|
4187 | 4191 | */ |
4188 | 4192 | public static function toggle_publish($lp_id, $set_visibility = 'v') |
4189 | 4193 | { |
@@ -4268,7 +4272,7 @@ discard block |
||
4268 | 4272 | * Make sure the results are saved with anoter method. This method should probably be |
4269 | 4273 | * redefined in children classes. |
4270 | 4274 | * To use a similar method statically, use the create_new_attempt() method |
4271 | - * @return string URL to load in the viewer |
|
4275 | + * @return boolean URL to load in the viewer |
|
4272 | 4276 | */ |
4273 | 4277 | public function restart() |
4274 | 4278 | { |
@@ -4346,6 +4350,7 @@ discard block |
||
4346 | 4350 | * Saves the given item |
4347 | 4351 | * @param integer $item_id. Optional (will take from $_REQUEST if null) |
4348 | 4352 | * @param boolean $from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true |
4353 | + * @param integer $item_id |
|
4349 | 4354 | * @return boolean |
4350 | 4355 | */ |
4351 | 4356 | public function save_item($item_id = null, $from_outside = true) |
@@ -4843,7 +4848,7 @@ discard block |
||
4843 | 4848 | |
4844 | 4849 | /** |
4845 | 4850 | * Sets use_max_score |
4846 | - * @param string $use_max_score Optional string giving the new location of this learnpath |
|
4851 | + * @param integer $use_max_score Optional string giving the new location of this learnpath |
|
4847 | 4852 | * @return boolean True on success / False on error |
4848 | 4853 | */ |
4849 | 4854 | public function set_use_max_score($use_max_score = 1) |
@@ -5244,6 +5249,7 @@ discard block |
||
5244 | 5249 | * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags |
5245 | 5250 | * |
5246 | 5251 | * @param string 'seriousgame', 'single' or 'multiple' |
5252 | + * @param string $mode |
|
5247 | 5253 | * @return boolean |
5248 | 5254 | * @author ndiechburg <[email protected]> |
5249 | 5255 | **/ |
@@ -5286,7 +5292,7 @@ discard block |
||
5286 | 5292 | /** |
5287 | 5293 | * Switch between multiple attempt, single attempt or serious_game mode (only for scorm) |
5288 | 5294 | * |
5289 | - * @return boolean |
|
5295 | + * @return boolean|null |
|
5290 | 5296 | * @author ndiechburg <[email protected]> |
5291 | 5297 | **/ |
5292 | 5298 | public function switch_attempt_mode() |
@@ -5477,7 +5483,6 @@ discard block |
||
5477 | 5483 | /** |
5478 | 5484 | * Function that creates a html list of learning path items so that we can add audio files to them |
5479 | 5485 | * @author Kevin Van Den Haute |
5480 | - * @param int $lp_id |
|
5481 | 5486 | * @return string |
5482 | 5487 | */ |
5483 | 5488 | public function overview() |
@@ -5838,7 +5843,7 @@ discard block |
||
5838 | 5843 | /** |
5839 | 5844 | * This function builds the action menu |
5840 | 5845 | * @param bool $returnContent |
5841 | - * @return void |
|
5846 | + * @return string|null |
|
5842 | 5847 | */ |
5843 | 5848 | public function build_action_menu($returnContent = false) |
5844 | 5849 | { |
@@ -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 | { |
@@ -8779,7 +8784,7 @@ discard block |
||
8779 | 8784 | |
8780 | 8785 | /** |
8781 | 8786 | * Creates a list with all the student publications in it |
8782 | - * @return unknown |
|
8787 | + * @return string |
|
8783 | 8788 | */ |
8784 | 8789 | public function get_student_publications() |
8785 | 8790 | { |
@@ -9723,7 +9728,7 @@ discard block |
||
9723 | 9728 | |
9724 | 9729 | /** |
9725 | 9730 | * @param int $lp_id |
9726 | - * @return bool |
|
9731 | + * @return false|null |
|
9727 | 9732 | */ |
9728 | 9733 | public function scorm_export_to_pdf($lp_id) |
9729 | 9734 | { |
@@ -10240,6 +10245,7 @@ discard block |
||
10240 | 10245 | } |
10241 | 10246 | |
10242 | 10247 | /** |
10248 | + * @param string $courseCode |
|
10243 | 10249 | * @return \learnpath |
10244 | 10250 | */ |
10245 | 10251 | public static function getLpFromSession($courseCode, $lp_id, $user_id) |
@@ -10259,7 +10265,7 @@ discard block |
||
10259 | 10265 | |
10260 | 10266 | /** |
10261 | 10267 | * @param int $itemId |
10262 | - * @return learnpathItem|false |
|
10268 | + * @return string |
|
10263 | 10269 | */ |
10264 | 10270 | public function getItem($itemId) |
10265 | 10271 | { |
@@ -10309,7 +10315,6 @@ discard block |
||
10309 | 10315 | /** |
10310 | 10316 | * Set whether this is a learning path with the possibility to subscribe |
10311 | 10317 | * users or not |
10312 | - * @param int $subscribeUsers (0 = false, 1 = true) |
|
10313 | 10318 | */ |
10314 | 10319 | public function setSubscribeUsers($value) |
10315 | 10320 | { |
@@ -10434,7 +10439,7 @@ discard block |
||
10434 | 10439 | |
10435 | 10440 | /** |
10436 | 10441 | * Get the item of exercise type (evaluation type) |
10437 | - * @return array The final evaluation. Otherwise return false |
|
10442 | + * @return integer The final evaluation. Otherwise return false |
|
10438 | 10443 | */ |
10439 | 10444 | public function getFinalEvaluationItem() |
10440 | 10445 | { |
@@ -10658,7 +10663,7 @@ discard block |
||
10658 | 10663 | /** |
10659 | 10664 | * Create a forum for this learning path |
10660 | 10665 | * @param type $forumCategoryId |
10661 | - * @return int The forum ID if was created. Otherwise return false |
|
10666 | + * @return false|string The forum ID if was created. Otherwise return false |
|
10662 | 10667 | */ |
10663 | 10668 | public function createForum($forumCategoryId) |
10664 | 10669 | { |