Passed
Push — 1.10.x ( 1f0c91...36635d )
by Angel Fernando Quiroz
43:44
created
main/newscorm/learnpath.class.php 1 patch
Doc Comments   +29 added lines, -25 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
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
     {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
      * @param int $max_time_allowed
486 486
      * @param int $userId
487 487
      *
488
-     * @return int
488
+     * @return false|string
489 489
      */
490 490
     public function add_item(
491 491
         $parent,
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
      * @param	array $courseInfo
1037 1037
      * @param	integer	Learnpath ID
1038 1038
      * @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)
1039
+     * @return	false|null	True on success, false on failure (might change that to return number of elements deleted)
1040 1040
      */
1041 1041
     public function delete($courseInfo = null, $id = null, $delete = 'keep')
1042 1042
     {
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
      * @param	integer	$id Elem ID (0 if first)
1171 1171
      * @param	integer	$remove Whether to remove the resource/data from the
1172 1172
      * system or leave it (default: 'keep', others 'remove')
1173
-     * @return	integer	Number of elements moved
1173
+     * @return	false|null	Number of elements moved
1174 1174
      * @todo implement resource removal
1175 1175
      */
1176 1176
     public function delete_item($id, $remove = 'keep')
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
      * @param   array   $audio The array resulting of the $_FILES[mp3] element
1253 1253
      * @param   int     $max_time_allowed
1254 1254
      * @param   string  $url
1255
-     * @return  boolean True on success, false on error
1255
+     * @return  false|null True on success, false on error
1256 1256
      */
1257 1257
     public function edit_item(
1258 1258
         $id,
@@ -1775,7 +1775,7 @@  discard block
 block discarded – undo
1775 1775
 
1776 1776
     /**
1777 1777
      * Gets the first element URL.
1778
-     * @return	string	URL to load into the viewer
1778
+     * @return	false|null	URL to load into the viewer
1779 1779
      */
1780 1780
     public function first()
1781 1781
     {
@@ -2291,6 +2291,7 @@  discard block
 block discarded – undo
2291 2291
      * @param int $student_id
2292 2292
      * @param string Course code (optional)
2293 2293
      * @param int $sessionId
2294
+     * @param string $courseCode
2294 2295
      * @return	bool
2295 2296
      */
2296 2297
     public static function is_lp_visible_for_student(
@@ -2590,7 +2591,7 @@  discard block
 block discarded – undo
2590 2591
 
2591 2592
     /**
2592 2593
      * Gets the learnpath session id
2593
-     * @return	string	Learnpath theme
2594
+     * @return	integer	Learnpath theme
2594 2595
      */
2595 2596
     public function get_lp_session_id()
2596 2597
     {
@@ -2623,7 +2624,7 @@  discard block
 block discarded – undo
2623 2624
     /**
2624 2625
      * @param string $size
2625 2626
      * @param string $path_type
2626
-     * @return bool|string
2627
+     * @return string|false
2627 2628
      */
2628 2629
     public function get_preview_image_path($size = null, $path_type = 'web')
2629 2630
     {
@@ -2769,6 +2770,8 @@  discard block
 block discarded – undo
2769 2770
      * Returns the XML DOM document's node
2770 2771
      * @param	resource	Reference to a list of objects to search for the given ITEM_*
2771 2772
      * @param	string		The identifier to look for
2773
+     * @param DOMNodeList $children
2774
+     * @param string $id
2772 2775
      * @return	mixed		The reference to the element found with that identifier. False if not found
2773 2776
      */
2774 2777
     public function get_scorm_xml_node(& $children, $id)
@@ -3016,7 +3019,7 @@  discard block
 block discarded – undo
3016 3019
     /**
3017 3020
      * Generate and return the table of contents for this learnpath. The (flat) table returned can be
3018 3021
      * 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
3022
+     * @return	boolean	TOC as a table with 4 elements per row: title, link, status and level
3020 3023
      */
3021 3024
     public function get_toc()
3022 3025
     {
@@ -3152,7 +3155,7 @@  discard block
 block discarded – undo
3152 3155
     }
3153 3156
 
3154 3157
     /**
3155
-     * @return array
3158
+     * @return string[]
3156 3159
      */
3157 3160
     public static function getChapterTypes()
3158 3161
     {
@@ -4054,7 +4057,7 @@  discard block
 block discarded – undo
4054 4057
      * Open a resource = initialise all local variables relative to this resource. Depending on the child
4055 4058
      * class, this might be redefined to allow several behaviours depending on the document type.
4056 4059
      * @param integer Resource ID
4057
-     * @return boolean True on success, false otherwise
4060
+     * @return boolean|null True on success, false otherwise
4058 4061
      */
4059 4062
     public function open($id)
4060 4063
     {
@@ -4183,7 +4186,7 @@  discard block
 block discarded – undo
4183 4186
      * Can be used as abstract
4184 4187
      * @param	integer	$lp_id Learnpath id
4185 4188
      * @param	string	$set_visibility New visibility (v/i - visible/invisible)
4186
-     * @return bool
4189
+     * @return false|null
4187 4190
      */
4188 4191
     public static function toggle_publish($lp_id, $set_visibility = 'v')
4189 4192
     {
@@ -4268,7 +4271,7 @@  discard block
 block discarded – undo
4268 4271
      * Make sure the results are saved with anoter method. This method should probably be
4269 4272
      * redefined in children classes.
4270 4273
      * To use a similar method  statically, use the create_new_attempt() method
4271
-     * @return string URL to load in the viewer
4274
+     * @return boolean URL to load in the viewer
4272 4275
      */
4273 4276
     public function restart()
4274 4277
     {
@@ -4346,6 +4349,7 @@  discard block
 block discarded – undo
4346 4349
      * Saves the given item
4347 4350
      * @param	integer	$item_id. Optional (will take from $_REQUEST if null)
4348 4351
      * @param	boolean	$from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true
4352
+     * @param integer $item_id
4349 4353
      * @return	boolean
4350 4354
      */
4351 4355
     public function save_item($item_id = null, $from_outside = true)
@@ -4843,7 +4847,7 @@  discard block
 block discarded – undo
4843 4847
 
4844 4848
     /**
4845 4849
      * Sets use_max_score
4846
-     * @param   string  $use_max_score Optional string giving the new location of this learnpath
4850
+     * @param   integer  $use_max_score Optional string giving the new location of this learnpath
4847 4851
      * @return  boolean True on success / False on error
4848 4852
      */
4849 4853
     public function set_use_max_score($use_max_score = 1)
@@ -5244,6 +5248,7 @@  discard block
 block discarded – undo
5244 5248
      * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags
5245 5249
      *
5246 5250
      * @param string 'seriousgame', 'single' or 'multiple'
5251
+     * @param string $mode
5247 5252
      * @return boolean
5248 5253
      * @author ndiechburg <[email protected]>
5249 5254
      **/
@@ -5286,7 +5291,7 @@  discard block
 block discarded – undo
5286 5291
     /**
5287 5292
      * Switch between multiple attempt, single attempt or serious_game mode (only for scorm)
5288 5293
      *
5289
-     * @return boolean
5294
+     * @return boolean|null
5290 5295
      * @author ndiechburg <[email protected]>
5291 5296
      **/
5292 5297
     public function switch_attempt_mode()
@@ -5477,7 +5482,6 @@  discard block
 block discarded – undo
5477 5482
     /**
5478 5483
      * Function that creates a html list of learning path items so that we can add audio files to them
5479 5484
      * @author Kevin Van Den Haute
5480
-     * @param int $lp_id
5481 5485
      * @return string
5482 5486
      */
5483 5487
     public function overview()
@@ -5842,7 +5846,7 @@  discard block
 block discarded – undo
5842 5846
     /**
5843 5847
      * This function builds the action menu
5844 5848
      * @param bool $returnContent
5845
-     * @return void
5849
+     * @return string|null
5846 5850
      */
5847 5851
     public function build_action_menu($returnContent = false)
5848 5852
     {
@@ -6348,7 +6352,7 @@  discard block
 block discarded – undo
6348 6352
     /**
6349 6353
      * Function that displays a list with al the resources that
6350 6354
      * could be added to the learning path
6351
-     * @return string
6355
+     * @return boolean
6352 6356
      */
6353 6357
     public function display_resources()
6354 6358
     {
@@ -8795,7 +8799,7 @@  discard block
 block discarded – undo
8795 8799
 
8796 8800
     /**
8797 8801
      * Creates a list with all the student publications in it
8798
-     * @return unknown
8802
+     * @return string
8799 8803
      */
8800 8804
     public function get_student_publications()
8801 8805
     {
@@ -9747,7 +9751,7 @@  discard block
 block discarded – undo
9747 9751
 
9748 9752
     /**
9749 9753
      * @param int $lp_id
9750
-     * @return bool
9754
+     * @return false|null
9751 9755
      */
9752 9756
     public function scorm_export_to_pdf($lp_id)
9753 9757
     {
@@ -10264,6 +10268,7 @@  discard block
 block discarded – undo
10264 10268
     }
10265 10269
 
10266 10270
     /**
10271
+     * @param string $courseCode
10267 10272
      * @return \learnpath
10268 10273
      */
10269 10274
     public static function getLpFromSession($courseCode, $lp_id, $user_id)
@@ -10283,7 +10288,7 @@  discard block
 block discarded – undo
10283 10288
 
10284 10289
     /**
10285 10290
      * @param int $itemId
10286
-     * @return learnpathItem|false
10291
+     * @return string
10287 10292
      */
10288 10293
     public function getItem($itemId)
10289 10294
     {
@@ -10333,7 +10338,6 @@  discard block
 block discarded – undo
10333 10338
     /**
10334 10339
      * Set whether this is a learning path with the possibility to subscribe
10335 10340
      * users or not
10336
-     * @param int $subscribeUsers (0 = false, 1 = true)
10337 10341
      */
10338 10342
     public function setSubscribeUsers($value)
10339 10343
     {
@@ -10458,7 +10462,7 @@  discard block
 block discarded – undo
10458 10462
 
10459 10463
     /**
10460 10464
      * Get the item of exercise type (evaluation type)
10461
-     * @return array The final evaluation. Otherwise return false
10465
+     * @return integer The final evaluation. Otherwise return false
10462 10466
      */
10463 10467
     public function getFinalEvaluationItem()
10464 10468
     {
@@ -10682,7 +10686,7 @@  discard block
 block discarded – undo
10682 10686
     /**
10683 10687
      * Create a forum for this learning path
10684 10688
      * @param type $forumCategoryId
10685
-     * @return int The forum ID if was created. Otherwise return false
10689
+     * @return false|string The forum ID if was created. Otherwise return false
10686 10690
      */
10687 10691
     public function createForum($forumCategoryId)
10688 10692
     {
@@ -10737,7 +10741,7 @@  discard block
 block discarded – undo
10737 10741
 
10738 10742
     /**
10739 10743
      * 
10740
-     * @return html
10744
+     * @return string
10741 10745
      */
10742 10746
     public function getFinalItemForm()
10743 10747
     {
Please login to merge, or discard this patch.