LLMS_Admin_Reporting_Tab_Students::output()
Output HTML for the current view within the students tab
Return Return
(void)
Source Source
File: includes/admin/reporting/tabs/class.llms.admin.reporting.tab.students.php
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | public function output() { // Single student. if ( isset( $_GET [ 'student_id' ] ) ) { $student_id = llms_filter_input( INPUT_GET, 'student_id' , FILTER_SANITIZE_NUMBER_INT ); if ( ! llms_current_user_can( 'view_lifterlms_reports' , $student_id ) ) { wp_die( __( "You do not have permission to access this student's reports" , 'lifterlms' ) ); } $student = llms_get_student( $student_id ); if ( ! $student ) { wp_die( __( "This student doesn't exist." , 'lifterlms' ) ); } $tabs = apply_filters( 'llms_reporting_tab_student_tabs' , array ( 'information' => __( 'Information' , 'lifterlms' ), 'courses' => __( 'Courses' , 'lifterlms' ), 'memberships' => __( 'Memberships' , 'lifterlms' ), 'achievements' => __( 'Achievements' , 'lifterlms' ), 'certificates' => __( 'Certificates' , 'lifterlms' ), ) ); llms_get_template( 'admin/reporting/tabs/students/student.php' , array ( 'current_tab' => isset( $_GET [ 'stab' ] ) ? esc_attr( llms_filter_input_sanitize_string( INPUT_GET, 'stab' ) ) : 'information' , 'tabs' => $tabs , 'student' => $student , ) ); } else { llms_get_template( 'admin/reporting/tabs/students/students.php' ); } } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Stop using deprecated FILTER_SANITIZE_STRING . |
4.20.0 | Added a report permission check and a user existence check. |
3.2.0 | Introduced. |