@@ -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) |
@@ -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) |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | * @param int $userMaxScore |
272 | 272 | * @param int $sessionId |
273 | 273 | * |
274 | - * @return bool Returns -1 on error |
|
274 | + * @return boolean|null Returns -1 on error |
|
275 | 275 | */ |
276 | 276 | public function import_manifest($courseCode, $userMaxScore = 1, $sessionId = 0, $userId = 0) |
277 | 277 | { |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | * @param string course Code |
926 | 926 | * @param string LP ID (in database) |
927 | 927 | * @param string Manifest file path (optional if lp_id defined) |
928 | - * @return integer New LP ID or false on failure |
|
928 | + * @return boolean New LP ID or false on failure |
|
929 | 929 | * TODO @TODO Implement imsmanifest_path parameter |
930 | 930 | */ |
931 | 931 | public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '') |
@@ -181,8 +181,8 @@ discard block |
||
181 | 181 | /** |
182 | 182 | * Inserts a resource into the database |
183 | 183 | * |
184 | - * @param $source_type |
|
185 | - * @param $source_id |
|
184 | + * @param string $source_type |
|
185 | + * @param integer $source_id |
|
186 | 186 | */ |
187 | 187 | function store_resources($source_type, $source_id) |
188 | 188 | { |
@@ -322,6 +322,10 @@ discard block |
||
322 | 322 | * @param icon - if ="icon" then the small icon will appear |
323 | 323 | * if ="wrap" then wrapped settings are used (and no icon is displayed) |
324 | 324 | * if ="nolink" then only the name is returned with no href and no icon (note:only in this case, the result is not displayed, but returned) |
325 | + * @param string $completed |
|
326 | + * @param string $id_in_path |
|
327 | + * @param string $builder |
|
328 | + * @param string $icon |
|
325 | 329 | * @todo this function is too long, rewrite |
326 | 330 | */ |
327 | 331 | function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_path, $builder, $icon, $level = 0) { |
@@ -205,8 +205,8 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * Inserts a resource into the database |
207 | 207 | * |
208 | - * @param $source_type |
|
209 | - * @param $source_id |
|
208 | + * @param string $source_type |
|
209 | + * @param integer $source_id |
|
210 | 210 | */ |
211 | 211 | function store_resources($source_type, $source_id) |
212 | 212 | { |
@@ -338,6 +338,10 @@ discard block |
||
338 | 338 | * @param icon - if ="icon" then the small icon will appear |
339 | 339 | * if ="wrap" then wrapped settings are used (and no icon is displayed) |
340 | 340 | * if ="nolink" then only the name is returned with no href and no icon (note:only in this case, the result is not displayed, but returned) |
341 | +* @param string $completed |
|
342 | +* @param string $id_in_path |
|
343 | +* @param string $builder |
|
344 | +* @param string $icon |
|
341 | 345 | * @todo this function is too long, rewrite |
342 | 346 | */ |
343 | 347 | function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_path, $builder, $icon, $level = 0) |
@@ -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 | { |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | * @param int $max_time_allowed |
489 | 489 | * @param int $userId |
490 | 490 | * |
491 | - * @return int |
|
491 | + * @return false|string |
|
492 | 492 | */ |
493 | 493 | public function add_item( |
494 | 494 | $parent, |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | * @param array $courseInfo |
1040 | 1040 | * @param integer Learnpath ID |
1041 | 1041 | * @param string Whether to delete data or keep it (default: 'keep', others: 'remove') |
1042 | - * @return boolean True on success, false on failure (might change that to return number of elements deleted) |
|
1042 | + * @return false|null True on success, false on failure (might change that to return number of elements deleted) |
|
1043 | 1043 | */ |
1044 | 1044 | public function delete($courseInfo = null, $id = null, $delete = 'keep') |
1045 | 1045 | { |
@@ -1173,7 +1173,7 @@ discard block |
||
1173 | 1173 | * @param integer $id Elem ID (0 if first) |
1174 | 1174 | * @param integer $remove Whether to remove the resource/data from the |
1175 | 1175 | * system or leave it (default: 'keep', others 'remove') |
1176 | - * @return integer Number of elements moved |
|
1176 | + * @return false|null Number of elements moved |
|
1177 | 1177 | * @todo implement resource removal |
1178 | 1178 | */ |
1179 | 1179 | public function delete_item($id, $remove = 'keep') |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | * @param array $audio The array resulting of the $_FILES[mp3] element |
1256 | 1256 | * @param int $max_time_allowed |
1257 | 1257 | * @param string $url |
1258 | - * @return boolean True on success, false on error |
|
1258 | + * @return false|null True on success, false on error |
|
1259 | 1259 | */ |
1260 | 1260 | public function edit_item( |
1261 | 1261 | $id, |
@@ -1775,7 +1775,7 @@ discard block |
||
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 |
||
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( |
@@ -2588,7 +2589,7 @@ discard block |
||
2588 | 2589 | |
2589 | 2590 | /** |
2590 | 2591 | * Gets the learnpath session id |
2591 | - * @return string Learnpath theme |
|
2592 | + * @return integer Learnpath theme |
|
2592 | 2593 | */ |
2593 | 2594 | public function get_lp_session_id() |
2594 | 2595 | { |
@@ -2621,7 +2622,7 @@ discard block |
||
2621 | 2622 | /** |
2622 | 2623 | * @param string $size |
2623 | 2624 | * @param string $path_type |
2624 | - * @return bool|string |
|
2625 | + * @return string|false |
|
2625 | 2626 | */ |
2626 | 2627 | public function get_preview_image_path($size = null, $path_type = 'web') |
2627 | 2628 | { |
@@ -2767,6 +2768,8 @@ discard block |
||
2767 | 2768 | * Returns the XML DOM document's node |
2768 | 2769 | * @param resource Reference to a list of objects to search for the given ITEM_* |
2769 | 2770 | * @param string The identifier to look for |
2771 | + * @param DOMNodeList $children |
|
2772 | + * @param string $id |
|
2770 | 2773 | * @return mixed The reference to the element found with that identifier. False if not found |
2771 | 2774 | */ |
2772 | 2775 | public function get_scorm_xml_node(& $children, $id) |
@@ -3014,7 +3017,7 @@ discard block |
||
3014 | 3017 | /** |
3015 | 3018 | * Generate and return the table of contents for this learnpath. The (flat) table returned can be |
3016 | 3019 | * used by get_html_toc() to be ready to display |
3017 | - * @return array TOC as a table with 4 elements per row: title, link, status and level |
|
3020 | + * @return boolean TOC as a table with 4 elements per row: title, link, status and level |
|
3018 | 3021 | */ |
3019 | 3022 | public function get_toc() |
3020 | 3023 | { |
@@ -3150,7 +3153,7 @@ discard block |
||
3150 | 3153 | } |
3151 | 3154 | |
3152 | 3155 | /** |
3153 | - * @return array |
|
3156 | + * @return string[] |
|
3154 | 3157 | */ |
3155 | 3158 | public static function getChapterTypes() |
3156 | 3159 | { |
@@ -4059,7 +4062,7 @@ discard block |
||
4059 | 4062 | * Open a resource = initialise all local variables relative to this resource. Depending on the child |
4060 | 4063 | * class, this might be redefined to allow several behaviours depending on the document type. |
4061 | 4064 | * @param integer Resource ID |
4062 | - * @return boolean True on success, false otherwise |
|
4065 | + * @return boolean|null True on success, false otherwise |
|
4063 | 4066 | */ |
4064 | 4067 | public function open($id) |
4065 | 4068 | { |
@@ -4188,7 +4191,7 @@ discard block |
||
4188 | 4191 | * Can be used as abstract |
4189 | 4192 | * @param integer $lp_id Learnpath id |
4190 | 4193 | * @param string $set_visibility New visibility (v/i - visible/invisible) |
4191 | - * @return bool |
|
4194 | + * @return false|null |
|
4192 | 4195 | */ |
4193 | 4196 | public static function toggle_publish($lp_id, $set_visibility = 'v') |
4194 | 4197 | { |
@@ -4273,7 +4276,7 @@ discard block |
||
4273 | 4276 | * Make sure the results are saved with anoter method. This method should probably be |
4274 | 4277 | * redefined in children classes. |
4275 | 4278 | * To use a similar method statically, use the create_new_attempt() method |
4276 | - * @return string URL to load in the viewer |
|
4279 | + * @return boolean URL to load in the viewer |
|
4277 | 4280 | */ |
4278 | 4281 | public function restart() |
4279 | 4282 | { |
@@ -4351,6 +4354,7 @@ discard block |
||
4351 | 4354 | * Saves the given item |
4352 | 4355 | * @param integer $item_id. Optional (will take from $_REQUEST if null) |
4353 | 4356 | * @param boolean $from_outside Save from url params (true) or from current attributes (false). Optional. Defaults to true |
4357 | + * @param integer $item_id |
|
4354 | 4358 | * @return boolean |
4355 | 4359 | */ |
4356 | 4360 | public function save_item($item_id = null, $from_outside = true) |
@@ -4848,7 +4852,7 @@ discard block |
||
4848 | 4852 | |
4849 | 4853 | /** |
4850 | 4854 | * Sets use_max_score |
4851 | - * @param string $use_max_score Optional string giving the new location of this learnpath |
|
4855 | + * @param integer $use_max_score Optional string giving the new location of this learnpath |
|
4852 | 4856 | * @return boolean True on success / False on error |
4853 | 4857 | */ |
4854 | 4858 | public function set_use_max_score($use_max_score = 1) |
@@ -5251,6 +5255,7 @@ discard block |
||
5251 | 5255 | * Register the attempt mode into db thanks to flags prevent_reinit and seriousgame_mode flags |
5252 | 5256 | * |
5253 | 5257 | * @param string 'seriousgame', 'single' or 'multiple' |
5258 | + * @param string $mode |
|
5254 | 5259 | * @return boolean |
5255 | 5260 | * @author ndiechburg <[email protected]> |
5256 | 5261 | **/ |
@@ -5293,7 +5298,7 @@ discard block |
||
5293 | 5298 | /** |
5294 | 5299 | * Switch between multiple attempt, single attempt or serious_game mode (only for scorm) |
5295 | 5300 | * |
5296 | - * @return boolean |
|
5301 | + * @return boolean|null |
|
5297 | 5302 | * @author ndiechburg <[email protected]> |
5298 | 5303 | **/ |
5299 | 5304 | public function switch_attempt_mode() |
@@ -5484,7 +5489,6 @@ discard block |
||
5484 | 5489 | /** |
5485 | 5490 | * Function that creates a html list of learning path items so that we can add audio files to them |
5486 | 5491 | * @author Kevin Van Den Haute |
5487 | - * @param int $lp_id |
|
5488 | 5492 | * @return string |
5489 | 5493 | */ |
5490 | 5494 | public function overview() |
@@ -5904,7 +5908,7 @@ discard block |
||
5904 | 5908 | /** |
5905 | 5909 | * This function builds the action menu |
5906 | 5910 | * @param bool $returnContent |
5907 | - * @return void |
|
5911 | + * @return string|null |
|
5908 | 5912 | */ |
5909 | 5913 | public function build_action_menu($returnContent = false) |
5910 | 5914 | { |
@@ -6449,7 +6453,7 @@ discard block |
||
6449 | 6453 | /** |
6450 | 6454 | * Function that displays a list with al the resources that |
6451 | 6455 | * could be added to the learning path |
6452 | - * @return string |
|
6456 | + * @return boolean |
|
6453 | 6457 | */ |
6454 | 6458 | public function display_resources() |
6455 | 6459 | { |
@@ -10030,7 +10034,7 @@ discard block |
||
10030 | 10034 | |
10031 | 10035 | /** |
10032 | 10036 | * @param int $lp_id |
10033 | - * @return bool |
|
10037 | + * @return false|null |
|
10034 | 10038 | */ |
10035 | 10039 | public function scorm_export_to_pdf($lp_id) |
10036 | 10040 | { |
@@ -10567,7 +10571,7 @@ discard block |
||
10567 | 10571 | |
10568 | 10572 | /** |
10569 | 10573 | * @param int $itemId |
10570 | - * @return learnpathItem|false |
|
10574 | + * @return string |
|
10571 | 10575 | */ |
10572 | 10576 | public function getItem($itemId) |
10573 | 10577 | { |
@@ -10617,7 +10621,6 @@ discard block |
||
10617 | 10621 | /** |
10618 | 10622 | * Set whether this is a learning path with the possibility to subscribe |
10619 | 10623 | * users or not |
10620 | - * @param int $subscribeUsers (0 = false, 1 = true) |
|
10621 | 10624 | */ |
10622 | 10625 | public function setSubscribeUsers($value) |
10623 | 10626 | { |
@@ -10742,7 +10745,7 @@ discard block |
||
10742 | 10745 | |
10743 | 10746 | /** |
10744 | 10747 | * Get the item of exercise type (evaluation type) |
10745 | - * @return array The final evaluation. Otherwise return false |
|
10748 | + * @return integer The final evaluation. Otherwise return false |
|
10746 | 10749 | */ |
10747 | 10750 | public function getFinalEvaluationItem() |
10748 | 10751 | { |
@@ -10966,7 +10969,7 @@ discard block |
||
10966 | 10969 | /** |
10967 | 10970 | * Create a forum for this learning path |
10968 | 10971 | * @param type $forumCategoryId |
10969 | - * @return int The forum ID if was created. Otherwise return false |
|
10972 | + * @return false|string The forum ID if was created. Otherwise return false |
|
10970 | 10973 | */ |
10971 | 10974 | public function createForum($forumCategoryId) |
10972 | 10975 | { |
@@ -11015,7 +11018,7 @@ discard block |
||
11015 | 11018 | /** |
11016 | 11019 | * Get the LP Final Item Template |
11017 | 11020 | * |
11018 | - * @return html |
|
11021 | + * @return string |
|
11019 | 11022 | */ |
11020 | 11023 | private function getFinalItemTemplate() |
11021 | 11024 | { |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | * @author Bert Vanderkimpen |
693 | 693 | * @author Yannick Warnier <[email protected]> Adaptation for work tool |
694 | 694 | * @param string $base_work_dir Base work dir (.../work) |
695 | - * @param string $desiredDirName complete path of the desired name |
|
695 | + * @param string $desired_dir_name complete path of the desired name |
|
696 | 696 | * |
697 | 697 | * @return string actual directory name if it succeeds, boolean false otherwise |
698 | 698 | */ |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | /** |
715 | 715 | * Delete a work-tool directory |
716 | 716 | * @param int $id work directory id to delete |
717 | - * @return integer -1 on error |
|
717 | + * @return boolean|null -1 on error |
|
718 | 718 | */ |
719 | 719 | function deleteDirWork($id) |
720 | 720 | { |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | * Update the url of a dir in the student_publication table |
858 | 858 | * @param array $work_data work original data |
859 | 859 | * @param string $newPath Example: "folder1" |
860 | - * @return bool |
|
860 | + * @return boolean|null |
|
861 | 861 | */ |
862 | 862 | function updateDirName($work_data, $newPath) |
863 | 863 | { |
@@ -914,6 +914,7 @@ discard block |
||
914 | 914 | /** |
915 | 915 | * Transform an all directory structure (only directories) in an array |
916 | 916 | * @param string path of the directory |
917 | + * @param string $directory |
|
917 | 918 | * @return array the directory structure into an array |
918 | 919 | * @author Julio Montoya Dokeos |
919 | 920 | * @version April 2008 |
@@ -983,7 +984,7 @@ discard block |
||
983 | 984 | * @param string the path of the directory |
984 | 985 | * @param boolean true if we want the total quantity of files |
985 | 986 | * include in others child directories, false only files in the directory |
986 | - * @return array the first element is an integer with the number of files |
|
987 | + * @return integer[] the first element is an integer with the number of files |
|
987 | 988 | * in the folder, the second element is the number of directories |
988 | 989 | * @author Julio Montoya |
989 | 990 | * @version April 2008 |
@@ -2713,7 +2714,7 @@ discard block |
||
2713 | 2714 | * @param int $userId |
2714 | 2715 | * @param int $workId |
2715 | 2716 | * @param int $courseId |
2716 | - * @return bool |
|
2717 | + * @return boolean|null |
|
2717 | 2718 | */ |
2718 | 2719 | function allowOnlySubscribedUser($userId, $workId, $courseId) |
2719 | 2720 | { |
@@ -2831,7 +2832,7 @@ discard block |
||
2831 | 2832 | /** |
2832 | 2833 | * Get total score from a work list |
2833 | 2834 | * @param $workList |
2834 | - * @return int|null |
|
2835 | + * @return integer |
|
2835 | 2836 | */ |
2836 | 2837 | function getTotalWorkScore($workList) |
2837 | 2838 | { |
@@ -2847,7 +2848,7 @@ discard block |
||
2847 | 2848 | * Get comment count from a work list (docs sent by students) |
2848 | 2849 | * @param array $workList |
2849 | 2850 | * @param array $courseInfo |
2850 | - * @return int|null |
|
2851 | + * @return integer |
|
2851 | 2852 | */ |
2852 | 2853 | function getTotalWorkComment($workList, $courseInfo = array()) |
2853 | 2854 | { |
@@ -2985,6 +2986,7 @@ discard block |
||
2985 | 2986 | * @param int $parentId |
2986 | 2987 | * @param array $courseInfo |
2987 | 2988 | * @param int $sessionId |
2989 | + * @param integer $userId |
|
2988 | 2990 | * @return int |
2989 | 2991 | */ |
2990 | 2992 | function getLastWorkStudentFromParentByUser( |
@@ -3614,12 +3616,11 @@ discard block |
||
3614 | 3616 | |
3615 | 3617 | /** |
3616 | 3618 | * Creates a new task (directory) in the assignment tool |
3617 | - * @param array $params |
|
3618 | 3619 | * @param int $user_id |
3619 | 3620 | * @param array $courseInfo |
3620 | 3621 | * @param int $group_id |
3621 | 3622 | * @param int $session_id |
3622 | - * @return bool|int |
|
3623 | + * @return string|false |
|
3623 | 3624 | * @note $params can have the following elements, but should at least have the 2 first ones: ( |
3624 | 3625 | * 'new_dir' => 'some-name', |
3625 | 3626 | * 'description' => 'some-desc', |
@@ -4115,7 +4116,7 @@ discard block |
||
4115 | 4116 | } |
4116 | 4117 | |
4117 | 4118 | /** |
4118 | - * @return array |
|
4119 | + * @return string[] |
|
4119 | 4120 | */ |
4120 | 4121 | function getUploadDocumentType() |
4121 | 4122 | { |
@@ -4488,7 +4489,7 @@ discard block |
||
4488 | 4489 | * @param int Session ID |
4489 | 4490 | * @param $correction |
4490 | 4491 | * |
4491 | - * @return array|bool |
|
4492 | + * @return boolean |
|
4492 | 4493 | */ |
4493 | 4494 | function getFileContents($id, $course_info, $sessionId = 0, $correction = false) |
4494 | 4495 | { |
@@ -4606,7 +4607,7 @@ discard block |
||
4606 | 4607 | * @param int $userId |
4607 | 4608 | * @param array $courseInfo |
4608 | 4609 | * @param string $format |
4609 | - * @return bool |
|
4610 | + * @return false|null |
|
4610 | 4611 | */ |
4611 | 4612 | function exportAllWork($userId, $courseInfo, $format = 'pdf') |
4612 | 4613 | { |
@@ -4654,7 +4655,7 @@ discard block |
||
4654 | 4655 | * @param array $courseInfo |
4655 | 4656 | * @param int $sessionId |
4656 | 4657 | * @param string $format |
4657 | - * @return bool |
|
4658 | + * @return false|null |
|
4658 | 4659 | */ |
4659 | 4660 | function exportAllStudentWorkFromPublication( |
4660 | 4661 | $workId, |
@@ -4792,7 +4793,7 @@ discard block |
||
4792 | 4793 | * Downloads all user files per user |
4793 | 4794 | * @param int $userId |
4794 | 4795 | * @param array $courseInfo |
4795 | - * @return bool |
|
4796 | + * @return false|null |
|
4796 | 4797 | */ |
4797 | 4798 | function downloadAllFilesPerUser($userId, $courseInfo) |
4798 | 4799 | { |
@@ -4906,7 +4907,7 @@ discard block |
||
4906 | 4907 | /** |
4907 | 4908 | * @param array $courseInfo |
4908 | 4909 | * @param int $workId |
4909 | - * @return bool |
|
4910 | + * @return boolean|null |
|
4910 | 4911 | */ |
4911 | 4912 | function protectWork($courseInfo, $workId) |
4912 | 4913 | { |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | /** |
1155 | 1155 | * Returns an array containing the list of options used to populate the gradebook_number_decimals variable |
1156 | 1156 | * This function is called through a call_user_func() in the generate_settings_form function. |
1157 | - * @return array List of gradebook_number_decimals options |
|
1157 | + * @return string[] List of gradebook_number_decimals options |
|
1158 | 1158 | * |
1159 | 1159 | * @author Guillaume Viguier <[email protected]> |
1160 | 1160 | */ |
@@ -1575,8 +1575,9 @@ discard block |
||
1575 | 1575 | } |
1576 | 1576 | /** |
1577 | 1577 | * Helper function to generates a form elements group |
1578 | - * @param object $form The form where the elements group has to be added |
|
1578 | + * @param FormValidator $form The form where the elements group has to be added |
|
1579 | 1579 | * @param array $values Values to browse through |
1580 | + * @param string $elementName |
|
1580 | 1581 | * @return array |
1581 | 1582 | */ |
1582 | 1583 | function formGenerateElementsGroup($form, $values = array(), $elementName) |
@@ -1592,7 +1593,7 @@ discard block |
||
1592 | 1593 | } |
1593 | 1594 | /** |
1594 | 1595 | * Helper function with allowed file types for CSS |
1595 | - * @return array Array of file types (no indexes) |
|
1596 | + * @return string[] Array of file types (no indexes) |
|
1596 | 1597 | */ |
1597 | 1598 | function getAllowedFileTypes() |
1598 | 1599 | { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | * Add attendances sheet inside table. This is the *list of* dates, not |
278 | 278 | * a specific date in itself. |
279 | 279 | * @param bool true for adding link in gradebook or false otherwise (optional) |
280 | - * @return int last attendance id |
|
280 | + * @return false|string last attendance id |
|
281 | 281 | */ |
282 | 282 | public function attendance_add($link_to_gradebook = false) |
283 | 283 | { |
@@ -354,6 +354,7 @@ discard block |
||
354 | 354 | * edit attendances inside table |
355 | 355 | * @param int attendance id |
356 | 356 | * @param bool true for adding link in gradebook or false otherwise (optional) |
357 | + * @param integer $attendance_id |
|
357 | 358 | * @return int last id |
358 | 359 | */ |
359 | 360 | public function attendance_edit($attendance_id, $link_to_gradebook = false) |
@@ -429,6 +430,7 @@ discard block |
||
429 | 430 | /** |
430 | 431 | * Restore attendance |
431 | 432 | * @param int|array one or many attendances id |
433 | + * @param integer $attendance_id |
|
432 | 434 | * @return int affected rows |
433 | 435 | */ |
434 | 436 | public function attendance_restore($attendance_id) |
@@ -530,7 +532,7 @@ discard block |
||
530 | 532 | |
531 | 533 | /** |
532 | 534 | * Changes visibility |
533 | - * @param int|array $attendanceId one or many attendances id |
|
535 | + * @param integer $attendanceId one or many attendances id |
|
534 | 536 | * @param int status |
535 | 537 | * |
536 | 538 | * @return int affected rows |
@@ -585,6 +587,7 @@ discard block |
||
585 | 587 | * Lock or unlock an attendance |
586 | 588 | * @param int attendance id |
587 | 589 | * @param bool True to lock or false otherwise |
590 | + * @param integer $attendance_id |
|
588 | 591 | */ |
589 | 592 | public function lock_attendance($attendance_id, $lock = true) |
590 | 593 | { |
@@ -917,7 +920,11 @@ discard block |
||
917 | 920 | * @param string Event type ('locked_attendance', 'done_attendance_sheet' ...) |
918 | 921 | * @param int Last edit user id |
919 | 922 | * @param string Calendar datetime value (optional, when event type is 'done_attendance_sheet') |
920 | - * @return int Affected rows |
|
923 | + * @param integer $attendance_id |
|
924 | + * @param string $lastedit_date |
|
925 | + * @param string $lastedit_type |
|
926 | + * @param integer $lastedit_user_id |
|
927 | + * @return false|string Affected rows |
|
921 | 928 | */ |
922 | 929 | public function save_attendance_sheet_log( |
923 | 930 | $attendance_id, |
@@ -962,6 +969,7 @@ discard block |
||
962 | 969 | /** |
963 | 970 | * Get number of done attendances inside current sheet |
964 | 971 | * @param int attendance id |
972 | + * @param integer $attendance_id |
|
965 | 973 | * @return int number of done attendances |
966 | 974 | */ |
967 | 975 | public static function get_done_attendance_calendar($attendance_id) |
@@ -1197,6 +1205,7 @@ discard block |
||
1197 | 1205 | /** |
1198 | 1206 | * Get next attendance calendar without presences (done attendances) |
1199 | 1207 | * @param int attendance id |
1208 | + * @param integer $attendance_id |
|
1200 | 1209 | * @return int attendance calendar id |
1201 | 1210 | */ |
1202 | 1211 | public function get_next_attendance_calendar_id($attendance_id) |
@@ -1225,6 +1234,7 @@ discard block |
||
1225 | 1234 | /** |
1226 | 1235 | * Get next attendance calendar datetime without presences (done attendances) |
1227 | 1236 | * @param int attendance id |
1237 | + * @param integer $attendance_id |
|
1228 | 1238 | * @return int UNIX time format datetime |
1229 | 1239 | */ |
1230 | 1240 | public function get_next_attendance_calendar_datetime($attendance_id) |
@@ -1253,6 +1263,7 @@ discard block |
||
1253 | 1263 | * Get user' score from current attendance |
1254 | 1264 | * @param int $user_id |
1255 | 1265 | * @param int $attendance_id |
1266 | + * @param integer $groupId |
|
1256 | 1267 | * @return int score |
1257 | 1268 | */ |
1258 | 1269 | public function get_user_score($user_id, $attendance_id, $groupId = null) |
@@ -1300,6 +1311,7 @@ discard block |
||
1300 | 1311 | /** |
1301 | 1312 | * Get attendance calendar data by id |
1302 | 1313 | * @param int attendance calendar id |
1314 | + * @param integer $calendar_id |
|
1303 | 1315 | * @return array attendance calendar data |
1304 | 1316 | */ |
1305 | 1317 | public function get_attendance_calendar_by_id($calendar_id) |
@@ -1422,6 +1434,7 @@ discard block |
||
1422 | 1434 | * Get number of attendance calendar inside current attendance |
1423 | 1435 | * @param int $attendance_id |
1424 | 1436 | * @param int $groupId |
1437 | + * @param boolean $done_attendance |
|
1425 | 1438 | * @return int number of dates in attendance calendar |
1426 | 1439 | */ |
1427 | 1440 | public static function get_number_of_attendance_calendar($attendance_id, $groupId = 0, $done_attendance = NULL, $userId = 0) |
@@ -1647,7 +1660,6 @@ discard block |
||
1647 | 1660 | /** |
1648 | 1661 | * @param int $calendarId |
1649 | 1662 | * @param int $courseId |
1650 | - * @param int $groupId |
|
1651 | 1663 | * @return array |
1652 | 1664 | */ |
1653 | 1665 | public function getGroupListByAttendanceCalendar($calendarId, $courseId) |
@@ -1687,7 +1699,6 @@ discard block |
||
1687 | 1699 | /** |
1688 | 1700 | * @param int $calendarId |
1689 | 1701 | * @param int $courseId |
1690 | - * @param int $groupId |
|
1691 | 1702 | * |
1692 | 1703 | * @return array |
1693 | 1704 | */ |
@@ -1788,6 +1799,8 @@ discard block |
||
1788 | 1799 | * edit a datetime inside attendance calendar table |
1789 | 1800 | * @param int attendance calendar id |
1790 | 1801 | * @param int attendance id |
1802 | + * @param integer $calendar_id |
|
1803 | + * @param integer $attendance_id |
|
1791 | 1804 | * @return int affected rows |
1792 | 1805 | */ |
1793 | 1806 | public function attendance_calendar_edit($calendar_id, $attendance_id) |
@@ -1827,6 +1840,8 @@ discard block |
||
1827 | 1840 | * @param int attendance calendar id |
1828 | 1841 | * @param int attendance id |
1829 | 1842 | * @param bool true for removing all calendar inside current attendance, false for removing by calendar id |
1843 | + * @param integer $calendar_id |
|
1844 | + * @param integer $attendance_id |
|
1830 | 1845 | * @return int affected rows |
1831 | 1846 | */ |
1832 | 1847 | public function attendance_calendar_delete($calendar_id, $attendance_id , $all_delete = false) |
@@ -1889,6 +1904,9 @@ discard block |
||
1889 | 1904 | $this->course_id = $course_id; |
1890 | 1905 | } |
1891 | 1906 | |
1907 | + /** |
|
1908 | + * @param string $datetime |
|
1909 | + */ |
|
1892 | 1910 | public function set_date_time($datetime) |
1893 | 1911 | { |
1894 | 1912 | $this->date_time = $datetime; |