tools
4 years ago
add_new_instructor.php
4 years ago
addons.php
4 years ago
announcements.php
4 years ago
answer.php
4 years ago
course-list.php
4 years ago
enable_disable_addons.php
4 years ago
get-pro.php
5 years ago
instructors.php
4 years ago
question_answer.php
4 years ago
quiz_attempts.php
4 years ago
students.php
4 years ago
tools.php
4 years ago
tutor-pro-addons.php
4 years ago
uninstall.php
4 years ago
view_attempt.php
4 years ago
welcome.php
4 years ago
withdraw_requests.php
4 years ago
instructors.php
453 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Instructors List Template. |
| 4 | * |
| 5 | * @package Instructors List |
| 6 | */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | |
| 12 | if ( isset( $_GET['sub_page'] ) ) { |
| 13 | $page = sanitize_text_field( $_GET['sub_page'] ); |
| 14 | include_once tutor()->path . "views/pages/{$page}.php"; |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | use TUTOR\Instructors_List; |
| 19 | $instructors = new Instructors_List(); |
| 20 | |
| 21 | /** |
| 22 | * Short able params |
| 23 | */ |
| 24 | $user_id = isset( $_GET['user_id'] ) ? $_GET['user_id'] : ''; |
| 25 | $course_id = isset( $_GET['course-id'] ) ? $_GET['course-id'] : ''; |
| 26 | $order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC'; |
| 27 | $date = isset( $_GET['date'] ) ? $_GET['date'] : ''; |
| 28 | $search = isset( $_GET['search'] ) ? $_GET['search'] : ''; |
| 29 | |
| 30 | /** |
| 31 | * Determine active tab |
| 32 | */ |
| 33 | $active_tab = isset( $_GET['data'] ) && $_GET['data'] !== '' ? esc_html__( $_GET['data'] ) : 'all'; |
| 34 | |
| 35 | /** |
| 36 | * Pagination data |
| 37 | */ |
| 38 | $paged = ( isset( $_GET['paged'] ) && is_numeric( $_GET['paged'] ) && $_GET['paged'] >= 1 ) ? $_GET['paged'] : 1; |
| 39 | $per_page = tutor_utils()->get_option( 'pagination_per_page' ); |
| 40 | $offset = ( $per_page * $paged ) - $per_page; |
| 41 | |
| 42 | // Available status for instructor. |
| 43 | $instructor_status = array( 'approved', 'pending', 'blocked' ); |
| 44 | if ( 'pending' === $active_tab ) { |
| 45 | $instructor_status = array( 'pending' ); |
| 46 | } elseif ( 'blocked' === $active_tab ) { |
| 47 | $instructor_status = array( 'blocked' ); |
| 48 | } elseif ( 'approved' == $active_tab ) { |
| 49 | $instructor_status = array( 'approved' ); |
| 50 | } |
| 51 | $instructors_list = tutor_utils()->get_instructors( $offset, $per_page, $search, $course_id, $date, $order, $instructor_status ); |
| 52 | $total = tutor_utils()->get_total_instructors( $search, $instructor_status, $course_id, $date ); |
| 53 | |
| 54 | /** |
| 55 | * Navbar data to make nav menu |
| 56 | */ |
| 57 | $url = get_pagenum_link(); |
| 58 | $add_insructor_url = $url . '&sub_page=add_new_instructor'; |
| 59 | $navbar_data = array( |
| 60 | 'page_title' => $instructors->page_title, |
| 61 | 'tabs' => $instructors->tabs_key_value( $search, $course_id, $date ), |
| 62 | 'active' => $active_tab, |
| 63 | 'add_button' => true, |
| 64 | 'button_title' => __( 'Add New', 'tutor' ), |
| 65 | 'button_url' => $add_insructor_url, |
| 66 | 'modal_target' => 'tutor-instructor-add-new', |
| 67 | ); |
| 68 | |
| 69 | $filters = array( |
| 70 | 'bulk_action' => $instructors->bulk_action, |
| 71 | 'bulk_actions' => $instructors->prpare_bulk_actions(), |
| 72 | 'ajax_action' => 'tutor_instructor_bulk_action', |
| 73 | 'filters' => true, |
| 74 | 'course_filter' => true, |
| 75 | ); |
| 76 | |
| 77 | ?> |
| 78 | |
| 79 | <?php |
| 80 | /** |
| 81 | * Load Templates with data. |
| 82 | */ |
| 83 | $navbar_template = tutor()->path . 'views/elements/navbar.php'; |
| 84 | $filters_template = tutor()->path . 'views/elements/filters.php'; |
| 85 | tutor_load_template_from_custom_path( $navbar_template, $navbar_data ); |
| 86 | tutor_load_template_from_custom_path( $filters_template, $filters ); |
| 87 | $available_status = array( |
| 88 | 'pending' => array( __( 'Pending', 'tutor' ), 'select-warning' ), |
| 89 | 'approved' => array( __( 'Approved', 'tutor' ), 'select-success' ), |
| 90 | 'blocked' => array( __( 'Blocked', 'tutor' ), 'select-danger' ), |
| 91 | ); |
| 92 | ?> |
| 93 | |
| 94 | <div class="wrap"> |
| 95 | <div class="tutor-ui-table-responsive tutor-mt-32"> |
| 96 | <table class="tutor-ui-table tutor-ui-table-responsive table-instructors tutor-table-with-checkbox"> |
| 97 | <thead> |
| 98 | <tr> |
| 99 | <th width="3%"> |
| 100 | <div class="tutor-d-flex"> |
| 101 | <input type="checkbox" id="tutor-bulk-checkbox-all" class="tutor-form-check-input" /> |
| 102 | </div> |
| 103 | </th> |
| 104 | <th class="tutor-table-rows-sorting"> |
| 105 | <div class="tutor-color-black-60"> |
| 106 | <span class="tutor-fs-7 tutor-ml-5"> <?php esc_html_e( 'Name', 'tutor' ); ?></span> |
| 107 | <span class="tutor-icon-ordering-a-to-z-filled a-to-z-sort-icon tutor-icon-22"></span> |
| 108 | </div> |
| 109 | </th> |
| 110 | <th class="tutor-table-rows-sorting"> |
| 111 | <div class="tutor-color-black-60"> |
| 112 | <span class="tutor-fs-7"><?php esc_html_e( 'Email', 'tutor' ); ?></span> |
| 113 | <span class="tutor-icon-order-down-filled up-down-icon"></span> |
| 114 | </div> |
| 115 | </th> |
| 116 | <th class="tutor-table-rows-sorting"> |
| 117 | <div class=" tutor-color-black-60"> |
| 118 | <span class="tutor-fs-7"><?php esc_html_e( 'Total Course', 'tutor' ); ?></span> |
| 119 | <span class="tutor-icon-order-down-filled up-down-icon"></span> |
| 120 | </div> |
| 121 | </th> |
| 122 | <th class="tutor-table-rows-sorting"> |
| 123 | <div class=" tutor-color-black-60"> |
| 124 | <span class="tutor-fs-7"> |
| 125 | <?php esc_html_e( 'Commission Rate', 'tutor' ); ?> |
| 126 | </span> |
| 127 | <span class="tutor-icon-order-down-filled up-down-icon"></span> |
| 128 | </div> |
| 129 | </th> |
| 130 | <th class="tutor-table-rows-sorting"> |
| 131 | <div class="tutor-color-black-60"> |
| 132 | <span class="tutor-fs-7"><?php esc_html_e( 'Status', 'tutor' ); ?></span> |
| 133 | <span class="tutor-icon-order-down-filled up-down-icon"></span> |
| 134 | </div> |
| 135 | </th> |
| 136 | <th class="tutor-shrink"></th> |
| 137 | </tr> |
| 138 | </thead> |
| 139 | <tbody> |
| 140 | <?php if ( is_array( $instructors_list ) && count( $instructors_list ) ) : ?> |
| 141 | <?php |
| 142 | foreach ( $instructors_list as $list ) : |
| 143 | $alert = ( 'pending' === $list->status ? 'warning' : ( 'approved' === $list->status ? 'success' : ( 'blocked' === $list->status ? 'danger' : 'default' ) ) ); |
| 144 | ?> |
| 145 | <tr> |
| 146 | <td data-th="<?php esc_html_e( 'Checkbox', 'tutor' ); ?>"> |
| 147 | <div class="td-checkbox tutor-d-flex "> |
| 148 | <input id="tutor-admin-list-<?php esc_attr_e( $list->ID ); ?>" type="checkbox" class="tutor-form-check-input tutor-bulk-checkbox" name="tutor-bulk-checkbox-all" value="<?php echo esc_attr( $list->ID ); ?>" /> |
| 149 | </div> |
| 150 | </td> |
| 151 | <td data-th="<?php esc_html_e( 'Avatar', 'tutor' ); ?>" class="column-fullwidth"> |
| 152 | <div class="td-avatar"> |
| 153 | <?php $avatar_url = get_avatar_url( $list->ID ); ?> |
| 154 | <img src="<?php echo esc_url( $avatar_url ); ?>" alt="student avatar"/> |
| 155 | <span class="tutor-color-black tutor-fs-6 tutor-fw-medium"> |
| 156 | <?php echo esc_html( $list->display_name ); ?> |
| 157 | </span> |
| 158 | <a href="<?php echo esc_url( tutor_utils()->profile_url( $list->ID, true ) ); ?>" class="btn-text btn-detail-link tutor-color-design-dark" target="_blank"> |
| 159 | <span class="tutor-icon-detail-link-filled tutor-mt-4"></span> |
| 160 | </a> |
| 161 | </div> |
| 162 | </td> |
| 163 | <td data-th="<?php esc_html_e( 'Email', 'tutor' ); ?>"> |
| 164 | <span class="tutor-color-black tutor-fs-7"> |
| 165 | <?php echo esc_html( $list->user_email ); ?> |
| 166 | </span> |
| 167 | </td> |
| 168 | </td> |
| 169 | <td data-th="<?php esc_html_e( 'Total Course', 'tutor' ); ?>"> |
| 170 | <span class="tutor-color-black tutor-fs-7"> |
| 171 | <?php echo esc_html( $instructors->column_total_course( $list, 'total_course' ) ); ?> |
| 172 | </span> |
| 173 | </td> |
| 174 | <td data-th="<?php esc_html_e( 'Commission Rate', 'tutor' ); ?>"> |
| 175 | <span class="tutor-color-black tutor-fs-7"> |
| 176 | <?php echo esc_html( tutor_utils()->get_option( 'earning_instructor_commission' ) . '%' ); ?> |
| 177 | </span> |
| 178 | </td> |
| 179 | <td data-th="<?php esc_html_e( 'Status', 'tutor' ); ?>"> |
| 180 | <div class="tutor-form-select-with-icon <?php echo esc_html( $available_status[ $list->status ][1] ); ?>"> |
| 181 | <select class="tutor-table-row-status-update" data-bulk-ids="<?php echo esc_attr( $list->ID ); ?>" data-status_key="bulk-action" data-action="tutor_instructor_bulk_action"> |
| 182 | <?php foreach ( $available_status as $key => $status ) : ?> |
| 183 | <option data-status_class="<?php echo $available_status[ $key ][1]; ?>" value="<?php echo esc_attr( $key ); ?>" data-status="<?php echo esc_attr( $key ); ?>" <?php selected( $list->status, $key ); ?>> |
| 184 | <?php echo esc_html( $available_status[ $key ][0] ); ?> |
| 185 | </option> |
| 186 | <?php endforeach; ?> |
| 187 | </select> |
| 188 | <i class="icon1 tutor-icon-eye-fill-filled"></i> |
| 189 | <i class="icon2 tutor-icon-angle-down-filled"></i> |
| 190 | </div> |
| 191 | </td> |
| 192 | <td data-th="<?php esc_html_e( 'Status', 'tutor' ); ?>"> |
| 193 | <a href="<?php echo esc_url( add_query_arg( 'user_id', $list->ID, self_admin_url( 'user-edit.php' ) ) ); ?>" class="tutor-btn tutor-btn-wordpress tutor-btn-disable-outline tutor-btn-sm"> |
| 194 | <?php esc_html_e( 'Edit', 'tutor' ); ?> |
| 195 | </a> |
| 196 | </td> |
| 197 | </tr> |
| 198 | <?php endforeach; ?> |
| 199 | <?php else : ?> |
| 200 | <tr> |
| 201 | <td colspan="100%" class="column-empty-state"> |
| 202 | <?php tutor_utils()->tutor_empty_state( __( 'No instructor found', 'tutor' ) ); ?> |
| 203 | </td> |
| 204 | </tr> |
| 205 | <?php endif; ?> |
| 206 | </tbody> |
| 207 | </table> |
| 208 | </div> |
| 209 | <div class="tutor-admin-page-pagination-wrapper tutor-mt-48"> |
| 210 | <?php |
| 211 | /** |
| 212 | * Prepare pagination data & load template |
| 213 | */ |
| 214 | if ( $total > $per_page ) { |
| 215 | $pagination_data = array( |
| 216 | 'total_items' => $total, |
| 217 | 'per_page' => $per_page, |
| 218 | 'paged' => $paged, |
| 219 | ); |
| 220 | $pagination_template = tutor()->path . 'views/elements/pagination.php'; |
| 221 | tutor_load_template_from_custom_path( $pagination_template, $pagination_data ); |
| 222 | } |
| 223 | ?> |
| 224 | </div> |
| 225 | </div> |
| 226 | |
| 227 | <div id="tutor-instructor-add-new" class="tutor-modal modal-sticky-header-footer tutor-modal-is-close-inside-header"> |
| 228 | <span class="tutor-modal-overlay"></span> |
| 229 | <div class="tutor-modal-root"> |
| 230 | <div class="tutor-modal-inner"> |
| 231 | <form action="" method="post" id="tutor-new-instructor-form" autocomplete="off"> |
| 232 | <div class="tutor-modal-header"> |
| 233 | <div class="tutor-modal-title tutor-fs-6 tutor-fw-bold tutor-color-black-70"> |
| 234 | <?php esc_html_e( 'Add New Instructor', 'tutor' ); ?> |
| 235 | </div> |
| 236 | <button data-tutor-modal-close class="tutor-modal-close"> |
| 237 | <span class="tutor-icon-line-cross-line"></span> |
| 238 | </button> |
| 239 | </div> |
| 240 | <div class="tutor-modal-body-alt tutor-bg-gray-10"> |
| 241 | |
| 242 | <?php tutor_nonce_field(); ?> |
| 243 | <?php do_action( 'tutor_add_new_instructor_form_fields_before' ); ?> |
| 244 | <div class="tutor-row "> |
| 245 | <div class="tutor-col"> |
| 246 | <label class="tutor-form-label"> |
| 247 | <?php esc_html_e( 'First Name', 'tutor' ); ?> |
| 248 | </label> |
| 249 | <div class="tutor-input-group tutor-mb-16"> |
| 250 | <input type="text" name="first_name" class="tutor-form-control tutor-mb-12" placeholder="<?php echo esc_attr( 'Enter First Name', 'tutor' ); ?>" pattern="[a-zA-Z0-9-\s]+" title="<?php esc_attr_e( 'Only alphanumeric & space are allowed', 'tutor' ); ?>" required/> |
| 251 | </div> |
| 252 | </div> |
| 253 | <div class="tutor-col"> |
| 254 | <label class="tutor-form-label"> |
| 255 | <?php esc_html_e( 'Last Name', 'tutor' ); ?> |
| 256 | </label> |
| 257 | <div class="tutor-input-group tutor-mb-16"> |
| 258 | <input type="text" name="last_name" class="tutor-form-control tutor-mb-12" placeholder="<?php echo esc_attr( 'Enter Last Name', 'tutor' ); ?>" pattern="[a-zA-Z0-9-\s]+" title="<?php esc_attr_e( 'Only alphanumeric & space are allowed', 'tutor' ); ?>" required/> |
| 259 | </div> |
| 260 | </div> |
| 261 | </div> |
| 262 | <div class="tutor-row "> |
| 263 | <div class="tutor-col"> |
| 264 | <label class="tutor-form-label"> |
| 265 | <?php esc_html_e( 'User Name', 'tutor' ); ?> |
| 266 | </label> |
| 267 | <div class="tutor-input-group tutor-mb-16"> |
| 268 | <input type="text" name="user_login" class="tutor-form-control tutor-mb-12" autocomplete="off" placeholder="<?php echo esc_attr( 'Enter Your Name', 'tutor' ); ?>" pattern="^[a-zA-Z0-9_]*$" title="<?php esc_attr_e( 'Only alphanumeric and underscore are allowed', 'tutor' ); ?>" required/> |
| 269 | </div> |
| 270 | </div> |
| 271 | <div class="tutor-col"> |
| 272 | <label class="tutor-form-label"> |
| 273 | <?php esc_html_e( 'Phone Number', 'tutor' ); ?> |
| 274 | </label> |
| 275 | <div class="tutor-input-group tutor-mb-16"> |
| 276 | <input type="text" name="phone_number" class="tutor-form-control tutor-mb-12" placeholder="<?php echo esc_attr( 'Enter Phone Number', 'tutor' ); ?>" minlength="8" maxlength="16" pattern="[0-9]+" title="<?php esc_attr_e( 'Only number is allowed', 'tutor' ); ?>" required/> |
| 277 | </div> |
| 278 | </div> |
| 279 | </div> |
| 280 | <div class="tutor-row "> |
| 281 | <div class="tutor-col"> |
| 282 | <label class="tutor-form-label"> |
| 283 | <?php esc_html_e( 'Email Address', 'tutor' ); ?> |
| 284 | </label> |
| 285 | <div class="tutor-input-group tutor-mb-16"> |
| 286 | <input type="email" name="email" class="tutor-form-control tutor-mb-12" autocomplete="off" placeholder="<?php echo esc_attr( 'Enter Your Email', 'tutor' ); ?>" required/> |
| 287 | </div> |
| 288 | </div> |
| 289 | </div> |
| 290 | <div class="tutor-row "> |
| 291 | <div class="tutor-col"> |
| 292 | <label class="tutor-form-label"> |
| 293 | <?php esc_html_e( 'Password', 'tutor' ); ?> |
| 294 | </label> |
| 295 | <div class="tutor-input-group tutor-form-control-has-icon-right tutor-mb-16"> |
| 296 | <span class="tutor-icon-eye-filled tutor-input-group-icon-right tutor-password-reveal"></span> |
| 297 | <input type="password" name="password" id="tutor-instructor-pass" class="tutor-form-control tutor-mb-12" minlength="8" placeholder="*******" autocomplete="new-password" required/> |
| 298 | </div> |
| 299 | </div> |
| 300 | <div class="tutor-col"> |
| 301 | <label class="tutor-form-label"> |
| 302 | <?php esc_html_e( 'Retype Password', 'tutor' ); ?> |
| 303 | </label> |
| 304 | <div class="tutor-input-group tutor-form-control-has-icon-right tutor-mb-16"> |
| 305 | <span class="tutor-icon-eye-filled tutor-input-group-icon-right tutor-password-reveal"></span> |
| 306 | <input type="password" name="password_confirmation" class="tutor-form-control tutor-mb-12" placeholder="*******" autocomplete="off" pattern="" title="<?php esc_attr_e( 'Your passwords should match each other. Please recheck.', 'tutor' ); ?>" onfocus="this.setAttribute('pattern', document.getElementById('tutor-instructor-pass').value)" required/> |
| 307 | </div> |
| 308 | </div> |
| 309 | </div> |
| 310 | <?php do_action( 'tutor_add_new_instructor_form_fields_after' ); ?> |
| 311 | <div class="tutor-row "> |
| 312 | <div class="tutor-col"> |
| 313 | <label class="tutor-form-label"> |
| 314 | <?php esc_html_e( 'Bio', 'tutor' ); ?> |
| 315 | <!-- @todo: remove the hard coded color --> |
| 316 | <span class="tutor-fs-7 tutor-fw-medium" style="color: #999ead;"> |
| 317 | <?php esc_html_e( '(Optional)', 'tutor' ); ?> |
| 318 | </span> |
| 319 | </label> |
| 320 | <div class="tutor-input-group tutor-mb-16"> |
| 321 | <textarea name="tutor_profile_bio" class="tutor-form-control" rows="3" style="width: 100%;" placeholder="<?php esc_html_e( 'Write Your Bio...', 'tutor' ); ?>"></textarea> |
| 322 | </div> |
| 323 | </div> |
| 324 | </div> |
| 325 | <div class="tutor-row " id="tutor-new-instructor-form-response"></div> |
| 326 | </div> |
| 327 | <div class="tutor-modal-footer"> |
| 328 | <div class="tutor-d-flex tutor-justify-content-between"> |
| 329 | <div class="col"> |
| 330 | <button type="submit" class="tutor-btn tutor-btn-wordpress tutor-btn-lg tutor-btn-loading" name="tutor_register_instructor_btn"> |
| 331 | <?php esc_html_e( 'Add Instructor', 'tutor' ); ?> |
| 332 | </button> |
| 333 | </div> |
| 334 | <div class="col-auto"> |
| 335 | <button data-tutor-modal-close class="tutor-btn tutor-is-default"> |
| 336 | <?php esc_html_e( 'Cancel', 'tutor' ); ?> |
| 337 | </button> |
| 338 | </div> |
| 339 | </div> |
| 340 | </div> |
| 341 | </form> |
| 342 | </div> |
| 343 | </div> |
| 344 | </div> |
| 345 | <?php |
| 346 | /** |
| 347 | * Instructor Approve, Reject popup |
| 348 | * that will be shown based on get params |
| 349 | * |
| 350 | * @since v2.0.0 |
| 351 | */ |
| 352 | $instructor_id = isset( $_GET['instructor'] ) ? sanitize_text_field( $_GET['instructor'] ) : ''; |
| 353 | $prompt_action = isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : ''; |
| 354 | $instructor_data = get_userdata( $instructor_id ); |
| 355 | if ( $instructor_data && ( 'approved' === $prompt_action || 'blocked' === $prompt_action ) ) : |
| 356 | $instructor_status = tutor_utils()->instructor_status( $instructor_data->ID, false ); |
| 357 | ?> |
| 358 | <div id="tutor-ins-approval-1" class="tutor-modal tutor-modal-is-close-beside tutor-modal-ins-approval tutor-is-active"> |
| 359 | <span class="tutor-modal-overlay"></span> |
| 360 | <div class="tutor-modal-root"> |
| 361 | <button data-tutor-modal-close="true" class="tutor-modal-close"> |
| 362 | <span class="tutor-icon-56 tutor-icon-line-cross-line"></span> |
| 363 | </button> |
| 364 | <div class="tutor-modal-inner"> |
| 365 | <?php if ( $instructor_data ) : ?> |
| 366 | <div class="tutor-modal-body tutor-text-center"> |
| 367 | <div class="tutor-modal-text-wrap"> |
| 368 | <div class="tutor-fs-4 tutor-fw-medium tutor-color-black"> |
| 369 | <?php esc_html_e( 'A New Instructor Just Signed Up', 'tutor' ); ?> |
| 370 | </div> |
| 371 | <div class="tutor-fs-7 tutor-color-black-60 tutor-mt-12"> |
| 372 | <?php esc_html_e( 'You can either accept or reject the application. The applicant will be notified via email either way.', 'tutor' ); ?> |
| 373 | </div> |
| 374 | </div> |
| 375 | <div class="tutor-modal-ins-meta tutor-mt-44"> |
| 376 | <div class="flex-center"> |
| 377 | <div class="tutor-avatar"> |
| 378 | <?php echo get_avatar( $instructor_data->ID ); ?> |
| 379 | </div> |
| 380 | </div> |
| 381 | <div class="tutor-fs-4 tutor-fw-medium tutor-color-black tutor-mt-20"> |
| 382 | <?php |
| 383 | echo esc_html( |
| 384 | ( '' !== $instructor_data->display_name ? |
| 385 | $instructor_data->display_name : ( '' !== $instructor_data->user_nicename ? |
| 386 | $instructor_data->user_nicename : '' ) ) |
| 387 | ); |
| 388 | ?> |
| 389 | </div> |
| 390 | <div class="tutor-fs-6 tutor-color-black-70 tutor-mt-8"> |
| 391 | <?php esc_html_e( 'Username:', 'tutor' ); ?> |
| 392 | <span class="tutor-color-black"> |
| 393 | <?php echo esc_html( $instructor_data->user_login ); ?> |
| 394 | </span> |
| 395 | </div> |
| 396 | <div class="tutor-fs-6 tutor-color-black-70 tutor-mt-4"> |
| 397 | <?php esc_html_e( 'Email:', 'tutor' ); ?> |
| 398 | <span class="tutor-color-black"> |
| 399 | <?php echo esc_html( $instructor_data->user_email ); ?> |
| 400 | </span> |
| 401 | </div> |
| 402 | </div> |
| 403 | <div class="tutor-modal-buttons tutor-mt-32 tutor-mt-md-48"> |
| 404 | <?php if ( 'approved' === $prompt_action || 'blocked' === $prompt_action ) : ?> |
| 405 | <?php if ( 'pending' === $instructor_status ) : ?> |
| 406 | <a class="instructor-action tutor-btn tutor-btn-full " data-action="approve" data-instructor-id="<?php echo esc_attr( $instructor_data->ID ); ?>"> |
| 407 | <?php esc_html_e( 'Approve The Instructor', 'tutor' ); ?> |
| 408 | </a> |
| 409 | <a class="instructor-action tutor-btn tutor-is-outline tutor-is-default tutor-btn-full tutor-mt-md-25 tutor-mt-12" data-action="blocked" data-instructor-id="<?php echo esc_attr( $instructor_data->ID ); ?>"> |
| 410 | <?php esc_html_e( 'Reject The Application', 'tutor' ); ?> |
| 411 | </a> |
| 412 | <?php elseif ( 'approved' === $instructor_status ) : ?> |
| 413 | <a class="instructor-action tutor-btn tutor-is-outline tutor-is-default tutor-btn-full tutor-mt-md-25 tutor-mt-12" data-action="blocked" data-instructor-id="<?php echo esc_attr( $instructor_data->ID ); ?>"> |
| 414 | <?php esc_html_e( 'Reject The Application', 'tutor' ); ?> |
| 415 | </a> |
| 416 | <?php elseif ( 'blocked' === $instructor_status ) : ?> |
| 417 | <a class="instructor-action tutor-btn tutor-btn-full " data-action="approve" data-instructor-id="<?php echo esc_attr( $instructor_data->ID ); ?>"> |
| 418 | <?php esc_html_e( 'Approve The Instructor', 'tutor' ); ?> |
| 419 | </a> |
| 420 | <?php endif; ?> |
| 421 | <?php else : ?> |
| 422 | <div class="tutor-alert tutor-danger"> |
| 423 | <div class="tutor-alert-text"> |
| 424 | <span class="tutor-alert-icon tutor-icon-34 tutor-icon-cross-circle-outline-filled tutor-mr-12"></span> |
| 425 | <span> |
| 426 | <?php esc_html_e( 'Attempted invalid action', 'tutor' ); ?> |
| 427 | </span> |
| 428 | </div> |
| 429 | </div> |
| 430 | <?php endif; ?> |
| 431 | </div> |
| 432 | |
| 433 | </div> |
| 434 | <?php endif; ?> |
| 435 | <?php if ( false === $instructor_data ) : ?> |
| 436 | <div class="tutor-modal-body tutor-text-center"> |
| 437 | <div class="tutor-modal-text-wrap"> |
| 438 | <div class="tutor-alert tutor-danger"> |
| 439 | <div class="tutor-alert-text"> |
| 440 | <span class="tutor-alert-icon tutor-icon-34 tutor-icon-cross-circle-outline-filled tutor-mr-12"></span> |
| 441 | <span> |
| 442 | <?php esc_html_e( 'Invalid instructor', 'tutor' ); ?> |
| 443 | </span> |
| 444 | </div> |
| 445 | </div> |
| 446 | </div> |
| 447 | </div> |
| 448 | <?php endif; ?> |
| 449 | </div> |
| 450 | </div> |
| 451 | </div> |
| 452 | <?php endif; ?> |
| 453 |