@@ -498,7 +498,7 @@ |
||
| 498 | 498 | * @param int User id |
| 499 | 499 | * @param string plugin path |
| 500 | 500 | * @param integer $user_id |
| 501 | - * @return bool |
|
| 501 | + * @return false|string |
|
| 502 | 502 | */ |
| 503 | 503 | public static function close_user_block($user_id, $path) |
| 504 | 504 | { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @return array |
|
| 23 | + * @return string[] |
|
| 24 | 24 | */ |
| 25 | 25 | public static function get_tags() |
| 26 | 26 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param string $course_code |
| 43 | 43 | * @param int $session_id |
| 44 | 44 | * |
| 45 | - * @return mixed |
|
| 45 | + * @return string |
|
| 46 | 46 | */ |
| 47 | 47 | public static function parse_content($userId, $content, $course_code, $session_id = 0) |
| 48 | 48 | { |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | * @param int $courseId |
| 192 | 192 | * @param int $userId |
| 193 | 193 | * |
| 194 | - * @return array |
|
| 194 | + * @return integer |
|
| 195 | 195 | */ |
| 196 | 196 | public static function getAnnouncementInfoById($announcementId, $courseId, $userId) |
| 197 | 197 | { |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | * @param string $file_comment Comment describing the attachment |
| 401 | 401 | * @param string $end_date |
| 402 | 402 | * @param bool $sendToUsersInSession |
| 403 | - * @return int false on failure, ID of the announcement on success |
|
| 403 | + * @return false|string false on failure, ID of the announcement on success |
|
| 404 | 404 | */ |
| 405 | 405 | public static function add_announcement( |
| 406 | 406 | $emailTitle, |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | * @param string $file_comment |
| 512 | 512 | * @param bool $sendToUsersInSession |
| 513 | 513 | * |
| 514 | - * @return bool|int |
|
| 514 | + * @return false|string |
|
| 515 | 515 | */ |
| 516 | 516 | public static function add_group_announcement( |
| 517 | 517 | $emailTitle, |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | |
| 754 | 754 | /** |
| 755 | 755 | * @param int $insert_id |
| 756 | - * @return bool |
|
| 756 | + * @return false|null |
|
| 757 | 757 | */ |
| 758 | 758 | public static function update_mail_sent($insert_id) |
| 759 | 759 | { |
@@ -773,6 +773,7 @@ discard block |
||
| 773 | 773 | * Gets all announcements from a user by course |
| 774 | 774 | * @param string course db |
| 775 | 775 | * @param int user id |
| 776 | + * @param integer $user_id |
|
| 776 | 777 | * @return array html with the content and count of announcements or false otherwise |
| 777 | 778 | */ |
| 778 | 779 | public static function get_all_annoucement_by_user_course($course_code, $user_id) |
@@ -1018,6 +1019,7 @@ discard block |
||
| 1018 | 1019 | * has been sent to |
| 1019 | 1020 | * @param string The tool (announcement, agenda, ...) |
| 1020 | 1021 | * @param int ID of the element of the corresponding type |
| 1022 | + * @param string $tool |
|
| 1021 | 1023 | * @return array Array of users and groups to whom the element has been sent |
| 1022 | 1024 | */ |
| 1023 | 1025 | public static function sent_to($tool, $id) |
@@ -1088,6 +1090,7 @@ discard block |
||
| 1088 | 1090 | * @param int announcement id |
| 1089 | 1091 | * @param string file comment |
| 1090 | 1092 | * @param array uploaded file $_FILES |
| 1093 | + * @param string|null $file_comment |
|
| 1091 | 1094 | * @return int -1 if failed, 0 if unknown (should not happen), 1 if success |
| 1092 | 1095 | */ |
| 1093 | 1096 | public static function add_announcement_attachment_file($announcement_id, $file_comment, $file) |
@@ -1146,6 +1149,8 @@ discard block |
||
| 1146 | 1149 | * @param int attach id |
| 1147 | 1150 | * @param array uploaded file $_FILES |
| 1148 | 1151 | * @param string file comment |
| 1152 | + * @param integer $id_attach |
|
| 1153 | + * @param string $file_comment |
|
| 1149 | 1154 | * @return int |
| 1150 | 1155 | */ |
| 1151 | 1156 | public static function edit_announcement_attachment_file($id_attach, $file, $file_comment) |
@@ -1440,7 +1440,7 @@ discard block |
||
| 1440 | 1440 | * Get first connection date for a student |
| 1441 | 1441 | * @param int $student_id |
| 1442 | 1442 | * |
| 1443 | - * @return string|bool Date format long without day or false if there are no connections |
|
| 1443 | + * @return string|false Date format long without day or false if there are no connections |
|
| 1444 | 1444 | */ |
| 1445 | 1445 | public static function get_first_connection_date($student_id) |
| 1446 | 1446 | { |
@@ -1470,7 +1470,7 @@ discard block |
||
| 1470 | 1470 | * @param int $student_id |
| 1471 | 1471 | * @param bool $warning_message Show a warning message (optional) |
| 1472 | 1472 | * @param bool $return_timestamp True for returning results in timestamp (optional) |
| 1473 | - * @return string|int|bool Date format long without day, false if there are no connections or |
|
| 1473 | + * @return string Date format long without day, false if there are no connections or |
|
| 1474 | 1474 | * timestamp if parameter $return_timestamp is true |
| 1475 | 1475 | */ |
| 1476 | 1476 | public static function get_last_connection_date($student_id, $warning_message = false, $return_timestamp = false) |
@@ -2795,6 +2795,9 @@ discard block |
||
| 2795 | 2795 | * @param array Limit average to listed lp ids |
| 2796 | 2796 | * @param int Session id (optional), if param $session_id is |
| 2797 | 2797 | * null(default) it'll return results including sessions, 0 = session is not filtered |
| 2798 | + * @param integer $student_id |
|
| 2799 | + * @param string $course_code |
|
| 2800 | + * @param integer $session_id |
|
| 2798 | 2801 | * @return int Total time |
| 2799 | 2802 | */ |
| 2800 | 2803 | public static function get_time_spent_in_lp($student_id, $course_code, $lp_ids = array(), $session_id = null) |
@@ -2864,6 +2867,8 @@ discard block |
||
| 2864 | 2867 | * @param int|array Student id(s) |
| 2865 | 2868 | * @param string Course code |
| 2866 | 2869 | * @param int Learning path id |
| 2870 | + * @param integer $student_id |
|
| 2871 | + * @param string $course_code |
|
| 2867 | 2872 | * @return int Total time |
| 2868 | 2873 | */ |
| 2869 | 2874 | public static function get_last_connection_time_in_lp($student_id, $course_code, $lp_id, $session_id = 0) |
@@ -5586,7 +5591,7 @@ discard block |
||
| 5586 | 5591 | |
| 5587 | 5592 | /** |
| 5588 | 5593 | * @param FormValidator $form |
| 5589 | - * @return mixed |
|
| 5594 | + * @return FormValidator |
|
| 5590 | 5595 | */ |
| 5591 | 5596 | public static function setUserSearchForm($form) |
| 5592 | 5597 | { |
@@ -7187,7 +7192,7 @@ discard block |
||
| 7187 | 7192 | * @param int $user_id |
| 7188 | 7193 | * @param int $course_id |
| 7189 | 7194 | * @param int $session_id |
| 7190 | - * @return array |
|
| 7195 | + * @return string[] |
|
| 7191 | 7196 | */ |
| 7192 | 7197 | public function display_login_tracking_info($view, $user_id, $course_id, $session_id = 0) |
| 7193 | 7198 | { |
@@ -7233,9 +7238,9 @@ discard block |
||
| 7233 | 7238 | /** |
| 7234 | 7239 | * Displays the exercise results for a specific user in a specific course. |
| 7235 | 7240 | * @param string $view |
| 7236 | - * @param int $user_id User ID |
|
| 7241 | + * @param int $userId User ID |
|
| 7237 | 7242 | * @param string $courseCode Course code |
| 7238 | - * @return array |
|
| 7243 | + * @return string[] |
|
| 7239 | 7244 | * @todo remove globals |
| 7240 | 7245 | */ |
| 7241 | 7246 | public function display_exercise_tracking_info($view, $userId, $courseCode) |
@@ -51,7 +51,8 @@ |
||
| 51 | 51 | * @param string $objetives |
| 52 | 52 | * @param string $target_audience |
| 53 | 53 | * @param int $user_id |
| 54 | - * @return mixed The database id of the newly created course request or FALSE on failure. |
|
| 54 | + * @param boolean $exemplary_content |
|
| 55 | + * @return false|string The database id of the newly created course request or FALSE on failure. |
|
| 55 | 56 | */ |
| 56 | 57 | public static function create_course_request( |
| 57 | 58 | $wanted_code, |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * @return bool |
|
| 41 | + * @return false|null |
|
| 42 | 42 | */ |
| 43 | 43 | public function create_user_folder() |
| 44 | 44 | { |
@@ -599,6 +599,8 @@ discard block |
||
| 599 | 599 | * @param int message id |
| 600 | 600 | * @param int message user id (receiver user id or sender user id) |
| 601 | 601 | * @param int group id (optional) |
| 602 | + * @param integer $message_id |
|
| 603 | + * @param integer $message_uid |
|
| 602 | 604 | * @return void |
| 603 | 605 | */ |
| 604 | 606 | public static function delete_message_attachment_file($message_id, $message_uid, $group_id = 0) |
@@ -643,7 +645,7 @@ discard block |
||
| 643 | 645 | * update messages by user id and message id |
| 644 | 646 | * @param int $user_id |
| 645 | 647 | * @param int $message_id |
| 646 | - * @return resource |
|
| 648 | + * @return false|null |
|
| 647 | 649 | */ |
| 648 | 650 | public static function update_message($user_id, $message_id) |
| 649 | 651 | { |
@@ -663,7 +665,7 @@ discard block |
||
| 663 | 665 | * @param int $user_id |
| 664 | 666 | * @param int $message_id |
| 665 | 667 | * @param string $type |
| 666 | - * @return bool |
|
| 668 | + * @return false|null |
|
| 667 | 669 | */ |
| 668 | 670 | public static function update_message_status($user_id, $message_id, $type) |
| 669 | 671 | { |
@@ -701,6 +703,7 @@ discard block |
||
| 701 | 703 | /** |
| 702 | 704 | * get messages by group id |
| 703 | 705 | * @param int group id |
| 706 | + * @param integer $group_id |
|
| 704 | 707 | * @return array |
| 705 | 708 | */ |
| 706 | 709 | public static function get_messages_by_group($group_id) |
@@ -1479,7 +1482,7 @@ discard block |
||
| 1479 | 1482 | * Sort date by desc from a multi-dimensional array |
| 1480 | 1483 | * @param array $array1 first array to compare |
| 1481 | 1484 | * @param array $array2 second array to compare |
| 1482 | - * @return bool |
|
| 1485 | + * @return integer |
|
| 1483 | 1486 | */ |
| 1484 | 1487 | public function order_desc_date($array1, $array2) |
| 1485 | 1488 | { |
@@ -1541,7 +1544,7 @@ discard block |
||
| 1541 | 1544 | } |
| 1542 | 1545 | |
| 1543 | 1546 | /** |
| 1544 | - * @param $id |
|
| 1547 | + * @param string $id |
|
| 1545 | 1548 | * @param array $params |
| 1546 | 1549 | * @return string |
| 1547 | 1550 | */ |
@@ -1555,7 +1558,7 @@ discard block |
||
| 1555 | 1558 | } |
| 1556 | 1559 | |
| 1557 | 1560 | /** |
| 1558 | - * @param $id |
|
| 1561 | + * @param string $id |
|
| 1559 | 1562 | * @param array $params |
| 1560 | 1563 | * @return string |
| 1561 | 1564 | */ |
@@ -209,11 +209,11 @@ discard block |
||
| 209 | 209 | /** |
| 210 | 210 | * Gives a list of people online now (and in the last $valid minutes) |
| 211 | 211 | * |
| 212 | - * @param $from |
|
| 212 | + * @param integer $from |
|
| 213 | 213 | * @param $number_of_items |
| 214 | 214 | * @param null $column |
| 215 | 215 | * @param null $direction |
| 216 | - * @param null $time_limit |
|
| 216 | + * @param integer $time_limit |
|
| 217 | 217 | * @param bool $friends |
| 218 | 218 | * @return array|bool For each line, a list of user IDs and login dates, or FALSE on error or empty results |
| 219 | 219 | */ |
@@ -320,6 +320,9 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | +/** |
|
| 324 | + * @param string $time_limit |
|
| 325 | + */ |
|
| 323 | 326 | function who_is_online_count($time_limit = null, $friends = false) |
| 324 | 327 | { |
| 325 | 328 | if (empty($time_limit)) { |
@@ -436,6 +439,10 @@ discard block |
||
| 436 | 439 | } |
| 437 | 440 | } |
| 438 | 441 | |
| 442 | +/** |
|
| 443 | + * @param integer $uid |
|
| 444 | + * @param string|null $time_limit |
|
| 445 | + */ |
|
| 439 | 446 | function who_is_online_in_this_course_count($uid, $time_limit, $coursecode=null) |
| 440 | 447 | { |
| 441 | 448 | if (empty($coursecode)) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | /** |
| 287 | 287 | * @param $item |
| 288 | - * @param $ignore_score_color |
|
| 288 | + * @param boolean $ignore_score_color |
|
| 289 | 289 | * @return string |
| 290 | 290 | */ |
| 291 | 291 | private function build_average_column($item, $ignore_score_color) |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | /** |
| 308 | 308 | * @param $item |
| 309 | - * @param $ignore_score_color |
|
| 309 | + * @param boolean $ignore_score_color |
|
| 310 | 310 | * @return string |
| 311 | 311 | */ |
| 312 | 312 | private function build_result_column($item, $ignore_score_color) |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | /** |
| 325 | 325 | * @param $item |
| 326 | - * @param $ignore_score_color |
|
| 326 | + * @param boolean $ignore_score_color |
|
| 327 | 327 | * @return string |
| 328 | 328 | */ |
| 329 | 329 | private function build_mask_column($item, $ignore_score_color) |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | |
| 340 | 340 | /** |
| 341 | 341 | * @param $coursecode |
| 342 | - * @return mixed |
|
| 342 | + * @return string |
|
| 343 | 343 | */ |
| 344 | 344 | private function get_course_name_from_code_cached($coursecode) |
| 345 | 345 | { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | 127 | * Get variables and categories as in 1.11.x |
| 128 | - * @return array |
|
| 128 | + * @return string |
|
| 129 | 129 | */ |
| 130 | 130 | public function getVariablesAndCategories() |
| 131 | 131 | { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | /** |
| 429 | 429 | * Rename old variable with variable used in Chamilo 2.0 |
| 430 | 430 | * @param string $variable |
| 431 | - * @return mixed |
|
| 431 | + * @return string |
|
| 432 | 432 | */ |
| 433 | 433 | public function renameVariable($variable) |
| 434 | 434 | { |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | * Replace old Chamilo 1.x category with 2.0 version |
| 465 | 465 | * @param string $variable |
| 466 | 466 | * @param string $defaultCategory |
| 467 | - * @return mixed |
|
| 467 | + * @return string |
|
| 468 | 468 | */ |
| 469 | 469 | public function fixCategory($variable, $defaultCategory) |
| 470 | 470 | { |
@@ -558,8 +558,8 @@ discard block |
||
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | /** |
| 561 | - * @param $name |
|
| 562 | - * @return mixed |
|
| 561 | + * @param string $name |
|
| 562 | + * @return string |
|
| 563 | 563 | * @throws \InvalidArgumentException |
| 564 | 564 | */ |
| 565 | 565 | public function getSetting($name) |
@@ -843,6 +843,9 @@ discard block |
||
| 843 | 843 | return $parameters; |
| 844 | 844 | } |
| 845 | 845 | |
| 846 | + /** |
|
| 847 | + * @param string $namespace |
|
| 848 | + */ |
|
| 846 | 849 | public function getParametersFromKeyword($namespace, $keyword = '') |
| 847 | 850 | { |
| 848 | 851 | $criteria = array('category' => $namespace); |