← All changes
|
templates/profile/tabs/courses/general-statistic.php
+60
-60
4.3.9
→
4.4.9
View file →
| @@ -1,60 +1,60 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying general statistic in user profile overview. | |
| 4 | - * | |
| 5 | - * @author ThimPress | |
| 6 | - * @package LearnPress/Templates | |
| 7 | - * @version 4.0.1 | |
| 8 | - */ | |
| 9 | - | |
| 10 | -defined( 'ABSPATH' ) || exit; | |
| 11 | - | |
| 12 | -if ( empty( $statistic ) || empty( $user ) ) { | |
| 13 | - return; | |
| 14 | -} | |
| 15 | - | |
| 16 | -?> | |
| 17 | - | |
| 18 | -<div id="dashboard-statistic"> | |
| 19 | - | |
| 20 | - <?php do_action( 'learn-press/before-profile-dashboard-general-statistic-row' ); ?> | |
| 21 | - | |
| 22 | - <div class="dashboard-statistic__row"> | |
| 23 | - | |
| 24 | - <?php do_action( 'learn-press/before-profile-dashboard-user-general-statistic' ); ?> | |
| 25 | - | |
| 26 | - <div class=" statistic-box" title="<?php esc_html_e( 'Total enrolled courses', 'learnpress' ); ?>"> | |
| 27 | - <p class="statistic-box__text"><?php esc_html_e( 'Enrolled Courses', 'learnpress' ); ?></p> | |
| 28 | - <span class="statistic-box__number"><?php echo esc_html( $statistic['enrolled_courses'] ); ?></span> | |
| 29 | - </div> | |
| 30 | - <div class="statistic-box" | |
| 31 | - title="<?php esc_html_e( 'The total number of courses is being learned', 'learnpress' ); ?>"> | |
| 32 | - <p class="statistic-box__text"><?php esc_html_e( 'Active Courses', 'learnpress' ); ?></p> | |
| 33 | - <span class="statistic-box__number"><?php echo esc_html( $statistic['active_courses'] ); ?></span> | |
| 34 | - </div> | |
| 35 | - <div class="statistic-box" title="<?php esc_html_e( 'Total courses have finished', 'learnpress' ); ?>"> | |
| 36 | - <p class="statistic-box__text"><?php esc_html_e( 'Completed Courses', 'learnpress' ); ?></p> | |
| 37 | - <span class="statistic-box__number"><?php echo esc_html( $statistic['completed_courses'] ); ?></span> | |
| 38 | - </div> | |
| 39 | - | |
| 40 | - <?php do_action( 'learn-press/after-profile-dashboard-user-general-statistic' ); ?> | |
| 41 | - | |
| 42 | - <?php if ( $user->can_create_course() ) : ?> | |
| 43 | - <?php do_action( 'learn-press/before-profile-dashboard-instructor-general-statistic' ); ?> | |
| 44 | - <div class="statistic-box" title="<?php esc_html_e( 'Total created courses', 'learnpress' ); ?>"> | |
| 45 | - <p class="statistic-box__text"><?php esc_html_e( 'Total Courses', 'learnpress' ); ?></p> | |
| 46 | - <span class="statistic-box__number"><?php echo esc_html( $statistic['total_courses'] ); ?></span> | |
| 47 | - </div> | |
| 48 | - <div class="statistic-box" title="<?php esc_html_e( 'Total attended students', 'learnpress' ); ?>"> | |
| 49 | - <p class="statistic-box__text"><?php esc_html_e( 'Total Students', 'learnpress' ); ?></p> | |
| 50 | - <span class="statistic-box__number"><?php echo esc_html( $statistic['total_users'] ); ?></span> | |
| 51 | - </div> | |
| 52 | - | |
| 53 | - <?php do_action( 'learn-press/after-profile-dashboard-instructor-general-statistic' ); ?> | |
| 54 | - <?php endif; ?> | |
| 55 | - </div> | |
| 56 | - | |
| 57 | - <?php do_action( 'learn-press/profile-dashboard-general-statistic-row' ); ?> | |
| 58 | - | |
| 59 | - <?php do_action( 'learn-press/after-profile-dashboard-general-statistic-row' ); ?> | |
| 60 | -</div> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying general statistic in user profile overview. | |
| 4 | + * | |
| 5 | + * @author ThimPress | |
| 6 | + * @package LearnPress/Templates | |
| 7 | + * @version 4.0.1 | |
| 8 | + */ | |
| 9 | + | |
| 10 | +defined( 'ABSPATH' ) || exit; | |
| 11 | + | |
| 12 | +if ( empty( $statistic ) || empty( $user ) ) { | |
| 13 | + return; | |
| 14 | +} | |
| 15 | + | |
| 16 | +?> | |
| 17 | + | |
| 18 | +<div id="dashboard-statistic"> | |
| 19 | + | |
| 20 | + <?php do_action( 'learn-press/before-profile-dashboard-general-statistic-row' ); ?> | |
| 21 | + | |
| 22 | + <div class="dashboard-statistic__row"> | |
| 23 | + | |
| 24 | + <?php do_action( 'learn-press/before-profile-dashboard-user-general-statistic' ); ?> | |
| 25 | + | |
| 26 | + <div class=" statistic-box" title="<?php esc_html_e( 'Total enrolled courses', 'learnpress' ); ?>"> | |
| 27 | + <p class="statistic-box__text"><?php esc_html_e( 'Enrolled Courses', 'learnpress' ); ?></p> | |
| 28 | + <span class="statistic-box__number"><?php echo esc_html( $statistic['enrolled_courses'] ); ?></span> | |
| 29 | + </div> | |
| 30 | + <div class="statistic-box" | |
| 31 | + title="<?php esc_html_e( 'The total number of courses is being learned', 'learnpress' ); ?>"> | |
| 32 | + <p class="statistic-box__text"><?php esc_html_e( 'Active Courses', 'learnpress' ); ?></p> | |
| 33 | + <span class="statistic-box__number"><?php echo esc_html( $statistic['active_courses'] ); ?></span> | |
| 34 | + </div> | |
| 35 | + <div class="statistic-box" title="<?php esc_html_e( 'Total courses have finished', 'learnpress' ); ?>"> | |
| 36 | + <p class="statistic-box__text"><?php esc_html_e( 'Completed Courses', 'learnpress' ); ?></p> | |
| 37 | + <span class="statistic-box__number"><?php echo esc_html( $statistic['completed_courses'] ); ?></span> | |
| 38 | + </div> | |
| 39 | + | |
| 40 | + <?php do_action( 'learn-press/after-profile-dashboard-user-general-statistic' ); ?> | |
| 41 | + | |
| 42 | + <?php if ( $user->can_create_course() ) : ?> | |
| 43 | + <?php do_action( 'learn-press/before-profile-dashboard-instructor-general-statistic' ); ?> | |
| 44 | + <div class="statistic-box" title="<?php esc_html_e( 'Total created courses', 'learnpress' ); ?>"> | |
| 45 | + <p class="statistic-box__text"><?php esc_html_e( 'Total Courses', 'learnpress' ); ?></p> | |
| 46 | + <span class="statistic-box__number"><?php echo esc_html( $statistic['total_courses'] ); ?></span> | |
| 47 | + </div> | |
| 48 | + <div class="statistic-box" title="<?php esc_html_e( 'Total attended students', 'learnpress' ); ?>"> | |
| 49 | + <p class="statistic-box__text"><?php esc_html_e( 'Total Students', 'learnpress' ); ?></p> | |
| 50 | + <span class="statistic-box__number"><?php echo esc_html( $statistic['total_users'] ); ?></span> | |
| 51 | + </div> | |
| 52 | + | |
| 53 | + <?php do_action( 'learn-press/after-profile-dashboard-instructor-general-statistic' ); ?> | |
| 54 | + <?php endif; ?> | |
| 55 | + </div> | |
| 56 | + | |
| 57 | + <?php do_action( 'learn-press/profile-dashboard-general-statistic-row' ); ?> | |
| 58 | + | |
| 59 | + <?php do_action( 'learn-press/after-profile-dashboard-general-statistic-row' ); ?> | |
| 60 | +</div> | |