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.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 6 years ago content.php 6 years ago lesson_sidebar.php 6 years ago required-enroll.php 6 years ago sidebar_question_and_answer.php 6 years ago
lesson_sidebar.php
196 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 $enable_q_and_a_on_course = tutor_utils()->get_option('enable_q_and_a_on_course');
30
31
32 ?>
33
34 <?php do_action('tutor_lesson/single/before/lesson_sidebar'); ?>
35
36 <div class="tutor-sidebar-tabs-wrap">
37 <div class="tutor-tabs-btn-group">
38 <a href="#tutor-lesson-sidebar-tab-content" class="<?php echo $enable_q_and_a_on_course ? "active" : ""; ?>"> <i class="tutor-icon-education"></i> <span> <?php esc_html_e('Lesson List', 'tutor'); ?></span></a>
39 <?php if($enable_q_and_a_on_course) { ?>
40 <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>
41 <?php } ?>
42 </div>
43
44 <div class="tutor-sidebar-tabs-content">
45
46 <div id="tutor-lesson-sidebar-tab-content" class="tutor-lesson-sidebar-tab-item">
47 <?php
48 $topics = tutor_utils()->get_topics($course_id);
49 if ($topics->have_posts()){
50 while ($topics->have_posts()){ $topics->the_post();
51 $topic_id = get_the_ID();
52 $topic_summery = get_the_content();
53 ?>
54
55 <div class="tutor-topics-in-single-lesson tutor-topics-<?php echo $topic_id; ?>">
56 <div class="tutor-topics-title <?php echo $topic_summery ? 'has-summery' : ''; ?>">
57 <h3>
58 <?php
59 the_title();
60 if($topic_summery) {
61 echo "<span class='toogle-informaiton-icon'>&quest;</span>";
62 }
63 ?>
64 </h3>
65 <button class="tutor-single-lesson-topic-toggle"><i class="tutor-icon-plus"></i></button>
66 </div>
67
68 <?php
69 if ($topic_summery){
70 ?>
71 <div class="tutor-topics-summery">
72 <?php echo $topic_summery; ?>
73 </div>
74 <?php
75 }
76 ?>
77
78 <div class="tutor-lessons-under-topic" style="display: none">
79 <?php
80 do_action('tutor/lesson_list/before/topic', $topic_id);
81
82 $lessons = tutor_utils()->get_course_contents_by_topic(get_the_ID(), -1);
83 if ($lessons->have_posts()){
84 while ($lessons->have_posts()){
85 $lessons->the_post();
86
87 if ($post->post_type === 'tutor_quiz') {
88
89
90 $quiz = $post;
91 ?>
92 <div class="tutor-single-lesson-items quiz-single-item quiz-single-item-<?php echo $quiz->ID; ?>" data-quiz-id="<?php echo $quiz->ID; ?>">
93 <a href="<?php echo get_permalink($quiz->ID); ?>" class="sidebar-single-quiz-a" data-quiz-id="<?php echo $quiz->ID; ?>">
94 <i class="tutor-icon-doubt"></i>
95 <span class="lesson_title"><?php echo $quiz->post_title; ?></span>
96 <span class="tutor-lesson-right-icons">
97
98 <?php
99 $time_limit = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_value');
100 if ($time_limit){
101 $time_type = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_type');
102 echo "<span class='quiz-time-limit'>{$time_limit} {$time_type}</span>";
103 }
104 ?>
105 </span>
106 </a>
107 </div>
108 <?php
109 }elseif($post->post_type === 'tutor_assignments'){
110 /**
111 * Assignments
112 * @since this block v.1.3.3
113 */
114
115 ?>
116 <div class="tutor-single-lesson-items assignments-single-item assignment-single-item-<?php echo $post->ID; ?>"
117 data-assignment-id="<?php echo $post->ID; ?>">
118 <a href="<?php echo get_permalink($post->ID); ?>" class="sidebar-single-assignment-a" data-assignment-id="<?php echo $post->ID; ?>">
119 <i class="tutor-icon-clipboard"></i>
120 <span class="lesson_title"> <?php echo $post->post_title; ?> </span>
121 </a>
122 </div>
123 <?php
124
125 }else{
126
127 /**
128 * Lesson
129 */
130
131 $video = tutor_utils()->get_video_info();
132
133 $play_time = false;
134 if ( $video ) {
135 $play_time = $video->playtime;
136 }
137 $is_completed_lesson = tutor_utils()->is_completed_lesson();
138 ?>
139
140 <div class="tutor-single-lesson-items <?php echo ( $currentPost->ID === get_the_ID() ) ? 'active' : ''; ?>">
141 <a href="<?php the_permalink(); ?>" class="tutor-single-lesson-a" data-lesson-id="<?php the_ID(); ?>">
142
143 <?php
144 $tutor_lesson_type_icon = $play_time ? 'youtube' : 'document';
145 echo "<i class='tutor-icon-$tutor_lesson_type_icon'></i>";
146 ?>
147 <span class="lesson_title"><?php the_title(); ?></span>
148 <span class="tutor-lesson-right-icons">
149 <?php
150 if ( $play_time ) {
151 echo "<i class='tutor-play-duration'>$play_time</i>";
152 }
153 $lesson_complete_icon = $is_completed_lesson ? 'tutor-icon-mark tutor-done' : '';
154 echo "<i class='tutor-lesson-complete $lesson_complete_icon'></i>";
155 ?>
156 </span>
157 </a>
158 </div>
159
160 <?php
161
162
163 }
164
165 }
166 $lessons->reset_postdata();
167 }
168
169 ?>
170
171 <?php do_action('tutor/lesson_list/after/topic', $topic_id); ?>
172 </div>
173 </div>
174
175 <?php
176 }
177 $topics->reset_postdata();
178 wp_reset_postdata();
179 }
180 ?>
181 </div>
182
183
184 <div id="tutor-lesson-sidebar-qa-tab-content" class="tutor-lesson-sidebar-tab-item" style="display: none;">
185 <?php
186 tutor_lesson_sidebar_question_and_answer();
187 ?>
188 </div>
189
190
191
192 </div>
193
194 </div>
195
196 <?php do_action('tutor_lesson/single/after/lesson_sidebar'); ?>