@@ -20,6 +20,9 @@ |
||
| 20 | 20 | return $this->id; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @return string |
|
| 25 | + */ |
|
| 23 | 26 | public function getName() |
| 24 | 27 | { |
| 25 | 28 | return $this->name; |
@@ -334,6 +334,9 @@ |
||
| 334 | 334 | return preg_replace('/, $/','',$result); |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | + /** |
|
| 338 | + * @param string $paramString |
|
| 339 | + */ |
|
| 337 | 340 | private function _parseParameterString ($paramString) |
| 338 | 341 | { |
| 339 | 342 | $elements = explode('&',$paramString); |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | * @author Bart Mollet |
| 372 | 372 | * @param int $groupId iid |
| 373 | 373 | * @param string $course_code Default is current course |
| 374 | - * @return integer - number of groups deleted. |
|
| 374 | + * @return boolean - number of groups deleted. |
|
| 375 | 375 | */ |
| 376 | 376 | public static function delete_groups($groupId, $course_code = null) |
| 377 | 377 | { |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | * @param bool Whether self registration is allowed or not |
| 564 | 564 | * @param bool Whether self unregistration is allowed or not |
| 565 | 565 | * @param int $categoryId |
| 566 | - * @return bool TRUE if properties are successfully changed, false otherwise |
|
| 566 | + * @return Statement|null TRUE if properties are successfully changed, false otherwise |
|
| 567 | 567 | */ |
| 568 | 568 | public static function set_group_properties( |
| 569 | 569 | $group_id, |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | * @param int $group_id The iid of the group |
| 717 | 717 | * @param string $course_code The course in which the group is (default = |
| 718 | 718 | * current course) |
| 719 | - * @return array The category |
|
| 719 | + * @return integer The category |
|
| 720 | 720 | */ |
| 721 | 721 | public static function get_category_from_group($group_id, $course_code = null) |
| 722 | 722 | { |
@@ -782,9 +782,9 @@ discard block |
||
| 782 | 782 | * Create group category |
| 783 | 783 | * @param string $title The title of the new category |
| 784 | 784 | * @param string $description The description of the new category |
| 785 | - * @param bool $self_registration_allowed |
|
| 786 | - * @param bool $self_unregistration_allowed |
|
| 787 | - * @param int $max_number_of_students |
|
| 785 | + * @param integer $self_registration_allowed |
|
| 786 | + * @param integer $self_unregistration_allowed |
|
| 787 | + * @param int $maximum_number_of_students |
|
| 788 | 788 | * @param int $groups_per_user |
| 789 | 789 | */ |
| 790 | 790 | public static function create_category( |
@@ -990,6 +990,8 @@ discard block |
||
| 990 | 990 | * @param int $limit |
| 991 | 991 | * @param bool $getCount |
| 992 | 992 | * @param int $courseId |
| 993 | + * @param string $column |
|
| 994 | + * @param string $direction |
|
| 993 | 995 | * @return array list of user id |
| 994 | 996 | */ |
| 995 | 997 | public static function get_users( |
@@ -1583,7 +1585,7 @@ discard block |
||
| 1583 | 1585 | /** |
| 1584 | 1586 | * Subscribe tutor(s) to a specified group in current course |
| 1585 | 1587 | * @param mixed $user_ids Can be an array with user-id's or a single user-id |
| 1586 | - * @param int $group_id iid |
|
| 1588 | + * @param int $groupId iid |
|
| 1587 | 1589 | * @param int $course_id |
| 1588 | 1590 | * |
| 1589 | 1591 | * @author Patrick Cool <[email protected]>, Ghent University |
@@ -1614,7 +1616,7 @@ discard block |
||
| 1614 | 1616 | * Unsubscribe user(s) from a specified group in current course |
| 1615 | 1617 | * @param mixed $user_ids Can be an array with user-id's or a single user-id |
| 1616 | 1618 | * @param int $group_id iid |
| 1617 | - * @return bool TRUE if successful |
|
| 1619 | + * @return boolean|null TRUE if successful |
|
| 1618 | 1620 | */ |
| 1619 | 1621 | public static function unsubscribe_users($user_ids, $group_id) |
| 1620 | 1622 | { |
@@ -1633,7 +1635,7 @@ discard block |
||
| 1633 | 1635 | |
| 1634 | 1636 | /** |
| 1635 | 1637 | * Unsubscribe all users from one or more groups |
| 1636 | - * @param int $group_id iid |
|
| 1638 | + * @param integer $groupId iid |
|
| 1637 | 1639 | * @return bool TRUE if successful |
| 1638 | 1640 | */ |
| 1639 | 1641 | public static function unsubscribe_all_users($groupId) |
@@ -1781,6 +1783,7 @@ discard block |
||
| 1781 | 1783 | * |
| 1782 | 1784 | * @param $user_array_in list of users (must be sorted). |
| 1783 | 1785 | * @param string $compare_field, the field to be compared |
| 1786 | + * @param string $compare_field |
|
| 1784 | 1787 | */ |
| 1785 | 1788 | public static function filter_duplicates($user_array_in, $compare_field) |
| 1786 | 1789 | { |
@@ -37,6 +37,8 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @param int Error code |
| 39 | 39 | * @param string Error message |
| 40 | + * @param integer $code |
|
| 41 | + * @param string $message |
|
| 40 | 42 | */ |
| 41 | 43 | public function __construct($code, $message) |
| 42 | 44 | { |
@@ -48,6 +50,7 @@ discard block |
||
| 48 | 50 | * Sets the error handler |
| 49 | 51 | * |
| 50 | 52 | * @param WSErrorHandler Error handler |
| 53 | + * @param WSCMSoapErrorHandler $handler |
|
| 51 | 54 | */ |
| 52 | 55 | public static function setErrorHandler($handler) |
| 53 | 56 | { |
@@ -86,6 +89,7 @@ discard block |
||
| 86 | 89 | * Handle method |
| 87 | 90 | * |
| 88 | 91 | * @param WSError Error |
| 92 | + * @return void |
|
| 89 | 93 | */ |
| 90 | 94 | public function handle($error); |
| 91 | 95 | } |
@@ -114,7 +118,7 @@ discard block |
||
| 114 | 118 | * Verifies the API key |
| 115 | 119 | * |
| 116 | 120 | * @param string Secret key |
| 117 | - * @return mixed WSError in case of failure, null in case of success |
|
| 121 | + * @return WSCMError|null WSError in case of failure, null in case of success |
|
| 118 | 122 | */ |
| 119 | 123 | protected function verifyKey($secret_key) |
| 120 | 124 | { |
@@ -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) |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * Save a participant in a meeting room |
| 280 | 280 | * @param int $meetingId |
| 281 | 281 | * @param int $participantId |
| 282 | - * @return false|int The last inserted ID. Otherwise return false |
|
| 282 | + * @return false|string The last inserted ID. Otherwise return false |
|
| 283 | 283 | */ |
| 284 | 284 | public function saveParticipant($meetingId, $participantId) |
| 285 | 285 | { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | /** |
| 353 | 353 | * Returns a meeting "join" URL |
| 354 | 354 | * @param string The name of the meeting (usually the course code) |
| 355 | - * @return mixed The URL to join the meeting, or false on error |
|
| 355 | + * @return false|string The URL to join the meeting, or false on error |
|
| 356 | 356 | * @todo implement moderator pass |
| 357 | 357 | * @assert ('') === false |
| 358 | 358 | * @assert ('abcdefghijklmnopqrstuvwxyzabcdefghijklmno') === false |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | * Closes a meeting (usually when the user click on the close button from |
| 661 | 661 | * the conferences listing. |
| 662 | 662 | * @param string The internal ID of the meeting (id field for this meeting) |
| 663 | - * @return void |
|
| 663 | + * @return false|null |
|
| 664 | 664 | * @assert (0) === false |
| 665 | 665 | */ |
| 666 | 666 | public function endMeeting($id) |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | * @param array $recordInfo |
| 1078 | 1078 | * @param bool $isGlobal |
| 1079 | 1079 | * @param bool $isAdminReport |
| 1080 | - * @return array |
|
| 1080 | + * @return string[] |
|
| 1081 | 1081 | */ |
| 1082 | 1082 | private function getActionLinks($meetingInfo, $recordInfo, $isGlobal = false, $isAdminReport = false) |
| 1083 | 1083 | { |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | /** |
| 219 | 219 | * Displays the tools of a certain category. |
| 220 | 220 | * |
| 221 | - * @return void |
|
| 221 | + * @return string |
|
| 222 | 222 | * @param string $course_tool_category contains the category of tools to display: |
| 223 | 223 | * "Public", "PublicButHide", "courseAdmin", "claroAdmin" |
| 224 | 224 | */ |
@@ -67,6 +67,8 @@ discard block |
||
| 67 | 67 | * @param int user id |
| 68 | 68 | * @param int user friend id |
| 69 | 69 | * @param string |
| 70 | + * @param integer $user_id |
|
| 71 | + * @param integer $user_friend |
|
| 70 | 72 | * @author isaac flores paz |
| 71 | 73 | */ |
| 72 | 74 | public static function get_relation_between_contacts($user_id, $user_friend) |
@@ -98,6 +100,8 @@ discard block |
||
| 98 | 100 | * @param int group id |
| 99 | 101 | * @param string name to search |
| 100 | 102 | * @param bool true will load firstname, lastname, and image name |
| 103 | + * @param integer $user_id |
|
| 104 | + * @param integer $id_group |
|
| 101 | 105 | * @return array |
| 102 | 106 | * @author Julio Montoya <[email protected]> Cleaning code, function renamed, $load_extra_info option added |
| 103 | 107 | * @author isaac flores paz |
@@ -174,6 +178,9 @@ discard block |
||
| 174 | 178 | * @param int user friend id |
| 175 | 179 | * @param string title of the message |
| 176 | 180 | * @param string content of the message |
| 181 | + * @param integer $user_id |
|
| 182 | + * @param string $message_title |
|
| 183 | + * @param string $message_content |
|
| 177 | 184 | * @return boolean |
| 178 | 185 | * @author isaac flores paz |
| 179 | 186 | * @author Julio Montoya <[email protected]> Cleaning code |
@@ -248,6 +255,7 @@ discard block |
||
| 248 | 255 | * Get number messages of the inbox |
| 249 | 256 | * @author isaac flores paz |
| 250 | 257 | * @param int user receiver id |
| 258 | + * @param integer $user_receiver_id |
|
| 251 | 259 | * @return int |
| 252 | 260 | */ |
| 253 | 261 | public static function get_message_number_invitation_by_user_id($user_receiver_id) |
@@ -290,6 +298,7 @@ discard block |
||
| 290 | 298 | * Get invitation list sent by user |
| 291 | 299 | * @author Julio Montoya <[email protected]> |
| 292 | 300 | * @param int user id |
| 301 | + * @param integer $user_id |
|
| 293 | 302 | * @return array() |
| 294 | 303 | */ |
| 295 | 304 | public static function get_list_invitation_sent_by_user_id($user_id) |
@@ -332,6 +341,7 @@ discard block |
||
| 332 | 341 | * Denies invitation |
| 333 | 342 | * @param int user sender id |
| 334 | 343 | * @param int user receiver id |
| 344 | + * @param integer $user_receiver_id |
|
| 335 | 345 | * @author isaac flores paz |
| 336 | 346 | * @author Julio Montoya <[email protected]> Cleaning code |
| 337 | 347 | */ |
@@ -426,7 +436,7 @@ discard block |
||
| 426 | 436 | * @param string $subject |
| 427 | 437 | * @param string $content |
| 428 | 438 | * |
| 429 | - * @return string message invitation |
|
| 439 | + * @return false|null message invitation |
|
| 430 | 440 | */ |
| 431 | 441 | public static function sendInvitationToUser($userId, $subject = '', $content = '') |
| 432 | 442 | { |
@@ -1223,7 +1233,7 @@ discard block |
||
| 1223 | 1233 | * @param string $messageContent of the message |
| 1224 | 1234 | * @param int $messageId id parent |
| 1225 | 1235 | * @param string $messageStatus status type of message |
| 1226 | - * @return boolean |
|
| 1236 | + * @return false|string |
|
| 1227 | 1237 | * @author Yannick Warnier |
| 1228 | 1238 | */ |
| 1229 | 1239 | public static function sendWallMessage($userId, $friendId, $messageContent, $messageId = 0, $messageStatus = '') |
@@ -1315,7 +1325,7 @@ discard block |
||
| 1315 | 1325 | * Gets all messages from someone's wall (within specific limits) |
| 1316 | 1326 | * @param int $userId id of wall shown |
| 1317 | 1327 | * @param string $messageStatus status wall message |
| 1318 | - * @param int|string $parentId id message (Post main) |
|
| 1328 | + * @param integer|null $parentId id message (Post main) |
|
| 1319 | 1329 | * @param date $start Date from which we want to show the messages, in UTC time |
| 1320 | 1330 | * @param int $limit Limit for the number of parent messages we want to show |
| 1321 | 1331 | * @param int $offset Wall message query offset |
@@ -1600,7 +1610,7 @@ discard block |
||
| 1600 | 1610 | |
| 1601 | 1611 | /** |
| 1602 | 1612 | * verify if Url Exist - Using Curl |
| 1603 | - * @param $uri url |
|
| 1613 | + * @param string $uri url |
|
| 1604 | 1614 | * |
| 1605 | 1615 | * @return boolean |
| 1606 | 1616 | */ |
@@ -1626,7 +1636,7 @@ discard block |
||
| 1626 | 1636 | /** |
| 1627 | 1637 | * Delete messages delete logic |
| 1628 | 1638 | * @param int $id id message to delete. |
| 1629 | - * @return bool status query |
|
| 1639 | + * @return Statement|null status query |
|
| 1630 | 1640 | */ |
| 1631 | 1641 | public static function deleteMessage($id) |
| 1632 | 1642 | { |
@@ -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)) { |