@@ -85,6 +85,7 @@ |
||
85 | 85 | /** |
86 | 86 | * @author Sebastien Piraux <[email protected]> |
87 | 87 | * @param sql : a sql query (as a string) |
88 | + * @param integer $X |
|
88 | 89 | * @desc Return many results of a query in a X column tab |
89 | 90 | * in $resu[$i][0], $resu[$i][1],$resu[$i][2],... |
90 | 91 | * this function is more 'standard' but use a little |
@@ -18,6 +18,7 @@ discard block |
||
18 | 18 | * Get all files of lang folder (forum.inc.php,gradebook.inc.php,notebook.inc.php) |
19 | 19 | * @param String The lang path folder (/var/www/my_lms/main/lang/spanish) |
20 | 20 | * @param bool true if we only want the "subname" trad4all instead of trad4all.inc.php |
21 | + * @param string $path |
|
21 | 22 | * |
22 | 23 | * @return Array All file of lang folder |
23 | 24 | */ |
@@ -68,6 +69,7 @@ discard block |
||
68 | 69 | /** |
69 | 70 | * Get all information of language |
70 | 71 | * @param Integer The parent id(Language father id) |
72 | + * @param integer $parent_id |
|
71 | 73 | * @return Array All information about language |
72 | 74 | */ |
73 | 75 | public static function get_all_information_of_language($parent_id) |
@@ -86,6 +88,7 @@ discard block |
||
86 | 88 | /** |
87 | 89 | * Get all information of chamilo file |
88 | 90 | * @param String The chamilo path file (/var/www/chamilo/main/lang/spanish/gradebook.inc.php) |
91 | + * @param string $system_path_file |
|
89 | 92 | * @patam Bool Whether we want to remove the '$' prefix in the results or not |
90 | 93 | * @return Array Contains all information of chamilo file |
91 | 94 | */ |
@@ -345,7 +348,7 @@ discard block |
||
345 | 348 | /** |
346 | 349 | * Make available the language |
347 | 350 | * @param Integer The language id |
348 | - * @return void |
|
351 | + * @return boolean |
|
349 | 352 | */ |
350 | 353 | public static function make_available_language($language_id) |
351 | 354 | { |
@@ -14,6 +14,9 @@ |
||
14 | 14 | class Session implements \ArrayAccess |
15 | 15 | { |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $variable |
|
19 | + */ |
|
17 | 20 | static function read($variable, $default = null) |
18 | 21 | { |
19 | 22 | return isset($_SESSION[$variable]) ? $_SESSION[$variable] : $default; |
@@ -31,6 +31,10 @@ |
||
31 | 31 | return $method == 'GET'; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $key |
|
36 | + * @param string $default |
|
37 | + */ |
|
34 | 38 | public static function post($key, $default = null) |
35 | 39 | { |
36 | 40 | return isset($_POST[$key]) ? $_POST[$key] : $default; |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * @param int Whether the announcement should be visible to anonymous users (1) or not (0) |
307 | 307 | * @param string The language for which the announvement should be shown. Leave null for all langages |
308 | 308 | * @param int Whether to send an e-mail to all users (1) or not (0) |
309 | - * @return mixed insert_id on success, false on failure |
|
309 | + * @return false|string insert_id on success, false on failure |
|
310 | 310 | */ |
311 | 311 | public static function add_announcement( |
312 | 312 | $title, |
@@ -648,6 +648,8 @@ discard block |
||
648 | 648 | * @param int Whether to send to all teachers (1) or not (0) |
649 | 649 | * @param int Whether to send to all students (1) or not (0) |
650 | 650 | * @param string Language (optional, considered for all languages if left empty) |
651 | + * @param integer|null $teacher |
|
652 | + * @param integer|null $student |
|
651 | 653 | * @return bool True if the message was sent or there was no destination matching. False on database or e-mail sending error. |
652 | 654 | */ |
653 | 655 | public static function send_system_announcement_by_email($title, $content, $teacher, $student, $language = null, $sendEmailTest = false) |
@@ -80,7 +80,7 @@ |
||
80 | 80 | * @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC) |
81 | 81 | * @param array $column_show The columns that we will show in the table i.e: $column_show = array('1','0','1') we will show the 1st and the 3th column. |
82 | 82 | * @param array $column_order Changes how the columns will be sorted ie. $column_order = array('0','3','2','3') The column [1] will be sorted like the column [3] |
83 | - * @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
83 | + * @param integer $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE) |
|
84 | 84 | * @return array The sorted dataset |
85 | 85 | * @author [email protected] |
86 | 86 | */ |
@@ -330,6 +330,7 @@ discard block |
||
330 | 330 | /** |
331 | 331 | * Sets the footer visibility |
332 | 332 | * @param bool true if we show the footer |
333 | + * @param boolean $status |
|
333 | 334 | */ |
334 | 335 | public function set_footer($status) |
335 | 336 | { |
@@ -370,6 +371,7 @@ discard block |
||
370 | 371 | /** |
371 | 372 | * Sets the header visibility |
372 | 373 | * @param bool true if we show the header |
374 | + * @param boolean $status |
|
373 | 375 | */ |
374 | 376 | public function set_header($status) |
375 | 377 | { |
@@ -52,6 +52,7 @@ discard block |
||
52 | 52 | * Converts the text of a html-document to a given encoding, the meta-tag is changed accordingly. |
53 | 53 | * @param string $string The input full-html document. |
54 | 54 | * @param string The new encoding value to be set. |
55 | + * @param string $encoding |
|
55 | 56 | */ |
56 | 57 | function api_set_encoding_html(&$string, $encoding) { |
57 | 58 | $old_encoding = api_detect_encoding_html($string); |
@@ -74,7 +75,7 @@ discard block |
||
74 | 75 | * Returns the title of a html document. |
75 | 76 | * @param string $string The contents of the input document. |
76 | 77 | * @param string $input_encoding The encoding of the input document. If the value is not set, it is detected. |
77 | - * @param string $$output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | + * @param string $output_encoding The encoding of the retrieved title. If the value is not set, the system encoding is assumend. |
|
78 | 79 | * @return string The retrieved title, html-entities and extra-whitespace between the words are cleaned. |
79 | 80 | */ |
80 | 81 | function api_get_title_html(&$string, $output_encoding = null, $input_encoding = null) { |
@@ -433,7 +434,7 @@ discard block |
||
433 | 434 | * @since wordpress 2.8.1 |
434 | 435 | * @access private |
435 | 436 | * |
436 | - * @param string|array $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | + * @param string[] $search The value being searched for, otherwise known as the needle. An array may be used to designate multiple needles. |
|
437 | 438 | * @param string $subject The string being searched and replaced on, otherwise known as the haystack. |
438 | 439 | * @return string The string with the replaced svalues. |
439 | 440 | */ |
@@ -628,6 +629,7 @@ discard block |
||
628 | 629 | * @param string The text to "cut" |
629 | 630 | * @param int Count of chars |
630 | 631 | * @param bool Whether to embed in a <span title="...">...</span> |
632 | + * @param integer $maxchar |
|
631 | 633 | * @return string |
632 | 634 | * */ |
633 | 635 | function cut($text, $maxchar, $embed = false) { |
@@ -645,7 +647,7 @@ discard block |
||
645 | 647 | * |
646 | 648 | * @param mixed Number to convert |
647 | 649 | * @param int Decimal points 0=never, 1=if needed, 2=always |
648 | - * @return mixed An integer or a float depends on the parameter |
|
650 | + * @return string|null An integer or a float depends on the parameter |
|
649 | 651 | */ |
650 | 652 | function float_format($number, $flag = 1) { |
651 | 653 | if (is_numeric($number)) { |
@@ -689,7 +691,7 @@ discard block |
||
689 | 691 | /** |
690 | 692 | * Gets the week from a day |
691 | 693 | * @param string Date in UTC (2010-01-01 12:12:12) |
692 | - * @return int Returns an integer with the week number of the year |
|
694 | + * @return string Returns an integer with the week number of the year |
|
693 | 695 | */ |
694 | 696 | function get_week_from_day($date) { |
695 | 697 | if (!empty($date)) { |
@@ -739,6 +741,9 @@ discard block |
||
739 | 741 | return $output.$end; |
740 | 742 | } |
741 | 743 | |
744 | +/** |
|
745 | + * @param string $glue |
|
746 | + */ |
|
742 | 747 | function implode_with_key($glue, $array) { |
743 | 748 | if (!empty($array)) { |
744 | 749 | $string = ''; |
@@ -817,7 +822,7 @@ discard block |
||
817 | 822 | /** |
818 | 823 | * @param string $string |
819 | 824 | * @param bool $capitalizeFirstCharacter |
820 | - * @return mixed |
|
825 | + * @return string |
|
821 | 826 | */ |
822 | 827 | function underScoreToCamelCase($string, $capitalizeFirstCharacter = true) |
823 | 828 | { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param string $url The URL of the site |
19 | 19 | * @param string $description The description of the site |
20 | 20 | * @param int $active is active or not |
21 | - * @return boolean if success |
|
21 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
22 | 22 | */ |
23 | 23 | public static function add($url, $description, $active) |
24 | 24 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param string $url |
44 | 44 | * @param string $description The description of the site |
45 | 45 | * @param int $active is active or not |
46 | - * @return boolean if success |
|
46 | + * @return Doctrine\DBAL\Driver\Statement|null if success |
|
47 | 47 | */ |
48 | 48 | public static function update($url_id, $url, $description, $active) |
49 | 49 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @author Julio Montoya |
68 | 68 | * @param int $id url id |
69 | 69 | * |
70 | - * @return boolean true if success |
|
70 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
71 | 71 | * */ |
72 | 72 | public static function delete($id) |
73 | 73 | { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * @author Julio Montoya |
367 | 367 | * @param int user id |
368 | 368 | * @param int url id |
369 | - * @return boolean true if success |
|
369 | + * @return integer true if success |
|
370 | 370 | * */ |
371 | 371 | public static function relation_url_user_exist($user_id, $url_id) |
372 | 372 | { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * @author Julio Montoya |
385 | 385 | * @param int $courseId |
386 | 386 | * @param int $urlId |
387 | - * @return boolean true if success |
|
387 | + * @return integer true if success |
|
388 | 388 | * */ |
389 | 389 | public static function relation_url_course_exist($courseId, $urlId) |
390 | 390 | { |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * @author Julio Montoya |
406 | 406 | * @param int $userGroupId |
407 | 407 | * @param int $urlId |
408 | - * @return boolean true if success |
|
408 | + * @return integer true if success |
|
409 | 409 | * */ |
410 | 410 | public static function relationUrlUsergroupExist($userGroupId, $urlId) |
411 | 411 | { |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @author Julio Montoya |
425 | 425 | * @param int user id |
426 | 426 | * @param int url id |
427 | - * @return boolean true if success |
|
427 | + * @return integer true if success |
|
428 | 428 | * */ |
429 | 429 | public static function relation_url_session_exist($session_id, $url_id) |
430 | 430 | { |
@@ -545,6 +545,8 @@ discard block |
||
545 | 545 | * @author Julio Montoya |
546 | 546 | * @param array of course ids |
547 | 547 | * @param array of url_ids |
548 | + * @param integer[] $courseCategoryList |
|
549 | + * @param integer[] $urlList |
|
548 | 550 | * @return array |
549 | 551 | **/ |
550 | 552 | public static function addCourseCategoryListToUrl($courseCategoryList, $urlList) |
@@ -575,7 +577,7 @@ discard block |
||
575 | 577 | * @author Julio Montoya |
576 | 578 | * @param int $categoryCourseId |
577 | 579 | * @param int $urlId |
578 | - * @return boolean true if success |
|
580 | + * @return integer true if success |
|
579 | 581 | * */ |
580 | 582 | public static function relationUrlCourseCategoryExist($categoryCourseId, $urlId) |
581 | 583 | { |
@@ -592,7 +594,7 @@ discard block |
||
592 | 594 | /** |
593 | 595 | * @param int $userGroupId |
594 | 596 | * @param int $urlId |
595 | - * @return int |
|
597 | + * @return string |
|
596 | 598 | */ |
597 | 599 | public static function addUserGroupToUrl($userGroupId, $urlId) |
598 | 600 | { |
@@ -692,7 +694,7 @@ discard block |
||
692 | 694 | * @param int $courseId |
693 | 695 | * @param int $url_id |
694 | 696 | * |
695 | - * @return resource |
|
697 | + * @return boolean |
|
696 | 698 | */ |
697 | 699 | public static function add_course_to_url($courseId, $url_id = 1) |
698 | 700 | { |
@@ -763,7 +765,7 @@ discard block |
||
763 | 765 | * @param int $courseId |
764 | 766 | * @param int $urlId |
765 | 767 | * |
766 | - * @return boolean true if success |
|
768 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
767 | 769 | * */ |
768 | 770 | public static function delete_url_rel_course($courseId, $urlId) |
769 | 771 | { |
@@ -781,7 +783,7 @@ discard block |
||
781 | 783 | * @param int $userGroupId |
782 | 784 | * @param int $urlId |
783 | 785 | * |
784 | - * @return boolean true if success |
|
786 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
785 | 787 | * */ |
786 | 788 | public static function delete_url_rel_usergroup($userGroupId, $urlId) |
787 | 789 | { |
@@ -800,7 +802,7 @@ discard block |
||
800 | 802 | * @param int $userGroupId |
801 | 803 | * @param int $urlId |
802 | 804 | * |
803 | - * @return boolean true if success |
|
805 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
804 | 806 | * */ |
805 | 807 | public static function deleteUrlRelCourseCategory($userGroupId, $urlId) |
806 | 808 | { |
@@ -819,7 +821,7 @@ discard block |
||
819 | 821 | * @param char course code |
820 | 822 | * @param int url id |
821 | 823 | * |
822 | - * @return boolean true if success |
|
824 | + * @return Doctrine\DBAL\Driver\Statement|null true if success |
|
823 | 825 | * */ |
824 | 826 | public static function delete_url_rel_session($session_id, $url_id) |
825 | 827 | { |