PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.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 4.2.0 4.2.1 All 138 releases
learnpress / inc / admin / views / user / course-progress.php

course-progress.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.8, at inc/admin/views/user/course-progress.php

58 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @author Thimpress
4 * @version 1.0.1
5 */
6
7 if ( ! isset( $user ) || ! isset( $course ) || ! isset( $course_result ) || ! isset( $course_data ) ) {
8 return;
9 }
10
11 $passing_condition = $course->get_passing_condition();
12 /*$completed_percent = 0;
13
14 if ( isset( $course_result['count_items'] ) && isset( $course_result['completed_items'] )
15 && $course_result['count_items'] > 0 ) {
16 $completed_percent = round( $course_result['completed_items'] * 100 / $course_result['count_items'], 2 );
17 }*/
18
19 ?>
20
21 <div class="course-results-progress">
22 <div class="items-progress lp-progress-row">
23
24 <?php $heading = apply_filters( 'learn-press/course/items-completed-heading', esc_html__( 'Items completed:', 'learnpress' ) ); ?>
25
26 <?php if ( $heading ) : ?>
27 <h4 class="lp-course-progress-heading"><?php echo esc_html__( 'Items completed:', 'learnpress' ); ?></h4>
28 <?php endif; ?>
29
30 <span class="number"><?php printf( __( '%1$d of %2$d items', 'learnpress' ), $course_result['completed_items'] ?? 0, $course->count_items() ); ?></span>
31 </div>
32
33 <div class="course-progress lp-progress-row">
34
35 <?php $heading = apply_filters( 'learn-press/course/result-heading', esc_html__( 'Course progress:', 'learnpress' ) ); ?>
36
37 <?php if ( $heading ) : ?>
38 <h4 class="lp-course-progress-heading">
39 <?php echo esc_html( $heading ); ?>
40 </h4>
41 <?php endif; ?>
42
43 <div class="lp-course-status">
44 <span class="number">
45 <?php echo round( $course_result['result'], 2 ); ?>
46 <span class="percentage-sign">%</span>
47 </span>
48
49 <?php $graduation = $course_data->get_graduation(); ?>
50 <?php if ( $graduation ) : ?>
51 <span class="lp-graduation <?php echo esc_attr( $graduation ); ?>" style="color: #222; font-weight: 600;">
52 - <?php learn_press_course_grade_html( $graduation ); ?>
53 </span>
54 <?php endif; ?>
55 </div>
56 </div>
57 </div>
58