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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
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 $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 $quiz = $post;
89 ?>
90 <div class="tutor-single-lesson-items quiz-single-item quiz-single-item-<?php echo $quiz->ID; ?> <?php echo ( $currentPost->ID === get_the_ID() ) ? 'active' : ''; ?>" data-quiz-id="<?php echo $quiz->ID; ?>">
91 <a href="<?php echo get_permalink($quiz->ID); ?>" class="sidebar-single-quiz-a" data-quiz-id="<?php echo $quiz->ID; ?>">
92 <i class="tutor-icon-doubt"></i>
93 <span class="lesson_title"><?php echo $quiz->post_title; ?></span>
94 <span class="tutor-lesson-right-icons">
95 <?php
96 do_action('tutor/lesson_list/right_icon_area', $post);
97
98 $time_limit = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_value');
99 if ($time_limit){
100 $time_type = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_type');
101 echo "<span class='quiz-time-limit'>{$time_limit} {$time_type}</span>";
102 }
103 ?>
104 </span>
105 </a>
106 </div>
107 <?php
108 }elseif($post->post_type === 'tutor_assignments'){
109 /**
110 * Assignments
111 * @since this block v.1.3.3
112 */
113
114 ?>
115 <div class="tutor-single-lesson-items assignments-single-item assignment-single-item-<?php echo $post->ID; ?> <?php echo ( $currentPost->ID === get_the_ID() ) ? 'active' : ''; ?>"
116 data-assignment-id="<?php echo $post->ID; ?>">
117 <a href="<?php echo get_permalink($post->ID); ?>" class="sidebar-single-assignment-a" data-assignment-id="<?php echo $post->ID; ?>">
118 <i class="tutor-icon-clipboard"></i>
119 <span class="lesson_title"> <?php echo $post->post_title; ?> </span>
120 <span class="tutor-lesson-right-icons">
121 <?php do_action('tutor/lesson_list/right_icon_area', $post); ?>
122 </span>
123 </a>
124 </div>
125 <?php
126
127 }else{
128
129 /**
130 * Lesson
131 */
132
133 $video = tutor_utils()->get_video_info();
134
135 $play_time = false;
136 if ( $video ) {
137 $play_time = $video->playtime;
138 }
139 $is_completed_lesson = tutor_utils()->is_completed_lesson();
140 ?>
141
142 <div class="tutor-single-lesson-items <?php echo ( $currentPost->ID === get_the_ID() ) ? 'active' : ''; ?>">
143 <a href="<?php the_permalink(); ?>" class="tutor-single-lesson-a" data-lesson-id="<?php the_ID(); ?>">
144
145 <?php
146 $tutor_lesson_type_icon = $play_time ? 'youtube' : 'document';
147 echo "<i class='tutor-icon-$tutor_lesson_type_icon'></i>";
148 ?>
149 <span class="lesson_title"><?php the_title(); ?></span>
150 <span class="tutor-lesson-right-icons">
151 <?php
152 do_action('tutor/lesson_list/right_icon_area', $post);
153 if ( $play_time ) {
154 echo "<i class='tutor-play-duration'>$play_time</i>";
155 }
156 $lesson_complete_icon = $is_completed_lesson ? 'tutor-icon-mark tutor-done' : '';
157 echo "<i class='tutor-lesson-complete $lesson_complete_icon'></i>";
158 ?>
159 </span>
160 </a>
161 </div>
162
163 <?php
164 }
165 }
166 $lessons->reset_postdata();
167 }
168 ?>
169
170 <?php do_action('tutor/lesson_list/after/topic', $topic_id); ?>
171 </div>
172 </div>
173
174 <?php
175 }
176 $topics->reset_postdata();
177 wp_reset_postdata();
178 }
179 ?>
180 </div>
181
182 <div id="tutor-lesson-sidebar-qa-tab-content" class="tutor-lesson-sidebar-tab-item" style="display: none;">
183 <?php
184 tutor_lesson_sidebar_question_and_answer();
185 ?>
186 </div>
187
188 </div>
189
190 </div>
191
192 <?php do_action('tutor_lesson/single/after/lesson_sidebar'); ?>