PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | templates/profile/tabs/courses/course-list.php +49 -47 4.4.3 → 4.4.9 View file →
@@ -23,58 +23,60 @@
23 23 $singleCourseTemplate = SingleCourseTemplate::instance();
24 24 ?>
25 25
26 26 <?php if ( $current_page === 1 ) : ?>
27 -<table class="lp_profile_course_progress lp-list-table">
28 - <thead>
29 - <tr class="lp_profile_course_progress__item lp_profile_course_progress__header">
30 - <th></th>
31 - <th><?php esc_html_e( 'Name', 'learnpress' ); ?></th>
32 - <th><?php esc_html_e( 'Result', 'learnpress' ); ?></th>
33 - <th><?php esc_html_e( 'Expiration time', 'learnpress' ); ?></th>
34 - <th><?php esc_html_e( 'End time', 'learnpress' ); ?></th>
35 - </tr>
36 - </thead>
37 - <?php endif; ?>
38 - <tbody>
39 - <?php
40 - foreach ( $course_ids as $id ) {
41 - $courseModel = CourseModel::find( $id, true );
42 - if ( ! $courseModel ) {
43 - continue;
44 - }
27 +<div class="lp-table-wrap">
28 + <table class="lp_profile_course_progress lp-list-table">
29 + <thead>
30 + <tr class="lp_profile_course_progress__item lp_profile_course_progress__header">
31 + <th></th>
32 + <th><?php esc_html_e( 'Name', 'learnpress' ); ?></th>
33 + <th><?php esc_html_e( 'Result', 'learnpress' ); ?></th>
34 + <th><?php esc_html_e( 'Expiration time', 'learnpress' ); ?></th>
35 + <th><?php esc_html_e( 'End time', 'learnpress' ); ?></th>
36 + </tr>
37 + </thead>
38 + <?php endif; ?>
39 + <tbody>
40 + <?php
41 + foreach ( $course_ids as $id ) {
42 + $courseModel = CourseModel::find( $id, true );
43 + if ( ! $courseModel ) {
44 + continue;
45 + }
45 46
46 - $userCourseModel = UserCourseModel::find( $user->get_id(), $id, true );
47 - if ( ! $userCourseModel ) {
48 - continue;
47 + $userCourseModel = UserCourseModel::find( $user->get_id(), $id, true );
48 + if ( ! $userCourseModel ) {
49 + continue;
50 + }
51 +
52 + $course_result = $userCourseModel->calculate_course_results();
53 + ?>
54 + <tr class="lp_profile_course_progress__item">
55 + <td style="max-width: 100px">
56 + <a href="<?php echo $courseModel->get_permalink(); ?>" title="<?php echo $courseModel->get_title(); ?>">
57 + <?php echo wp_kses_post( $singleCourseTemplate->html_image( $courseModel ) ); ?>
58 + </a>
59 + </td>
60 + <td>
61 + <a href="<?php echo $courseModel->get_permalink(); ?>"
62 + title="<?php echo $courseModel->get_title(); ?>">
63 + <?php echo wp_kses_post( $singleCourseTemplate->html_title( $courseModel ) ); ?>
64 + </a>
65 + </td>
66 + <td><?php echo esc_html( $course_result['result'] ); ?>%</td>
67 + <td>
68 + <?php echo $userCourseTemplate->html_expire_date_time( $userCourseModel ); ?>
69 + </td>
70 + <td><?php echo $userCourseTemplate->html_end_date_time( $userCourseModel ); ?></td>
71 + </tr>
72 + <?php
49 73 }
50 -
51 - $course_result = $userCourseModel->calculate_course_results();
52 74 ?>
53 - <tr class="lp_profile_course_progress__item">
54 - <td>
55 - <a href="<?php echo $courseModel->get_permalink(); ?>" title="<?php echo $courseModel->get_title(); ?>">
56 - <?php echo wp_kses_post( $singleCourseTemplate->html_image( $courseModel ) ); ?>
57 - </a>
58 - </td>
59 - <td>
60 - <a href="<?php echo $courseModel->get_permalink(); ?>"
61 - title="<?php echo $courseModel->get_title(); ?>">
62 - <?php echo wp_kses_post( $singleCourseTemplate->html_title( $courseModel ) ); ?>
63 - </a>
64 - </td>
65 - <td><?php echo esc_html( $course_result['result'] ); ?>%</td>
66 - <td>
67 - <?php echo $userCourseTemplate->html_expire_date_time( $userCourseModel ); ?>
68 - </td>
69 - <td><?php echo $userCourseTemplate->html_end_date_time( $userCourseModel ); ?></td>
70 - </tr>
71 - <?php
72 - }
73 - ?>
74 - </tbody>
75 - <?php if ( $current_page === 1 ) : ?>
76 -</table>
75 + </tbody>
76 + <?php if ( $current_page === 1 ) : ?>
77 + </table>
78 +</div>
77 79 <?php endif; ?>
78 80
79 81 <?php if ( $num_pages > 1 && $current_page < $num_pages && $current_page === 1 ) : ?>
80 82 <div class="lp_profile_course_progress__nav">