-
Notifications
You must be signed in to change notification settings - Fork 135
/
information.php
129 lines (106 loc) · 3.39 KB
/
information.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
/**
* Single Student View: Information Tab
*
* @package LifterLMS/Templates/Admin
*
* @since 3.2.0
* @since 6.0.0 Use `LLMS_Student::get_awards_count()`.
* @version 6.0.0
*/
defined( 'ABSPATH' ) || exit;
if ( ! is_admin() ) {
exit;
}
?>
<?php do_action( 'llms_reporting_student_tab_info_stab_before_content' ); ?>
<div class="llms-reporting-tab-content">
<section class="llms-reporting-tab-main llms-reporting-widgets">
<header>
<h3><?php esc_html_e( 'Student Information', 'lifterlms' ); ?></h3>
</header>
<?php
do_action( 'llms_reporting_single_student_overview_before_widgets', $student );
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of3',
'icon' => 'calendar',
'id' => 'llms-reporting-student-registered',
'data' => $student->get_registration_date(),
'data_type' => 'date',
'text' => __( 'Registered', 'lifterlms' ),
)
);
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of3',
'icon' => 'line-chart',
'id' => 'llms-reporting-student-registered',
'data' => $student->get_overall_progress(),
'data_type' => 'percentage',
'text' => __( 'Overall Progress', 'lifterlms' ),
)
);
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of3',
'icon' => 'graduation-cap',
'id' => 'llms-reporting-student-registered',
'data' => $student->get_overall_grade(),
'data_type' => 'percentage',
'text' => __( 'Overall Grade', 'lifterlms' ),
)
);
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of2',
'icon' => 'trophy',
'id' => 'llms-reporting-student-achievements',
'data' => $student->get_awards_count( 'achievement' ),
'text' => __( 'Achievements earned', 'lifterlms' ),
)
);
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of2',
'icon' => 'certificate',
'id' => 'llms-reporting-student-certificates',
'data' => $student->get_awards_count( 'certificate' ),
'text' => __( 'Certificates earned', 'lifterlms' ),
)
);
$address = $student->get( 'billing_address_1' );
if ( $student->get( 'billing_address_2' ) ) {
$address .= ' ' . $student->get( 'billing_address_2' );
}
$address .= '<br>' . $student->get( 'billing_city' ) . ', ' . $student->get( 'billing_state' ) . ' ' . $student->get( 'billing_zip' );
$address .= ' ' . $student->get( 'billing_country' );
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of2',
'icon' => 'map-marker',
'id' => 'llms-reporting-student-address',
'data' => trim( $address ),
'data_type' => 'text',
)
);
LLMS_Admin_Reporting::output_widget(
array(
'cols' => 'd-1of2',
'icon' => 'phone',
'id' => 'llms-reporting-student-address',
'data' => $student->get( 'phone' ),
'data_type' => 'text',
)
);
do_action( 'llms_reporting_single_student_overview_after_widgets', $student );
?>
</section>
<aside class="llms-reporting-tab-side">
<h3><i class="fa fa-bolt" aria-hidden="true"></i> <?php esc_html_e( 'Recent events', 'lifterlms' ); ?></h3>
<?php foreach ( $student->get_events() as $event ) : ?>
<?php LLMS_Admin_Reporting::output_event( $event, 'student' ); ?>
<?php endforeach; ?>
</aside>
</div>
<?php do_action( 'llms_reporting_student_tab_info_stab_after_content' ); ?>