Completed
Pull Request — 1.11.x (#1285)
by José
43:07
created
main/lp/learnpath.class.php 1 patch
Doc Comments   +26 added lines, -23 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param	string	$course Course code
88 88
      * @param	integer	$lp_id
89 89
      * @param	integer	$user_id
90
-     * @return mixed True on success, false on error
90
+     * @return boolean True on success, false on error
91 91
      */
92 92
     public function __construct($course, $lp_id, $user_id)
93 93
     {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      * @param int $max_time_allowed
492 492
      * @param int $userId
493 493
      *
494
-     * @return int
494
+     * @return false|string
495 495
      */
496 496
     public function add_item(
497 497
         $parent,
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
      * @param	array $courseInfo
1043 1043
      * @param	integer	Learnpath ID
1044 1044
      * @param	string	Whether to delete data or keep it (default: 'keep', others: 'remove')
1045
-     * @return	boolean	True on success, false on failure (might change that to return number of elements deleted)
1045
+     * @return	false|null	True on success, false on failure (might change that to return number of elements deleted)
1046 1046
      */
1047 1047
     public function delete($courseInfo = null, $id = null, $delete = 'keep')
1048 1048
     {
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
      * @param	integer	$id Elem ID (0 if first)
1182 1182
      * @param	integer	$remove Whether to remove the resource/data from the
1183 1183
      * system or leave it (default: 'keep', others 'remove')
1184
-     * @return	integer	Number of elements moved
1184
+     * @return	false|null	Number of elements moved
1185 1185
      * @todo implement resource removal
1186 1186
      */
1187 1187
     public function delete_item($id, $remove = 'keep')
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
      * @param   array   $audio The array resulting of the $_FILES[mp3] element
1264 1264
      * @param   int     $max_time_allowed
1265 1265
      * @param   string  $url
1266
-     * @return  boolean True on success, false on error
1266
+     * @return  false|null True on success, false on error
1267 1267
      */
1268 1268
     public function edit_item(
1269 1269
         $id,
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
 
1783 1783
     /**
1784 1784
      * Gets the first element URL.
1785
-     * @return	string	URL to load into the viewer
1785
+     * @return	false|null	URL to load into the viewer
1786 1786
      */
1787 1787
     public function first()
1788 1788
     {
@@ -2296,6 +2296,7 @@  discard block
 block discarded – undo
2296 2296
      * @param int $student_id
2297 2297
      * @param string Course code (optional)
2298 2298
      * @param int $sessionId
2299
+     * @param string $courseCode
2299 2300
      * @return	bool
2300 2301
      */
2301 2302
     public static function is_lp_visible_for_student(
@@ -2593,7 +2594,7 @@  discard block
 block discarded – undo
2593 2594
 
2594 2595
     /**
2595 2596
      * Gets the learnpath session id
2596
-     * @return	string	Learnpath theme
2597
+     * @return	integer	Learnpath theme
2597 2598
      */
2598 2599
     public function get_lp_session_id()
2599 2600
     {
@@ -2626,7 +2627,7 @@  discard block
 block discarded – undo
2626 2627
     /**
2627 2628
      * @param string $size
2628 2629
      * @param string $path_type
2629
-     * @return bool|string
2630
+     * @return string|false
2630 2631
      */
2631 2632
     public function get_preview_image_path($size = null, $path_type = 'web')
2632 2633
     {
@@ -2772,6 +2773,8 @@  discard block
 block discarded – undo
2772 2773
      * Returns the XML DOM document's node
2773 2774
      * @param	resource	Reference to a list of objects to search for the given ITEM_*
2774 2775
      * @param	string		The identifier to look for
2776
+     * @param DOMNodeList $children
2777
+     * @param string $id
2775 2778
      * @return	mixed		The reference to the element found with that identifier. False if not found
2776 2779
      */
2777 2780
     public function get_scorm_xml_node(& $children, $id)
@@ -3019,7 +3022,7 @@  discard block
 block discarded – undo
3019 3022
     /**
3020 3023
      * Generate and return the table of contents for this learnpath. The (flat) table returned can be
3021 3024
      * used by get_html_toc() to be ready to display
3022
-     * @return	array	TOC as a table with 4 elements per row: title, link, status and level
3025
+     * @return	boolean	TOC as a table with 4 elements per row: title, link, status and level
3023 3026
      */
3024 3027
     public function get_toc()
3025 3028
     {
@@ -3155,7 +3158,7 @@  discard block
 block discarded – undo
3155 3158
     }
3156 3159
 
3157 3160
     /**
3158
-     * @return array
3161
+     * @return string[]
3159 3162
      */
3160 3163
     public static function getChapterTypes()
3161 3164
     {
@@ -4061,7 +4064,7 @@  discard block
 block discarded – undo
4061 4064
      * Open a resource = initialise all local variables relative to this resource. Depending on the child
4062 4065
      * class, this might be redefined to allow several behaviours depending on the document type.
4063 4066
      * @param integer Resource ID
4064
-     * @return boolean True on success, false otherwise
4067
+     * @return boolean|null True on success, false otherwise
4065 4068
      */
4066 4069
     public function open($id)
4067 4070
     {
@@ -4190,7 +4193,7 @@  discard block
 block discarded – undo
4190 4193
      * Can be used as abstract
4191 4194
      * @param	integer	$lp_id Learnpath id
4192 4195
      * @param	string	$set_visibility New visibility (v/i - visible/invisible)
4193
-     * @return bool
4196
+     * @return false|null
4194 4197
      */
4195 4198
     public static function toggle_publish($lp_id, $set_visibility = 'v')
4196 4199
     {
@@ -4275,7 +4278,7 @@  discard block
 block discarded – undo
4275 4278
      * Make sure the results are saved with anoter method. This method should probably be
4276 4279
      * redefined in children classes.
4277 4280
      * To use a similar method  statically, use the create_new_attempt() method
4278
-     * @return string URL to load in the viewer
4281
+     * @return boolean URL to load in the viewer
4279 4282
      */
4280 4283
     public function restart()
4281 4284
     {
@@ -4353,6 +4356,7 @@  discard block
 block discarded – undo
4353 4356
      * Saves the given item
4354 4357
      * @param	integer	$item_id. Optional (will take from $_REQUEST if null)
4355 4358
      * @param	boolean	$from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true
4359
+     * @param integer $item_id
4356 4360
      * @return	boolean
4357 4361
      */
4358 4362
     public function save_item($item_id = null, $from_outside = true)
@@ -4850,7 +4854,7 @@  discard block
 block discarded – undo
4850 4854
 
4851 4855
     /**
4852 4856
      * Sets use_max_score
4853
-     * @param   string  $use_max_score Optional string giving the new location of this learnpath
4857
+     * @param   integer  $use_max_score Optional string giving the new location of this learnpath
4854 4858
      * @return  boolean True on success / False on error
4855 4859
      */
4856 4860
     public function set_use_max_score($use_max_score = 1)
@@ -5253,6 +5257,7 @@  discard block
 block discarded – undo
5253 5257
      * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags
5254 5258
      *
5255 5259
      * @param string 'seriousgame', 'single' or 'multiple'
5260
+     * @param string $mode
5256 5261
      * @return boolean
5257 5262
      * @author ndiechburg <[email protected]>
5258 5263
      **/
@@ -5295,7 +5300,7 @@  discard block
 block discarded – undo
5295 5300
     /**
5296 5301
      * Switch between multiple attempt, single attempt or serious_game mode (only for scorm)
5297 5302
      *
5298
-     * @return boolean
5303
+     * @return boolean|null
5299 5304
      * @author ndiechburg <[email protected]>
5300 5305
      **/
5301 5306
     public function switch_attempt_mode()
@@ -5486,7 +5491,6 @@  discard block
 block discarded – undo
5486 5491
     /**
5487 5492
      * Function that creates a html list of learning path items so that we can add audio files to them
5488 5493
      * @author Kevin Van Den Haute
5489
-     * @param int $lp_id
5490 5494
      * @return string
5491 5495
      */
5492 5496
     public function overview()
@@ -6446,7 +6450,7 @@  discard block
 block discarded – undo
6446 6450
     /**
6447 6451
      * Function that displays a list with al the resources that
6448 6452
      * could be added to the learning path
6449
-     * @return string
6453
+     * @return boolean
6450 6454
      */
6451 6455
     public function display_resources()
6452 6456
     {
@@ -9991,7 +9995,7 @@  discard block
 block discarded – undo
9991 9995
 
9992 9996
     /**
9993 9997
      * @param int $lp_id
9994
-     * @return bool
9998
+     * @return false|null
9995 9999
      */
9996 10000
     public function scorm_export_to_pdf($lp_id)
9997 10001
     {
@@ -10526,7 +10530,7 @@  discard block
 block discarded – undo
10526 10530
 
10527 10531
     /**
10528 10532
      * @param int $itemId
10529
-     * @return learnpathItem|false
10533
+     * @return string
10530 10534
      */
10531 10535
     public function getItem($itemId)
10532 10536
     {
@@ -10576,7 +10580,6 @@  discard block
 block discarded – undo
10576 10580
     /**
10577 10581
      * Set whether this is a learning path with the possibility to subscribe
10578 10582
      * users or not
10579
-     * @param int $subscribeUsers (0 = false, 1 = true)
10580 10583
      */
10581 10584
     public function setSubscribeUsers($value)
10582 10585
     {
@@ -10701,7 +10704,7 @@  discard block
 block discarded – undo
10701 10704
 
10702 10705
     /**
10703 10706
      * Get the item of exercise type (evaluation type)
10704
-     * @return array The final evaluation. Otherwise return false
10707
+     * @return integer The final evaluation. Otherwise return false
10705 10708
      */
10706 10709
     public function getFinalEvaluationItem()
10707 10710
     {
@@ -10925,7 +10928,7 @@  discard block
 block discarded – undo
10925 10928
     /**
10926 10929
      * Create a forum for this learning path
10927 10930
      * @param type $forumCategoryId
10928
-     * @return int The forum ID if was created. Otherwise return false
10931
+     * @return false|string The forum ID if was created. Otherwise return false
10929 10932
      */
10930 10933
     public function createForum($forumCategoryId)
10931 10934
     {
@@ -10974,7 +10977,7 @@  discard block
 block discarded – undo
10974 10977
     /**
10975 10978
      * Get the LP Final Item Template
10976 10979
      *
10977
-     * @return html
10980
+     * @return string
10978 10981
      */
10979 10982
     private function getFinalItemTemplate()
10980 10983
     {
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
 
2235 2235
     /**
2236 2236
      * Creates a file called mysql_dump.sql in the course folder
2237
-     * @param $course_code The code of the course
2237
+     * @param string $course_code The code of the course
2238 2238
      * @todo Implementation for single database
2239 2239
      */
2240 2240
     public static function create_database_dump($course_code)
@@ -2982,6 +2982,7 @@  discard block
 block discarded – undo
2982 2982
      * @param int $limit
2983 2983
      * @param string $column
2984 2984
      * @param string $direction
2985
+     * @param integer $status
2985 2986
      * @return array    courses
2986 2987
      */
2987 2988
     public static function get_courses_followed_by_drh(
@@ -3585,6 +3586,7 @@  discard block
 block discarded – undo
3585 3586
      *  class userportal-course-item.
3586 3587
      * @param int      User category id
3587 3588
      * @param bool      Whether to show the document quick-loader or not
3589
+     * @param integer $user_category_id
3588 3590
      * @return string
3589 3591
      */
3590 3592
     public static function returnCoursesWithoutCategories($user_category_id, $load_dirs = false)
@@ -5957,7 +5959,7 @@  discard block
 block discarded – undo
5957 5959
      * @param int $accessUrlId The access URL ID
5958 5960
      * @param string $param
5959 5961
      * @param string $msgLabel
5960
-     * @return bool|string
5962
+     * @return boolean
5961 5963
      */
5962 5964
     private static function checkCreateCourseAccessUrlParam($_configuration, $accessUrlId, $param, $msgLabel) {
5963 5965
         if (isset($_configuration[$accessUrlId][$param]) && $_configuration[$accessUrlId][$param] > 0) {
Please login to merge, or discard this patch.
main/inc/lib/MoodleImport.lib.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * Read and validate the quiz module XML
300 300
      *
301 301
      * @param resource $moduleXml XML file
302
-     * @return mixed | array if is a valid xml file, false otherwise
302
+     * @return string | array if is a valid xml file, false otherwise
303 303
      */
304 304
     public function readQuizModule($moduleXml)
305 305
     {
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
     /**
515 515
      * Process Chamilo Unique Answer
516 516
      *
517
-     * @param object $objAnswer
518
-     * @param object $questionInstance
517
+     * @param Answer $objAnswer
518
+     * @param Question $questionInstance
519 519
      * @param array $answerValues
520 520
      * @param integer $position
521 521
      * @return integer db response
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
      * Litle utility to delete the unuseful tags
558 558
      *
559 559
      * @param $array
560
-     * @param $keys
560
+     * @param string[] $keys
561 561
      */
562 562
     public function traverseArray(&$array, $keys) {
563 563
         foreach ($array as $key => &$value) {
Please login to merge, or discard this patch.