@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | /** |
| 278 | 278 | * @param string |
| 279 | 279 | * @param string |
| 280 | - * @return true if the user is allowed to see the document, false otherwise |
|
| 280 | + * @return boolean if the user is allowed to see the document, false otherwise |
|
| 281 | 281 | * @author Sergio A Kessler, first version |
| 282 | 282 | * @author Roan Embrechts, bugfix |
| 283 | 283 | * @todo not only check if a file is visible, but also check if the user is allowed to see the file?? |
@@ -1558,7 +1558,7 @@ discard block |
||
| 1558 | 1558 | * Return true if the documentpath have visibility=1 as |
| 1559 | 1559 | * item_property (you should use the is_visible_by_id) |
| 1560 | 1560 | * |
| 1561 | - * @param string $document_path the relative complete path of the document |
|
| 1561 | + * @param string $doc_path the relative complete path of the document |
|
| 1562 | 1562 | * @param array $course the _course array info of the document's course |
| 1563 | 1563 | * @param int |
| 1564 | 1564 | * @param string |
@@ -1644,6 +1644,7 @@ discard block |
||
| 1644 | 1644 | * @param int |
| 1645 | 1645 | * @param int |
| 1646 | 1646 | * @param bool |
| 1647 | + * @param integer $user_id |
|
| 1647 | 1648 | * @return bool |
| 1648 | 1649 | */ |
| 1649 | 1650 | public static function is_visible_by_id( |
@@ -1995,7 +1996,7 @@ discard block |
||
| 1995 | 1996 | * Remove default certificate |
| 1996 | 1997 | * @param string $course_id The course code |
| 1997 | 1998 | * @param int $default_certificate_id The document id of the default certificate |
| 1998 | - * @return void |
|
| 1999 | + * @return false|null |
|
| 1999 | 2000 | */ |
| 2000 | 2001 | public static function remove_attach_certificate($course_id, $default_certificate_id) |
| 2001 | 2002 | { |
@@ -2128,6 +2129,7 @@ discard block |
||
| 2128 | 2129 | * @param bool is file or string html |
| 2129 | 2130 | * @param string type (one of the app tools) - optional (otherwise takes the current item's type) |
| 2130 | 2131 | * @param int level of recursivity we're in |
| 2132 | + * @param string $source_html |
|
| 2131 | 2133 | * @return array List of file paths. An additional field containing 'local' or 'remote' helps determine |
| 2132 | 2134 | * if the file should be copied into the zip or just linked |
| 2133 | 2135 | */ |
@@ -2970,6 +2972,7 @@ discard block |
||
| 2970 | 2972 | |
| 2971 | 2973 | /** |
| 2972 | 2974 | * Obtains the text inside the file with the right parser |
| 2975 | + * @param string $doc_path |
|
| 2973 | 2976 | */ |
| 2974 | 2977 | public static function get_text_content($doc_path, $doc_mime) |
| 2975 | 2978 | { |
@@ -3221,6 +3224,7 @@ discard block |
||
| 3221 | 3224 | * Shows a play icon next to the document title in the document list |
| 3222 | 3225 | * @param int |
| 3223 | 3226 | * @param string |
| 3227 | + * @param integer|null $i |
|
| 3224 | 3228 | * @return string html content |
| 3225 | 3229 | */ |
| 3226 | 3230 | public static function generate_media_preview($i, $type = 'simple') |
@@ -4122,7 +4126,7 @@ discard block |
||
| 4122 | 4126 | } |
| 4123 | 4127 | |
| 4124 | 4128 | /** |
| 4125 | - * @return array |
|
| 4129 | + * @return string[] |
|
| 4126 | 4130 | */ |
| 4127 | 4131 | public static function get_web_odf_extension_list() |
| 4128 | 4132 | { |
@@ -4131,10 +4135,10 @@ discard block |
||
| 4131 | 4135 | |
| 4132 | 4136 | /** |
| 4133 | 4137 | * Set of extension allowed to use Jodconverter |
| 4134 | - * @param $mode 'from' |
|
| 4138 | + * @param string $mode 'from' |
|
| 4135 | 4139 | * 'to' |
| 4136 | 4140 | * 'all' |
| 4137 | - * @param $format 'text' |
|
| 4141 | + * @param string $format 'text' |
|
| 4138 | 4142 | * 'spreadsheet' |
| 4139 | 4143 | * 'presentation' |
| 4140 | 4144 | * 'drawing' |
@@ -4338,7 +4342,7 @@ discard block |
||
| 4338 | 4342 | } |
| 4339 | 4343 | |
| 4340 | 4344 | /** |
| 4341 | - * @return array |
|
| 4345 | + * @return string[] |
|
| 4342 | 4346 | */ |
| 4343 | 4347 | public static function get_system_folders() |
| 4344 | 4348 | { |
@@ -4356,7 +4360,7 @@ discard block |
||
| 4356 | 4360 | } |
| 4357 | 4361 | |
| 4358 | 4362 | /** |
| 4359 | - * @return array |
|
| 4363 | + * @return string[] |
|
| 4360 | 4364 | */ |
| 4361 | 4365 | public static function getProtectedFolderFromStudent() |
| 4362 | 4366 | { |
@@ -4512,7 +4516,7 @@ discard block |
||
| 4512 | 4516 | * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg |
| 4513 | 4517 | * @param string $wavFile |
| 4514 | 4518 | * @param bool $removeWavFileIfSuccess |
| 4515 | - * @return bool |
|
| 4519 | + * @return string|false |
|
| 4516 | 4520 | */ |
| 4517 | 4521 | public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false) |
| 4518 | 4522 | { |
@@ -5088,6 +5092,8 @@ discard block |
||
| 5088 | 5092 | * @param string The current folder (path inside of the "document" directory, including the prefix "/") |
| 5089 | 5093 | * @param string Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root) |
| 5090 | 5094 | * @param boolean Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form) |
| 5095 | + * @param string $document_id |
|
| 5096 | + * @param FormValidator $form |
|
| 5091 | 5097 | |
| 5092 | 5098 | * @return string html form |
| 5093 | 5099 | */ |
@@ -5596,9 +5602,6 @@ discard block |
||
| 5596 | 5602 | /** |
| 5597 | 5603 | * Creates the row of edit icons for a file/folder |
| 5598 | 5604 | * |
| 5599 | - * @param string $curdirpath current path (cfr open folder) |
|
| 5600 | - * @param string $type (file/folder) |
|
| 5601 | - * @param string $path dbase path of file/folder |
|
| 5602 | 5605 | * @param int $visibility (1/0) |
| 5603 | 5606 | * @param int $id dbase id of the document |
| 5604 | 5607 | * @return string html img tags with hyperlinks |
@@ -5947,7 +5950,7 @@ discard block |
||
| 5947 | 5950 | /** |
| 5948 | 5951 | * Gets the path translated with title of docs and folders |
| 5949 | 5952 | * @param string $path the real path |
| 5950 | - * @return the path which should be displayed |
|
| 5953 | + * @return string path which should be displayed |
|
| 5951 | 5954 | */ |
| 5952 | 5955 | public static function get_titles_of_path($path) |
| 5953 | 5956 | { |
@@ -6003,7 +6006,8 @@ discard block |
||
| 6003 | 6006 | |
| 6004 | 6007 | /** |
| 6005 | 6008 | * Checks whether the user is in shared folder |
| 6006 | - * @return return bool Return true when user is into shared folder |
|
| 6009 | + * @param integer $current_session_id |
|
| 6010 | + * @return boolean bool Return true when user is into shared folder |
|
| 6007 | 6011 | */ |
| 6008 | 6012 | public static function is_shared_folder($curdirpath, $current_session_id) |
| 6009 | 6013 | { |
@@ -6019,7 +6023,7 @@ discard block |
||
| 6019 | 6023 | |
| 6020 | 6024 | /** |
| 6021 | 6025 | * Checks whether the user is into any user shared folder |
| 6022 | - * @return return bool Return true when user is in any user shared folder |
|
| 6026 | + * @return boolean bool Return true when user is in any user shared folder |
|
| 6023 | 6027 | */ |
| 6024 | 6028 | public static function is_any_user_shared_folder($path, $current_session_id) |
| 6025 | 6029 | { |
@@ -6233,7 +6237,7 @@ discard block |
||
| 6233 | 6237 | * @param int $id |
| 6234 | 6238 | * @param array $courseInfo |
| 6235 | 6239 | * @param int $sessionId |
| 6236 | - * @return bool |
|
| 6240 | + * @return boolean|null |
|
| 6237 | 6241 | */ |
| 6238 | 6242 | public static function downloadDeletedDocument($id, $courseInfo, $sessionId) |
| 6239 | 6243 | { |
@@ -6252,7 +6256,7 @@ discard block |
||
| 6252 | 6256 | * @param array $courseInfo |
| 6253 | 6257 | * @param int $sessionId |
| 6254 | 6258 | * |
| 6255 | - * @return bool |
|
| 6259 | + * @return false|null |
|
| 6256 | 6260 | */ |
| 6257 | 6261 | public static function downloadAllDeletedDocument($courseInfo, $sessionId) |
| 6258 | 6262 | { |
@@ -6291,7 +6295,7 @@ discard block |
||
| 6291 | 6295 | * @param array $courseInfo |
| 6292 | 6296 | * @param int $sessionId |
| 6293 | 6297 | * |
| 6294 | - * @return bool |
|
| 6298 | + * @return false|null |
|
| 6295 | 6299 | */ |
| 6296 | 6300 | public static function deleteDocumentsFromSession($courseInfo, $sessionId) |
| 6297 | 6301 | { |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | * Read and validate the quiz module XML |
| 404 | 404 | * |
| 405 | 405 | * @param resource $moduleXml XML file |
| 406 | - * @return mixed | array if is a valid xml file, false otherwise |
|
| 406 | + * @return string | array if is a valid xml file, false otherwise |
|
| 407 | 407 | */ |
| 408 | 408 | public function readQuizModule($moduleXml) |
| 409 | 409 | { |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | * Fix moodle files that contains spaces |
| 622 | 622 | * @param array $importedFiles |
| 623 | 623 | * @param string $text |
| 624 | - * @return mixed |
|
| 624 | + * @return string |
|
| 625 | 625 | */ |
| 626 | 626 | public function fixPathInText($importedFiles, &$text) |
| 627 | 627 | { |
@@ -642,10 +642,10 @@ discard block |
||
| 642 | 642 | * |
| 643 | 643 | * @param array $questionList |
| 644 | 644 | * @param string $questionType |
| 645 | - * @param object $questionInstance Question/Answer instance |
|
| 645 | + * @param Question $questionInstance Question/Answer instance |
|
| 646 | 646 | * @param array $currentQuestion |
| 647 | 647 | * @param array $importedFiles |
| 648 | - * @return integer db response |
|
| 648 | + * @return boolean|null db response |
|
| 649 | 649 | */ |
| 650 | 650 | public function processAnswers($questionList, $questionType, $questionInstance, $currentQuestion, $importedFiles) |
| 651 | 651 | { |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | /** |
| 801 | 801 | * Process Chamilo Unique Answer |
| 802 | 802 | * |
| 803 | - * @param object $objAnswer |
|
| 803 | + * @param Answer $objAnswer |
|
| 804 | 804 | * @param array $answerValues |
| 805 | 805 | * @param integer $position |
| 806 | 806 | * @param integer $questionWeighting |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | /** |
| 837 | 837 | * Process Chamilo True False |
| 838 | 838 | * |
| 839 | - * @param object $objAnswer |
|
| 839 | + * @param Answer $objAnswer |
|
| 840 | 840 | * @param array $answerValues |
| 841 | 841 | * @param integer $position |
| 842 | 842 | * @param integer $questionWeighting |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | /** |
| 874 | 874 | * Process Chamilo FillBlanks |
| 875 | 875 | * |
| 876 | - * @param object $objAnswer |
|
| 876 | + * @param Answer $objAnswer |
|
| 877 | 877 | * @param array $questionType |
| 878 | 878 | * @param array $answerValues |
| 879 | 879 | * @param string $placeholder |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | * Litle utility to delete the unuseful tags |
| 1027 | 1027 | * |
| 1028 | 1028 | * @param $array |
| 1029 | - * @param $keys |
|
| 1029 | + * @param string[] $keys |
|
| 1030 | 1030 | */ |
| 1031 | 1031 | public function traverseArray(&$array, $keys) |
| 1032 | 1032 | { |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * Validates the password |
| 134 | 134 | * |
| 135 | - * @param $encoded |
|
| 136 | - * @param $raw |
|
| 137 | - * @param $salt |
|
| 135 | + * @param string $encoded |
|
| 136 | + * @param string $raw |
|
| 137 | + * @param string $salt |
|
| 138 | 138 | * @return bool |
| 139 | 139 | */ |
| 140 | 140 | public static function isPasswordValid($encoded, $raw, $salt) |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * @param string $raw |
| 150 | 150 | * @param User $user |
| 151 | 151 | * |
| 152 | - * @return bool |
|
| 152 | + * @return string |
|
| 153 | 153 | */ |
| 154 | 154 | public static function encryptPassword($raw, User $user) |
| 155 | 155 | { |
@@ -1096,6 +1096,7 @@ discard block |
||
| 1096 | 1096 | /** |
| 1097 | 1097 | * Disables a user |
| 1098 | 1098 | * @param int User id |
| 1099 | + * @param integer $user_id |
|
| 1099 | 1100 | * @return bool |
| 1100 | 1101 | * @uses UserManager::change_active_state() to actually disable the user |
| 1101 | 1102 | * @assert (0) === false |
@@ -1112,6 +1113,7 @@ discard block |
||
| 1112 | 1113 | /** |
| 1113 | 1114 | * Enable a user |
| 1114 | 1115 | * @param int User id |
| 1116 | + * @param integer $user_id |
|
| 1115 | 1117 | * @return bool |
| 1116 | 1118 | * @uses UserManager::change_active_state() to actually disable the user |
| 1117 | 1119 | * @assert (0) === false |
@@ -1278,6 +1280,7 @@ discard block |
||
| 1278 | 1280 | * Checks whether the user id exists in the database |
| 1279 | 1281 | * |
| 1280 | 1282 | * @param int User id |
| 1283 | + * @param integer $userId |
|
| 1281 | 1284 | * @return bool True if user id was found, false otherwise |
| 1282 | 1285 | */ |
| 1283 | 1286 | public static function is_user_id_valid($userId) |
@@ -1419,7 +1422,7 @@ discard block |
||
| 1419 | 1422 | /** |
| 1420 | 1423 | * Get a list of users of which the given conditions match with a LIKE '%cond%' |
| 1421 | 1424 | * @param array $conditions a list of condition (exemple : status=>STUDENT) |
| 1422 | - * @param array $order_by a list of fields on which sort |
|
| 1425 | + * @param string[] $order_by a list of fields on which sort |
|
| 1423 | 1426 | * @return array An array with all users of the platform. |
| 1424 | 1427 | * @todo optional course code parameter, optional sorting parameters... |
| 1425 | 1428 | * @todo security filter order_by |
@@ -1490,7 +1493,7 @@ discard block |
||
| 1490 | 1493 | * @param array $userInfo user information to avoid query the DB |
| 1491 | 1494 | * returns the /main/img/unknown.jpg image set it at true |
| 1492 | 1495 | * |
| 1493 | - * @return array Array of 2 elements: 'dir' and 'file' which contain |
|
| 1496 | + * @return integer Array of 2 elements: 'dir' and 'file' which contain |
|
| 1494 | 1497 | * the dir and file as the name implies if image does not exist it will |
| 1495 | 1498 | * return the unknow image if anonymous parameter is true if not it returns an empty array |
| 1496 | 1499 | */ |
@@ -1982,7 +1985,7 @@ discard block |
||
| 1982 | 1985 | /** |
| 1983 | 1986 | * Returns an array with the user's productions. |
| 1984 | 1987 | * |
| 1985 | - * @param $user_id User id |
|
| 1988 | + * @param integer $user_id User id |
|
| 1986 | 1989 | * @return array An array containing the user's productions |
| 1987 | 1990 | */ |
| 1988 | 1991 | public static function get_user_productions($user_id) |
@@ -2137,7 +2140,7 @@ discard block |
||
| 2137 | 2140 | |
| 2138 | 2141 | /** |
| 2139 | 2142 | * Build a list of extra file already uploaded in $user_folder/{$extra_field}/ |
| 2140 | - * @param $user_id |
|
| 2143 | + * @param integer $user_id |
|
| 2141 | 2144 | * @param $extra_field |
| 2142 | 2145 | * @param bool $force |
| 2143 | 2146 | * @param bool $showDelete |
@@ -2242,7 +2245,7 @@ discard block |
||
| 2242 | 2245 | * @param int $fieldType Field's type |
| 2243 | 2246 | * @param string $displayText Field's language var name |
| 2244 | 2247 | * @param string $default Field's default value |
| 2245 | - * @return int |
|
| 2248 | + * @return boolean |
|
| 2246 | 2249 | */ |
| 2247 | 2250 | public static function create_extra_field($variable, $fieldType, $displayText, $default) |
| 2248 | 2251 | { |
@@ -2276,6 +2279,7 @@ discard block |
||
| 2276 | 2279 | * @param boolean Whether to prefix the fields indexes with "extra_" (might be used by formvalidator) |
| 2277 | 2280 | * @param boolean Whether to return invisible fields as well |
| 2278 | 2281 | * @param boolean Whether to split multiple-selection fields or not |
| 2282 | + * @param boolean $field_filter |
|
| 2279 | 2283 | * @return array Array of fields => value for the given user |
| 2280 | 2284 | */ |
| 2281 | 2285 | public static function get_extra_user_data( |
@@ -3122,7 +3126,7 @@ discard block |
||
| 3122 | 3126 | * @param string $user_id User ID |
| 3123 | 3127 | * @param string $course course directory |
| 3124 | 3128 | * @param string $resourcetype resourcetype: images, all |
| 3125 | - * @return int User ID (or false if not found) |
|
| 3129 | + * @return string User ID (or false if not found) |
|
| 3126 | 3130 | */ |
| 3127 | 3131 | public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all') |
| 3128 | 3132 | { |
@@ -3206,7 +3210,7 @@ discard block |
||
| 3206 | 3210 | /** |
| 3207 | 3211 | * Adds a new API key to the users' account |
| 3208 | 3212 | * @param int Optional user ID (defaults to the results of api_get_user_id()) |
| 3209 | - * @return boolean True on success, false on failure |
|
| 3213 | + * @return false|string True on success, false on failure |
|
| 3210 | 3214 | */ |
| 3211 | 3215 | public static function add_api_key($user_id = null, $api_service = 'dokeos') |
| 3212 | 3216 | { |
@@ -3261,6 +3265,7 @@ discard block |
||
| 3261 | 3265 | * Regenerate an API key from the user's account |
| 3262 | 3266 | * @param int user ID (defaults to the results of api_get_user_id()) |
| 3263 | 3267 | * @param string API key's internal ID |
| 3268 | + * @param string $api_service |
|
| 3264 | 3269 | * @return int num |
| 3265 | 3270 | */ |
| 3266 | 3271 | public static function update_api_key($user_id, $api_service) |
@@ -3290,6 +3295,7 @@ discard block |
||
| 3290 | 3295 | /** |
| 3291 | 3296 | * @param int user ID (defaults to the results of api_get_user_id()) |
| 3292 | 3297 | * @param string API key's internal ID |
| 3298 | + * @param string $api_service |
|
| 3293 | 3299 | * @return int row ID, or return false if not found |
| 3294 | 3300 | */ |
| 3295 | 3301 | public static function get_api_key_id($user_id, $api_service) |
@@ -3505,7 +3511,7 @@ discard block |
||
| 3505 | 3511 | * @param int $field_id |
| 3506 | 3512 | * @param bool $show_links show links or not |
| 3507 | 3513 | * |
| 3508 | - * @return array |
|
| 3514 | + * @return string |
|
| 3509 | 3515 | */ |
| 3510 | 3516 | public static function get_user_tags_to_string($user_id, $field_id, $show_links = true) |
| 3511 | 3517 | { |
@@ -3602,7 +3608,7 @@ discard block |
||
| 3602 | 3608 | * @param mixed $tag |
| 3603 | 3609 | * @param int $user_id |
| 3604 | 3610 | * @param int $field_id field id of the tag |
| 3605 | - * @return bool |
|
| 3611 | + * @return boolean|null |
|
| 3606 | 3612 | */ |
| 3607 | 3613 | public static function add_tag($tag, $user_id, $field_id) |
| 3608 | 3614 | { |
@@ -5048,7 +5054,7 @@ discard block |
||
| 5048 | 5054 | } |
| 5049 | 5055 | |
| 5050 | 5056 | /** |
| 5051 | - * @return array |
|
| 5057 | + * @return string[] |
|
| 5052 | 5058 | */ |
| 5053 | 5059 | public static function get_user_field_types() |
| 5054 | 5060 | { |
@@ -5340,7 +5346,7 @@ discard block |
||
| 5340 | 5346 | |
| 5341 | 5347 | /** |
| 5342 | 5348 | * Get the boss user ID from a followed user id |
| 5343 | - * @param $userId |
|
| 5349 | + * @param integer $userId |
|
| 5344 | 5350 | * @return bool |
| 5345 | 5351 | */ |
| 5346 | 5352 | public static function getStudentBossList($userId) |
@@ -5392,7 +5398,7 @@ discard block |
||
| 5392 | 5398 | * Get either a Gravatar URL or complete image tag for a specified email address. |
| 5393 | 5399 | * |
| 5394 | 5400 | * @param string $email The email address |
| 5395 | - * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
| 5401 | + * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
| 5396 | 5402 | * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
| 5397 | 5403 | * @param string $r Maximum rating (inclusive) [ g | pg | r | x ] |
| 5398 | 5404 | * @param boole $img True to return a complete IMG tag False for just the URL |
@@ -5767,9 +5773,9 @@ discard block |
||
| 5767 | 5773 | * @param bool $get_count |
| 5768 | 5774 | * @param bool $reverse_order |
| 5769 | 5775 | * @param int $start |
| 5770 | - * @param null $maxPerPage |
|
| 5776 | + * @param integer $maxPerPage |
|
| 5771 | 5777 | * @param null $categoryFilter |
| 5772 | - * @return array |
|
| 5778 | + * @return integer |
|
| 5773 | 5779 | */ |
| 5774 | 5780 | public static function getCategories( |
| 5775 | 5781 | $user_id, |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * provides a side connection to a vchamilo database |
| 185 | 185 | * @param array $_configuration |
| 186 | 186 | * |
| 187 | - * @return \Doctrine\DBAL\Driver\Connection |
|
| 187 | + * @return string |
|
| 188 | 188 | */ |
| 189 | 189 | public static function bootConnection(&$_configuration) |
| 190 | 190 | { |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | /** |
| 374 | 374 | * get a proper SQLdump command |
| 375 | - * @param object $vchamilodata the complete new host information |
|
| 375 | + * @param stdClass $vchamilodata the complete new host information |
|
| 376 | 376 | * @return string the shell command |
| 377 | 377 | */ |
| 378 | 378 | public static function getDatabaseDumpCmd($vchamilodata) |
@@ -456,8 +456,8 @@ discard block |
||
| 456 | 456 | |
| 457 | 457 | /** |
| 458 | 458 | * Backups a database for having a snapshot. |
| 459 | - * @param $vchamilo object The Vchamilo object. |
|
| 460 | - * @param $outputfilerad string The output SQL file radical. |
|
| 459 | + * @param stdClass $vchamilo object The Vchamilo object. |
|
| 460 | + * @param string $outputfilerad string The output SQL file radical. |
|
| 461 | 461 | * @return bool If TRUE, dumping database was a success, otherwise FALSE. |
| 462 | 462 | */ |
| 463 | 463 | public static function backupDatabase($vchamilo, $outputfilerad) |
@@ -619,6 +619,8 @@ discard block |
||
| 619 | 619 | * this function set will map standard moodle API calls to chamilo |
| 620 | 620 | * internal primitives. This avoids too many changes to do in imported |
| 621 | 621 | * code |
| 622 | + * @param string $module |
|
| 623 | + * @param string $key |
|
| 622 | 624 | */ |
| 623 | 625 | public static function getConfig($module, $key, $isplugin = true) |
| 624 | 626 | { |
@@ -698,7 +700,7 @@ discard block |
||
| 698 | 700 | /** |
| 699 | 701 | * @param string $path |
| 700 | 702 | * |
| 701 | - * @return mixed |
|
| 703 | + * @return string |
|
| 702 | 704 | */ |
| 703 | 705 | public static function chopLastSlash($path) |
| 704 | 706 | { |
@@ -852,7 +854,7 @@ discard block |
||
| 852 | 854 | |
| 853 | 855 | /** |
| 854 | 856 | * @param object $instance |
| 855 | - * @return bool|\Doctrine\DBAL\Connection |
|
| 857 | + * @return Doctrine\ORM\EntityManagerInterface |
|
| 856 | 858 | */ |
| 857 | 859 | public static function getConnectionFromInstance($instance, $getManager = false) |
| 858 | 860 | { |
@@ -1297,7 +1299,7 @@ discard block |
||
| 1297 | 1299 | /** |
| 1298 | 1300 | * @param stdClass $instance |
| 1299 | 1301 | * |
| 1300 | - * @return bool|string returns the original version of the app |
|
| 1302 | + * @return string|false returns the original version of the app |
|
| 1301 | 1303 | */ |
| 1302 | 1304 | public static function canBeUpgraded($instance) |
| 1303 | 1305 | { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Install the plugin |
| 46 | - * @return void |
|
| 46 | + * @return boolean |
|
| 47 | 47 | */ |
| 48 | 48 | public function install() |
| 49 | 49 | { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * Uninstall the plugin |
| 55 | - * @return void |
|
| 55 | + * @return boolean |
|
| 56 | 56 | */ |
| 57 | 57 | public function uninstall() |
| 58 | 58 | { |
@@ -1532,7 +1532,7 @@ discard block |
||
| 1532 | 1532 | * @param array $id_checked an array to delete sessions |
| 1533 | 1533 | * @param boolean $from_ws optional, true if the function is called |
| 1534 | 1534 | * by a webservice, false otherwise. |
| 1535 | - * @return void Nothing, or false on error |
|
| 1535 | + * @return boolean Nothing, or false on error |
|
| 1536 | 1536 | * */ |
| 1537 | 1537 | public static function delete($id_checked, $from_ws = false) |
| 1538 | 1538 | { |
@@ -1669,7 +1669,7 @@ discard block |
||
| 1669 | 1669 | * @param array $user_list |
| 1670 | 1670 | * @param int $session_visibility |
| 1671 | 1671 | * @param bool $empty_users |
| 1672 | - * @return bool |
|
| 1672 | + * @return false|null |
|
| 1673 | 1673 | */ |
| 1674 | 1674 | public static function subscribe_users_to_session( |
| 1675 | 1675 | $id_session, |
@@ -1942,7 +1942,7 @@ discard block |
||
| 1942 | 1942 | * @param array $courseInfo |
| 1943 | 1943 | * @param int $status |
| 1944 | 1944 | * @param bool $updateTotal |
| 1945 | - * @return bool |
|
| 1945 | + * @return false|null |
|
| 1946 | 1946 | */ |
| 1947 | 1947 | public static function removeUsersFromCourseSession( |
| 1948 | 1948 | $userList, |
@@ -2008,7 +2008,7 @@ discard block |
||
| 2008 | 2008 | * @param string $course_code |
| 2009 | 2009 | * @param int $session_visibility |
| 2010 | 2010 | * @param bool $removeUsersNotInList |
| 2011 | - * @return bool |
|
| 2011 | + * @return false|null |
|
| 2012 | 2012 | */ |
| 2013 | 2013 | public static function subscribe_users_to_session_course( |
| 2014 | 2014 | $user_list, |
@@ -2192,7 +2192,7 @@ discard block |
||
| 2192 | 2192 | * @param bool $removeExistingCoursesWithUsers Whether to unsubscribe |
| 2193 | 2193 | * existing courses and users (true, default) or not (false) |
| 2194 | 2194 | * @param $copyEvaluation from base course to session course |
| 2195 | - * @return void Nothing, or false on error |
|
| 2195 | + * @return false|null Nothing, or false on error |
|
| 2196 | 2196 | * */ |
| 2197 | 2197 | public static function add_courses_to_session( |
| 2198 | 2198 | $sessionId, |
@@ -2441,7 +2441,7 @@ discard block |
||
| 2441 | 2441 | * @param string $variable Field's internal variable name |
| 2442 | 2442 | * @param int $fieldType Field's type |
| 2443 | 2443 | * @param string $displayText Field's language var name |
| 2444 | - * @return int new extra field id |
|
| 2444 | + * @return boolean new extra field id |
|
| 2445 | 2445 | */ |
| 2446 | 2446 | public static function create_session_extra_field($variable, $fieldType, $displayText) |
| 2447 | 2447 | { |
@@ -2670,7 +2670,7 @@ discard block |
||
| 2670 | 2670 | * @param array id_checked |
| 2671 | 2671 | * @param bool include delete session |
| 2672 | 2672 | * @param bool optional, true if the function is called by a webservice, false otherwise. |
| 2673 | - * @return void Nothing, or false on error |
|
| 2673 | + * @return boolean Nothing, or false on error |
|
| 2674 | 2674 | * The parameters is a array to delete sessions |
| 2675 | 2675 | * */ |
| 2676 | 2676 | public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false) |
@@ -3436,8 +3436,8 @@ discard block |
||
| 3436 | 3436 | /** |
| 3437 | 3437 | * Gets the list of courses by session filtered by access_url |
| 3438 | 3438 | * |
| 3439 | - * @param $userId |
|
| 3440 | - * @param $sessionId |
|
| 3439 | + * @param integer $userId |
|
| 3440 | + * @param null|integer $sessionId |
|
| 3441 | 3441 | * @param null $from |
| 3442 | 3442 | * @param null $limit |
| 3443 | 3443 | * @param null $column |
@@ -3562,6 +3562,7 @@ discard block |
||
| 3562 | 3562 | /** |
| 3563 | 3563 | * Gets the count of courses by session filtered by access_url |
| 3564 | 3564 | * @param int session id |
| 3565 | + * @param integer $session_id |
|
| 3565 | 3566 | * @return array list of courses |
| 3566 | 3567 | */ |
| 3567 | 3568 | public static function getCourseCountBySessionId($session_id, $keyword = null) |
@@ -3820,6 +3821,7 @@ discard block |
||
| 3820 | 3821 | * Updates a session status |
| 3821 | 3822 | * @param int session id |
| 3822 | 3823 | * @param int status |
| 3824 | + * @param integer $status |
|
| 3823 | 3825 | */ |
| 3824 | 3826 | public static function set_session_status($session_id, $status) |
| 3825 | 3827 | { |
@@ -4028,7 +4030,7 @@ discard block |
||
| 4028 | 4030 | * Protect a session to be edited. |
| 4029 | 4031 | * @param int $id |
| 4030 | 4032 | * @param bool $checkSession |
| 4031 | - * @return mixed | bool true if pass the check, api_not_allowed otherwise |
|
| 4033 | + * @return boolean|null | bool true if pass the check, api_not_allowed otherwise |
|
| 4032 | 4034 | */ |
| 4033 | 4035 | public static function protectSession($id, $checkSession = true) |
| 4034 | 4036 | { |
@@ -4136,7 +4138,7 @@ discard block |
||
| 4136 | 4138 | |
| 4137 | 4139 | /** |
| 4138 | 4140 | * @param $id |
| 4139 | - * @return bool |
|
| 4141 | + * @return null|boolean |
|
| 4140 | 4142 | */ |
| 4141 | 4143 | public static function protect_teacher_session_edit($id) |
| 4142 | 4144 | { |
@@ -4201,7 +4203,7 @@ discard block |
||
| 4201 | 4203 | * true: if the session exists it will be updated. |
| 4202 | 4204 | * false: if session exists a new session will be created adding a counter session1, session2, etc |
| 4203 | 4205 | * @param int $defaultUserId |
| 4204 | - * @param mixed $logger |
|
| 4206 | + * @param Logger $logger |
|
| 4205 | 4207 | * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will |
| 4206 | 4208 | * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id') |
| 4207 | 4209 | * @param string $extraFieldId |
@@ -5504,7 +5506,6 @@ discard block |
||
| 5504 | 5506 | * @param string $lastConnectionDate |
| 5505 | 5507 | * @param array $sessionIdList |
| 5506 | 5508 | * @param array $studentIdList |
| 5507 | - * @param int $userStatus STUDENT|COURSEMANAGER constants |
|
| 5508 | 5509 | * |
| 5509 | 5510 | * @return array|int |
| 5510 | 5511 | */ |
@@ -5656,7 +5657,7 @@ discard block |
||
| 5656 | 5657 | /** |
| 5657 | 5658 | * Get the list of course tools that have to be dealt with in case of |
| 5658 | 5659 | * registering any course to a session |
| 5659 | - * @return array The list of tools to be dealt with (literal names) |
|
| 5660 | + * @return string[] The list of tools to be dealt with (literal names) |
|
| 5660 | 5661 | */ |
| 5661 | 5662 | public static function getCourseToolToBeManaged() |
| 5662 | 5663 | { |
@@ -5670,7 +5671,7 @@ discard block |
||
| 5670 | 5671 | * Calls the methods bound to each tool when a course is registered into a session |
| 5671 | 5672 | * @param int $sessionId |
| 5672 | 5673 | * @param int $courseId |
| 5673 | - * @return void |
|
| 5674 | + * @return boolean|null |
|
| 5674 | 5675 | */ |
| 5675 | 5676 | public static function installCourse($sessionId, $courseId) |
| 5676 | 5677 | { |
@@ -6320,6 +6321,7 @@ discard block |
||
| 6320 | 6321 | * @param int $categoryId The internal ID of the session category |
| 6321 | 6322 | * @param string $target Value to search for in the session field values |
| 6322 | 6323 | * @param array $extraFields A list of fields to be scanned and returned |
| 6324 | + * @param DateTime $publicationDate |
|
| 6323 | 6325 | * @return mixed |
| 6324 | 6326 | */ |
| 6325 | 6327 | public static function getShortSessionListAndExtraByCategory( |
@@ -7656,7 +7658,7 @@ discard block |
||
| 7656 | 7658 | /** |
| 7657 | 7659 | * Get link to the admin page for this session |
| 7658 | 7660 | * @param int $id Session ID |
| 7659 | - * @return mixed URL to the admin page to manage the session, or false on error |
|
| 7661 | + * @return false|string URL to the admin page to manage the session, or false on error |
|
| 7660 | 7662 | */ |
| 7661 | 7663 | public static function getAdminPath($id) |
| 7662 | 7664 | { |
@@ -7673,7 +7675,7 @@ discard block |
||
| 7673 | 7675 | * If a course is provided, build the link to the course |
| 7674 | 7676 | * @param int $id Session ID |
| 7675 | 7677 | * @param int $courseId Course ID (optional) in case the link has to send straight to the course |
| 7676 | - * @return mixed URL to the page to use the session, or false on error |
|
| 7678 | + * @return false|string URL to the page to use the session, or false on error |
|
| 7677 | 7679 | */ |
| 7678 | 7680 | public static function getPath($id, $courseId = 0) |
| 7679 | 7681 | { |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | * |
| 76 | 76 | * @param int $resourceId |
| 77 | 77 | * @param int $type |
| 78 | - * @return boolean |
|
| 78 | + * @return boolean|null |
|
| 79 | 79 | */ |
| 80 | 80 | public function deleteResource($resourceId, $type) |
| 81 | 81 | { |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | |
| 750 | 750 | /** |
| 751 | 751 | * @param int $course_id |
| 752 | - * @return bool|string |
|
| 752 | + * @return string|false |
|
| 753 | 753 | */ |
| 754 | 754 | public function show_message_resource_delete($course_id) |
| 755 | 755 | { |
@@ -1554,7 +1554,7 @@ discard block |
||
| 1554 | 1554 | * Retrieve all categories inside a course independent category |
| 1555 | 1555 | * that should be visible to a student. |
| 1556 | 1556 | * @param integer $cat_id parent category |
| 1557 | - * @param $stud_id student id |
|
| 1557 | + * @param integer $stud_id student id |
|
| 1558 | 1558 | * @param $cats optional: if defined, the categories will be added to this array |
| 1559 | 1559 | */ |
| 1560 | 1560 | public function get_independent_categories_with_result_for_student($cat_id, $stud_id, $cats = array()) |
@@ -95,6 +95,9 @@ discard block |
||
| 95 | 95 | return $this->user_id; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | + /** |
|
| 99 | + * @return string |
|
| 100 | + */ |
|
| 98 | 101 | public function get_course_code() |
| 99 | 102 | { |
| 100 | 103 | return $this->course_code; |
@@ -278,7 +281,7 @@ discard block |
||
| 278 | 281 | } |
| 279 | 282 | |
| 280 | 283 | /** |
| 281 | - * @param array $result |
|
| 284 | + * @param Doctrine\DBAL\Driver\Statement|null $result |
|
| 282 | 285 | * @return array |
| 283 | 286 | */ |
| 284 | 287 | private static function create_evaluation_objects_from_sql_result($result) |