@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | * @param int $userMaxScore |
272 | 272 | * @param int $sessionId |
273 | 273 | * |
274 | - * @return bool Returns -1 on error |
|
274 | + * @return boolean|null Returns -1 on error |
|
275 | 275 | */ |
276 | 276 | public function import_manifest($courseCode, $userMaxScore = 1, $sessionId = 0, $userId = 0) |
277 | 277 | { |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | * @param string course Code |
926 | 926 | * @param string LP ID (in database) |
927 | 927 | * @param string Manifest file path (optional if lp_id defined) |
928 | - * @return integer New LP ID or false on failure |
|
928 | + * @return boolean New LP ID or false on failure |
|
929 | 929 | * TODO @TODO Implement imsmanifest_path parameter |
930 | 930 | */ |
931 | 931 | public function reimport_manifest($courseCode, $lp_id = null, $imsmanifest_path = '') |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * This function retrieves the existing permissions of a user, group or role. |
121 | -* @param $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
121 | +* @param string $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
122 | 122 | * @param $id the id of the user, group or role |
123 | 123 | * @author Patrick Cool <[email protected]>, Ghent University |
124 | 124 | * @version 1.0 |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | |
527 | 527 | /** |
528 | 528 | * This function gets all the roles that are defined |
529 | -* @param $content are we finding the roles for a user or a group (the database depends on it) |
|
529 | +* @param string $content are we finding the roles for a user or a group (the database depends on it) |
|
530 | 530 | * @param $id the id of the user or group |
531 | 531 | * @param string Deprecated parameter allowing use of 'platform' scope - the corresponding tables don't exist anymore so the scope is always set to 'course' |
532 | 532 | * @return array that contains the name of the roles the user has |
@@ -338,6 +338,10 @@ |
||
338 | 338 | * @param icon - if ="icon" then the small icon will appear |
339 | 339 | * if ="wrap" then wrapped settings are used (and no icon is displayed) |
340 | 340 | * if ="nolink" then only the name is returned with no href and no icon (note:only in this case, the result is not displayed, but returned) |
341 | +* @param string $completed |
|
342 | +* @param string $id_in_path |
|
343 | +* @param string $builder |
|
344 | +* @param string $icon |
|
341 | 345 | * @todo this function is too long, rewrite |
342 | 346 | */ |
343 | 347 | function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_path, $builder, $icon, $level = 0) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * Deletes all survey invitations of a user |
48 | 48 | * @param int $user_id |
49 | 49 | * |
50 | - * @return boolean |
|
50 | + * @return false|null |
|
51 | 51 | * @assert ('') === false |
52 | 52 | */ |
53 | 53 | public static function delete_all_survey_invitations_by_user($user_id) |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * Retrieves all the survey information |
105 | 105 | * |
106 | 106 | * @param integer $survey_id the id of the survey |
107 | - * @param boolean $shared this parameter determines if |
|
107 | + * @param integer $shared this parameter determines if |
|
108 | 108 | * we have to get the information of a survey from the central (shared) database or from the |
109 | 109 | * course database |
110 | 110 | * @param string course code optional |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | * This function deletes a survey (and also all the question in that survey |
572 | 572 | * |
573 | 573 | * @param int $survey_id id of the survey that has to be deleted |
574 | - * @return true |
|
574 | + * @return boolean |
|
575 | 575 | * |
576 | 576 | * @author Patrick Cool <[email protected]>, Ghent University |
577 | 577 | * @version January 2007 |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | * |
757 | 757 | * @param int $survey_id id of the survey that has to be duplicated |
758 | 758 | * @param int $courseId id of the course which survey has to be duplicated |
759 | - * @return true |
|
759 | + * @return boolean |
|
760 | 760 | * |
761 | 761 | * @author Eric Marguin <[email protected]>, Elixir Interactive |
762 | 762 | * @version October 2007 |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | /** |
797 | 797 | * This function recalculates the number of people who have taken the survey (=filled at least one question) |
798 | 798 | * |
799 | - * @param int $survey_id the id of the survey somebody |
|
799 | + * @param int $survey_data the id of the survey somebody |
|
800 | 800 | * @return true |
801 | 801 | * |
802 | 802 | * @author Patrick Cool <[email protected]>, Ghent University |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | * and all the options of all the questions. |
842 | 842 | * |
843 | 843 | * @param integer $survey_id the id of the survey |
844 | - * @param boolean $shared this parameter determines if we have to get the |
|
844 | + * @param integer $shared this parameter determines if we have to get the |
|
845 | 845 | * information of a survey from the central (shared) database or from the |
846 | 846 | * course database |
847 | 847 | * |
@@ -1387,7 +1387,7 @@ discard block |
||
1387 | 1387 | * This function deletes a shared survey question from the main database and all its options |
1388 | 1388 | * |
1389 | 1389 | * @param int $question_id the id of the question |
1390 | - * @param int $shared |
|
1390 | + * @param integer $survey_id |
|
1391 | 1391 | * |
1392 | 1392 | * @todo delete all the options of this question |
1393 | 1393 | * |
@@ -1514,8 +1514,8 @@ discard block |
||
1514 | 1514 | * This function deletes all the options of the questions of a given survey |
1515 | 1515 | * This function is normally only called when a survey is deleted |
1516 | 1516 | * |
1517 | - * @param $survey_id the id of the survey that has to be deleted |
|
1518 | - * @return true |
|
1517 | + * @param integer $survey_id the id of the survey that has to be deleted |
|
1518 | + * @return boolean |
|
1519 | 1519 | * |
1520 | 1520 | * @author Patrick Cool <[email protected]>, Ghent University |
1521 | 1521 | * @version January 2007 |
@@ -1581,8 +1581,8 @@ discard block |
||
1581 | 1581 | * This function deletes all the answers anyone has given on this survey |
1582 | 1582 | * This function is normally only called when a survey is deleted |
1583 | 1583 | * |
1584 | - * @param $survey_id the id of the survey that has to be deleted |
|
1585 | - * @return true |
|
1584 | + * @param integer $survey_id the id of the survey that has to be deleted |
|
1585 | + * @return boolean |
|
1586 | 1586 | * |
1587 | 1587 | * @todo write the function |
1588 | 1588 | * |
@@ -1824,7 +1824,7 @@ discard block |
||
1824 | 1824 | /** |
1825 | 1825 | * This function checks the parameters that are used in this page |
1826 | 1826 | * |
1827 | - * @return string The header, an error and the footer if any parameter fails, else it returns true |
|
1827 | + * @return null|boolean The header, an error and the footer if any parameter fails, else it returns true |
|
1828 | 1828 | * @author Patrick Cool <[email protected]>, Ghent University |
1829 | 1829 | * @version February 2007 |
1830 | 1830 | */ |
@@ -2391,6 +2391,7 @@ discard block |
||
2391 | 2391 | * Display score data about a survey question |
2392 | 2392 | * @param array Question info |
2393 | 2393 | * @param integer The offset of results shown |
2394 | + * @param integer $offset |
|
2394 | 2395 | * @return void (direct output) |
2395 | 2396 | */ |
2396 | 2397 | public static function display_question_report_score($survey_data, $question, $offset) |
@@ -3228,7 +3229,7 @@ discard block |
||
3228 | 3229 | * @param array User's answers |
3229 | 3230 | * @param mixed User ID or user details as string - Used as a string in the result string |
3230 | 3231 | * @param boolean Whether to display user fields or not |
3231 | - * @return string One line of the csv file |
|
3232 | + * @return string[] One line of the csv file |
|
3232 | 3233 | */ |
3233 | 3234 | static function export_complete_report_row_xls( |
3234 | 3235 | $survey_data, |
@@ -3821,7 +3822,7 @@ discard block |
||
3821 | 3822 | |
3822 | 3823 | /** |
3823 | 3824 | * @param $params |
3824 | - * @return bool|int |
|
3825 | + * @return false|string |
|
3825 | 3826 | */ |
3826 | 3827 | public static function save_invitation($params) |
3827 | 3828 | { |
@@ -3875,6 +3876,7 @@ discard block |
||
3875 | 3876 | * |
3876 | 3877 | * @param int invitedUser - the userId (course user) or emailaddress of additional user |
3877 | 3878 | * $param string $invitation_code - the unique invitation code for the URL |
3879 | + * @param string|null $invitation_text |
|
3878 | 3880 | * @return void |
3879 | 3881 | */ |
3880 | 3882 | public static function send_invitation_mail($invitedUser, $invitation_code, $invitation_title, $invitation_text) |
@@ -4803,7 +4805,7 @@ discard block |
||
4803 | 4805 | /** |
4804 | 4806 | * @author Isaac Flores Paz <[email protected]> |
4805 | 4807 | * @param int $user_id - User ID |
4806 | - * @param int $user_id_answer - User in survey answer table (user id or anonymus) |
|
4808 | + * @param int $user_answer - User in survey answer table (user id or anonymus) |
|
4807 | 4809 | * @return boolean |
4808 | 4810 | */ |
4809 | 4811 | static function show_link_available($user_id, $survey_code, $user_answer) |
@@ -4849,7 +4851,7 @@ discard block |
||
4849 | 4851 | * Display survey question chart |
4850 | 4852 | * @param array Chart data |
4851 | 4853 | * @param boolean Tells if the chart has a serie. False by default |
4852 | - * @return void (direct output) |
|
4854 | + * @return string (direct output) |
|
4853 | 4855 | */ |
4854 | 4856 | public static function drawChart($chartData, $hasSerie = false, $chartContainerId = 'chartContainer') |
4855 | 4857 | { |
@@ -735,7 +735,6 @@ |
||
735 | 735 | * lock = the user can no longer use this account |
736 | 736 | * @author Patrick Cool <[email protected]>, Ghent University |
737 | 737 | * @param int $active the current state of the account |
738 | - * @param int $user_id The user id |
|
739 | 738 | * @param string $urlParams |
740 | 739 | * |
741 | 740 | * @return string Some HTML-code with the lock/unlock button |
@@ -84,7 +84,7 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * @param $directoryPath |
|
87 | + * @param string $directoryPath |
|
88 | 88 | * @return bool |
89 | 89 | */ |
90 | 90 | function deleteDirectory($directoryPath) |
@@ -32,6 +32,8 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @param int Error code |
34 | 34 | * @param string Error message |
35 | + * @param integer $code |
|
36 | + * @param string $message |
|
35 | 37 | */ |
36 | 38 | public function __construct($code, $message) { |
37 | 39 | $this->code = $code; |
@@ -42,6 +44,7 @@ discard block |
||
42 | 44 | * Sets the error handler |
43 | 45 | * |
44 | 46 | * @param WSErrorHandler Error handler |
47 | + * @param WSCMSoapErrorHandler $handler |
|
45 | 48 | */ |
46 | 49 | public static function setErrorHandler($handler) { |
47 | 50 | if($handler instanceof WSErrorHandler) { |
@@ -76,6 +79,7 @@ discard block |
||
76 | 79 | * Handle method |
77 | 80 | * |
78 | 81 | * @param WSError Error |
82 | + * @return void |
|
79 | 83 | */ |
80 | 84 | public function handle($error); |
81 | 85 | } |
@@ -102,7 +106,7 @@ discard block |
||
102 | 106 | * Verifies the API key |
103 | 107 | * |
104 | 108 | * @param string Secret key |
105 | - * @return mixed WSError in case of failure, null in case of success |
|
109 | + * @return WSCMError|null WSError in case of failure, null in case of success |
|
106 | 110 | */ |
107 | 111 | protected function verifyKey($secret_key) { |
108 | 112 | $ip = trim($_SERVER['REMOTE_ADDR']); |
@@ -204,6 +204,9 @@ |
||
204 | 204 | |
205 | 205 | } |
206 | 206 | |
207 | + /** |
|
208 | + * @param integer $user_id |
|
209 | + */ |
|
207 | 210 | protected function set_message_as_read($user_id, $message_id){ |
208 | 211 | $table_message = Database::get_main_table(TABLE_MESSAGE); |
209 | 212 | $query = "UPDATE $table_message SET msg_status = '".MESSAGE_STATUS_NEW."' WHERE user_receiver_id=".$user_id." AND id='".$message_id."';"; |
@@ -137,7 +137,7 @@ |
||
137 | 137 | /** |
138 | 138 | * Get a list of users of which the given conditions match with a LIKE '%cond%' |
139 | 139 | * @param array $conditions a list of condition (exemple : status=>STUDENT) |
140 | - * @param array $order_by a list of fields on which sort |
|
140 | + * @param string[] $order_by a list of fields on which sort |
|
141 | 141 | * @return array An array with all users of the platform. |
142 | 142 | * @todo optional course code parameter, optional sorting parameters... |
143 | 143 | *@todo Use the UserManager class |