@@ -25,6 +25,7 @@ |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Useful finder - experimental akelos like only use in notification.lib.php send function |
28 | + * @param string $type |
|
28 | 29 | */ |
29 | 30 | public function find($type, $options = null) |
30 | 31 | { |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | /** |
196 | 196 | * Get parentId |
197 | 197 | * |
198 | - * @return boolean |
|
198 | + * @return integer |
|
199 | 199 | */ |
200 | 200 | public function getParentId() |
201 | 201 | { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * Get id |
207 | 207 | * |
208 | - * @return boolean |
|
208 | + * @return integer |
|
209 | 209 | */ |
210 | 210 | public function getId() |
211 | 211 | { |
@@ -1869,7 +1869,7 @@ discard block |
||
1869 | 1869 | |
1870 | 1870 | /** |
1871 | 1871 | * Get the extra terms (tags) that identify this item |
1872 | - * @return mixed |
|
1872 | + * @return string |
|
1873 | 1873 | */ |
1874 | 1874 | public function get_terms() |
1875 | 1875 | { |
@@ -2069,7 +2069,7 @@ discard block |
||
2069 | 2069 | |
2070 | 2070 | /** |
2071 | 2071 | * Opens/launches the item. Initialises runtime values. |
2072 | - * @return boolean True on success, false on failure. |
|
2072 | + * @return boolean|null True on success, false on failure. |
|
2073 | 2073 | */ |
2074 | 2074 | public function open($allow_new_attempt = false) |
2075 | 2075 | { |
@@ -3504,7 +3504,7 @@ discard block |
||
3504 | 3504 | |
3505 | 3505 | /** |
3506 | 3506 | * Checks if the current status is part of the list of status given |
3507 | - * @param array $list An array of status to check for. |
|
3507 | + * @param string[] $list An array of status to check for. |
|
3508 | 3508 | * If the current status is one of the strings, return true |
3509 | 3509 | * |
3510 | 3510 | * @return boolean True if the status was one of the given strings, |
@@ -3681,7 +3681,7 @@ discard block |
||
3681 | 3681 | /** |
3682 | 3682 | * Write objectives to DB. This method is separate from write_to_db() because otherwise |
3683 | 3683 | * objectives are lost as a side effect to AJAX and session concurrent access |
3684 | - * @return boolean True or false on error |
|
3684 | + * @return boolean|null True or false on error |
|
3685 | 3685 | */ |
3686 | 3686 | public function write_objectives_to_db() |
3687 | 3687 | { |
@@ -4322,7 +4322,7 @@ discard block |
||
4322 | 4322 | * Removes the relation between the current item and an audio file. The file |
4323 | 4323 | * is only removed from the lp_item table, but remains in the document table |
4324 | 4324 | * and directory |
4325 | - * @return bool |
|
4325 | + * @return false|null |
|
4326 | 4326 | */ |
4327 | 4327 | public function remove_audio() |
4328 | 4328 | { |
@@ -1415,7 +1415,7 @@ discard block |
||
1415 | 1415 | |
1416 | 1416 | /** |
1417 | 1417 | * Get the emoji list to include in chat |
1418 | - * @return array |
|
1418 | + * @return string[] |
|
1419 | 1419 | */ |
1420 | 1420 | public static function getEmojisToInclude() |
1421 | 1421 | { |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | |
1739 | 1739 | /** |
1740 | 1740 | * Get the number of users connected in chat |
1741 | - * @return mixed |
|
1741 | + * @return integer |
|
1742 | 1742 | */ |
1743 | 1743 | public function countUsersOnline() |
1744 | 1744 | { |
@@ -1073,8 +1073,8 @@ |
||
1073 | 1073 | |
1074 | 1074 | /** |
1075 | 1075 | * Get li HTML of page number |
1076 | - * @param $pageNumber |
|
1077 | - * @param $pageLength |
|
1076 | + * @param integer $pageNumber |
|
1077 | + * @param integer $pageLength |
|
1078 | 1078 | * @param array $liAttributes |
1079 | 1079 | * @param string $content |
1080 | 1080 | * @return string |
@@ -1334,9 +1334,9 @@ discard block |
||
1334 | 1334 | * @param integer $sessionCategoryId |
1335 | 1335 | * @param int $visibility |
1336 | 1336 | * @param string $description |
1337 | - * @param bool $showDescription |
|
1337 | + * @param integer $showDescription |
|
1338 | 1338 | * @param int $duration |
1339 | - * @param array $extraFields |
|
1339 | + * @param boolean|null $extraFields |
|
1340 | 1340 | * @param int $sessionAdminId |
1341 | 1341 | * @param boolean $sendSubscriptionNotification Optional. |
1342 | 1342 | * Whether send a mail notification to users being subscribed |
@@ -1565,7 +1565,7 @@ discard block |
||
1565 | 1565 | * @param array $user_list |
1566 | 1566 | * @param int $session_visibility |
1567 | 1567 | * @param bool $empty_users |
1568 | - * @return bool |
|
1568 | + * @return false|null |
|
1569 | 1569 | */ |
1570 | 1570 | public static function suscribe_users_to_session( |
1571 | 1571 | $id_session, |
@@ -1837,7 +1837,7 @@ discard block |
||
1837 | 1837 | * @param array $courseInfo |
1838 | 1838 | * @param int $status |
1839 | 1839 | * @param bool $updateTotal |
1840 | - * @return bool |
|
1840 | + * @return false|null |
|
1841 | 1841 | */ |
1842 | 1842 | public static function removeUsersFromCourseSession( |
1843 | 1843 | $userList, |
@@ -1903,7 +1903,7 @@ discard block |
||
1903 | 1903 | * @param string $course_code |
1904 | 1904 | * @param int $session_visibility |
1905 | 1905 | * @param bool $removeUsersNotInList |
1906 | - * @return bool |
|
1906 | + * @return false|null |
|
1907 | 1907 | */ |
1908 | 1908 | public static function subscribe_users_to_session_course( |
1909 | 1909 | $user_list, |
@@ -2086,7 +2086,7 @@ discard block |
||
2086 | 2086 | * @param bool $removeExistingCoursesWithUsers Whether to unsubscribe |
2087 | 2087 | * existing courses and users (true, default) or not (false) |
2088 | 2088 | * @param $copyEvaluation from base course to session course |
2089 | - * @return void Nothing, or false on error |
|
2089 | + * @return false|null Nothing, or false on error |
|
2090 | 2090 | * */ |
2091 | 2091 | public static function add_courses_to_session( |
2092 | 2092 | $sessionId, |
@@ -2282,6 +2282,8 @@ discard block |
||
2282 | 2282 | * |
2283 | 2283 | * @param int Session id |
2284 | 2284 | * @param int Course id |
2285 | + * @param integer $session_id |
|
2286 | + * @param integer $course_id |
|
2285 | 2287 | * @return bool True in case of success, false otherwise |
2286 | 2288 | */ |
2287 | 2289 | public static function unsubscribe_course_from_session($session_id, $course_id) |
@@ -2337,7 +2339,7 @@ discard block |
||
2337 | 2339 | * @param string $variable Field's internal variable name |
2338 | 2340 | * @param int $fieldType Field's type |
2339 | 2341 | * @param string $displayText Field's language var name |
2340 | - * @return int new extra field id |
|
2342 | + * @return boolean new extra field id |
|
2341 | 2343 | */ |
2342 | 2344 | public static function create_session_extra_field($variable, $fieldType, $displayText) |
2343 | 2345 | { |
@@ -2356,7 +2358,7 @@ discard block |
||
2356 | 2358 | * @param integer Course ID |
2357 | 2359 | * @param string Field variable name |
2358 | 2360 | * @param string Field value |
2359 | - * @return boolean true if field updated, false otherwise |
|
2361 | + * @return boolean|null true if field updated, false otherwise |
|
2360 | 2362 | */ |
2361 | 2363 | public static function update_session_extra_field_value($sessionId, $variable, $value = '') |
2362 | 2364 | { |
@@ -2561,7 +2563,7 @@ discard block |
||
2561 | 2563 | * @param array id_checked |
2562 | 2564 | * @param bool include delete session |
2563 | 2565 | * @param bool optional, true if the function is called by a webservice, false otherwise. |
2564 | - * @return void Nothing, or false on error |
|
2566 | + * @return boolean Nothing, or false on error |
|
2565 | 2567 | * The parameters is a array to delete sessions |
2566 | 2568 | * */ |
2567 | 2569 | public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false) |
@@ -3056,6 +3058,7 @@ discard block |
||
3056 | 3058 | * @param string $orderCondition |
3057 | 3059 | * @param string $keyword |
3058 | 3060 | * @param string $description |
3061 | + * @param integer $status |
|
3059 | 3062 | * @return array sessions |
3060 | 3063 | */ |
3061 | 3064 | public static function getSessionsFollowedByUser( |
@@ -3268,8 +3271,8 @@ discard block |
||
3268 | 3271 | /** |
3269 | 3272 | * Gets the list of courses by session filtered by access_url |
3270 | 3273 | * |
3271 | - * @param $userId |
|
3272 | - * @param $sessionId |
|
3274 | + * @param integer $userId |
|
3275 | + * @param null|integer $sessionId |
|
3273 | 3276 | * @param null $from |
3274 | 3277 | * @param null $limit |
3275 | 3278 | * @param null $column |
@@ -3394,6 +3397,7 @@ discard block |
||
3394 | 3397 | /** |
3395 | 3398 | * Gets the count of courses by session filtered by access_url |
3396 | 3399 | * @param int session id |
3400 | + * @param integer $session_id |
|
3397 | 3401 | * @return array list of courses |
3398 | 3402 | */ |
3399 | 3403 | public static function getCourseCountBySessionId($session_id, $keyword = null) |
@@ -3645,6 +3649,7 @@ discard block |
||
3645 | 3649 | * Updates a session status |
3646 | 3650 | * @param int session id |
3647 | 3651 | * @param int status |
3652 | + * @param integer $status |
|
3648 | 3653 | */ |
3649 | 3654 | public static function set_session_status($session_id, $status) |
3650 | 3655 | { |
@@ -3853,7 +3858,7 @@ discard block |
||
3853 | 3858 | * Protect a session to be edited. |
3854 | 3859 | * @param int $id |
3855 | 3860 | * @param bool $checkSession |
3856 | - * @return mixed | bool true if pass the check, api_not_allowed otherwise |
|
3861 | + * @return boolean|null | bool true if pass the check, api_not_allowed otherwise |
|
3857 | 3862 | */ |
3858 | 3863 | public static function protectSession($id, $checkSession = true) |
3859 | 3864 | { |
@@ -3961,7 +3966,7 @@ discard block |
||
3961 | 3966 | |
3962 | 3967 | /** |
3963 | 3968 | * @param $id |
3964 | - * @return bool |
|
3969 | + * @return null|boolean |
|
3965 | 3970 | */ |
3966 | 3971 | public static function protect_teacher_session_edit($id) |
3967 | 3972 | { |
@@ -4025,7 +4030,7 @@ discard block |
||
4025 | 4030 | * true: if the session exists it will be updated. |
4026 | 4031 | * false: if session exists a new session will be created adding a counter session1, session2, etc |
4027 | 4032 | * @param int $defaultUserId |
4028 | - * @param mixed $logger |
|
4033 | + * @param Logger $logger |
|
4029 | 4034 | * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will |
4030 | 4035 | * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id') |
4031 | 4036 | * @param string $extraFieldId |
@@ -5267,7 +5272,6 @@ discard block |
||
5267 | 5272 | * @param string $lastConnectionDate |
5268 | 5273 | * @param array $sessionIdList |
5269 | 5274 | * @param array $studentIdList |
5270 | - * @param int $userStatus STUDENT|COURSEMANAGER constants |
|
5271 | 5275 | * |
5272 | 5276 | * @return array|int |
5273 | 5277 | */ |
@@ -5419,7 +5423,7 @@ discard block |
||
5419 | 5423 | /** |
5420 | 5424 | * Get the list of course tools that have to be dealt with in case of |
5421 | 5425 | * registering any course to a session |
5422 | - * @return array The list of tools to be dealt with (literal names) |
|
5426 | + * @return string[] The list of tools to be dealt with (literal names) |
|
5423 | 5427 | */ |
5424 | 5428 | public static function getCourseToolToBeManaged() |
5425 | 5429 | { |
@@ -5433,7 +5437,7 @@ discard block |
||
5433 | 5437 | * Calls the methods bound to each tool when a course is registered into a session |
5434 | 5438 | * @param int $sessionId |
5435 | 5439 | * @param int $courseId |
5436 | - * @return void |
|
5440 | + * @return boolean|null |
|
5437 | 5441 | */ |
5438 | 5442 | public static function installCourse($sessionId, $courseId) |
5439 | 5443 | { |
@@ -6073,6 +6077,7 @@ discard block |
||
6073 | 6077 | * @param int $categoryId The internal ID of the session category |
6074 | 6078 | * @param string $target Value to search for in the session field values |
6075 | 6079 | * @param array $extraFields A list of fields to be scanned and returned |
6080 | + * @param DateTime $publicationDate |
|
6076 | 6081 | * @return mixed |
6077 | 6082 | */ |
6078 | 6083 | public static function getShortSessionListAndExtraByCategory($categoryId, $target, $extraFields = null, $publicationDate = null) |
@@ -7402,7 +7407,7 @@ discard block |
||
7402 | 7407 | /** |
7403 | 7408 | * Get link to the admin page for this session |
7404 | 7409 | * @param int $id Session ID |
7405 | - * @return mixed URL to the admin page to manage the session, or false on error |
|
7410 | + * @return false|string URL to the admin page to manage the session, or false on error |
|
7406 | 7411 | */ |
7407 | 7412 | public static function getAdminPath($id) |
7408 | 7413 | { |
@@ -7419,7 +7424,7 @@ discard block |
||
7419 | 7424 | * If a course is provided, build the link to the course |
7420 | 7425 | * @param int $id Session ID |
7421 | 7426 | * @param int $courseId Course ID (optional) in case the link has to send straight to the course |
7422 | - * @return mixed URL to the page to use the session, or false on error |
|
7427 | + * @return false|string URL to the page to use the session, or false on error |
|
7423 | 7428 | */ |
7424 | 7429 | public static function getPath($id, $courseId = 0) |
7425 | 7430 | { |
@@ -7517,7 +7522,7 @@ discard block |
||
7517 | 7522 | /** |
7518 | 7523 | * Return true if coach is allowed to access this session |
7519 | 7524 | * @param int $sessionId |
7520 | - * @return bool |
|
7525 | + * @return integer |
|
7521 | 7526 | */ |
7522 | 7527 | public static function isSessionDateOkForCoach($sessionId) |
7523 | 7528 | { |
@@ -682,6 +682,7 @@ discard block |
||
682 | 682 | * retrieves all the courses that the user has already subscribed to |
683 | 683 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
684 | 684 | * @param int $user_id: the id of the user |
685 | + * @param integer $user_id |
|
685 | 686 | * @return array an array containing all the information of the courses of the given user |
686 | 687 | */ |
687 | 688 | public function get_courses_of_user($user_id) |
@@ -732,8 +733,8 @@ discard block |
||
732 | 733 | |
733 | 734 | /** |
734 | 735 | * @todo use the template system |
735 | - * @param $title |
|
736 | - * @param $content |
|
736 | + * @param string|null $title |
|
737 | + * @param string $content |
|
737 | 738 | * @param string $id |
738 | 739 | * @param array $params |
739 | 740 | * @param string $idAccordion |
@@ -1704,8 +1705,8 @@ discard block |
||
1704 | 1705 | |
1705 | 1706 | /** |
1706 | 1707 | * Return HTML code for personal user course category |
1707 | - * @param $id |
|
1708 | - * @param $title |
|
1708 | + * @param integer $id |
|
1709 | + * @param string $title |
|
1709 | 1710 | * @return string |
1710 | 1711 | */ |
1711 | 1712 | private static function getHtmlForUserCategory($id, $title) |
@@ -1726,7 +1727,7 @@ discard block |
||
1726 | 1727 | /** |
1727 | 1728 | * return HTML code for course display in session view |
1728 | 1729 | * @param array $courseInfo |
1729 | - * @param $userCategoryId |
|
1730 | + * @param integer $userCategoryId |
|
1730 | 1731 | * @param bool $displayButton |
1731 | 1732 | * @param $loadDirs |
1732 | 1733 | * @return string |
@@ -437,6 +437,7 @@ discard block |
||
437 | 437 | * If null, the timezone will be determined based on user preference, |
438 | 438 | * or timezone chosen by the admin for the platform. |
439 | 439 | * @param string The timezone to be converted from. If null, UTC will be assumed. |
440 | + * @param string $to_timezone |
|
440 | 441 | * @return string The converted time formatted as Y-m-d H:i:s |
441 | 442 | * |
442 | 443 | * @author Guillaume Viguier <[email protected]> |
@@ -793,6 +794,7 @@ discard block |
||
793 | 794 | * @param mixed The time to be converted |
794 | 795 | * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG) |
795 | 796 | * @param string Timezone to be converted from. If null, UTC will be assumed. |
797 | + * @param string $from_timezone |
|
796 | 798 | * @return string Converted and localized date |
797 | 799 | * |
798 | 800 | * @author Guillaume Viguier <[email protected]> |
@@ -862,7 +864,7 @@ discard block |
||
862 | 864 | * @param int/string $format (optional) The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
863 | 865 | * @param string $language (optional) The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only. |
864 | 866 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
865 | - * @return bool The result is sort of full name of the person. |
|
867 | + * @return string The result is sort of full name of the person. |
|
866 | 868 | * Sample results: |
867 | 869 | * Peter Ustinoff or Dr. Peter Ustinoff - the Western order |
868 | 870 | * Ustinoff Peter or Dr. Ustinoff Peter - the Eastern order |
@@ -956,7 +958,7 @@ discard block |
||
956 | 958 | |
957 | 959 | /** |
958 | 960 | * Checks whether a given format represents person name in Western order (for which first name is first). |
959 | - * @param int/string $format (optional) The person name format. It may be a pattern-string (for example '%t. %l, %f') or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
|
961 | + * @param integer $format (optional) The person name format. It may be a pattern-string (for example '%t. %l, %f') or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
|
960 | 962 | * @param string $language (optional) The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only. |
961 | 963 | * @return bool The result TRUE means that the order is first_name last_name, FALSE means last_name first_name. |
962 | 964 | * Note: You may use this function for determing the order of the fields or columns "First name" and "Last name" in forms, tables and reports. |
@@ -1184,8 +1186,8 @@ discard block |
||
1184 | 1186 | |
1185 | 1187 | /** |
1186 | 1188 | * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value. |
1187 | - * @param mixed $search String or array of strings to be found. |
|
1188 | - * @param mixed $replace String or array of strings used for replacement. |
|
1189 | + * @param string $search String or array of strings to be found. |
|
1190 | + * @param string $replace String or array of strings used for replacement. |
|
1189 | 1191 | * @param mixed $subject String or array of strings being searched. |
1190 | 1192 | * @param int $count (optional) The number of matched and replaced needles will be returned in count, which is passed by reference. |
1191 | 1193 | * @param string $encoding (optional) The used internally by this function character encoding. |
@@ -1248,10 +1250,10 @@ discard block |
||
1248 | 1250 | /** |
1249 | 1251 | * Finds first occurrence of a string within another, case insensitive. |
1250 | 1252 | * @param string $haystack The string from which to get the first occurrence. |
1251 | - * @param mixed $needle The string to be found. |
|
1253 | + * @param string $needle The string to be found. |
|
1252 | 1254 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1253 | 1255 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1254 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1256 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1255 | 1257 | * Notes: |
1256 | 1258 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1257 | 1259 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1307,7 +1309,7 @@ discard block |
||
1307 | 1309 | * @param mixed $needle The string which first character is to be found. |
1308 | 1310 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1309 | 1311 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1310 | - * @return mixed Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1312 | + * @return false|string Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
1311 | 1313 | * Notes: |
1312 | 1314 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1313 | 1315 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence. |
@@ -1374,7 +1376,7 @@ discard block |
||
1374 | 1376 | * @param mixed $needle The string to be found. |
1375 | 1377 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
1376 | 1378 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
1377 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1379 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
1378 | 1380 | * Notes: |
1379 | 1381 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
1380 | 1382 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1555,8 +1557,8 @@ discard block |
||
1555 | 1557 | |
1556 | 1558 | /** |
1557 | 1559 | * Performs a regular expression search and replace, UTF-8 aware when it is applicable. |
1558 | - * @param string|array $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1559 | - * @param string|array $replacement The string or an array with strings to replace. |
|
1560 | + * @param string $pattern The pattern to search for. It can be either a string or an array with strings. |
|
1561 | + * @param string $replacement The string or an array with strings to replace. |
|
1560 | 1562 | * @param string|array $subject The string or an array with strings to search and replace. |
1561 | 1563 | * @param int $limit The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit). |
1562 | 1564 | * @param int &$count If specified, this variable will be filled with the number of replacements done. |
@@ -1808,6 +1810,7 @@ discard block |
||
1808 | 1810 | /** |
1809 | 1811 | * Checks a string for UTF-8 validity. |
1810 | 1812 | * |
1813 | + * @param string $string |
|
1811 | 1814 | */ |
1812 | 1815 | function api_is_valid_utf8(&$string) |
1813 | 1816 | { |
@@ -1950,7 +1953,7 @@ discard block |
||
1950 | 1953 | /** |
1951 | 1954 | * Replaces non-valid formats for person names with the default (English) format. |
1952 | 1955 | * @param string $format The input format to be verified. |
1953 | - * @return bool Returns the same format if is is valid, otherwise returns a valid English format. |
|
1956 | + * @return string Returns the same format if is is valid, otherwise returns a valid English format. |
|
1954 | 1957 | */ |
1955 | 1958 | function _api_validate_person_name_format($format) { |
1956 | 1959 | if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) { |
@@ -2077,6 +2080,9 @@ discard block |
||
2077 | 2080 | |
2078 | 2081 | // This function checks whether the function _api_convert_encoding() (the php- |
2079 | 2082 | // implementation) is able to convert from/to a given encoding. |
2083 | +/** |
|
2084 | + * @param string $encoding |
|
2085 | + */ |
|
2080 | 2086 | function _api_convert_encoding_supports($encoding) { |
2081 | 2087 | static $supports = array(); |
2082 | 2088 | if (!isset($supports[$encoding])) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * Create a group of select from a date |
159 | 159 | * @param FormValidator $form |
160 | 160 | * @param string $prefix |
161 | - * @return array |
|
161 | + * @return HTML_QuickForm_element[] |
|
162 | 162 | */ |
163 | 163 | function create_group_date_select($form, $prefix = '') |
164 | 164 | { |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | * @author Bert Vanderkimpen |
753 | 753 | * @author Yannick Warnier <[email protected]> Adaptation for work tool |
754 | 754 | * @param string $base_work_dir Base work dir (.../work) |
755 | - * @param string $desiredDirName complete path of the desired name |
|
755 | + * @param string $desired_dir_name complete path of the desired name |
|
756 | 756 | * |
757 | 757 | * @return string actual directory name if it succeeds, boolean false otherwise |
758 | 758 | */ |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | /** |
775 | 775 | * Delete a work-tool directory |
776 | 776 | * @param int $id work directory id to delete |
777 | - * @return integer -1 on error |
|
777 | + * @return boolean|null -1 on error |
|
778 | 778 | */ |
779 | 779 | function deleteDirWork($id) |
780 | 780 | { |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | * Update the url of a dir in the student_publication table |
918 | 918 | * @param array $work_data work original data |
919 | 919 | * @param string $newPath Example: "folder1" |
920 | - * @return bool |
|
920 | + * @return boolean|null |
|
921 | 921 | */ |
922 | 922 | function updateDirName($work_data, $newPath) |
923 | 923 | { |
@@ -974,6 +974,7 @@ discard block |
||
974 | 974 | /** |
975 | 975 | * Transform an all directory structure (only directories) in an array |
976 | 976 | * @param string path of the directory |
977 | + * @param string $directory |
|
977 | 978 | * @return array the directory structure into an array |
978 | 979 | * @author Julio Montoya Dokeos |
979 | 980 | * @version April 2008 |
@@ -1043,7 +1044,7 @@ discard block |
||
1043 | 1044 | * @param string the path of the directory |
1044 | 1045 | * @param boolean true if we want the total quantity of files |
1045 | 1046 | * include in others child directories, false only files in the directory |
1046 | - * @return array the first element is an integer with the number of files |
|
1047 | + * @return integer[] the first element is an integer with the number of files |
|
1047 | 1048 | * in the folder, the second element is the number of directories |
1048 | 1049 | * @author Julio Montoya |
1049 | 1050 | * @version April 2008 |
@@ -2318,7 +2319,7 @@ discard block |
||
2318 | 2319 | } |
2319 | 2320 | |
2320 | 2321 | /** |
2321 | - * @param $name |
|
2322 | + * @param string $name |
|
2322 | 2323 | * @param $values |
2323 | 2324 | * @param string $checked |
2324 | 2325 | * @return string |
@@ -2844,7 +2845,7 @@ discard block |
||
2844 | 2845 | * @param int $userId |
2845 | 2846 | * @param int $workId |
2846 | 2847 | * @param int $courseId |
2847 | - * @return bool |
|
2848 | + * @return boolean|null |
|
2848 | 2849 | */ |
2849 | 2850 | function allowOnlySubscribedUser($userId, $workId, $courseId) |
2850 | 2851 | { |
@@ -3121,6 +3122,7 @@ discard block |
||
3121 | 3122 | * @param int $parentId |
3122 | 3123 | * @param array $courseInfo |
3123 | 3124 | * @param int $sessionId |
3125 | + * @param integer $userId |
|
3124 | 3126 | * @return int |
3125 | 3127 | */ |
3126 | 3128 | function getLastWorkStudentFromParentByUser( |
@@ -3757,12 +3759,11 @@ discard block |
||
3757 | 3759 | |
3758 | 3760 | /** |
3759 | 3761 | * Creates a new task (directory) in the assignment tool |
3760 | - * @param array $params |
|
3761 | 3762 | * @param int $user_id |
3762 | 3763 | * @param array $courseInfo |
3763 | 3764 | * @param int $group_id |
3764 | 3765 | * @param int $session_id |
3765 | - * @return bool|int |
|
3766 | + * @return string|false |
|
3766 | 3767 | * @note $params can have the following elements, but should at least have the 2 first ones: ( |
3767 | 3768 | * 'new_dir' => 'some-name', |
3768 | 3769 | * 'description' => 'some-desc', |
@@ -4258,7 +4259,7 @@ discard block |
||
4258 | 4259 | } |
4259 | 4260 | |
4260 | 4261 | /** |
4261 | - * @return array |
|
4262 | + * @return string[] |
|
4262 | 4263 | */ |
4263 | 4264 | function getUploadDocumentType() |
4264 | 4265 | { |
@@ -4630,7 +4631,7 @@ discard block |
||
4630 | 4631 | * @param int Session ID |
4631 | 4632 | * @param $correction |
4632 | 4633 | * |
4633 | - * @return array|bool |
|
4634 | + * @return boolean |
|
4634 | 4635 | */ |
4635 | 4636 | function getFileContents($id, $course_info, $sessionId = 0, $correction = false) |
4636 | 4637 | { |
@@ -4748,7 +4749,7 @@ discard block |
||
4748 | 4749 | * @param int $userId |
4749 | 4750 | * @param array $courseInfo |
4750 | 4751 | * @param string $format |
4751 | - * @return bool |
|
4752 | + * @return false|null |
|
4752 | 4753 | */ |
4753 | 4754 | function exportAllWork($userId, $courseInfo, $format = 'pdf') |
4754 | 4755 | { |
@@ -4796,7 +4797,7 @@ discard block |
||
4796 | 4797 | * @param array $courseInfo |
4797 | 4798 | * @param int $sessionId |
4798 | 4799 | * @param string $format |
4799 | - * @return bool |
|
4800 | + * @return false|null |
|
4800 | 4801 | */ |
4801 | 4802 | function exportAllStudentWorkFromPublication( |
4802 | 4803 | $workId, |
@@ -4934,7 +4935,7 @@ discard block |
||
4934 | 4935 | * Downloads all user files per user |
4935 | 4936 | * @param int $userId |
4936 | 4937 | * @param array $courseInfo |
4937 | - * @return bool |
|
4938 | + * @return false|null |
|
4938 | 4939 | */ |
4939 | 4940 | function downloadAllFilesPerUser($userId, $courseInfo) |
4940 | 4941 | { |
@@ -5048,7 +5049,7 @@ discard block |
||
5048 | 5049 | /** |
5049 | 5050 | * @param array $courseInfo |
5050 | 5051 | * @param int $workId |
5051 | - * @return bool |
|
5052 | + * @return boolean|null |
|
5052 | 5053 | */ |
5053 | 5054 | function protectWork($courseInfo, $workId) |
5054 | 5055 | { |