@@ -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 | { |