announcements
4 years ago
assignments
4 years ago
elements
4 years ago
enrolled-courses
4 years ago
instructor
4 years ago
my-courses
4 years ago
my-quiz-attempts
4 years ago
notifications
4 years ago
question-answer
4 years ago
quiz-attempts
4 years ago
reviews
4 years ago
settings
4 years ago
withdraw-method-fields
4 years ago
announcements.php
4 years ago
assignments.php
4 years ago
create-course.php
4 years ago
dashboard.php
4 years ago
enrolled-courses.php
4 years ago
index.php
4 years ago
logged-in.php
4 years ago
my-courses.php
4 years ago
my-profile.php
4 years ago
my-quiz-attempts.php
4 years ago
purchase_history.php
4 years ago
question-answer.php
4 years ago
quiz-attempts.php
4 years ago
registration.php
4 years ago
reviews.php
4 years ago
settings.php
4 years ago
wishlist.php
4 years ago
withdraw.php
4 years ago
dashboard.php
396 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @package TutorLMS/Templates |
| 5 | * @version 1.4.3 |
| 6 | */ |
| 7 | |
| 8 | if ( tutor_utils()->get_option( 'enable_profile_completion' ) ) { |
| 9 | $profile_completion = tutor_utils()->user_profile_completion(); |
| 10 | $is_instructor = tutor_utils()->is_instructor(null, true); |
| 11 | $total_count = count( $profile_completion ); |
| 12 | $incomplete_count = count( |
| 13 | array_filter( |
| 14 | $profile_completion, |
| 15 | function( $data ) { |
| 16 | return ! $data['is_set']; |
| 17 | } |
| 18 | ) |
| 19 | ); |
| 20 | $complete_count = $total_count - $incomplete_count; |
| 21 | |
| 22 | if ( $is_instructor ) { |
| 23 | if ( isset($total_count) && isset($incomplete_count) && $incomplete_count <= $total_count ) { |
| 24 | ?> |
| 25 | <div class="tutor-profile-completion tutor-card tutor-px-32 tutor-py-24 tutor-mb-40"> |
| 26 | <div class="tutor-row tutor-gx-0"> |
| 27 | <div class="tutor-col-lg-7 <?php echo tutor_utils()->is_instructor() ? 'tutor-profile-completion-content-admin' : ''; ?>"> |
| 28 | <div class="tutor-fs-5 tutor-fw-medium tutor-color-black"> |
| 29 | <?php esc_html_e( 'Complete Your Profile', 'tutor' ); ?> |
| 30 | </div> |
| 31 | |
| 32 | <div class="tutor-row tutor-align-center tutor-mt-12"> |
| 33 | <div class="tutor-col"> |
| 34 | <div class="tutor-row tutor-gx-1"> |
| 35 | <?php for ( $i = 1; $i <= $total_count; $i++ ) : ?> |
| 36 | <div class="tutor-col"> |
| 37 | <div class="tutor-progress-bar" style="--tutor-progress-value: <?php echo $i > $complete_count ? 0 : 100; ?>%; height: 8px;"><div class="tutor-progress-value" area-hidden="true"></div></div> |
| 38 | </div> |
| 39 | <?php endfor; ?> |
| 40 | </div> |
| 41 | </div> |
| 42 | |
| 43 | <div class="tutor-col-auto"> |
| 44 | <span class="tutor-round-box tutor-my-n20"> |
| 45 | <i class="tutor-icon-trophy" area-hidden="true"></i> |
| 46 | </span> |
| 47 | </div> |
| 48 | </div> |
| 49 | |
| 50 | <div class="tutor-fs-6 tutor-mt-20"> |
| 51 | <?php |
| 52 | $profile_complete_text = __("Please complete profile", "tutor"); |
| 53 | if($complete_count > ( $total_count / 2 ) && $complete_count < $total_count) { |
| 54 | $profile_complete_text = __("You are almost done", "tutor"); |
| 55 | } else if($complete_count === $total_count) { |
| 56 | $profile_complete_text = __("Thanks for completing your profile", "tutor"); |
| 57 | } |
| 58 | $profile_complete_status = $profile_complete_text; |
| 59 | ?> |
| 60 | |
| 61 | <span class="tutor-color-muted"><?php echo $profile_complete_status ?>:</span> |
| 62 | <span><?php echo $complete_count . '/' . $total_count; ?></span> |
| 63 | </div> |
| 64 | </div> |
| 65 | |
| 66 | <div class="tutor-col-lg-1 tutor-text-center tutor-my-24 tutor-my-lg-n24"> |
| 67 | <div class="tutor-vr tutor-d-none tutor-d-lg-inline-flex"></div> |
| 68 | <div class="tutor-hr tutor-d-flex tutor-d-lg-none"></div> |
| 69 | </div> |
| 70 | |
| 71 | <div class="tutor-col-lg-4 tutor-d-flex tutor-flex-column tutor-justify-center"> |
| 72 | <?php |
| 73 | $i = 0; |
| 74 | foreach ( $profile_completion as $key => $data ) { |
| 75 | $is_set = $data['is_set']; // Whether the step is done or not |
| 76 | ?> |
| 77 | <div class="tutor-d-flex tutor-align-center<?php echo $i < (count($profile_completion) - 1) ? ' tutor-mb-8' : ''; ?>"> |
| 78 | <?php if ( $is_set ) : ?> |
| 79 | <span class="tutor-icon-circle-mark-line tutor-color-success tutor-mr-8"></span> |
| 80 | <?php else : ?> |
| 81 | <span class="tutor-icon-circle-times-line tutor-color-warning tutor-mr-8"></span> |
| 82 | <?php endif; ?> |
| 83 | |
| 84 | <span class="<?php echo $is_set ? 'tutor-color-secondary' : 'tutor-color-muted'; ?>"> |
| 85 | <a class="tutor-btn tutor-btn-ghost tutor-has-underline" href="<?php echo esc_url( $data['url'] ); ?>"> |
| 86 | <?php echo esc_html( $data['text'] ); ?> |
| 87 | </a> |
| 88 | </span> |
| 89 | </div> |
| 90 | <?php |
| 91 | $i++; |
| 92 | } |
| 93 | ?> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |
| 97 | <?php |
| 98 | } |
| 99 | } else { |
| 100 | if ( ! $profile_completion['_tutor_profile_photo']['is_set'] ) { |
| 101 | $alert_message = sprintf( |
| 102 | '<div class="tutor-alert tutor-primary tutor-mb-20"> |
| 103 | <div class="tutor-alert-text"> |
| 104 | <span class="tutor-alert-icon tutor-fs-4 tutor-icon-circle-info tutor-mr-12"></span> |
| 105 | <span> |
| 106 | %s |
| 107 | </span> |
| 108 | </div> |
| 109 | <div class="alert-btn-group"> |
| 110 | <a href="%s" class="tutor-btn tutor-btn-sm">Click Here</a> |
| 111 | </div> |
| 112 | </div>', |
| 113 | $profile_completion['_tutor_profile_photo']['text'], |
| 114 | tutor_utils()->tutor_dashboard_url( 'settings' ) |
| 115 | ); |
| 116 | |
| 117 | echo $alert_message; |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | ?> |
| 122 | |
| 123 | <div class="tutor-fs-5 tutor-fw-medium tutor-color-black tutor-capitalize-text tutor-mb-24 tutor-dashboard-title"><?php _e( 'Dashboard', 'tutor' ); ?></div> |
| 124 | <div class="tutor-dashboard-content-inner"> |
| 125 | <?php |
| 126 | $enrolled_course = tutor_utils()->get_enrolled_courses_by_user(); |
| 127 | $completed_courses = tutor_utils()->get_completed_courses_ids_by_user(); |
| 128 | $total_students = tutor_utils()->get_total_students_by_instructor( get_current_user_id() ); |
| 129 | $my_courses = tutor_utils()->get_courses_by_instructor( get_current_user_id(), 'publish' ); |
| 130 | $earning_sum = tutor_utils()->get_earning_sum(); |
| 131 | |
| 132 | $enrolled_course_count = $enrolled_course ? $enrolled_course->post_count : 0; |
| 133 | $completed_course_count = count( $completed_courses ); |
| 134 | $active_course_count = $enrolled_course_count - $completed_course_count; |
| 135 | $active_course_count < 0 ? $active_course_count = 0 : 0; |
| 136 | |
| 137 | $status_translations = array( |
| 138 | 'publish' => __( 'Published', 'tutor' ), |
| 139 | 'pending' => __( 'Pending', 'tutor' ), |
| 140 | 'trash' => __( 'Trash', 'tutor' ), |
| 141 | ); |
| 142 | |
| 143 | ?> |
| 144 | <div class="tutor-row tutor-gx-lg-4"> |
| 145 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 146 | <div class="tutor-card"> |
| 147 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 148 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 149 | <i class="tutor-icon-book-open" area-hidden="true"></i> |
| 150 | </span> |
| 151 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo esc_html( $enrolled_course_count ); ?></div> |
| 152 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Enrolled Courses', 'tutor' ); ?></div> |
| 153 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo esc_html( $enrolled_course_count ); ?></div> |
| 154 | </div> |
| 155 | </div> |
| 156 | </div> |
| 157 | |
| 158 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 159 | <div class="tutor-card"> |
| 160 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 161 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 162 | <i class="tutor-icon-mortarboard-o" area-hidden="true"></i> |
| 163 | </span> |
| 164 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo esc_html( $active_course_count ); ?></div> |
| 165 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Active Courses', 'tutor' ); ?></div> |
| 166 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo esc_html( $active_course_count ); ?></div> |
| 167 | </div> |
| 168 | </div> |
| 169 | </div> |
| 170 | |
| 171 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 172 | <div class="tutor-card"> |
| 173 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 174 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 175 | <i class="tutor-icon-trophy" area-hidden="true"></i> |
| 176 | </span> |
| 177 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo esc_html( $completed_course_count ); ?></div> |
| 178 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Completed Courses', 'tutor' ); ?></div> |
| 179 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo esc_html( $completed_course_count ); ?></div> |
| 180 | </div> |
| 181 | </div> |
| 182 | </div> |
| 183 | |
| 184 | <?php |
| 185 | if ( current_user_can( tutor()->instructor_role ) ) : |
| 186 | ?> |
| 187 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 188 | <div class="tutor-card"> |
| 189 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 190 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 191 | <i class="tutor-icon-user-graduate" area-hidden="true"></i> |
| 192 | </span> |
| 193 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo esc_html( $total_students ); ?></div> |
| 194 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Total Students', 'tutor' ); ?></div> |
| 195 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo esc_html( $total_students ); ?></div> |
| 196 | </div> |
| 197 | </div> |
| 198 | </div> |
| 199 | |
| 200 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 201 | <div class="tutor-card"> |
| 202 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 203 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 204 | <i class="tutor-icon-box-open" area-hidden="true"></i> |
| 205 | </span> |
| 206 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo esc_html( count( $my_courses ) ); ?></div> |
| 207 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Total Courses', 'tutor' ); ?></div> |
| 208 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo esc_html( count( $my_courses ) ); ?></div> |
| 209 | </div> |
| 210 | </div> |
| 211 | </div> |
| 212 | |
| 213 | <div class="tutor-col-lg-6 tutor-col-xl-4 tutor-mb-16 tutor-mb-lg-32"> |
| 214 | <div class="tutor-card"> |
| 215 | <div class="tutor-d-flex tutor-flex-lg-column tutor-align-center tutor-text-lg-center tutor-px-12 tutor-px-lg-24 tutor-py-8 tutor-py-lg-32"> |
| 216 | <span class="tutor-round-box tutor-mr-12 tutor-mr-lg-0 tutor-mb-lg-12"> |
| 217 | <i class="tutor-icon-coins" area-hidden="true"></i> |
| 218 | </span> |
| 219 | <div class="tutor-fs-3 tutor-fw-bold tutor-d-none tutor-d-lg-block"><?php echo tutor_utils()->tutor_price( $earning_sum->instructor_amount ); ?></div> |
| 220 | <div class="tutor-fs-7 tutor-color-secondary"><?php esc_html_e( 'Total Earnings', 'tutor' ); ?></div> |
| 221 | <div class="tutor-fs-4 tutor-fw-bold tutor-d-block tutor-d-lg-none tutor-ml-auto"><?php echo tutor_utils()->tutor_price( $earning_sum->instructor_amount ); ?></div> |
| 222 | </div> |
| 223 | </div> |
| 224 | </div> |
| 225 | <?php |
| 226 | endif; |
| 227 | ?> |
| 228 | </div> |
| 229 | </div> |
| 230 | |
| 231 | <?php |
| 232 | /** |
| 233 | * Active users in progress courses |
| 234 | */ |
| 235 | $placeholder_img = tutor()->url . 'assets/images/placeholder.svg'; |
| 236 | $courses_in_progress = tutor_utils()->get_active_courses_by_user( get_current_user_id() ); |
| 237 | ?> |
| 238 | |
| 239 | <?php if ( $courses_in_progress && $courses_in_progress->have_posts() ) : ?> |
| 240 | <div class="tutor-frontend-dashboard-course-progress"> |
| 241 | <div class="tutor-fs-5 tutor-fw-medium tutor-color-black tutor-capitalize-text tutor-mb-24"> |
| 242 | <?php esc_html_e( 'In Progress Courses', 'tutor' ); ?> |
| 243 | </div> |
| 244 | <?php |
| 245 | while ( $courses_in_progress->have_posts() ) : |
| 246 | $courses_in_progress->the_post(); |
| 247 | $tutor_course_img = get_tutor_course_thumbnail_src(); |
| 248 | $course_rating = tutor_utils()->get_course_rating( get_the_ID() ); |
| 249 | $course_progress = tutor_utils()->get_course_completed_percent( get_the_ID(), 0, true ); |
| 250 | $completed_number = 0 === (int) $course_progress['completed_count'] ? 1 : (int) $course_progress['completed_count']; |
| 251 | ?> |
| 252 | <div class="tutor-course-progress-item tutor-card tutor-mb-20"> |
| 253 | <div class="tutor-row tutor-gx-0"> |
| 254 | <div class="tutor-col-lg-4"> |
| 255 | <div class="tutor-ratio tutor-ratio-3x2"> |
| 256 | <img class="tutor-card-image-left" src="<?php echo empty(esc_url($tutor_course_img)) ? $placeholder_img : esc_url($tutor_course_img) ?>" alt="<?php the_title(); ?>" loading="lazy"> |
| 257 | </div> |
| 258 | </div> |
| 259 | |
| 260 | <div class="tutor-col-lg-8 tutor-align-self-center"> |
| 261 | <div class="tutor-card-body"> |
| 262 | <?php if ( $course_rating ) : ?> |
| 263 | <div class="tutor-ratings tutor-mb-4"> |
| 264 | <?php tutor_utils()->star_rating_generator( $course_rating->rating_avg ); ?> |
| 265 | <div class="tutor-ratings-count"> |
| 266 | <?php echo esc_html( number_format( $course_rating->rating_avg, 2 ) ); ?> |
| 267 | </div> |
| 268 | </div> |
| 269 | <?php endif; ?> |
| 270 | |
| 271 | <div class="tutor-course-progress-item-title tutor-fs-5 tutor-fw-medium tutor-color-black tutor-mb-12"> |
| 272 | <?php the_title(); ?> |
| 273 | </div> |
| 274 | |
| 275 | <div class="tutor-d-flex tutor-fs-7 tutor-mb-32"> |
| 276 | <span class="tutor-color-muted tutor-mr-4"><?php esc_html_e( 'Completed Lessons:', 'tutor' ); ?></span> |
| 277 | <span class="tutor-fw-medium tutor-color-black"> |
| 278 | <span> |
| 279 | <?php echo esc_html( $course_progress['completed_count'] ); ?> |
| 280 | </span> |
| 281 | <?php esc_html_e( 'of', 'tutor' ); ?> |
| 282 | <span> |
| 283 | <?php echo esc_html( $course_progress['total_count'] ); ?> |
| 284 | </span> |
| 285 | <?php echo esc_html( _n( 'lesson', 'lessons', $completed_number, 'tutor' ) ); ?> |
| 286 | </span> |
| 287 | </div> |
| 288 | |
| 289 | <div class="tutor-row tutor-align-center"> |
| 290 | <div class="tutor-col"> |
| 291 | <div class="tutor-progress-bar tutor-mr-16" style="--tutor-progress-value:<?php echo esc_attr( $course_progress['completed_percent'] ); ?>%"><span class="tutor-progress-value" area-hidden="true"></span></div> |
| 292 | </div> |
| 293 | |
| 294 | <div class="tutor-col-auto"> |
| 295 | <span class="progress-percentage tutor-fs-7 tutor-color-muted"> |
| 296 | <span class="tutor-fw-medium tutor-color-black "> |
| 297 | <?php echo esc_html( $course_progress['completed_percent'] . '%' ); ?> |
| 298 | </span><?php esc_html_e( 'Complete', 'tutor' ); ?> |
| 299 | </span> |
| 300 | </div> |
| 301 | </div> |
| 302 | </div> |
| 303 | </div> |
| 304 | <a class="tutor-stretched-link" href="<?php the_permalink(); ?>"></a> |
| 305 | </div> |
| 306 | </div> |
| 307 | <?php endwhile; ?> |
| 308 | <?php wp_reset_postdata(); ?> |
| 309 | </div> |
| 310 | <?php endif; ?> |
| 311 | |
| 312 | <?php |
| 313 | $instructor_course = tutor_utils()->get_courses_for_instructors( get_current_user_id() ); |
| 314 | |
| 315 | if ( count( $instructor_course ) ) { |
| 316 | $course_badges = array( |
| 317 | 'publish' => 'success', |
| 318 | 'pending' => 'warning', |
| 319 | 'trash' => 'danger', |
| 320 | ); |
| 321 | |
| 322 | ?> |
| 323 | <div class="popular-courses-heading-dashboard tutor-d-flex tutor-justify-between tutor-mb-24 tutor-mt-md-40 tutor-mt-0"> |
| 324 | <span class="tutor-fs-5 tutor-fw-medium tutor-color-black"><?php esc_html_e( 'My Courses', 'tutor' ); ?></span> |
| 325 | <a class="tutor-btn tutor-btn-ghost" href="<?php echo esc_url( tutor_utils()->tutor_dashboard_url( 'my-courses' ) ); ?>"> |
| 326 | <?php esc_html_e( 'View All', 'tutor' ); ?> |
| 327 | </a> |
| 328 | </div> |
| 329 | |
| 330 | <div class="tutor-dashboard-content-inner"> |
| 331 | <table class="tutor-table tutor-table-responsive table-popular-courses"> |
| 332 | <thead> |
| 333 | <tr> |
| 334 | <th> |
| 335 | <span class="tutor-fs-7 tutor-color-secondary"> |
| 336 | <?php esc_html_e( 'Course Name', 'tutor' ); ?> |
| 337 | </span> |
| 338 | </th> |
| 339 | <th class="tutor-table-rows-sorting"> |
| 340 | <div class="tutor-d-inline-flex tutor-align-center tutor-color-secondary"> |
| 341 | <span class="tutor-fs-7"><?php esc_html_e( 'Enrolled', 'tutor' ); ?></span> |
| 342 | <span class="tutor-icon-ordering-a-z a-to-z-sort-icon"></span> |
| 343 | </div> |
| 344 | </th> |
| 345 | <th class="tutor-table-rows-sorting"> |
| 346 | <div class="tutor-d-inline-flex tutor-align-center tutor-color-secondary"> |
| 347 | <span class="tutor-fs-7"><?php esc_html_e( 'Rating', 'tutor' ); ?></span> |
| 348 | <span class="tutor-icon-ordering-a-z a-to-z-sort-icon"></span> |
| 349 | </div> |
| 350 | </th> |
| 351 | </tr> |
| 352 | </thead> |
| 353 | <tbody> |
| 354 | <?php if ( is_array( $instructor_course ) && count( $instructor_course ) ) : ?> |
| 355 | <?php |
| 356 | foreach ( $instructor_course as $course ) : |
| 357 | $enrolled = tutor_utils()->count_enrolled_users_by_course( $course->ID ); |
| 358 | $course_status = isset( $status_translations[ $course->post_status ] ) ? $status_translations[ $course->post_status ] : __( $course->post_status, 'tutor' ); |
| 359 | $course_rating = tutor_utils()->get_course_rating( $course->ID ); |
| 360 | $course_badge = isset( $course_badges[ $course->post_status ] ) ? $course_badges[ $course->post_status ] : 'dark'; |
| 361 | |
| 362 | ?> |
| 363 | <tr> |
| 364 | <td data-th="<?php esc_html_e( 'Course Name', 'tutor' ); ?>" class="column-fullwidth"> |
| 365 | <div class="td-course tutor-fs-6 tutor-fw-medium tutor-color-black"> |
| 366 | <a href="<?php echo esc_url( get_the_permalink( $course->ID ) ); ?>" target="_blank"> |
| 367 | <?php esc_html_e( $course->post_title ); ?> |
| 368 | </a> |
| 369 | </div> |
| 370 | </td> |
| 371 | <td data-th="<?php esc_html_e( 'Enrolled', 'tutor' ); ?>"> |
| 372 | <span class="tutor-fs-7 tutor-fw-medium tutor-color-black"> |
| 373 | <?php esc_html_e( $enrolled ); ?> |
| 374 | </span> |
| 375 | </td> |
| 376 | <td data-th="<?php esc_html_e( 'Rating', 'tutor' ); ?>"> |
| 377 | <div class="td-tutor-rating tutor-fs-6 tutor-color-secondary"> |
| 378 | <?php tutor_utils()->star_rating_generator_v2( $course_rating->rating_avg, null, true ); ?> |
| 379 | </div> |
| 380 | </td> |
| 381 | </tr> |
| 382 | <?php endforeach; ?> |
| 383 | <?php else : ?> |
| 384 | <tr> |
| 385 | <td colspan="100%" class="column-empty-state"> |
| 386 | <?php tutor_utils()->tutor_empty_state( tutor_utils()->not_found_text() ); ?> |
| 387 | </td> |
| 388 | </tr> |
| 389 | <?php endif; ?> |
| 390 | </tbody> |
| 391 | </table> |
| 392 | </div> |
| 393 | <?php |
| 394 | } |
| 395 | ?> |
| 396 |