active-courses.php
7 years ago
completed-courses.php
7 years ago
dashboard.php
7 years ago
index.php
7 years ago
logged-in.php
7 years ago
my-courses.php
7 years ago
registration.php
7 years ago
wishlist.php
7 years ago
active-courses.php
47 lines
| 1 | <h1><?php _e('Active Course', 'tutor'); ?></h1> |
| 2 | <div class="tutor-dashboard-content-inner"> |
| 3 | <?php |
| 4 | $active_courses = tutor_utils()->get_active_courses_by_user(); |
| 5 | |
| 6 | if ($active_courses && $active_courses->have_posts()): |
| 7 | while ($active_courses->have_posts()): |
| 8 | $active_courses->the_post(); |
| 9 | ?> |
| 10 | <div class="tutor-mycourse-wrap tutor-mycourse-<?php the_ID(); ?>"> |
| 11 | <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h3> |
| 12 | <div class="tutor-meta tutor-course-metadata"> |
| 13 | <?php |
| 14 | $total_lessons = tutor_utils()->get_lesson_count_by_course(); |
| 15 | $completed_lessons = tutor_utils()->get_completed_lesson_count_by_course(); |
| 16 | ?> |
| 17 | <ul> |
| 18 | <li> |
| 19 | <?php |
| 20 | _e('Total Lessons:', 'tutor'); |
| 21 | echo "<span>$total_lessons</span>"; |
| 22 | ?> |
| 23 | </li> |
| 24 | <li> |
| 25 | <?php |
| 26 | _e('Completed Lessons:', 'tutor'); |
| 27 | echo "<span>$completed_lessons / $total_lessons</span>"; |
| 28 | ?> |
| 29 | </li> |
| 30 | </ul> |
| 31 | </div> |
| 32 | |
| 33 | <?php tutor_course_completing_progress_bar(); ?> |
| 34 | <?php the_excerpt(); ?> |
| 35 | |
| 36 | </div> |
| 37 | |
| 38 | <?php |
| 39 | endwhile; |
| 40 | wp_reset_postdata(); |
| 41 | else: |
| 42 | echo "<div class='tutor-mycourse-wrap'>". esc_html__('There\'s no active course', 'tutor') ."</div>"; |
| 43 | endif; |
| 44 | |
| 45 | ?> |
| 46 | </div> |
| 47 |