@@ -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 |
@@ -1255,6 +1255,7 @@ discard block |
||
| 1255 | 1255 | |
| 1256 | 1256 | /** |
| 1257 | 1257 | * Validates the time control key |
| 1258 | + * @param integer $exercise_id |
|
| 1258 | 1259 | */ |
| 1259 | 1260 | public static function exercise_time_control_is_valid( |
| 1260 | 1261 | $exercise_id, |
@@ -1388,7 +1389,7 @@ discard block |
||
| 1388 | 1389 | * @param int $in_direction |
| 1389 | 1390 | * @param string $in_hotpot_path |
| 1390 | 1391 | * @param bool $in_get_count |
| 1391 | - * @param null $where_condition |
|
| 1392 | + * @param string $where_condition |
|
| 1392 | 1393 | * @return array|int |
| 1393 | 1394 | */ |
| 1394 | 1395 | public static function get_exam_results_hotpotatoes_data( |
@@ -2179,7 +2180,7 @@ discard block |
||
| 2179 | 2180 | /** |
| 2180 | 2181 | * Return true if pass_pourcentage activated (we use the pass pourcentage feature |
| 2181 | 2182 | * return false if pass_percentage = 0 (we don't use the pass pourcentage feature |
| 2182 | - * @param $in_pass_pourcentage |
|
| 2183 | + * @param string $in_pass_pourcentage |
|
| 2183 | 2184 | * @return boolean |
| 2184 | 2185 | * In this version, pass_percentage and show_success_message are disabled if |
| 2185 | 2186 | * pass_percentage is set to 0 |
@@ -2192,7 +2193,7 @@ discard block |
||
| 2192 | 2193 | /** |
| 2193 | 2194 | * Converts a numeric value in a percentage example 0.66666 to 66.67 % |
| 2194 | 2195 | * @param $value |
| 2195 | - * @return float Converted number |
|
| 2196 | + * @return string Converted number |
|
| 2196 | 2197 | */ |
| 2197 | 2198 | public static function convert_to_percentage($value) |
| 2198 | 2199 | { |
@@ -2208,7 +2209,7 @@ discard block |
||
| 2208 | 2209 | * @param float $score |
| 2209 | 2210 | * @param float $weight |
| 2210 | 2211 | * @deprecated seem not to be used |
| 2211 | - * @return float the score rounded converted to the new range |
|
| 2212 | + * @return string|null the score rounded converted to the new range |
|
| 2212 | 2213 | */ |
| 2213 | 2214 | public static function convert_score($score, $weight) |
| 2214 | 2215 | { |
@@ -2759,6 +2760,7 @@ discard block |
||
| 2759 | 2760 | * @param int exercise id |
| 2760 | 2761 | * @param int $courseId |
| 2761 | 2762 | * @param int session id |
| 2763 | + * @param integer $user_count |
|
| 2762 | 2764 | * @return float Best average score |
| 2763 | 2765 | */ |
| 2764 | 2766 | public static function get_best_average_score_by_exercise( |
@@ -3198,8 +3200,9 @@ discard block |
||
| 3198 | 3200 | } |
| 3199 | 3201 | |
| 3200 | 3202 | /** |
| 3201 | - * @param array $answer |
|
| 3203 | + * @param string|null $answer |
|
| 3202 | 3204 | * @param string $user_answer |
| 3205 | + * @param string|null $current_answer |
|
| 3203 | 3206 | * @return array |
| 3204 | 3207 | */ |
| 3205 | 3208 | public static function check_fill_in_blanks($answer, $user_answer, $current_answer) |
@@ -3805,7 +3808,7 @@ discard block |
||
| 3805 | 3808 | |
| 3806 | 3809 | /** |
| 3807 | 3810 | * @param int $countLetter |
| 3808 | - * @return mixed |
|
| 3811 | + * @return string |
|
| 3809 | 3812 | */ |
| 3810 | 3813 | public static function detectInputAppropriateClass($countLetter) |
| 3811 | 3814 | { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string Name of common tag to place each line in |
| 158 | 158 | * @param string Name of the root element. A root element should always be given. |
| 159 | 159 | * @param string Encoding in which the data is provided |
| 160 | - * @return void Prompts the user for a file download |
|
| 160 | + * @return boolean Prompts the user for a file download |
|
| 161 | 161 | */ |
| 162 | 162 | public static function export_complex_table_xml( |
| 163 | 163 | $data, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | * @param string $name |
| 284 | 284 | * @param string $format |
| 285 | 285 | * |
| 286 | - * @return bool |
|
| 286 | + * @return false|null |
|
| 287 | 287 | */ |
| 288 | 288 | public static function htmlToOdt($html, $name, $format = 'odt') |
| 289 | 289 | { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - * @return array |
|
| 126 | + * @return string[] |
|
| 127 | 127 | */ |
| 128 | 128 | public static function getValidExtraFieldTypes() |
| 129 | 129 | { |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | /** |
| 201 | 201 | * @param array $conditions |
| 202 | - * @param null $order_field_options_by |
|
| 202 | + * @param string $order_field_options_by |
|
| 203 | 203 | * |
| 204 | 204 | * @return array |
| 205 | 205 | */ |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | /** |
| 238 | 238 | * @param string $variable |
| 239 | 239 | * |
| 240 | - * @return array|bool |
|
| 240 | + * @return integer |
|
| 241 | 241 | */ |
| 242 | 242 | public function get_handler_field_info_by_field_variable($variable) |
| 243 | 243 | { |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | /** |
| 320 | 320 | * @param string $handler |
| 321 | 321 | * |
| 322 | - * @return array |
|
| 322 | + * @return string[] |
|
| 323 | 323 | */ |
| 324 | 324 | public static function get_extra_fields_by_handler($handler) |
| 325 | 325 | { |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | /** |
| 499 | - * @return array |
|
| 499 | + * @return string[] |
|
| 500 | 500 | */ |
| 501 | 501 | public function get_field_types() |
| 502 | 502 | { |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | /** |
| 507 | 507 | * @param int $id |
| 508 | 508 | * |
| 509 | - * @return null |
|
| 509 | + * @return string|null |
|
| 510 | 510 | */ |
| 511 | 511 | public function get_field_type_by_id($id) |
| 512 | 512 | { |
@@ -691,7 +691,6 @@ discard block |
||
| 691 | 691 | * @param FormValidator $form |
| 692 | 692 | * @param array $extraData |
| 693 | 693 | * @param bool $admin_permissions |
| 694 | - * @param int $user_id |
|
| 695 | 694 | * @param array $extra |
| 696 | 695 | * @param int $itemId |
| 697 | 696 | * @param array $exclude variables of extra field to exclude |
@@ -1592,7 +1591,7 @@ discard block |
||
| 1592 | 1591 | } |
| 1593 | 1592 | |
| 1594 | 1593 | /** |
| 1595 | - * @return array |
|
| 1594 | + * @return string[] |
|
| 1596 | 1595 | */ |
| 1597 | 1596 | public function getJqgridColumnNames() |
| 1598 | 1597 | { |
@@ -1832,7 +1831,7 @@ discard block |
||
| 1832 | 1831 | } |
| 1833 | 1832 | |
| 1834 | 1833 | /** |
| 1835 | - * @param array $columns |
|
| 1834 | + * @param string[] $columns |
|
| 1836 | 1835 | * @param array $column_model |
| 1837 | 1836 | * @param array $extraFields |
| 1838 | 1837 | * @return array |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @return ExtraField |
|
| 46 | + * @return string |
|
| 47 | 47 | */ |
| 48 | 48 | public function getExtraField() |
| 49 | 49 | { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * This function is used with $extraField->addElements() |
| 73 | 73 | * @param array $params array for the insertion into the *_field_values table |
| 74 | 74 | * |
| 75 | - * @return mixed false on empty params, void otherwise |
|
| 75 | + * @return false|null false on empty params, void otherwise |
|
| 76 | 76 | * @assert (array()) === false |
| 77 | 77 | */ |
| 78 | 78 | public function saveFieldValues($params) |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
| 501 | 501 | * @param int $field_id Field ID (the ID from the *_field table) |
| 502 | 502 | * @param bool $transform Whether to transform the result to a human readable strings |
| 503 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
| 503 | + * @return string A structured array with the field_id and field_value, or false on error |
|
| 504 | 504 | * @assert (-1,-1) === false |
| 505 | 505 | */ |
| 506 | 506 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * @param int $item_id Item ID from the original table |
| 594 | 594 | * @param string $field_variable The name of the field we are looking for |
| 595 | 595 | * @param bool $transform |
| 596 | - * @param bool $allVisibility |
|
| 596 | + * @param bool $visibility |
|
| 597 | 597 | * |
| 598 | 598 | * @return mixed Array of results, or false on error or not found |
| 599 | 599 | * @assert (-1,'') === false |
@@ -13,6 +13,8 @@ discard block |
||
| 13 | 13 | * @param - action (string) - action type require : 'delete' or 'update' |
| 14 | 14 | * @param - old_path (string) - old path info stored to change |
| 15 | 15 | * @param - new_path (string) - new path info to substitute |
| 16 | + * @param string $action |
|
| 17 | + * @param string $old_path |
|
| 16 | 18 | * @desc Update the file or directory path in the document db document table |
| 17 | 19 | * |
| 18 | 20 | */ |
@@ -76,8 +78,8 @@ discard block |
||
| 76 | 78 | * Deletes a file or a directory |
| 77 | 79 | * |
| 78 | 80 | * @author - Hugues Peeters |
| 79 | - * @param $file (String) - the path of file or directory to delete |
|
| 80 | - * @return boolean - true if the delete succeed, false otherwise. |
|
| 81 | + * @param string $file (String) - the path of file or directory to delete |
|
| 82 | + * @return boolean|null - true if the delete succeed, false otherwise. |
|
| 81 | 83 | * @see - delete() uses check_name_exist() and removeDir() functions |
| 82 | 84 | */ |
| 83 | 85 | function my_delete($file) |
@@ -162,9 +164,9 @@ discard block |
||
| 162 | 164 | * Renames a file or a directory |
| 163 | 165 | * |
| 164 | 166 | * @author - Hugues Peeters <[email protected]> |
| 165 | - * @param - $file_path (string) - complete path of the file or the directory |
|
| 166 | - * @param - $new_file_name (string) - new name for the file or the directory |
|
| 167 | - * @return - boolean - true if succeed |
|
| 167 | + * @param string $file_path (string) - complete path of the file or the directory |
|
| 168 | + * @param string $new_file_name (string) - new name for the file or the directory |
|
| 169 | + * @return string boolean - true if succeed |
|
| 168 | 170 | * - boolean - false otherwise |
| 169 | 171 | * @see - rename() uses the check_name_exist() and php2phps() functions |
| 170 | 172 | */ |
@@ -327,7 +329,6 @@ discard block |
||
| 327 | 329 | * Calculation size of a directory |
| 328 | 330 | * |
| 329 | 331 | * @returns integer size |
| 330 | - * @param string $path path to size |
|
| 331 | 332 | * @param boolean $recursive if true , include subdir in total |
| 332 | 333 | */ |
| 333 | 334 | function dirsize($root, $recursive = true) { |
@@ -17,6 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @author - Hugues Peeters <[email protected]> |
| 19 | 19 | * @param - file_name (string) name of a file |
| 20 | + * @param string $file_name |
|
| 20 | 21 | * @return - the filenam phps'ized |
| 21 | 22 | */ |
| 22 | 23 | function php2phps($file_name) { |
@@ -73,7 +74,7 @@ discard block |
||
| 73 | 74 | * Returns the name without extension, used for the title |
| 74 | 75 | * |
| 75 | 76 | * @param string $name |
| 76 | - * @return name without the extension |
|
| 77 | + * @return string without the extension |
|
| 77 | 78 | */ |
| 78 | 79 | function get_document_title($name) { |
| 79 | 80 | // If they upload .htaccess... |
@@ -86,7 +87,7 @@ discard block |
||
| 86 | 87 | * This function checks if the upload succeeded |
| 87 | 88 | * |
| 88 | 89 | * @param array $uploaded_file ($_FILES) |
| 89 | - * @return true if upload succeeded |
|
| 90 | + * @return boolean if upload succeeded |
|
| 90 | 91 | */ |
| 91 | 92 | function process_uploaded_file($uploaded_file, $show_output = true) |
| 92 | 93 | { |
@@ -698,6 +699,8 @@ discard block |
||
| 698 | 699 | * @param - dir (string) - Path of the directory |
| 699 | 700 | * whe the file should be added |
| 700 | 701 | * @param - max_dir_space (int) - maximum size of the diretory in byte |
| 702 | + * @param string $dir |
|
| 703 | + * @param integer $max_dir_space |
|
| 701 | 704 | * @return - boolean true if there is enough space, |
| 702 | 705 | * boolean false otherwise |
| 703 | 706 | * |
@@ -1022,7 +1025,7 @@ discard block |
||
| 1022 | 1025 | * @param array $courseInfo |
| 1023 | 1026 | * @param array $userInfo |
| 1024 | 1027 | * @param array $uploaded_file - follows the $_FILES Structure |
| 1025 | - * @param string $upload_path - destination of the upload. |
|
| 1028 | + * @param string $uploadPath - destination of the upload. |
|
| 1026 | 1029 | * This path is to append to $base_work_dir |
| 1027 | 1030 | * @param string $base_work_dir - base working directory of the module |
| 1028 | 1031 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1201,7 +1204,7 @@ discard block |
||
| 1201 | 1204 | * @param bool $save_visibility |
| 1202 | 1205 | * @param int $group_id |
| 1203 | 1206 | * @param int $session_id Session ID, if any |
| 1204 | - * @return int id if inserted document |
|
| 1207 | + * @return string|false id if inserted document |
|
| 1205 | 1208 | */ |
| 1206 | 1209 | function add_document( |
| 1207 | 1210 | $_course, |
@@ -1337,7 +1340,7 @@ discard block |
||
| 1337 | 1340 | * |
| 1338 | 1341 | * @author Olivier Cauberghe <[email protected]> |
| 1339 | 1342 | * @param path+filename eg: /main/document/document.php |
| 1340 | - * @return The directory depth |
|
| 1343 | + * @return integer directory depth |
|
| 1341 | 1344 | */ |
| 1342 | 1345 | function get_levels($filename) { |
| 1343 | 1346 | $levels = explode('/', $filename); |
@@ -1354,6 +1357,7 @@ discard block |
||
| 1354 | 1357 | * @author Olivier Cauberghe <[email protected]> |
| 1355 | 1358 | * @param path,filename |
| 1356 | 1359 | * action: Adds an entry to the document table with the default settings. |
| 1360 | + * @param string $upload_path |
|
| 1357 | 1361 | */ |
| 1358 | 1362 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
| 1359 | 1363 | { |
@@ -1778,6 +1782,7 @@ discard block |
||
| 1778 | 1782 | |
| 1779 | 1783 | @author Roan Embrechts |
| 1780 | 1784 | @version 0.6 |
| 1785 | + * @param string $buffer |
|
| 1781 | 1786 | */ |
| 1782 | 1787 | function api_replace_links_in_string($upload_path, $buffer) { |
| 1783 | 1788 | // Search for hyperlinks |
@@ -2013,7 +2018,6 @@ discard block |
||
| 2013 | 2018 | * @param int $groupId |
| 2014 | 2019 | * @param bool $output |
| 2015 | 2020 | * @param array $parent |
| 2016 | - * @param string $uploadPath |
|
| 2017 | 2021 | * |
| 2018 | 2022 | */ |
| 2019 | 2023 | function add_all_documents_in_folder_to_database( |