@@ -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 $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)) { |
@@ -640,10 +640,10 @@ discard block |
||
640 | 640 | /** |
641 | 641 | * Insert message between Users and Admins |
642 | 642 | * @param $ticket_id |
643 | - * @param $subject |
|
644 | - * @param $content |
|
643 | + * @param string $subject |
|
644 | + * @param string $content |
|
645 | 645 | * @param $file_attachments |
646 | - * @param $user_id |
|
646 | + * @param integer $user_id |
|
647 | 647 | * @param string $status |
648 | 648 | * @param bool $sendConfirmation |
649 | 649 | * @return bool |
@@ -737,9 +737,9 @@ discard block |
||
737 | 737 | /** |
738 | 738 | * Attachment files when a message is sent |
739 | 739 | * @param $file_attach |
740 | - * @param $ticket_id |
|
741 | - * @param $message_id |
|
742 | - * @param $message_attch_id |
|
740 | + * @param integer $ticket_id |
|
741 | + * @param integer $message_id |
|
742 | + * @param integer $message_attch_id |
|
743 | 743 | * @return array |
744 | 744 | */ |
745 | 745 | public static function save_message_attachment_file( |
@@ -2017,7 +2017,7 @@ discard block |
||
2017 | 2017 | } |
2018 | 2018 | |
2019 | 2019 | /** |
2020 | - * @param $id |
|
2020 | + * @param integer $id |
|
2021 | 2021 | * @return Project |
2022 | 2022 | */ |
2023 | 2023 | public static function getProject($id) |
@@ -2137,7 +2137,7 @@ discard block |
||
2137 | 2137 | } |
2138 | 2138 | |
2139 | 2139 | /** |
2140 | - * @param $id |
|
2140 | + * @param integer $id |
|
2141 | 2141 | * @return Project |
2142 | 2142 | */ |
2143 | 2143 | public static function getStatus($id) |
@@ -2260,7 +2260,7 @@ discard block |
||
2260 | 2260 | } |
2261 | 2261 | |
2262 | 2262 | /** |
2263 | - * @param $id |
|
2263 | + * @param integer $id |
|
2264 | 2264 | * @return Priority |
2265 | 2265 | */ |
2266 | 2266 | public static function getPriority($id) |
@@ -2330,7 +2330,7 @@ discard block |
||
2330 | 2330 | } |
2331 | 2331 | |
2332 | 2332 | /** |
2333 | - * @return array |
|
2333 | + * @return string[] |
|
2334 | 2334 | */ |
2335 | 2335 | public static function getDefaultStatusList() { |
2336 | 2336 | return [ |
@@ -2343,7 +2343,7 @@ discard block |
||
2343 | 2343 | } |
2344 | 2344 | |
2345 | 2345 | /** |
2346 | - * @return array |
|
2346 | + * @return string[] |
|
2347 | 2347 | */ |
2348 | 2348 | public static function getDefaultPriorityList() { |
2349 | 2349 | return [ |
@@ -573,14 +573,14 @@ |
||
573 | 573 | * @param int $allDay is all day 'true' or 'false' |
574 | 574 | * @param string $title |
575 | 575 | * @param string $content |
576 | - * @param array $usersToSend |
|
576 | + * @param string[] $usersToSend |
|
577 | 577 | * @param array $attachmentArray |
578 | 578 | * @param array $attachmentCommentList |
579 | 579 | * @param string $comment |
580 | 580 | * @param string $color |
581 | 581 | * @param bool $addAnnouncement |
582 | 582 | * |
583 | - * @return null|false |
|
583 | + * @return null|boolean |
|
584 | 584 | */ |
585 | 585 | public function editEvent( |
586 | 586 | $id, |
@@ -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 | { |
@@ -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 | { |
@@ -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 | { |
@@ -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) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * This function is used with $extraField->addElements() |
76 | 76 | * @param array $params array for the insertion into the *_field_values table |
77 | 77 | * @param bool $showQuery |
78 | - * @return mixed false on empty params, void otherwise |
|
78 | + * @return false|null false on empty params, void otherwise |
|
79 | 79 | * @assert (array()) === false |
80 | 80 | */ |
81 | 81 | public function saveFieldValues($params, $showQuery = false) |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
532 | 532 | * @param int $field_id Field ID (the ID from the *_field table) |
533 | 533 | * @param bool $transform Whether to transform the result to a human readable strings |
534 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
534 | + * @return string A structured array with the field_id and field_value, or false on error |
|
535 | 535 | * @assert (-1,-1) === false |
536 | 536 | */ |
537 | 537 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | * @param int $item_id Item ID from the original table |
625 | 625 | * @param string $field_variable The name of the field we are looking for |
626 | 626 | * @param bool $transform |
627 | - * @param bool $allVisibility |
|
627 | + * @param bool $visibility |
|
628 | 628 | * |
629 | 629 | * @return mixed Array of results, or false on error or not found |
630 | 630 | * @assert (-1,'') === false |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | * @param string $field_value Data we are looking for in the given field |
687 | 687 | * @param bool $transform Whether to transform the result to a human readable strings |
688 | 688 | * @param bool $last Whether to return the last element or simply the first one we get |
689 | - * @return mixed Give the ID if found, or false on failure or not found |
|
689 | + * @return string|null Give the ID if found, or false on failure or not found |
|
690 | 690 | * @assert (-1,-1) === false |
691 | 691 | */ |
692 | 692 | public function get_item_id_from_field_variable_and_field_value( |