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