@@ -173,7 +173,7 @@ |
||
| 173 | 173 | |
| 174 | 174 | /** |
| 175 | 175 | * @param array $file |
| 176 | - * @return bool|string |
|
| 176 | + * @return string|false |
|
| 177 | 177 | */ |
| 178 | 178 | public static function import_uploaded_file($file) |
| 179 | 179 | { |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * @param null $feedback_type |
| 59 | 59 | * @param null $counter |
| 60 | 60 | * @param null $score |
| 61 | - * @return null|string |
|
| 61 | + * @return string |
|
| 62 | 62 | */ |
| 63 | 63 | function return_header($feedback_type = null, $counter = null, $score = null) |
| 64 | 64 | { |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * Get the progress of this learnpath. Only the last attempt are taken into account. |
| 98 | - * @param $stud_id student id (default: all students who have results - then the average is returned) |
|
| 98 | + * @param integer $stud_id student id (default: all students who have results - then the average is returned) |
|
| 99 | 99 | * @return array (score, max) if student is given |
| 100 | 100 | * array (sum of scores, number of scores) otherwise |
| 101 | 101 | * or null if no scores available |
@@ -32,6 +32,8 @@ discard block |
||
| 32 | 32 | * @param array $evals |
| 33 | 33 | * @param array $links |
| 34 | 34 | * @param null $addparams |
| 35 | + * @param boolean $showTeacherView |
|
| 36 | + * @param integer $userId |
|
| 35 | 37 | */ |
| 36 | 38 | public function __construct( |
| 37 | 39 | $currentcat, |
@@ -895,7 +897,7 @@ discard block |
||
| 895 | 897 | |
| 896 | 898 | /** |
| 897 | 899 | * @param $item |
| 898 | - * @return mixed |
|
| 900 | + * @return string|null |
|
| 899 | 901 | */ |
| 900 | 902 | private function build_course_code($item) |
| 901 | 903 | { |
@@ -72,6 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * Get actual array data |
| 75 | + * @param integer $count |
|
| 75 | 76 | * @return array 2-dimensional array - each array contains the elements: |
| 76 | 77 | * 0: eval/link object |
| 77 | 78 | * 1: item name |
@@ -285,7 +286,7 @@ discard block |
||
| 285 | 286 | |
| 286 | 287 | /** |
| 287 | 288 | * @param $item |
| 288 | - * @param $ignore_score_color |
|
| 289 | + * @param boolean $ignore_score_color |
|
| 289 | 290 | * @return string |
| 290 | 291 | */ |
| 291 | 292 | private function build_average_column($item, $ignore_score_color) |
@@ -306,7 +307,7 @@ discard block |
||
| 306 | 307 | |
| 307 | 308 | /** |
| 308 | 309 | * @param $item |
| 309 | - * @param $ignore_score_color |
|
| 310 | + * @param boolean $ignore_score_color |
|
| 310 | 311 | * @return string |
| 311 | 312 | */ |
| 312 | 313 | private function build_result_column($item, $ignore_score_color) |
@@ -323,7 +324,7 @@ discard block |
||
| 323 | 324 | |
| 324 | 325 | /** |
| 325 | 326 | * @param $item |
| 326 | - * @param $ignore_score_color |
|
| 327 | + * @param boolean $ignore_score_color |
|
| 327 | 328 | * @return string |
| 328 | 329 | */ |
| 329 | 330 | private function build_mask_column($item, $ignore_score_color) |
@@ -339,7 +340,7 @@ discard block |
||
| 339 | 340 | |
| 340 | 341 | /** |
| 341 | 342 | * @param $coursecode |
| 342 | - * @return mixed |
|
| 343 | + * @return string |
|
| 343 | 344 | */ |
| 344 | 345 | private function get_course_name_from_code_cached($coursecode) |
| 345 | 346 | { |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * @return array |
|
| 21 | + * @return string[] |
|
| 22 | 22 | */ |
| 23 | 23 | public static function get_tags() |
| 24 | 24 | { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * @param string $course_code |
| 41 | 41 | * @param int $session_id |
| 42 | 42 | * |
| 43 | - * @return mixed |
|
| 43 | + * @return string |
|
| 44 | 44 | */ |
| 45 | 45 | public static function parse_content($userId, $content, $course_code, $session_id = 0) |
| 46 | 46 | { |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @param array uploaded file $_FILES |
| 350 | 350 | * @param string Comment describing the attachment |
| 351 | 351 | * @param bool $sendToUsersInSession |
| 352 | - * @return int false on failure, ID of the announcement on success |
|
| 352 | + * @return false|string false on failure, ID of the announcement on success |
|
| 353 | 353 | */ |
| 354 | 354 | public static function add_announcement( |
| 355 | 355 | $emailTitle, |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | * @param $to_users |
| 461 | 461 | * @param array $file |
| 462 | 462 | * @param string $file_comment |
| 463 | - * @return bool|int |
|
| 463 | + * @return false|string |
|
| 464 | 464 | */ |
| 465 | 465 | public static function add_group_announcement( |
| 466 | 466 | $emailTitle, |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | |
| 700 | 700 | /** |
| 701 | 701 | * @param int $insert_id |
| 702 | - * @return bool |
|
| 702 | + * @return false|null |
|
| 703 | 703 | */ |
| 704 | 704 | public static function update_mail_sent($insert_id) |
| 705 | 705 | { |
@@ -719,6 +719,7 @@ discard block |
||
| 719 | 719 | * Gets all announcements from a user by course |
| 720 | 720 | * @param string course db |
| 721 | 721 | * @param int user id |
| 722 | + * @param integer $user_id |
|
| 722 | 723 | * @return array html with the content and count of announcements or false otherwise |
| 723 | 724 | */ |
| 724 | 725 | public static function get_all_annoucement_by_user_course($course_code, $user_id) |
@@ -1184,6 +1185,7 @@ discard block |
||
| 1184 | 1185 | * has been sent to |
| 1185 | 1186 | * @param string The tool (announcement, agenda, ...) |
| 1186 | 1187 | * @param int ID of the element of the corresponding type |
| 1188 | + * @param string $tool |
|
| 1187 | 1189 | * @return array Array of users and groups to whom the element has been sent |
| 1188 | 1190 | */ |
| 1189 | 1191 | public static function sent_to($tool, $id) |
@@ -1308,6 +1310,8 @@ discard block |
||
| 1308 | 1310 | * @param int attach id |
| 1309 | 1311 | * @param array uploaded file $_FILES |
| 1310 | 1312 | * @param string file comment |
| 1313 | + * @param integer $id_attach |
|
| 1314 | + * @param string $file_comment |
|
| 1311 | 1315 | * @return int |
| 1312 | 1316 | */ |
| 1313 | 1317 | public static function edit_announcement_attachment_file($id_attach, $file, $file_comment) |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | /** |
| 214 | 214 | * Displays the tools of a certain category. |
| 215 | 215 | * |
| 216 | - * @return void |
|
| 216 | + * @return string |
|
| 217 | 217 | * @param string $course_tool_category contains the category of tools to display: |
| 218 | 218 | * "Public", "PublicButHide", "courseAdmin", "claroAdmin" |
| 219 | 219 | */ |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | * @param array $all_tools_list List of tools as returned by get_tools_category() |
| 651 | 651 | * @param bool $rows |
| 652 | 652 | * |
| 653 | - * @return void |
|
| 653 | + * @return string |
|
| 654 | 654 | */ |
| 655 | 655 | public static function show_tools_category($all_tools_list, $rows = false) |
| 656 | 656 | { |
@@ -1194,6 +1194,7 @@ discard block |
||
| 1194 | 1194 | |
| 1195 | 1195 | /** |
| 1196 | 1196 | * Show a toolbar with shortcuts to the course tool |
| 1197 | + * @param integer $orientation |
|
| 1197 | 1198 | */ |
| 1198 | 1199 | public static function show_navigation_tool_shortcuts($orientation = SHORTCUTS_HORIZONTAL) |
| 1199 | 1200 | { |
@@ -351,6 +351,12 @@ |
||
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | 353 | * Additional functions needed for fast integration |
| 354 | + * @param integer $status |
|
| 355 | + * @param string $section |
|
| 356 | + * @param string $title |
|
| 357 | + * @param string $url |
|
| 358 | + * @param string|null $formatter |
|
| 359 | + * @param string $comment |
|
| 354 | 360 | */ |
| 355 | 361 | public function build_setting($status, $section, $title, $url, $current_value, $expected_value, $formatter, $comment, $img_path = null) { |
| 356 | 362 | switch ($status) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @return array |
|
| 35 | + * @return string[] |
|
| 36 | 36 | */ |
| 37 | 37 | public static function toolList() |
| 38 | 38 | { |
@@ -290,7 +290,6 @@ discard block |
||
| 290 | 290 | * 'page_nr' = The page to display |
| 291 | 291 | * 'hide_navigation' = true to hide the navigation |
| 292 | 292 | * @param array $query_vars Additional variables to add in the query-string |
| 293 | - * @param array $form actions Additional variables to add in the query-string |
|
| 294 | 293 | * @param mixed An array with bool values to know which columns show. |
| 295 | 294 | * i.e: $visibility_options= array(true, false) we will only show the first column |
| 296 | 295 | * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing |
@@ -331,7 +330,6 @@ discard block |
||
| 331 | 330 | * 'page_nr' = The page to display |
| 332 | 331 | * 'hide_navigation' = true to hide the navigation |
| 333 | 332 | * @param array $query_vars Additional variables to add in the query-string |
| 334 | - * @param array $form actions Additional variables to add in the query-string |
|
| 335 | 333 | * @param mixed An array with bool values to know which columns show. i.e: |
| 336 | 334 | * $visibility_options= array(true, false) we will only show the first column |
| 337 | 335 | * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing |
@@ -388,10 +386,11 @@ discard block |
||
| 388 | 386 | * 'per_page' = number of items to show per page |
| 389 | 387 | * 'page_nr' = The page to display |
| 390 | 388 | * @param array $query_vars Additional variables to add in the query-string |
| 391 | - * @param array $column_show Array of binaries 1= show columns 0. hide a column |
|
| 389 | + * @param integer[] $column_show Array of binaries 1= show columns 0. hide a column |
|
| 392 | 390 | * @param array $column_order An array of integers that let us decide how the columns are going to be sort. |
| 393 | 391 | * i.e: $column_order=array('1''4','3','4'); The 2nd column will be order like the 4th column |
| 394 | 392 | * @param array $form_actions Set optional forms actions |
| 393 | + * @param string $table_name |
|
| 395 | 394 | * |
| 396 | 395 | * @author Julio Montoya |
| 397 | 396 | */ |
@@ -444,7 +443,7 @@ discard block |
||
| 444 | 443 | * @param bool $filter (true) or not (false) |
| 445 | 444 | * @param bool $returnValue |
| 446 | 445 | * |
| 447 | - * @return void |
|
| 446 | + * @return string|null |
|
| 448 | 447 | */ |
| 449 | 448 | public static function display_normal_message($message, $filter = true, $returnValue = false) |
| 450 | 449 | { |
@@ -474,7 +473,7 @@ discard block |
||
| 474 | 473 | /** |
| 475 | 474 | * Displays an confirmation message. Use this if something has been done successfully |
| 476 | 475 | * @param bool Filter (true) or not (false) |
| 477 | - * @return void |
|
| 476 | + * @return string|null |
|
| 478 | 477 | */ |
| 479 | 478 | public static function display_confirmation_message ($message, $filter = true, $returnValue = false) |
| 480 | 479 | { |
@@ -491,7 +490,7 @@ discard block |
||
| 491 | 490 | * @param string $message - include any additional html |
| 492 | 491 | * tags if you need them |
| 493 | 492 | * @param bool Filter (true) or not (false) |
| 494 | - * @return void |
|
| 493 | + * @return string|null |
|
| 495 | 494 | */ |
| 496 | 495 | public static function display_error_message ($message, $filter = true, $returnValue = false) |
| 497 | 496 | { |
@@ -681,6 +680,7 @@ discard block |
||
| 681 | 680 | * @param string The alt text (probably a language variable) |
| 682 | 681 | * @param array additional attributes (for instance height, width, onclick, ...) |
| 683 | 682 | * @param integer The wanted width of the icon (to be looked for in the corresponding img/icons/ folder) |
| 683 | + * @param string $image |
|
| 684 | 684 | * @return void |
| 685 | 685 | */ |
| 686 | 686 | public static function display_icon( |
@@ -881,6 +881,7 @@ discard block |
||
| 881 | 881 | /** |
| 882 | 882 | * Displays an HTML input tag |
| 883 | 883 | * |
| 884 | + * @param string $type |
|
| 884 | 885 | */ |
| 885 | 886 | public static function input($type, $name, $value, $attributes = array()) |
| 886 | 887 | { |
@@ -897,8 +898,8 @@ discard block |
||
| 897 | 898 | } |
| 898 | 899 | |
| 899 | 900 | /** |
| 900 | - * @param $name |
|
| 901 | - * @param $value |
|
| 901 | + * @param string $name |
|
| 902 | + * @param string $value |
|
| 902 | 903 | * @param array $attributes |
| 903 | 904 | * @return string |
| 904 | 905 | */ |
@@ -913,6 +914,7 @@ discard block |
||
| 913 | 914 | /** |
| 914 | 915 | * Displays an HTML select tag |
| 915 | 916 | * |
| 917 | + * @param string $blank_item_text |
|
| 916 | 918 | */ |
| 917 | 919 | public static function select( |
| 918 | 920 | $name, |
@@ -983,6 +985,8 @@ discard block |
||
| 983 | 985 | * @param array content that will be showed |
| 984 | 986 | * @param string the id of the container of the tab in the example "tabs" |
| 985 | 987 | * @param array attributes for the ul |
| 988 | + * @param string[] $header_list |
|
| 989 | + * @param string[] $content_list |
|
| 986 | 990 | * |
| 987 | 991 | */ |
| 988 | 992 | public static function tabs($header_list, $content_list, $id = 'tabs', $attributes = array(), $ul_attributes = array()) |
@@ -1029,7 +1033,7 @@ discard block |
||
| 1029 | 1033 | |
| 1030 | 1034 | /** |
| 1031 | 1035 | * @param $headers |
| 1032 | - * @param null $selected |
|
| 1036 | + * @param integer $selected |
|
| 1033 | 1037 | * |
| 1034 | 1038 | * @return string |
| 1035 | 1039 | */ |
@@ -1067,6 +1071,7 @@ discard block |
||
| 1067 | 1071 | * As you can see both function use the same "my_grid_name" this is very important otherwise nothing will work |
| 1068 | 1072 | * |
| 1069 | 1073 | * @param string the div id, this value must be the same with the first parameter of Display::grid_js() |
| 1074 | + * @param string $div_id |
|
| 1070 | 1075 | * @return string html |
| 1071 | 1076 | * |
| 1072 | 1077 | */ |
@@ -1622,6 +1627,8 @@ discard block |
||
| 1622 | 1627 | * @param string url that will be added (for jquery see hot_courses.tpl) |
| 1623 | 1628 | * @param string point info array see function CourseManager::get_course_ranking() |
| 1624 | 1629 | * @param bool add a div wrapper |
| 1630 | + * @param string $id |
|
| 1631 | + * @param string $url |
|
| 1625 | 1632 | * @todo use templates |
| 1626 | 1633 | **/ |
| 1627 | 1634 | public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true) |
@@ -1717,6 +1724,9 @@ discard block |
||
| 1717 | 1724 | return '<'.$size.'>'.Security::remove_XSS($title).'</'.$size.'>'; |
| 1718 | 1725 | } |
| 1719 | 1726 | |
| 1727 | + /** |
|
| 1728 | + * @param string $title |
|
| 1729 | + */ |
|
| 1720 | 1730 | public static function page_subheader2($title, $second_title = null) |
| 1721 | 1731 | { |
| 1722 | 1732 | return self::page_header($title, $second_title, 'h4'); |
@@ -1947,6 +1957,7 @@ discard block |
||
| 1947 | 1957 | |
| 1948 | 1958 | /** |
| 1949 | 1959 | * @todo use twig |
| 1960 | + * @param string $title |
|
| 1950 | 1961 | */ |
| 1951 | 1962 | public static function group_button($title, $elements) |
| 1952 | 1963 | { |
@@ -2164,9 +2175,9 @@ discard block |
||
| 2164 | 2175 | |
| 2165 | 2176 | /** |
| 2166 | 2177 | * @param int $id |
| 2167 | - * @param array $content |
|
| 2178 | + * @param string[] $content |
|
| 2168 | 2179 | * @param int $col |
| 2169 | - * @param bool|true $right |
|
| 2180 | + * @param boolean $right |
|
| 2170 | 2181 | * @return string |
| 2171 | 2182 | */ |
| 2172 | 2183 | public static function toolbarAction($id, $content = array(), $col = 2, $right = true) |
@@ -2248,10 +2259,10 @@ discard block |
||
| 2248 | 2259 | /** |
| 2249 | 2260 | * @param string $title |
| 2250 | 2261 | * @param string $content |
| 2251 | - * @param null $id |
|
| 2262 | + * @param string $id |
|
| 2252 | 2263 | * @param array $params |
| 2253 | - * @param null $idAccordion |
|
| 2254 | - * @param null $idCollapse |
|
| 2264 | + * @param string $idAccordion |
|
| 2265 | + * @param string $idCollapse |
|
| 2255 | 2266 | * @param bool|true $open |
| 2256 | 2267 | * @param bool|false $fullClickable |
| 2257 | 2268 | * @return null|string |