@@ -1275,6 +1275,7 @@ discard block |
||
| 1275 | 1275 | * Gets the list of courses a specific user is subscribed to |
| 1276 | 1276 | * @param int User ID |
| 1277 | 1277 | * @param boolean $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED |
| 1278 | + * @param integer $userid |
|
| 1278 | 1279 | * @return array Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d) |
| 1279 | 1280 | */ |
| 1280 | 1281 | function api_get_user_courses($userid, $fetch_session = true) |
@@ -3049,7 +3050,7 @@ discard block |
||
| 3049 | 3050 | * on the session visibility |
| 3050 | 3051 | * @param bool $tutor Whether to check if the user has the tutor role |
| 3051 | 3052 | * @param bool $coach Whether to check if the user has the coach role |
| 3052 | -* @return boolean true: the user has the rights to edit, false: he does not |
|
| 3053 | +* @return boolean|null true: the user has the rights to edit, false: he does not |
|
| 3053 | 3054 | */ |
| 3054 | 3055 | function api_is_allowed_to_session_edit($tutor = false, $coach = false) |
| 3055 | 3056 | { |
@@ -5228,6 +5229,7 @@ discard block |
||
| 5228 | 5229 | * @param string Whether we want a simple list (display a category) or |
| 5229 | 5230 | * a grouped list (group by variable as in settings.php default). Values: 'list' or 'group' |
| 5230 | 5231 | * @param int Access URL's ID. Optional. Uses 1 by default, which is the unique URL |
| 5232 | + * @param string $cat |
|
| 5231 | 5233 | * @return array Array of database results for the current settings of the current access URL |
| 5232 | 5234 | */ |
| 5233 | 5235 | function &api_get_settings($cat = null, $ordering = 'list', $access_url = 1, $url_changeable = 0) |
@@ -6621,7 +6623,7 @@ discard block |
||
| 6621 | 6623 | /** |
| 6622 | 6624 | * Returns an array of global configuration settings which should be ignored |
| 6623 | 6625 | * when printing the configuration settings screens |
| 6624 | - * @return array Array of strings, each identifying one of the excluded settings |
|
| 6626 | + * @return string[] Array of strings, each identifying one of the excluded settings |
|
| 6625 | 6627 | */ |
| 6626 | 6628 | function api_get_locked_settings() { |
| 6627 | 6629 | return array( |
@@ -6662,6 +6664,7 @@ discard block |
||
| 6662 | 6664 | * false if he isn't. If the user ID is given and is an integer, then the same |
| 6663 | 6665 | * ID is simply returned |
| 6664 | 6666 | * @param integer User ID |
| 6667 | + * @param integer $user_id |
|
| 6665 | 6668 | * @return boolean Integer User ID is logged in, or false otherwise |
| 6666 | 6669 | */ |
| 6667 | 6670 | function api_user_is_login($user_id = null) { |
@@ -7082,6 +7085,7 @@ discard block |
||
| 7082 | 7085 | /** |
| 7083 | 7086 | * Gets memory limit in bytes |
| 7084 | 7087 | * @param string The memory size (128M, 1G, 1000K, etc) |
| 7088 | + * @param string $mem |
|
| 7085 | 7089 | * @return int |
| 7086 | 7090 | * @assert (null) === false |
| 7087 | 7091 | * @assert ('1t') === 1099511627776 |
@@ -8100,8 +8104,8 @@ discard block |
||
| 8100 | 8104 | * Adds or Subtract a time in hh:mm:ss to a datetime |
| 8101 | 8105 | * |
| 8102 | 8106 | * @param $datetime |
| 8103 | - * @param $time |
|
| 8104 | - * @param $operation - True for Add, False to Subtract |
|
| 8107 | + * @param string $time |
|
| 8108 | + * @param boolean $operation - True for Add, False to Subtract |
|
| 8105 | 8109 | * @return string |
| 8106 | 8110 | */ |
| 8107 | 8111 | function api_add_sub_hours_to_date_time($datetime, $time, $operation) |
@@ -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, |
@@ -591,6 +596,8 @@ discard block |
||
| 591 | 596 | * @param int Whether this answer is correct (1) or not (0) |
| 592 | 597 | * @param string Coordinates of this point (e.g. 123;324) |
| 593 | 598 | * @param bool update results? |
| 599 | + * @param integer $exe_id |
|
| 600 | + * @param integer $correct |
|
| 594 | 601 | * @return boolean Result of the insert query |
| 595 | 602 | * @uses Course code and user_id from global scope $_cid and $_user |
| 596 | 603 | */ |
@@ -808,11 +815,11 @@ discard block |
||
| 808 | 815 | /** |
| 809 | 816 | * Save the new message for one event and for one language |
| 810 | 817 | * |
| 811 | - * @param string $eventName |
|
| 818 | + * @param string $event_name |
|
| 812 | 819 | * @param array $users |
| 813 | 820 | * @param string $message |
| 814 | 821 | * @param string $subject |
| 815 | - * @param string $eventMessageLanguage |
|
| 822 | + * @param string $event_message_language |
|
| 816 | 823 | * @param int $activated |
| 817 | 824 | */ |
| 818 | 825 | public static function save_event_type_message($event_name, $users, $message, $subject, $event_message_language, $activated) |
@@ -946,10 +953,10 @@ discard block |
||
| 946 | 953 | } |
| 947 | 954 | |
| 948 | 955 | /** |
| 949 | - * @param $user_id |
|
| 956 | + * @param integer $user_id |
|
| 950 | 957 | * @param $exerciseId |
| 951 | - * @param $lp_id |
|
| 952 | - * @param $lp_item_id |
|
| 958 | + * @param integer $lp_id |
|
| 959 | + * @param integer $lp_item_id |
|
| 953 | 960 | * @return int |
| 954 | 961 | */ |
| 955 | 962 | public static function get_attempt_count_not_finished($user_id, $exerciseId, $lp_id, $lp_item_id) |
@@ -1126,6 +1133,7 @@ discard block |
||
| 1126 | 1133 | * @param int exercise id |
| 1127 | 1134 | * @param int $courseId |
| 1128 | 1135 | * @param int session id |
| 1136 | + * @param integer $user_id |
|
| 1129 | 1137 | * @return array with the results |
| 1130 | 1138 | * |
| 1131 | 1139 | */ |
@@ -1222,6 +1230,7 @@ discard block |
||
| 1222 | 1230 | * @param int exercise id |
| 1223 | 1231 | * @param int $courseId |
| 1224 | 1232 | * @param int session id |
| 1233 | + * @param integer $user_id |
|
| 1225 | 1234 | * @return array with the results |
| 1226 | 1235 | * |
| 1227 | 1236 | */ |
@@ -1313,6 +1322,8 @@ discard block |
||
| 1313 | 1322 | * @param int lp id |
| 1314 | 1323 | * @param int lp item id |
| 1315 | 1324 | * @param string order asc or desc |
| 1325 | + * @param integer $courseId |
|
| 1326 | + * @param string $order |
|
| 1316 | 1327 | * @return array with the results |
| 1317 | 1328 | * |
| 1318 | 1329 | */ |
@@ -1379,7 +1390,7 @@ discard block |
||
| 1379 | 1390 | * @param int exercise id |
| 1380 | 1391 | * @param int $courseId |
| 1381 | 1392 | * @param int session id |
| 1382 | - * @return array with the results |
|
| 1393 | + * @return string with the results |
|
| 1383 | 1394 | * |
| 1384 | 1395 | */ |
| 1385 | 1396 | public static function count_exercise_attempts_by_user($user_id, $exercise_id, $courseId, $session_id = 0) |
@@ -1551,7 +1562,7 @@ discard block |
||
| 1551 | 1562 | * @param int exercise id |
| 1552 | 1563 | * @param int course id |
| 1553 | 1564 | * @param int session id |
| 1554 | - * @return array with the results |
|
| 1565 | + * @return integer with the results |
|
| 1555 | 1566 | * |
| 1556 | 1567 | */ |
| 1557 | 1568 | public static function get_count_exercises_attempted_by_course($courseId, $session_id = 0) |
@@ -1795,6 +1806,10 @@ discard block |
||
| 1795 | 1806 | CourseManager::update_course_ranking(null, null, null, null, true, false); |
| 1796 | 1807 | } |
| 1797 | 1808 | |
| 1809 | + /** |
|
| 1810 | + * @param integer $userId |
|
| 1811 | + * @param integer $sessionId |
|
| 1812 | + */ |
|
| 1798 | 1813 | public static function eventCourseVirtualLogin($courseId, $userId, $sessionId, $virtualTime = '') |
| 1799 | 1814 | { |
| 1800 | 1815 | $courseTrackingTable = Database::get_main_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS); |