@@ -1255,6 +1255,7 @@ discard block |
||
| 1255 | 1255 | |
| 1256 | 1256 | /** |
| 1257 | 1257 | * Validates the time control key |
| 1258 | + * @param integer $exercise_id |
|
| 1258 | 1259 | */ |
| 1259 | 1260 | public static function exercise_time_control_is_valid( |
| 1260 | 1261 | $exercise_id, |
@@ -1388,7 +1389,7 @@ discard block |
||
| 1388 | 1389 | * @param int $in_direction |
| 1389 | 1390 | * @param string $in_hotpot_path |
| 1390 | 1391 | * @param bool $in_get_count |
| 1391 | - * @param null $where_condition |
|
| 1392 | + * @param string $where_condition |
|
| 1392 | 1393 | * @return array|int |
| 1393 | 1394 | */ |
| 1394 | 1395 | public static function get_exam_results_hotpotatoes_data( |
@@ -2179,7 +2180,7 @@ discard block |
||
| 2179 | 2180 | /** |
| 2180 | 2181 | * Return true if pass_pourcentage activated (we use the pass pourcentage feature |
| 2181 | 2182 | * return false if pass_percentage = 0 (we don't use the pass pourcentage feature |
| 2182 | - * @param $in_pass_pourcentage |
|
| 2183 | + * @param string $in_pass_pourcentage |
|
| 2183 | 2184 | * @return boolean |
| 2184 | 2185 | * In this version, pass_percentage and show_success_message are disabled if |
| 2185 | 2186 | * pass_percentage is set to 0 |
@@ -2192,7 +2193,7 @@ discard block |
||
| 2192 | 2193 | /** |
| 2193 | 2194 | * Converts a numeric value in a percentage example 0.66666 to 66.67 % |
| 2194 | 2195 | * @param $value |
| 2195 | - * @return float Converted number |
|
| 2196 | + * @return string Converted number |
|
| 2196 | 2197 | */ |
| 2197 | 2198 | public static function convert_to_percentage($value) |
| 2198 | 2199 | { |
@@ -2208,7 +2209,7 @@ discard block |
||
| 2208 | 2209 | * @param float $score |
| 2209 | 2210 | * @param float $weight |
| 2210 | 2211 | * @deprecated seem not to be used |
| 2211 | - * @return float the score rounded converted to the new range |
|
| 2212 | + * @return string|null the score rounded converted to the new range |
|
| 2212 | 2213 | */ |
| 2213 | 2214 | public static function convert_score($score, $weight) |
| 2214 | 2215 | { |
@@ -2759,6 +2760,7 @@ discard block |
||
| 2759 | 2760 | * @param int exercise id |
| 2760 | 2761 | * @param int $courseId |
| 2761 | 2762 | * @param int session id |
| 2763 | + * @param integer $user_count |
|
| 2762 | 2764 | * @return float Best average score |
| 2763 | 2765 | */ |
| 2764 | 2766 | public static function get_best_average_score_by_exercise( |
@@ -3198,8 +3200,9 @@ discard block |
||
| 3198 | 3200 | } |
| 3199 | 3201 | |
| 3200 | 3202 | /** |
| 3201 | - * @param array $answer |
|
| 3203 | + * @param string|null $answer |
|
| 3202 | 3204 | * @param string $user_answer |
| 3205 | + * @param string|null $current_answer |
|
| 3203 | 3206 | * @return array |
| 3204 | 3207 | */ |
| 3205 | 3208 | public static function check_fill_in_blanks($answer, $user_answer, $current_answer) |
@@ -3805,7 +3808,7 @@ discard block |
||
| 3805 | 3808 | |
| 3806 | 3809 | /** |
| 3807 | 3810 | * @param int $countLetter |
| 3808 | - * @return mixed |
|
| 3811 | + * @return string |
|
| 3809 | 3812 | */ |
| 3810 | 3813 | public static function detectInputAppropriateClass($countLetter) |
| 3811 | 3814 | { |
@@ -13,9 +13,9 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * ChamiloForm constructor. |
| 16 | - * @param $mode |
|
| 17 | - * @param $returnurl |
|
| 18 | - * @param $cancelurl |
|
| 16 | + * @param string $mode |
|
| 17 | + * @param string $returnurl |
|
| 18 | + * @param string $cancelurl |
|
| 19 | 19 | * @param $customdata |
| 20 | 20 | */ |
| 21 | 21 | public function __construct($mode, $returnurl, $cancelurl, $customdata = []) |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * Check that form data is valid. |
| 138 | 138 | * You should almost always use this, rather than {@see validate_defined_fields} |
| 139 | 139 | * |
| 140 | - * @return bool true if form data valid |
|
| 140 | + * @return boolean|null true if form data valid |
|
| 141 | 141 | */ |
| 142 | 142 | public function is_validated() |
| 143 | 143 | { |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * is NOT to validate the form when a no submit button has been pressed. |
| 167 | 167 | * pass true here to override this behaviour |
| 168 | 168 | * |
| 169 | - * @return bool true if form data valid |
|
| 169 | + * @return boolean|null true if form data valid |
|
| 170 | 170 | */ |
| 171 | 171 | public function validate_defined_fields($validateonnosubmit=false) |
| 172 | 172 | { |
@@ -314,7 +314,7 @@ |
||
| 314 | 314 | * Set votes |
| 315 | 315 | * |
| 316 | 316 | * @param integer $votes |
| 317 | - * @return integer |
|
| 317 | + * @return Message |
|
| 318 | 318 | */ |
| 319 | 319 | public function setVotes($votes) |
| 320 | 320 | { |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | /** |
| 356 | - * @return int |
|
| 356 | + * @return string |
|
| 357 | 357 | */ |
| 358 | 358 | public function selectPassPercentage() |
| 359 | 359 | { |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | * tells if questions are selected randomly, and if so returns the draws |
| 463 | 463 | * |
| 464 | 464 | * @author Olivier Brouckaert |
| 465 | - * @return integer - 0 if not random, otherwise the draws |
|
| 465 | + * @return boolean - 0 if not random, otherwise the draws |
|
| 466 | 466 | */ |
| 467 | 467 | public function isRandom() |
| 468 | 468 | { |
@@ -2830,7 +2830,7 @@ discard block |
||
| 2830 | 2830 | * @param int int lp id |
| 2831 | 2831 | * @param int int lp item id |
| 2832 | 2832 | * @param int int lp item_view id |
| 2833 | - * @param float $weight |
|
| 2833 | + * @param integer $weight |
|
| 2834 | 2834 | * @param array question list |
| 2835 | 2835 | */ |
| 2836 | 2836 | public function save_stat_track_exercise_info( |
@@ -5327,6 +5327,9 @@ discard block |
||
| 5327 | 5327 | } |
| 5328 | 5328 | } |
| 5329 | 5329 | |
| 5330 | + /** |
|
| 5331 | + * @param integer $exe_id |
|
| 5332 | + */ |
|
| 5330 | 5333 | function send_notification_for_oral_questions($question_list_answers, $origin, $exe_id) |
| 5331 | 5334 | { |
| 5332 | 5335 | if (api_get_course_setting('email_alert_manager_on_new_quiz') != 1 ) { |
@@ -5478,7 +5481,7 @@ discard block |
||
| 5478 | 5481 | * @param int Maximum number of attempts (0 if no limit) |
| 5479 | 5482 | * @param int Feedback type |
| 5480 | 5483 | * @todo this was function was added due the import exercise via CSV |
| 5481 | - * @return int New exercise ID |
|
| 5484 | + * @return string New exercise ID |
|
| 5482 | 5485 | */ |
| 5483 | 5486 | public function createExercise( |
| 5484 | 5487 | $title, |
@@ -6813,7 +6816,7 @@ discard block |
||
| 6813 | 6816 | * @param bool $show_comment |
| 6814 | 6817 | * @param null $exercise_feedback |
| 6815 | 6818 | * @param bool $show_answers |
| 6816 | - * @param null $modelType |
|
| 6819 | + * @param integer $modelType |
|
| 6817 | 6820 | * @param bool $categoryMinusOne |
| 6818 | 6821 | * @return bool|null|string |
| 6819 | 6822 | */ |
@@ -666,7 +666,6 @@ discard block |
||
| 666 | 666 | * @param int $sessionId The session ID |
| 667 | 667 | * @param int $courseId The course ID |
| 668 | 668 | * @param int $exerciseId The quiz ID |
| 669 | - * @param int $answer Answer status (0 = incorrect, 1 = correct, 2 = both) |
|
| 670 | 669 | * @return string HTML array of results formatted for gridJS |
| 671 | 670 | * @author César Perales <[email protected]>, Beeznest Team |
| 672 | 671 | */ |
@@ -1254,6 +1253,7 @@ discard block |
||
| 1254 | 1253 | * @param int Number of items to select |
| 1255 | 1254 | * @param string Column to order on |
| 1256 | 1255 | * @param string Order direction |
| 1256 | + * @param integer $number_of_items |
|
| 1257 | 1257 | * @return array Results |
| 1258 | 1258 | */ |
| 1259 | 1259 | public static function get_course_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1588,6 +1588,7 @@ discard block |
||
| 1588 | 1588 | * @param int Number of items to select |
| 1589 | 1589 | * @param string Column to order on |
| 1590 | 1590 | * @param string Order direction |
| 1591 | + * @param integer $number_of_items |
|
| 1591 | 1592 | * @return array Results |
| 1592 | 1593 | */ |
| 1593 | 1594 | public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1608,7 +1609,6 @@ discard block |
||
| 1608 | 1609 | /** |
| 1609 | 1610 | * Fills in session reporting data |
| 1610 | 1611 | * |
| 1611 | - * @param integer $user_id the id of the user |
|
| 1612 | 1612 | * @param array $url_params additonal url parameters |
| 1613 | 1613 | * @param array $row the row information (the other columns) |
| 1614 | 1614 | * @return string html code |
@@ -2239,6 +2239,7 @@ discard block |
||
| 2239 | 2239 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
| 2240 | 2240 | * @version Dokeos 1.8.6 |
| 2241 | 2241 | * @since October 2008 |
| 2242 | + * @param integer $number_of_items |
|
| 2242 | 2243 | */ |
| 2243 | 2244 | public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction) |
| 2244 | 2245 | { |
@@ -2341,7 +2342,6 @@ discard block |
||
| 2341 | 2342 | /** |
| 2342 | 2343 | * Checks if there are repeted users in a given array |
| 2343 | 2344 | * @param array $usernames list of the usernames in the uploaded file |
| 2344 | - * @param array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2 |
|
| 2345 | 2345 | * @return array with the $usernames array and the $user_array array |
| 2346 | 2346 | * @author Julio Montoya Armas |
| 2347 | 2347 | */ |
@@ -2516,6 +2516,7 @@ discard block |
||
| 2516 | 2516 | |
| 2517 | 2517 | /** |
| 2518 | 2518 | * Adds missing user-information (which isn't required, like password, etc). |
| 2519 | + * @return integer |
|
| 2519 | 2520 | */ |
| 2520 | 2521 | function complete_missing_data($user) { |
| 2521 | 2522 | // 1. Generate a password if it is necessary. |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | * Deletes a file or a directory |
| 40 | 40 | * |
| 41 | 41 | * @author - Hugues Peeters |
| 42 | - * @param $file (String) - the path of file or directory to delete |
|
| 43 | - * @return boolean - true if the delete succeed, false otherwise. |
|
| 42 | + * @param string $file (String) - the path of file or directory to delete |
|
| 43 | + * @return boolean|null - true if the delete succeed, false otherwise. |
|
| 44 | 44 | * @see - delete() uses check_name_exist() and removeDir() functions |
| 45 | 45 | */ |
| 46 | 46 | function my_delete($file) |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | * @author Hugues Peeters <[email protected]> |
| 128 | 128 | * @param string $file_path complete path of the file or the directory |
| 129 | 129 | * @param string $new_file_name new name for the file or the directory |
| 130 | - * @return boolean true if succeed, false otherwise |
|
| 130 | + * @return string|false true if succeed, false otherwise |
|
| 131 | 131 | * @see rename() uses the check_name_exist() and php2phps() functions |
| 132 | 132 | */ |
| 133 | 133 | function my_rename($file_path, $new_file_name) { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @param string $target the path of the new area |
| 175 | 175 | * @param bool $forceMove Whether to force a move or to make a copy (safer but slower) and then delete the original |
| 176 | 176 | * @param bool $moveContent In some cases (including migrations), we need to move the *content* and not the folder itself |
| 177 | - * @return bool true if the move succeed, false otherwise. |
|
| 177 | + * @return boolean|null true if the move succeed, false otherwise. |
|
| 178 | 178 | * @see move() uses check_name_exist() and copyDirTo() functions |
| 179 | 179 | */ |
| 180 | 180 | function move($source, $target, $forceMove = false, $moveContent = false) |
@@ -132,38 +132,38 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | function my_rename($file_path, $new_file_name) { |
| 134 | 134 | |
| 135 | - $save_dir = getcwd(); |
|
| 136 | - $path = dirname($file_path); |
|
| 137 | - $old_file_name = basename($file_path); |
|
| 138 | - $new_file_name = api_replace_dangerous_char($new_file_name); |
|
| 135 | + $save_dir = getcwd(); |
|
| 136 | + $path = dirname($file_path); |
|
| 137 | + $old_file_name = basename($file_path); |
|
| 138 | + $new_file_name = api_replace_dangerous_char($new_file_name); |
|
| 139 | 139 | |
| 140 | - // If no extension, take the old one |
|
| 141 | - if ((strpos($new_file_name, '.') === false) && ($dotpos = strrpos($old_file_name, '.'))) { |
|
| 142 | - $new_file_name .= substr($old_file_name, $dotpos); |
|
| 143 | - } |
|
| 140 | + // If no extension, take the old one |
|
| 141 | + if ((strpos($new_file_name, '.') === false) && ($dotpos = strrpos($old_file_name, '.'))) { |
|
| 142 | + $new_file_name .= substr($old_file_name, $dotpos); |
|
| 143 | + } |
|
| 144 | 144 | |
| 145 | - // Note: still possible: 'xx.yy' -rename-> '.yy' -rename-> 'zz' |
|
| 146 | - // This is useful for folder names, where otherwise '.' would be sticky |
|
| 145 | + // Note: still possible: 'xx.yy' -rename-> '.yy' -rename-> 'zz' |
|
| 146 | + // This is useful for folder names, where otherwise '.' would be sticky |
|
| 147 | 147 | |
| 148 | - // Extension PHP is not allowed, change to PHPS |
|
| 149 | - $new_file_name = php2phps($new_file_name); |
|
| 148 | + // Extension PHP is not allowed, change to PHPS |
|
| 149 | + $new_file_name = php2phps($new_file_name); |
|
| 150 | 150 | |
| 151 | - if ($new_file_name == $old_file_name) { |
|
| 152 | - return $old_file_name; |
|
| 153 | - } |
|
| 151 | + if ($new_file_name == $old_file_name) { |
|
| 152 | + return $old_file_name; |
|
| 153 | + } |
|
| 154 | 154 | |
| 155 | - if (strtolower($new_file_name) != strtolower($old_file_name) && check_name_exist($path.'/'.$new_file_name)) { |
|
| 156 | - return false; |
|
| 157 | - } |
|
| 158 | - // On a Windows server, it would be better not to do the above check |
|
| 159 | - // because it succeeds for some new names resembling the old name. |
|
| 160 | - // But on Unix/Linux the check must be done because rename overwrites. |
|
| 155 | + if (strtolower($new_file_name) != strtolower($old_file_name) && check_name_exist($path.'/'.$new_file_name)) { |
|
| 156 | + return false; |
|
| 157 | + } |
|
| 158 | + // On a Windows server, it would be better not to do the above check |
|
| 159 | + // because it succeeds for some new names resembling the old name. |
|
| 160 | + // But on Unix/Linux the check must be done because rename overwrites. |
|
| 161 | 161 | |
| 162 | - chdir($path); |
|
| 163 | - $res = rename($old_file_name, $new_file_name) ? $new_file_name : false; |
|
| 164 | - chdir($save_dir); |
|
| 162 | + chdir($path); |
|
| 163 | + $res = rename($old_file_name, $new_file_name) ? $new_file_name : false; |
|
| 164 | + chdir($save_dir); |
|
| 165 | 165 | |
| 166 | - return $res; |
|
| 166 | + return $res; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $file_name = basename($source); |
| 186 | 186 | // move onto self illegal: mv a/b/c a/b/c or mv a/b/c a/b |
| 187 | 187 | if (strcasecmp($target, dirname($source)) === 0) { |
| 188 | - return false; |
|
| 188 | + return false; |
|
| 189 | 189 | } |
| 190 | 190 | $isWindowsOS = api_is_windows_os(); |
| 191 | 191 | $canExec = function_exists('exec'); |
@@ -265,8 +265,8 @@ discard block |
||
| 265 | 265 | */ |
| 266 | 266 | function getextension($filename) |
| 267 | 267 | { |
| 268 | - $bouts = explode('.', $filename); |
|
| 269 | - return array(array_pop($bouts), implode('.', $bouts)); |
|
| 268 | + $bouts = explode('.', $filename); |
|
| 269 | + return array(array_pop($bouts), implode('.', $bouts)); |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /** |
@@ -277,17 +277,17 @@ discard block |
||
| 277 | 277 | * @param boolean $recursive if true , include subdirectory in total |
| 278 | 278 | */ |
| 279 | 279 | function dirsize($root, $recursive = true) { |
| 280 | - $dir = @opendir($root); |
|
| 281 | - $size = 0; |
|
| 282 | - while ($file = @readdir($dir)) { |
|
| 283 | - if (!in_array($file, array('.', '..'))) { |
|
| 284 | - if (is_dir($root.'/'.$file)) { |
|
| 285 | - $size += $recursive ? dirsize($root.'/'.$file) : 0; |
|
| 286 | - } else { |
|
| 287 | - $size += @filesize($root.'/'.$file); |
|
| 288 | - } |
|
| 289 | - } |
|
| 290 | - } |
|
| 291 | - @closedir($dir); |
|
| 292 | - return $size; |
|
| 280 | + $dir = @opendir($root); |
|
| 281 | + $size = 0; |
|
| 282 | + while ($file = @readdir($dir)) { |
|
| 283 | + if (!in_array($file, array('.', '..'))) { |
|
| 284 | + if (is_dir($root.'/'.$file)) { |
|
| 285 | + $size += $recursive ? dirsize($root.'/'.$file) : 0; |
|
| 286 | + } else { |
|
| 287 | + $size += @filesize($root.'/'.$file); |
|
| 288 | + } |
|
| 289 | + } |
|
| 290 | + } |
|
| 291 | + @closedir($dir); |
|
| 292 | + return $size; |
|
| 293 | 293 | } |
@@ -193,9 +193,9 @@ |
||
| 193 | 193 | /* File case */ |
| 194 | 194 | if (is_file($source)) { |
| 195 | 195 | if ($forceMove && !$isWindowsOS && $canExec) { |
| 196 | - exec('mv ' . $source . ' ' . $target . '/' . $file_name); |
|
| 196 | + exec('mv '.$source.' '.$target.'/'.$file_name); |
|
| 197 | 197 | } else { |
| 198 | - copy($source, $target . '/' . $file_name); |
|
| 198 | + copy($source, $target.'/'.$file_name); |
|
| 199 | 199 | unlink($source); |
| 200 | 200 | } |
| 201 | 201 | return true; |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
| 242 | - * @param doc_id id of document (id in mainDb.document table) |
|
| 242 | + * @param doc_id string of document (id in mainDb.document table) |
|
| 243 | 243 | * @author Sebastien Piraux <[email protected]> |
| 244 | 244 | * @desc Record information for upload event |
| 245 | 245 | * used in the works tool to record informations when |
@@ -313,6 +313,9 @@ discard block |
||
| 313 | 313 | * @param int session_id |
| 314 | 314 | * @param int learnpath_id (id of the learnpath) |
| 315 | 315 | * @param int learnpath_item_id (id of the learnpath_item) |
| 316 | + * @param integer $score |
|
| 317 | + * @param integer $weighting |
|
| 318 | + * @param integer $session_id |
|
| 316 | 319 | * |
| 317 | 320 | * @author Sebastien Piraux <[email protected]> |
| 318 | 321 | * @author Julio Montoya Armas <[email protected]> Reworked 2010 |
@@ -414,7 +417,9 @@ discard block |
||
| 414 | 417 | * @param integer Session ID (from the session table). Default value of null means "get from context". |
| 415 | 418 | * @param integer Learnpath ID (from c_lp table). Default value of null means "get from context". |
| 416 | 419 | * @param integer Learnpath item ID (from the c_lp_item table). Default value of null means "get from context". |
| 417 | - * @return boolean Result of the insert query |
|
| 420 | + * @param integer $exe_id |
|
| 421 | + * @param integer $position |
|
| 422 | + * @return false|string Result of the insert query |
|
| 418 | 423 | */ |
| 419 | 424 | public static function saveQuestionAttempt( |
| 420 | 425 | $score, |
@@ -588,6 +593,8 @@ discard block |
||
| 588 | 593 | * @param int Whether this answer is correct (1) or not (0) |
| 589 | 594 | * @param string Coordinates of this point (e.g. 123;324) |
| 590 | 595 | * @param bool update results? |
| 596 | + * @param integer $exe_id |
|
| 597 | + * @param integer $correct |
|
| 591 | 598 | * @return boolean Result of the insert query |
| 592 | 599 | * @uses Course code and user_id from global scope $_cid and $_user |
| 593 | 600 | */ |
@@ -800,11 +807,11 @@ discard block |
||
| 800 | 807 | /** |
| 801 | 808 | * Save the new message for one event and for one language |
| 802 | 809 | * |
| 803 | - * @param string $eventName |
|
| 810 | + * @param string $event_name |
|
| 804 | 811 | * @param array $users |
| 805 | 812 | * @param string $message |
| 806 | 813 | * @param string $subject |
| 807 | - * @param string $eventMessageLanguage |
|
| 814 | + * @param string $event_message_language |
|
| 808 | 815 | * @param int $activated |
| 809 | 816 | */ |
| 810 | 817 | public static function save_event_type_message($event_name, $users, $message, $subject, $event_message_language, $activated) |
@@ -938,10 +945,10 @@ discard block |
||
| 938 | 945 | } |
| 939 | 946 | |
| 940 | 947 | /** |
| 941 | - * @param $user_id |
|
| 948 | + * @param integer $user_id |
|
| 942 | 949 | * @param $exerciseId |
| 943 | - * @param $lp_id |
|
| 944 | - * @param $lp_item_id |
|
| 950 | + * @param integer $lp_id |
|
| 951 | + * @param integer $lp_item_id |
|
| 945 | 952 | * @return int |
| 946 | 953 | */ |
| 947 | 954 | public static function get_attempt_count_not_finished($user_id, $exerciseId, $lp_id, $lp_item_id) |
@@ -1118,6 +1125,7 @@ discard block |
||
| 1118 | 1125 | * @param int exercise id |
| 1119 | 1126 | * @param int $courseId |
| 1120 | 1127 | * @param int session id |
| 1128 | + * @param integer $user_id |
|
| 1121 | 1129 | * @return array with the results |
| 1122 | 1130 | * |
| 1123 | 1131 | */ |
@@ -1213,6 +1221,7 @@ discard block |
||
| 1213 | 1221 | * @param int exercise id |
| 1214 | 1222 | * @param int $courseId |
| 1215 | 1223 | * @param int session id |
| 1224 | + * @param integer $user_id |
|
| 1216 | 1225 | * @return array with the results |
| 1217 | 1226 | * |
| 1218 | 1227 | */ |
@@ -1301,6 +1310,8 @@ discard block |
||
| 1301 | 1310 | * @param int lp id |
| 1302 | 1311 | * @param int lp item id |
| 1303 | 1312 | * @param string order asc or desc |
| 1313 | + * @param integer $courseId |
|
| 1314 | + * @param string $order |
|
| 1304 | 1315 | * @return array with the results |
| 1305 | 1316 | * |
| 1306 | 1317 | */ |
@@ -1367,7 +1378,7 @@ discard block |
||
| 1367 | 1378 | * @param int exercise id |
| 1368 | 1379 | * @param int $courseId |
| 1369 | 1380 | * @param int session id |
| 1370 | - * @return array with the results |
|
| 1381 | + * @return string with the results |
|
| 1371 | 1382 | * |
| 1372 | 1383 | */ |
| 1373 | 1384 | public static function count_exercise_attempts_by_user($user_id, $exercise_id, $courseId, $session_id = 0) |
@@ -1538,7 +1549,7 @@ discard block |
||
| 1538 | 1549 | * @param int exercise id |
| 1539 | 1550 | * @param int course id |
| 1540 | 1551 | * @param int session id |
| 1541 | - * @return array with the results |
|
| 1552 | + * @return integer with the results |
|
| 1542 | 1553 | * |
| 1543 | 1554 | */ |
| 1544 | 1555 | public static function get_count_exercises_attempted_by_course($courseId, $session_id = 0) |
@@ -1652,7 +1652,7 @@ discard block |
||
| 1652 | 1652 | * @param array $user_list |
| 1653 | 1653 | * @param int $session_visibility |
| 1654 | 1654 | * @param bool $empty_users |
| 1655 | - * @return bool |
|
| 1655 | + * @return false|null |
|
| 1656 | 1656 | */ |
| 1657 | 1657 | public static function subscribe_users_to_session( |
| 1658 | 1658 | $id_session, |
@@ -1925,7 +1925,7 @@ discard block |
||
| 1925 | 1925 | * @param array $courseInfo |
| 1926 | 1926 | * @param int $status |
| 1927 | 1927 | * @param bool $updateTotal |
| 1928 | - * @return bool |
|
| 1928 | + * @return false|null |
|
| 1929 | 1929 | */ |
| 1930 | 1930 | public static function removeUsersFromCourseSession( |
| 1931 | 1931 | $userList, |
@@ -1991,7 +1991,7 @@ discard block |
||
| 1991 | 1991 | * @param string $course_code |
| 1992 | 1992 | * @param int $session_visibility |
| 1993 | 1993 | * @param bool $removeUsersNotInList |
| 1994 | - * @return bool |
|
| 1994 | + * @return false|null |
|
| 1995 | 1995 | */ |
| 1996 | 1996 | public static function subscribe_users_to_session_course( |
| 1997 | 1997 | $user_list, |
@@ -2175,7 +2175,7 @@ discard block |
||
| 2175 | 2175 | * @param bool $removeExistingCoursesWithUsers Whether to unsubscribe |
| 2176 | 2176 | * existing courses and users (true, default) or not (false) |
| 2177 | 2177 | * @param $copyEvaluation from base course to session course |
| 2178 | - * @return void Nothing, or false on error |
|
| 2178 | + * @return false|null Nothing, or false on error |
|
| 2179 | 2179 | * */ |
| 2180 | 2180 | public static function add_courses_to_session( |
| 2181 | 2181 | $sessionId, |
@@ -2424,7 +2424,7 @@ discard block |
||
| 2424 | 2424 | * @param string $variable Field's internal variable name |
| 2425 | 2425 | * @param int $fieldType Field's type |
| 2426 | 2426 | * @param string $displayText Field's language var name |
| 2427 | - * @return int new extra field id |
|
| 2427 | + * @return boolean new extra field id |
|
| 2428 | 2428 | */ |
| 2429 | 2429 | public static function create_session_extra_field($variable, $fieldType, $displayText) |
| 2430 | 2430 | { |
@@ -2648,7 +2648,7 @@ discard block |
||
| 2648 | 2648 | * @param array id_checked |
| 2649 | 2649 | * @param bool include delete session |
| 2650 | 2650 | * @param bool optional, true if the function is called by a webservice, false otherwise. |
| 2651 | - * @return void Nothing, or false on error |
|
| 2651 | + * @return boolean Nothing, or false on error |
|
| 2652 | 2652 | * The parameters is a array to delete sessions |
| 2653 | 2653 | * */ |
| 2654 | 2654 | public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false) |
@@ -3414,8 +3414,8 @@ discard block |
||
| 3414 | 3414 | /** |
| 3415 | 3415 | * Gets the list of courses by session filtered by access_url |
| 3416 | 3416 | * |
| 3417 | - * @param $userId |
|
| 3418 | - * @param $sessionId |
|
| 3417 | + * @param integer $userId |
|
| 3418 | + * @param null|integer $sessionId |
|
| 3419 | 3419 | * @param null $from |
| 3420 | 3420 | * @param null $limit |
| 3421 | 3421 | * @param null $column |
@@ -3540,6 +3540,7 @@ discard block |
||
| 3540 | 3540 | /** |
| 3541 | 3541 | * Gets the count of courses by session filtered by access_url |
| 3542 | 3542 | * @param int session id |
| 3543 | + * @param integer $session_id |
|
| 3543 | 3544 | * @return array list of courses |
| 3544 | 3545 | */ |
| 3545 | 3546 | public static function getCourseCountBySessionId($session_id, $keyword = null) |
@@ -3798,6 +3799,7 @@ discard block |
||
| 3798 | 3799 | * Updates a session status |
| 3799 | 3800 | * @param int session id |
| 3800 | 3801 | * @param int status |
| 3802 | + * @param integer $status |
|
| 3801 | 3803 | */ |
| 3802 | 3804 | public static function set_session_status($session_id, $status) |
| 3803 | 3805 | { |
@@ -4006,7 +4008,7 @@ discard block |
||
| 4006 | 4008 | * Protect a session to be edited. |
| 4007 | 4009 | * @param int $id |
| 4008 | 4010 | * @param bool $checkSession |
| 4009 | - * @return mixed | bool true if pass the check, api_not_allowed otherwise |
|
| 4011 | + * @return boolean|null | bool true if pass the check, api_not_allowed otherwise |
|
| 4010 | 4012 | */ |
| 4011 | 4013 | public static function protectSession($id, $checkSession = true) |
| 4012 | 4014 | { |
@@ -4114,7 +4116,7 @@ discard block |
||
| 4114 | 4116 | |
| 4115 | 4117 | /** |
| 4116 | 4118 | * @param $id |
| 4117 | - * @return bool |
|
| 4119 | + * @return null|boolean |
|
| 4118 | 4120 | */ |
| 4119 | 4121 | public static function protect_teacher_session_edit($id) |
| 4120 | 4122 | { |
@@ -4179,7 +4181,7 @@ discard block |
||
| 4179 | 4181 | * true: if the session exists it will be updated. |
| 4180 | 4182 | * false: if session exists a new session will be created adding a counter session1, session2, etc |
| 4181 | 4183 | * @param int $defaultUserId |
| 4182 | - * @param mixed $logger |
|
| 4184 | + * @param Logger $logger |
|
| 4183 | 4185 | * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will |
| 4184 | 4186 | * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id') |
| 4185 | 4187 | * @param string $extraFieldId |
@@ -5482,7 +5484,6 @@ discard block |
||
| 5482 | 5484 | * @param string $lastConnectionDate |
| 5483 | 5485 | * @param array $sessionIdList |
| 5484 | 5486 | * @param array $studentIdList |
| 5485 | - * @param int $userStatus STUDENT|COURSEMANAGER constants |
|
| 5486 | 5487 | * |
| 5487 | 5488 | * @return array|int |
| 5488 | 5489 | */ |
@@ -5634,7 +5635,7 @@ discard block |
||
| 5634 | 5635 | /** |
| 5635 | 5636 | * Get the list of course tools that have to be dealt with in case of |
| 5636 | 5637 | * registering any course to a session |
| 5637 | - * @return array The list of tools to be dealt with (literal names) |
|
| 5638 | + * @return string[] The list of tools to be dealt with (literal names) |
|
| 5638 | 5639 | */ |
| 5639 | 5640 | public static function getCourseToolToBeManaged() |
| 5640 | 5641 | { |
@@ -5648,7 +5649,7 @@ discard block |
||
| 5648 | 5649 | * Calls the methods bound to each tool when a course is registered into a session |
| 5649 | 5650 | * @param int $sessionId |
| 5650 | 5651 | * @param int $courseId |
| 5651 | - * @return void |
|
| 5652 | + * @return boolean|null |
|
| 5652 | 5653 | */ |
| 5653 | 5654 | public static function installCourse($sessionId, $courseId) |
| 5654 | 5655 | { |
@@ -6288,6 +6289,7 @@ discard block |
||
| 6288 | 6289 | * @param int $categoryId The internal ID of the session category |
| 6289 | 6290 | * @param string $target Value to search for in the session field values |
| 6290 | 6291 | * @param array $extraFields A list of fields to be scanned and returned |
| 6292 | + * @param DateTime $publicationDate |
|
| 6291 | 6293 | * @return mixed |
| 6292 | 6294 | */ |
| 6293 | 6295 | public static function getShortSessionListAndExtraByCategory($categoryId, $target, $extraFields = null, $publicationDate = null) |
@@ -7618,7 +7620,7 @@ discard block |
||
| 7618 | 7620 | /** |
| 7619 | 7621 | * Get link to the admin page for this session |
| 7620 | 7622 | * @param int $id Session ID |
| 7621 | - * @return mixed URL to the admin page to manage the session, or false on error |
|
| 7623 | + * @return false|string URL to the admin page to manage the session, or false on error |
|
| 7622 | 7624 | */ |
| 7623 | 7625 | public static function getAdminPath($id) |
| 7624 | 7626 | { |
@@ -7635,7 +7637,7 @@ discard block |
||
| 7635 | 7637 | * If a course is provided, build the link to the course |
| 7636 | 7638 | * @param int $id Session ID |
| 7637 | 7639 | * @param int $courseId Course ID (optional) in case the link has to send straight to the course |
| 7638 | - * @return mixed URL to the page to use the session, or false on error |
|
| 7640 | + * @return false|string URL to the page to use the session, or false on error |
|
| 7639 | 7641 | */ |
| 7640 | 7642 | public static function getPath($id, $courseId = 0) |
| 7641 | 7643 | { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * provides a side connection to a vchamilo database |
| 147 | 147 | * @param array $_configuration |
| 148 | 148 | * |
| 149 | - * @return \Doctrine\DBAL\Driver\Connection |
|
| 149 | + * @return string |
|
| 150 | 150 | */ |
| 151 | 151 | public static function bootConnection(&$_configuration) |
| 152 | 152 | { |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | /** |
| 336 | 336 | * get a proper SQLdump command |
| 337 | - * @param object $vchamilodata the complete new host information |
|
| 337 | + * @param stdClass $vchamilodata the complete new host information |
|
| 338 | 338 | * @return string the shell command |
| 339 | 339 | */ |
| 340 | 340 | public static function getDatabaseDumpCmd($vchamilodata) |
@@ -418,8 +418,8 @@ discard block |
||
| 418 | 418 | |
| 419 | 419 | /** |
| 420 | 420 | * Backups a database for having a snapshot. |
| 421 | - * @param $vchamilo object The Vchamilo object. |
|
| 422 | - * @param $outputfilerad string The output SQL file radical. |
|
| 421 | + * @param stdClass $vchamilo object The Vchamilo object. |
|
| 422 | + * @param string $outputfilerad string The output SQL file radical. |
|
| 423 | 423 | * @return bool If TRUE, dumping database was a success, otherwise FALSE. |
| 424 | 424 | */ |
| 425 | 425 | public static function backupDatabase($vchamilo, $outputfilerad) |
@@ -581,6 +581,8 @@ discard block |
||
| 581 | 581 | * this function set will map standard moodle API calls to chamilo |
| 582 | 582 | * internal primitives. This avoids too many changes to do in imported |
| 583 | 583 | * code |
| 584 | + * @param string $module |
|
| 585 | + * @param string $key |
|
| 584 | 586 | */ |
| 585 | 587 | public static function getConfig($module, $key, $isplugin = true) |
| 586 | 588 | { |
@@ -660,7 +662,7 @@ discard block |
||
| 660 | 662 | /** |
| 661 | 663 | * @param string $path |
| 662 | 664 | * |
| 663 | - * @return mixed |
|
| 665 | + * @return string |
|
| 664 | 666 | */ |
| 665 | 667 | public static function chopLastSlash($path) |
| 666 | 668 | { |
@@ -812,7 +814,7 @@ discard block |
||
| 812 | 814 | } |
| 813 | 815 | |
| 814 | 816 | /** |
| 815 | - * @param object $instance |
|
| 817 | + * @param stdClass $instance |
|
| 816 | 818 | * @return \Doctrine\DBAL\Connection |
| 817 | 819 | */ |
| 818 | 820 | public static function getConnectionFromInstance($instance, $getManager = false) |
@@ -1254,7 +1256,7 @@ discard block |
||
| 1254 | 1256 | /** |
| 1255 | 1257 | * @param stdClass $instance |
| 1256 | 1258 | * |
| 1257 | - * @return bool|string returns the original version of the app |
|
| 1259 | + * @return string|false returns the original version of the app |
|
| 1258 | 1260 | */ |
| 1259 | 1261 | public static function canBeUpgraded($instance) |
| 1260 | 1262 | { |