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.2 3.2.3 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / templates / single / lesson / lesson_sidebar.php
tutor / templates / single / lesson Last commit date
complete_form.php 7 years ago content.php 7 years ago lesson_sidebar.php 7 years ago required-enroll.php 7 years ago sidebar_question_and_answer.php 7 years ago
lesson_sidebar.php
192 lines
1 <?php
2
3 /**
4 * Display Topics and Lesson lists for learn
5 *
6 * @since v.1.0.0
7 * @author themeum
8 * @url https://themeum.com
9 */
10
11 if ( ! defined( 'ABSPATH' ) )
12 exit;
13
14 global $post;
15
16 $currentPost = $post;
17
18 $course_id = 0;
19 if ($post->post_type === 'tutor_quiz'){
20 $course = tutor_utils()->get_course_by_quiz(get_the_ID());
21 $course_id = $course->ID;
22 }elseif($post->post_type === 'tutor_assignments'){
23 $course_id = get_post_meta($post->ID, '_tutor_course_id_for_assignments', true);
24
25 } else{
26 $course_id = get_post_meta($post->ID, '_tutor_course_id_for_lesson', true);
27 }
28
29
30 ?>
31
32 <?php do_action('tutor_lesson/single/before/lesson_sidebar'); ?>
33
34 <div class="tutor-sidebar-tabs-wrap">
35 <div class="tutor-tabs-btn-group">
36 <a href="#tutor-lesson-sidebar-tab-content" class="active"> <i class="tutor-icon-education"></i> <span> <?php esc_html_e('Lesson List', 'tutor'); ?></span></a>
37 <a href="#tutor-lesson-sidebar-qa-tab-content"> <i class="tutor-icon-question-1"></i> <span><?php esc_html_e('Browse Q&A', 'tutor'); ?></span></a>
38 </div>
39
40 <div class="tutor-sidebar-tabs-content">
41
42 <div id="tutor-lesson-sidebar-tab-content" class="tutor-lesson-sidebar-tab-item">
43 <?php
44 $topics = tutor_utils()->get_topics($course_id);
45 if ($topics->have_posts()){
46 while ($topics->have_posts()){ $topics->the_post();
47 $topic_id = get_the_ID();
48 $topic_summery = get_the_content();
49 ?>
50
51 <div class="tutor-topics-in-single-lesson tutor-topics-<?php echo $topic_id; ?>">
52 <div class="tutor-topics-title <?php echo $topic_summery ? 'has-summery' : ''; ?>">
53 <h3>
54 <?php
55 the_title();
56 if($topic_summery) {
57 echo "<span class='toogle-informaiton-icon'>&quest;</span>";
58 }
59 ?>
60 </h3>
61 <button class="tutor-single-lesson-topic-toggle"><i class="tutor-icon-plus"></i></button>
62 </div>
63
64 <?php
65 if ($topic_summery){
66 ?>
67 <div class="tutor-topics-summery">
68 <?php echo $topic_summery; ?>
69 </div>
70 <?php
71 }
72 ?>
73
74 <div class="tutor-lessons-under-topic" style="display: none">
75 <?php
76 do_action('tutor/lesson_list/before/topic', $topic_id);
77
78 $lessons = tutor_utils()->get_course_contents_by_topic(get_the_ID(), -1);
79 if ($lessons->have_posts()){
80 while ($lessons->have_posts()){
81 $lessons->the_post();
82
83 if ($post->post_type === 'tutor_quiz') {
84
85
86 $quiz = $post;
87 ?>
88 <div class="tutor-single-lesson-items quiz-single-item quiz-single-item-<?php echo $quiz->ID; ?>" data-quiz-id="<?php echo $quiz->ID; ?>">
89 <a href="<?php echo get_permalink($quiz->ID); ?>" class="sidebar-single-quiz-a" data-quiz-id="<?php echo $quiz->ID; ?>">
90 <i class="tutor-icon-doubt"></i>
91 <span class="lesson_title"><?php echo $quiz->post_title; ?></span>
92 <span class="tutor-lesson-right-icons">
93
94 <?php
95 $time_limit = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_value');
96 if ($time_limit){
97 $time_type = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_type');
98 echo "<span class='quiz-time-limit'>{$time_limit} {$time_type}</span>";
99 }
100 ?>
101 </span>
102 </a>
103 </div>
104 <?php
105 }elseif($post->post_type === 'tutor_assignments'){
106 /**
107 * Assignments
108 * @since this block v.1.3.3
109 */
110
111 ?>
112 <div class="tutor-single-lesson-items assignments-single-item assignment-single-item-<?php echo $post->ID; ?>"
113 data-assignment-id="<?php echo $post->ID; ?>">
114 <a href="<?php echo get_permalink($post->ID); ?>" class="sidebar-single-assignment-a" data-assignment-id="<?php echo $post->ID; ?>">
115 <i class="tutor-icon-clipboard"></i>
116 <span class="lesson_title"> <?php echo $post->post_title; ?> </span>
117 </a>
118 </div>
119 <?php
120
121 }else{
122
123 /**
124 * Lesson
125 */
126
127 $video = tutor_utils()->get_video_info();
128
129 $play_time = false;
130 if ( $video ) {
131 $play_time = $video->playtime;
132 }
133 $is_completed_lesson = tutor_utils()->is_completed_lesson();
134 ?>
135
136 <div class="tutor-single-lesson-items <?php echo ( $currentPost->ID === get_the_ID() ) ? 'active' : ''; ?>">
137 <a href="<?php the_permalink(); ?>" class="tutor-single-lesson-a" data-lesson-id="<?php the_ID(); ?>">
138
139 <?php
140 $tutor_lesson_type_icon = $play_time ? 'youtube' : 'document';
141 echo "<i class='tutor-icon-$tutor_lesson_type_icon'></i>";
142 ?>
143 <span class="lesson_title"><?php the_title(); ?></span>
144 <span class="tutor-lesson-right-icons">
145 <?php
146 if ( $play_time ) {
147 echo "<i class='tutor-play-duration'>$play_time</i>";
148 }
149 $lesson_complete_icon = $is_completed_lesson ? 'tutor-icon-mark tutor-done' : '';
150 echo "<i class='tutor-lesson-complete $lesson_complete_icon'></i>";
151 ?>
152 </span>
153 </a>
154 </div>
155
156 <?php
157
158
159 }
160
161 }
162 $lessons->reset_postdata();
163 }
164
165 ?>
166
167 <?php do_action('tutor/lesson_list/after/topic', $topic_id); ?>
168 </div>
169 </div>
170
171 <?php
172 }
173 $topics->reset_postdata();
174 wp_reset_postdata();
175 }
176 ?>
177 </div>
178
179
180 <div id="tutor-lesson-sidebar-qa-tab-content" class="tutor-lesson-sidebar-tab-item" style="display: none;">
181 <?php
182 tutor_lesson_sidebar_question_and_answer();
183 ?>
184 </div>
185
186
187
188 </div>
189
190 </div>
191
192 <?php do_action('tutor_lesson/single/after/lesson_sidebar'); ?>