enrolled
5 years ago
add-to-cart-edd.php
5 years ago
add-to-cart-woocommerce.php
5 years ago
add-to-cart.php
5 years ago
closed-enrollment.php
5 years ago
complete_form.php
5 years ago
continue-lesson.php
5 years ago
course-benefits.php
5 years ago
course-content.php
5 years ago
course-enroll-box.php
5 years ago
course-enrolled-box.php
5 years ago
course-requirements.php
5 years ago
course-target-audience.php
5 years ago
course-topics.php
5 years ago
instructors.php
5 years ago
lead-info.php
5 years ago
login.php
5 years ago
material-includes.php
5 years ago
q_and_a_turned_off.php
5 years ago
review-form.php
5 years ago
reviews.php
5 years ago
social_share.php
5 years ago
tags.php
5 years ago
wc-price-html.php
5 years ago
review-form.php
50 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package TutorLMS/Templates |
| 4 | * @version 1.4.3 |
| 5 | */ |
| 6 | |
| 7 | $isLoggedIn = is_user_logged_in(); |
| 8 | $rating = $isLoggedIn ? tutor_utils()->get_course_rating_by_user() : ''; |
| 9 | ?> |
| 10 | |
| 11 | <div class="tutor-course-enrolled-review-wrap" id> |
| 12 | <a href="javascript:;" class="write-course-review-link-btn"> |
| 13 | <?php |
| 14 | if($isLoggedIn && (!empty($rating->rating) || !empty($rating->review))){ |
| 15 | _e('Edit review', 'tutor'); |
| 16 | }else{ |
| 17 | _e('Write a review', 'tutor'); |
| 18 | } |
| 19 | ?> |
| 20 | </a> |
| 21 | <div class="tutor-write-review-form" style="display: none;"> |
| 22 | <?php |
| 23 | if($isLoggedIn) { |
| 24 | ?> |
| 25 | <form method="post"> |
| 26 | <input type="hidden" name="tutor_course_id" value="<?php echo get_the_ID(); ?>"> |
| 27 | <div class="tutor-write-review-box"> |
| 28 | <div class="tutor-form-group"> |
| 29 | <?php |
| 30 | tutor_utils()->star_rating_generator(tutor_utils()->get_rating_value($rating->rating)); |
| 31 | ?> |
| 32 | </div> |
| 33 | <div class="tutor-form-group"> |
| 34 | <textarea name="review" placeholder="<?php _e('write a review', 'tutor'); ?>"><?php echo stripslashes($rating->review); ?></textarea> |
| 35 | </div> |
| 36 | <div class="tutor-form-group"> |
| 37 | <button type="submit" class="tutor_submit_review_btn tutor-button tutor-success"><?php _e('Submit Review', 'tutor'); ?></button> |
| 38 | </div> |
| 39 | </div> |
| 40 | </form> |
| 41 | <?php |
| 42 | }else{ |
| 43 | ob_start(); |
| 44 | tutor_load_template( 'single.course.login' ); |
| 45 | $output = apply_filters( 'tutor_course/global/login', ob_get_clean()); |
| 46 | echo $output; |
| 47 | } |
| 48 | ?> |
| 49 | </div> |
| 50 | </div> |