@@ -21,6 +21,9 @@ discard block |
||
| 21 | 21 | private $order_page_slug; |
| 22 | 22 | public $taxonomy; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param string $file |
|
| 26 | + */ |
|
| 24 | 27 | public function __construct( $file ) |
| 25 | 28 | { |
| 26 | 29 | $this->file = $file; |
@@ -1942,6 +1945,7 @@ discard block |
||
| 1942 | 1945 | * Hooked into 'get_terms' |
| 1943 | 1946 | * |
| 1944 | 1947 | * @since 1.8.0 |
| 1948 | + * @param string[] $taxonomies |
|
| 1945 | 1949 | */ |
| 1946 | 1950 | public function append_teacher_name_to_module( $terms, $taxonomies, $args ) |
| 1947 | 1951 | { |
@@ -796,7 +796,7 @@ |
||
| 796 | 796 | * Return an array of field types expecting an array value returned. |
| 797 | 797 | * @access protected |
| 798 | 798 | * @since 1.0.0 |
| 799 | - * @return array |
|
| 799 | + * @return string[] |
|
| 800 | 800 | */ |
| 801 | 801 | protected function get_array_field_types () { |
| 802 | 802 | return array( 'multicheck' ); |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | * @since 1.8.0 |
| 453 | 453 | * @access public |
| 454 | 454 | * @parameters |
| 455 | - * @return array $users user id array |
|
| 455 | + * @return boolean $users user id array |
|
| 456 | 456 | */ |
| 457 | 457 | public function update_course_lessons_author ( $course_id, $new_author ){ |
| 458 | 458 | |
@@ -841,8 +841,7 @@ discard block |
||
| 841 | 841 | * This function hooks into wp_insert_post |
| 842 | 842 | * |
| 843 | 843 | * @since 1.8.0 |
| 844 | - * @param int $course_id |
|
| 845 | - * @return bool |
|
| 844 | + * @return false|null |
|
| 846 | 845 | */ |
| 847 | 846 | public function notify_admin_teacher_course_creation( $new_status, $old_status, $post ){ |
| 848 | 847 | |
@@ -1424,8 +1424,8 @@ discard block |
||
| 1424 | 1424 | * |
| 1425 | 1425 | * @global type $woothemes_sensei |
| 1426 | 1426 | * @global type $wpdb |
| 1427 | - * @param type $n |
|
| 1428 | - * @param type $offset |
|
| 1427 | + * @param integer $n |
|
| 1428 | + * @param integer $offset |
|
| 1429 | 1429 | * @return boolean |
| 1430 | 1430 | */ |
| 1431 | 1431 | function status_changes_repair_course_statuses( $n = 50, $offset = 0 ) { |
@@ -1669,8 +1669,8 @@ discard block |
||
| 1669 | 1669 | * Update the comment counts for all Courses and Lessons now that sensei comments will no longer be counted. |
| 1670 | 1670 | * |
| 1671 | 1671 | * @global type $wpdb |
| 1672 | - * @param type $n |
|
| 1673 | - * @param type $offset |
|
| 1672 | + * @param integer $n |
|
| 1673 | + * @param integer $offset |
|
| 1674 | 1674 | * @return boolean |
| 1675 | 1675 | */ |
| 1676 | 1676 | public function update_comment_course_lesson_comment_counts( $n = 50, $offset = 0 ) { |
@@ -850,7 +850,6 @@ discard block |
||
| 850 | 850 | * course_count function. |
| 851 | 851 | * |
| 852 | 852 | * @access public |
| 853 | - * @param array $exclude (default: array()) |
|
| 854 | 853 | * @param string $post_status (default: 'publish') |
| 855 | 854 | * @return int |
| 856 | 855 | */ |
@@ -1152,7 +1151,6 @@ discard block |
||
| 1152 | 1151 | * |
| 1153 | 1152 | * @since 1.4.0 |
| 1154 | 1153 | * @param object $user Queried user object |
| 1155 | - * @param boolean $manage Whether the user has permission to manage the courses |
|
| 1156 | 1154 | * @return string HTML displayng course data |
| 1157 | 1155 | */ |
| 1158 | 1156 | public function load_user_courses_content( $user = false ) { |
@@ -1879,7 +1877,7 @@ discard block |
||
| 1879 | 1877 | * |
| 1880 | 1878 | * @since 1.9 |
| 1881 | 1879 | * |
| 1882 | - * @param WP_Post $post |
|
| 1880 | + * @param WP_Post $post_id |
|
| 1883 | 1881 | */ |
| 1884 | 1882 | public function content_before_backwards_compatibility_hooks( $post_id ){ |
| 1885 | 1883 | |
@@ -192,7 +192,6 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @access public |
| 194 | 194 | * @param mixed $slug |
| 195 | - * @param mixed $option |
|
| 196 | 195 | * @param string $page_title (default: '') |
| 197 | 196 | * @param string $page_content (default: '') |
| 198 | 197 | * @param int $post_parent (default: 0) |
@@ -1037,6 +1036,9 @@ discard block |
||
| 1037 | 1036 | ?></div><?php |
| 1038 | 1037 | } |
| 1039 | 1038 | |
| 1039 | + /** |
|
| 1040 | + * @return string |
|
| 1041 | + */ |
|
| 1040 | 1042 | public function get_course_order() { |
| 1041 | 1043 | return get_option( 'sensei_course_order', '' ); |
| 1042 | 1044 | } |
@@ -60,8 +60,8 @@ |
||
| 60 | 60 | /** |
| 61 | 61 | * @since 1.9.0 |
| 62 | 62 | * |
| 63 | - * @param $setting |
|
| 64 | - * @param $new_value |
|
| 63 | + * @param string $setting |
|
| 64 | + * @param integer $new_value |
|
| 65 | 65 | */ |
| 66 | 66 | public function set( $setting, $new_value ){ |
| 67 | 67 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * Constructor |
| 22 | 22 | * @since 1.3.0 |
| 23 | 23 | * |
| 24 | - * @param $file |
|
| 24 | + * @param string $file |
|
| 25 | 25 | */ |
| 26 | 26 | public function __construct ( $file ) { |
| 27 | 27 | $this->name = __( 'Grading', 'woothemes-sensei' ); |
@@ -328,6 +328,7 @@ discard block |
||
| 328 | 328 | /** |
| 329 | 329 | * Return array of valid statuses for either Course or Lesson |
| 330 | 330 | * @since 1.7.0 |
| 331 | + * @param string $type |
|
| 331 | 332 | * @return array |
| 332 | 333 | */ |
| 333 | 334 | public function get_stati( $type ) { |
@@ -527,7 +528,7 @@ discard block |
||
| 527 | 528 | * the grades as the Grader selected theme and saves the total grade and |
| 528 | 529 | * individual question grades. |
| 529 | 530 | * |
| 530 | - * @return bool |
|
| 531 | + * @return false|null |
|
| 531 | 532 | */ |
| 532 | 533 | public function admin_process_grading_submission() { |
| 533 | 534 | |
@@ -904,8 +905,8 @@ discard block |
||
| 904 | 905 | * Grading logic specifically for the gap fill questions |
| 905 | 906 | * |
| 906 | 907 | * @since 1.9.0 |
| 907 | - * @param $question_id |
|
| 908 | - * @param $user_answer |
|
| 908 | + * @param integer $question_id |
|
| 909 | + * @param string $user_answer |
|
| 909 | 910 | * |
| 910 | 911 | * @return bool | int false or the grade given to the user answer |
| 911 | 912 | */ |
@@ -1009,7 +1010,7 @@ discard block |
||
| 1009 | 1010 | * Add together all the graded lesson grades |
| 1010 | 1011 | * |
| 1011 | 1012 | * @since 1.9.0 |
| 1012 | - * @return double $sum_of_all_grades |
|
| 1013 | + * @return integer $sum_of_all_grades |
|
| 1013 | 1014 | */ |
| 1014 | 1015 | public static function get_graded_lessons_sum(){ |
| 1015 | 1016 | |
@@ -1032,7 +1033,7 @@ discard block |
||
| 1032 | 1033 | * |
| 1033 | 1034 | * @since 1.9.0 |
| 1034 | 1035 | * @param $user_id |
| 1035 | - * @return double |
|
| 1036 | + * @return integer |
|
| 1036 | 1037 | */ |
| 1037 | 1038 | public static function get_user_graded_lessons_sum( $user_id ){ |
| 1038 | 1039 | global $wpdb; |
@@ -1055,7 +1056,7 @@ discard block |
||
| 1055 | 1056 | * @since 1.9.0 |
| 1056 | 1057 | * |
| 1057 | 1058 | * @param int lesson_id |
| 1058 | - * @return double |
|
| 1059 | + * @return integer |
|
| 1059 | 1060 | */ |
| 1060 | 1061 | public static function get_lessons_users_grades_sum( $lesson_id ){ |
| 1061 | 1062 | |
@@ -1080,7 +1081,7 @@ discard block |
||
| 1080 | 1081 | * @since 1.9.0 |
| 1081 | 1082 | * |
| 1082 | 1083 | * @param int $course_id |
| 1083 | - * @return double |
|
| 1084 | + * @return integer |
|
| 1084 | 1085 | */ |
| 1085 | 1086 | public static function get_course_users_grades_sum( $course_id ){ |
| 1086 | 1087 | |
@@ -463,6 +463,9 @@ discard block |
||
| 463 | 463 | |
| 464 | 464 | } // End sensei_save_quiz_answers() |
| 465 | 465 | |
| 466 | + /** |
|
| 467 | + * @return string |
|
| 468 | + */ |
|
| 466 | 469 | public static function upload_file( $file = array() ) { |
| 467 | 470 | |
| 468 | 471 | require_once( ABSPATH . 'wp-admin/includes/admin.php' ); |
@@ -635,7 +638,7 @@ discard block |
||
| 635 | 638 | * @param integer $lesson_id |
| 636 | 639 | * @param bool $complete |
| 637 | 640 | * |
| 638 | - * @return mixed boolean or comment_ID |
|
| 641 | + * @return boolean|string boolean or comment_ID |
|
| 639 | 642 | */ |
| 640 | 643 | public static function user_start_lesson( $user_id = 0, $lesson_id = 0, $complete = false ) { |
| 641 | 644 | |
@@ -654,7 +657,7 @@ discard block |
||
| 654 | 657 | * @param int| string $user_id default 0 |
| 655 | 658 | * @param bool $complete default false |
| 656 | 659 | * |
| 657 | - * @return mixed boolean or comment_ID |
|
| 660 | + * @return boolean|string boolean or comment_ID |
|
| 658 | 661 | */ |
| 659 | 662 | public static function sensei_start_lesson( $lesson_id = 0, $user_id = 0, $complete = false ) { |
| 660 | 663 | |
@@ -833,7 +836,7 @@ discard block |
||
| 833 | 836 | /** |
| 834 | 837 | * Returns the user_grade for a specific question and user, or sensei_user_answer entry |
| 835 | 838 | * |
| 836 | - * @param mixed $question |
|
| 839 | + * @param integer $question |
|
| 837 | 840 | * @param int $user_id |
| 838 | 841 | * @return string |
| 839 | 842 | */ |
@@ -861,7 +864,7 @@ discard block |
||
| 861 | 864 | * Returns the answer_notes for a specific question and user, or sensei_user_answer entry |
| 862 | 865 | * |
| 863 | 866 | * @deprecated since 1.7.5 use Sensei()->quiz->get_user_question_feedback instead |
| 864 | - * @param mixed $question |
|
| 867 | + * @param integer $question |
|
| 865 | 868 | * @param int $user_id |
| 866 | 869 | * @return string |
| 867 | 870 | */ |
@@ -974,7 +977,7 @@ discard block |
||
| 974 | 977 | * sort_array_by_key sorts array by key |
| 975 | 978 | * @since 1.3.0 |
| 976 | 979 | * @param array $array by ref |
| 977 | - * @param $key string column name in array |
|
| 980 | + * @param string $key string column name in array |
|
| 978 | 981 | * @return void |
| 979 | 982 | */ |
| 980 | 983 | public static function sort_array_by_key( $array, $key ) { |
@@ -1021,7 +1024,7 @@ discard block |
||
| 1021 | 1024 | /** |
| 1022 | 1025 | * Get pass mark for course |
| 1023 | 1026 | * @param integer $course_id ID of course |
| 1024 | - * @return integer Pass mark for course |
|
| 1027 | + * @return double Pass mark for course |
|
| 1025 | 1028 | */ |
| 1026 | 1029 | public static function sensei_course_pass_grade( $course_id = 0 ) { |
| 1027 | 1030 | |
@@ -1062,7 +1065,7 @@ discard block |
||
| 1062 | 1065 | * Get user total grade for course |
| 1063 | 1066 | * @param integer $course_id ID of course |
| 1064 | 1067 | * @param integer $user_id ID of user |
| 1065 | - * @return integer User's total grade |
|
| 1068 | + * @return double User's total grade |
|
| 1066 | 1069 | */ |
| 1067 | 1070 | public static function sensei_course_user_grade( $course_id = 0, $user_id = 0 ) { |
| 1068 | 1071 | |
@@ -1322,7 +1325,7 @@ discard block |
||
| 1322 | 1325 | * @since 1.4.8 |
| 1323 | 1326 | * @param integer $user_id User ID |
| 1324 | 1327 | * @param integer $course_id Course ID |
| 1325 | - * @return mixed boolean or comment_ID |
|
| 1328 | + * @return string|boolean boolean or comment_ID |
|
| 1326 | 1329 | */ |
| 1327 | 1330 | public static function user_start_course( $user_id = 0, $course_id = 0 ) { |
| 1328 | 1331 | |
@@ -1358,7 +1361,7 @@ discard block |
||
| 1358 | 1361 | * @since 1.7.0 |
| 1359 | 1362 | * @param int $course_id |
| 1360 | 1363 | * @param int $user_id |
| 1361 | - * @return mixed false or comment_ID |
|
| 1364 | + * @return false|string false or comment_ID |
|
| 1362 | 1365 | */ |
| 1363 | 1366 | public static function user_started_course( $course_id = 0, $user_id = 0 ) { |
| 1364 | 1367 | |
@@ -1385,7 +1388,7 @@ discard block |
||
| 1385 | 1388 | * @since 1.7.0 |
| 1386 | 1389 | * @param integer $course_id Course ID |
| 1387 | 1390 | * @param integer $user_id User ID |
| 1388 | - * @return int |
|
| 1391 | + * @return boolean |
|
| 1389 | 1392 | */ |
| 1390 | 1393 | public static function user_complete_course( $course_id = 0, $user_id = 0 ) { |
| 1391 | 1394 | global $wp_version; |
@@ -1534,7 +1537,7 @@ discard block |
||
| 1534 | 1537 | * @since 1.7.0 |
| 1535 | 1538 | * @param int $lesson_id |
| 1536 | 1539 | * @param int $user_id |
| 1537 | - * @return mixed false or comment_ID |
|
| 1540 | + * @return string|false false or comment_ID |
|
| 1538 | 1541 | */ |
| 1539 | 1542 | public static function user_started_lesson( $lesson_id = 0, $user_id = 0 ) { |
| 1540 | 1543 | |
@@ -1561,7 +1564,7 @@ discard block |
||
| 1561 | 1564 | * Check if a user has completed a lesson or not |
| 1562 | 1565 | * |
| 1563 | 1566 | * @uses Sensei() |
| 1564 | - * @param mixed $lesson lesson_id or sensei_lesson_status entry |
|
| 1567 | + * @param integer $lesson lesson_id or sensei_lesson_status entry |
|
| 1565 | 1568 | * @param int $user_id |
| 1566 | 1569 | * @return boolean |
| 1567 | 1570 | */ |
@@ -1659,7 +1662,7 @@ discard block |
||
| 1659 | 1662 | * @since 1.7.0 |
| 1660 | 1663 | * @param int $lesson_id |
| 1661 | 1664 | * @param int $user_id |
| 1662 | - * @return object | bool |
|
| 1665 | + * @return integer | bool |
|
| 1663 | 1666 | */ |
| 1664 | 1667 | public static function user_lesson_status( $lesson_id = 0, $user_id = 0 ) { |
| 1665 | 1668 | |
@@ -1718,11 +1721,11 @@ discard block |
||
| 1718 | 1721 | * @since 1.7.0 |
| 1719 | 1722 | * |
| 1720 | 1723 | * @param int|string $user_id |
| 1721 | - * @param int|string $lesson_id |
|
| 1724 | + * @param integer $lesson_id |
|
| 1722 | 1725 | * @param string $status |
| 1723 | 1726 | * @param array $metadata |
| 1724 | 1727 | * |
| 1725 | - * @return mixed false or comment_ID |
|
| 1728 | + * @return boolean false or comment_ID |
|
| 1726 | 1729 | */ |
| 1727 | 1730 | public static function update_lesson_status( $user_id, $lesson_id, $status = 'in-progress', $metadata = array() ) { |
| 1728 | 1731 | $comment_id = false; |
@@ -1760,7 +1763,7 @@ discard block |
||
| 1760 | 1763 | * @param int $course_id |
| 1761 | 1764 | * @param string $status |
| 1762 | 1765 | * @param array $metadata |
| 1763 | - * @return mixed false or comment_ID |
|
| 1766 | + * @return boolean false or comment_ID |
|
| 1764 | 1767 | */ |
| 1765 | 1768 | public static function update_course_status( $user_id, $course_id, $status = 'in-progress', $metadata = array() ) { |
| 1766 | 1769 | $comment_id = false; |
@@ -1950,7 +1953,7 @@ discard block |
||
| 1950 | 1953 | * |
| 1951 | 1954 | * @since 1.7.4 |
| 1952 | 1955 | * |
| 1953 | - * @param $data_key |
|
| 1956 | + * @param string $data_key |
|
| 1954 | 1957 | * @param $post_id |
| 1955 | 1958 | * @param int $user_id |
| 1956 | 1959 | * |