logged-in.php
71 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package TutorLMS/Templates |
| 5 | * @version 1.4.3 |
| 6 | */ |
| 7 | |
| 8 | $is_instructor = tutor_utils()->is_instructor(); |
| 9 | if ( $is_instructor ) { |
| 10 | ?> |
| 11 | <?php |
| 12 | $user_id = get_current_user_id(); |
| 13 | $instructor_status = get_user_meta( $user_id, '_tutor_instructor_status', true ); |
| 14 | |
| 15 | ?> |
| 16 | |
| 17 | <div class="tutor-instructor-pending-wrapper"> |
| 18 | <div class="tutor-alert <?php echo $instructor_status == 'pending' ? 'tutor-alert-info' : ( $instructor_status == 'approved' ? 'tutor-alert-success' : ( $instructor_status == 'blocked' ? 'tutor-alert-danger' : '' ) ); ?>"> |
| 19 | |
| 20 | <?php |
| 21 | if ( $instructor_status == 'pending' ) { |
| 22 | _e( 'Your application will be reviewed and the results will be sent to you by email.', 'tutor' ); |
| 23 | } elseif ( $instructor_status == 'approved' ) { |
| 24 | _e( 'Your application has been accepted. Further necessary details have been sent to your registered email account.', 'tutor' ); |
| 25 | } elseif ( $instructor_status == 'blocked' ) { |
| 26 | _e( 'You have been blocked from being an instructor.', 'tutor' ); |
| 27 | } |
| 28 | ?> |
| 29 | </div> |
| 30 | |
| 31 | <div class="tutor-instructor-pending-content"> |
| 32 | <img src="<?php echo esc_url( tutor()->url . 'assets/images/new-user.png' ); ?>" alt="<?php _e( 'New User', 'tutor' ); ?>"> |
| 33 | <div class="tutor-instructor-thankyou-wrapper"> |
| 34 | <div class="tutor-instructor-thankyou-text"> |
| 35 | <h2> |
| 36 | <?php |
| 37 | if ( $instructor_status == 'pending' ) { |
| 38 | _e( 'Thank you for registering as an instructor! ', 'tutor' ); |
| 39 | } elseif ( $instructor_status == 'approved' ) { |
| 40 | _e( 'Congratulations! You are now registered as an instructor.', 'tutor' ); |
| 41 | } elseif ( $instructor_status == 'blocked' ) { |
| 42 | _e( 'Unfortunately, your instructor status has been removed.', 'tutor' ); |
| 43 | } |
| 44 | ?> |
| 45 | </h2> |
| 46 | </div> |
| 47 | <div class="tutor-instructor-extra-text"> |
| 48 | <p> |
| 49 | <?php |
| 50 | if ( $instructor_status == 'pending' ) { |
| 51 | _e( 'We\'ve received your application, and we will review it soon. Please hang tight!', 'tutor' ); |
| 52 | } elseif ( $instructor_status == 'approved' ) { |
| 53 | _e( 'Start building your first course today and let your eLearning journey begin.', 'tutor' ); |
| 54 | } elseif ( $instructor_status == 'blocked' ) { |
| 55 | _e( 'Please contact the site administrator for further information.', 'tutor' ); |
| 56 | } |
| 57 | ?> |
| 58 | </p> |
| 59 | </div> |
| 60 | |
| 61 | <a class="tutor-button" href="<?php echo esc_url( tutor_utils()->tutor_dashboard_url() ); ?>"> |
| 62 | <?php _e( 'Go to Dashboard', 'tutor' ); ?> |
| 63 | </a> |
| 64 | </div> |
| 65 | </div> |
| 66 | </div> |
| 67 | |
| 68 | <?php } else { |
| 69 | tutor_load_template( 'dashboard.instructor.apply_for_instructor' ); |
| 70 | } ?> |
| 71 |