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