function dt_statistics_teachers_pagination() { $curr_page = $_REQUEST['curr_page']; dt_get_statistics_teachers_list(10, $curr_page); die; }
function dt_get_statistics_teachers() { echo '<div class="dt-overallstatistics-container">'; if (isset($_REQUEST['teacher_id']) && $_REQUEST['teacher_id'] != '') { $teacher_id = $_REQUEST['teacher_id']; $teacher_info = get_userdata($teacher_id); echo '<h3>' . $teacher_info->display_name . '</h3>'; $courses_args = array('post_type' => 'dt_courses', 'post_status' => 'publish', 'author' => $teacher_id); $courses = get_posts($courses_args); if (isset($courses) && !empty($courses)) { echo '<table border="0" cellpadding="0" cellspacing="0">'; echo '<tr> <th>' . __('Course Name', 'dt_themes') . '</th> <th>' . __('Subscriptions', 'dt_themes') . '</th> <th>' . __('Completed', 'dt_themes') . '</th> </tr>'; foreach ($courses as $course) { $course_id = $course->ID; $student_cap = dt_get_course_capabilities_id($course_id); $course_subscribed = count($student_cap); $course_completed = dt_get_course_completed_list($course_id, 'count'); echo '<tr> <td><a href="' . admin_url('admin.php?page=dt-statistics-options&tab=dt_statistics_course&course_id=' . $course_id) . '">' . $course->post_title . '</a></td> <td>' . $course_subscribed . '</td> <td>' . $course_completed . '</td> </tr>'; } echo '</table>'; } echo '<a href="' . admin_url('admin.php?page=dt-statistics-options&tab=dt_statistics_teachers') . '" class="dt-statistics-button">' . __('All Teachers', 'dt_themes') . '</a>'; } else { echo '<div id="dt-sc-ajax-load-image" style="display:none;"><img src="' . IAMD_BASE_URL . "images/loading.png" . '" alt="" /></div>'; echo '<div id="dt-statistics-teachers-container">'; dt_get_statistics_teachers_list(10, 1); echo '</div>'; } echo '</div>'; }