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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 / content.php
tutor / templates / single / lesson Last commit date
comment.php 4 years ago complete_form.php 4 years ago content.php 4 years ago lesson_sidebar.php 4 years ago required-enroll.php 4 years ago sidebar_question_and_answer.php 4 years ago
content.php
198 lines
1 <?php
2 /**
3 * Display the content
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
17 global $post;
18 global $previous_id;
19 global $next_id;
20
21 // Get the ID of this content and the corresponding course
22 $course_content_id = get_the_ID();
23 $course_id = tutor_utils()->get_course_id_by_subcontent( $course_content_id );
24
25 $_is_preview = get_post_meta( $course_content_id, '_is_preview', true );
26 $content_id = tutor_utils()->get_post_id( $course_content_id );
27 $contents = tutor_utils()->get_course_prev_next_contents_by_id( $content_id );
28 $previous_id = $contents->previous_id;
29 $next_id = $contents->next_id;
30
31 // Get total content count
32 $course_stats = tutor_utils()->get_course_completed_percent( $course_id, 0, true );
33
34 $jsonData = array();
35 $jsonData['post_id'] = get_the_ID();
36 $jsonData['best_watch_time'] = 0;
37 $jsonData['autoload_next_course_content'] = (bool) get_tutor_option( 'autoload_next_course_content' );
38
39 $best_watch_time = tutor_utils()->get_lesson_reading_info( get_the_ID(), 0, 'video_best_watched_time' );
40 if ( $best_watch_time > 0 ) {
41 $jsonData['best_watch_time'] = $best_watch_time;
42 }
43
44 $is_comment_enabled = tutor_utils()->get_option( 'enable_comment_for_lesson' ) && comments_open();
45 $is_enrolled = tutor_utils()->is_enrolled( $course_id );
46 ?>
47
48 <?php do_action( 'tutor_lesson/single/before/content' ); ?>
49 <?php if ( $is_enrolled ) : ?>
50 <div class="tutor-single-page-top-bar tutor-d-flex tutor-justify-content-between">
51 <div class="tutor-topbar-left-item tutor-d-flex">
52 <div class="tutor-topbar-item tutor-topbar-sidebar-toggle tutor-hide-sidebar-bar flex-center tutor-d-none tutor-d-xl-flex">
53 <a href="javascript:;" class="tutor-lesson-sidebar-hide-bar">
54 <span class="tutor-icon-icon-light-left-line tutor-color-white flex-center"></span>
55 </a>
56 </div>
57 <div class="tutor-topbar-item tutor-topbar-content-title-wrap flex-center">
58 <span class="tutor-icon-youtube-brand tutor-icon-24 tutor-color-white tutor-mr-4"></span>
59 <span class="text-regular-caption tutor-color-design-white">
60 <?php
61 esc_html_e( 'Lesson: ', 'tutor' );
62 the_title();
63 ?>
64 </span>
65 </div>
66 </div>
67 <div class="tutor-topbar-right-item tutor-d-flex">
68 <div class="tutor-topbar-assignment-details tutor-d-flex tutor-align-items-center">
69 <?php
70 do_action( 'tutor_course/single/enrolled/before/lead_info/progress_bar' );
71 ?>
72 <div class="text-regular-caption tutor-color-design-white">
73 <span class="tutor-progress-content tutor-color-primary-60">
74 <?php _e( 'Your Progress:', 'tutor' ); ?>
75 </span>
76 <span class="text-bold-caption">
77 <?php echo $course_stats['completed_count']; ?>
78 </span>
79 <?php _e( 'of ', 'tutor' ); ?>
80 <span class="text-bold-caption">
81 <?php echo $course_stats['total_count']; ?>
82 </span>
83 (<?php echo $course_stats['completed_percent'] . '%'; ?>)
84 </div>
85 <?php
86 do_action( 'tutor_course/single/enrolled/after/lead_info/progress_bar' );
87 ?>
88 <!-- <div class="tutor-topbar-complete-btn tutor-ml-24"> -->
89 <?php tutor_lesson_mark_complete_html(); ?>
90 <!-- </div> -->
91 </div>
92 <div class="tutor-topbar-cross-icon tutor-ml-16 flex-center">
93 <?php $course_id = tutor_utils()->get_course_id_by( 'lesson', get_the_ID() ); ?>
94 <a href="<?php echo get_the_permalink( $course_id ); ?>">
95 <span class="tutor-icon-line-cross-line tutor-color-white flex-center"></span>
96 </a>
97 </div>
98 </div>
99 </div>
100 <div class="tutor-mobile-top-navigation tutor-d-block tutor-d-sm-none tutor-my-20 tutor-mx-12">
101 <div class="tutor-mobile-top-nav d-grid">
102 <a href="<?php echo get_the_permalink( $previous_id ); ?>">
103 <span class="tutor-top-nav-icon tutor-icon-previous-line design-lightgrey"></span>
104 </a>
105 <div class="tutor-top-nav-title tutor-fs-6 tutor-fw-normal tutor-color-black">
106 <?php
107 the_title();
108 ?>
109 </div>
110 </div>
111 </div>
112 <?php else : ?>
113 <div class="tutor-single-page-top-bar tutor-d-flex tutor-justify-content-between">
114 <div class="tutor-topbar-item tutor-topbar-sidebar-toggle tutor-hide-sidebar-bar flex-center tutor-d-none tutor-d-xl-flex">
115 <a href="javascript:;" class="tutor-lesson-sidebar-hide-bar">
116 <span class="tutor-icon-icon-light-left-line tutor-color-white flex-center"></span>
117 </a>
118 </div>
119 <div class="tutor-topbar-item tutor-topbar-content-title-wrap flex-center">
120 <span class="tutor-icon-youtube-brand tutor-icon-24 tutor-color-white tutor-mr-4"></span>
121 <span class="text-regular-caption tutor-color-design-white">
122 <?php
123 esc_html_e( 'Lesson: ', 'tutor' );
124 the_title();
125 ?>
126 </span>
127 </div>
128
129 <div class="tutor-topbar-cross-icon tutor-ml-16 flex-center">
130 <?php $course_id = tutor_utils()->get_course_id_by( 'lesson', get_the_ID() ); ?>
131 <a href="<?php echo get_the_permalink( $course_id ); ?>">
132 <span class="tutor-icon-line-cross-line tutor-color-white flex-center"></span>
133 </a>
134 </div>
135 </div>
136 <?php endif; ?>
137
138 <!-- Load Lesson Video -->
139 <input type="hidden" id="tutor_video_tracking_information" value="<?php echo esc_attr( json_encode( $jsonData ) ); ?>">
140 <?php tutor_lesson_video();
141
142 $referer_url = isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'';
143 $referer_comment_id = explode( '#', $_SERVER['REQUEST_URI'] );
144 $url_components = parse_url( $referer_url );
145 isset( $url_components['query'] ) ? parse_str( $url_components['query'], $output ) : null;
146 $page_tab = isset( $_GET['page_tab'] ) ? esc_attr( $_GET['page_tab'] ) : ( isset($output['page_tab']) ?$output['page_tab']: null );
147 ?>
148
149 <style>
150 .tutor-actual-comment.viewing{
151 box-shadow: 0 0 10px #cdcfd5;
152 animation: blinkComment 1s infinite;
153 }
154 @keyframes blinkComment { 50% { box-shadow:0 0 0px #ffffff; } }
155 </style>
156
157 <div class="tutor-course-spotlight-wrapper">
158 <div class="tutor-spotlight-tab tutor-default-tab tutor-course-details-tab">
159 <div class="tab-header tutor-d-flex justify-content-center">
160 <div class="tab-header-item flex-center<?php echo (!isset($page_tab) || 'overview'==$page_tab) ? ' is-active' : ''; ?>" data-tutor-spotlight-tab-target="tutor-course-spotlight-tab-1" data-tutor-query-string="overview">
161 <span class="tutor-icon-document-alt-filled"></span>
162 <span><?php _e( 'Overview', 'tutor' ); ?></span>
163 </div>
164 <div class="tab-header-item flex-center<?php echo 'files'==$page_tab ? ' is-active' : ''; ?>" data-tutor-spotlight-tab-target="tutor-course-spotlight-tab-2" data-tutor-query-string="files">
165 <span class="tutor-icon-attach-filled"></span>
166 <span><?php _e( 'Exercise Files', 'tutor' ); ?></span>
167 </div>
168 <?php if ( $is_comment_enabled ) : ?>
169 <div class="tab-header-item flex-center<?php echo 'comments'==$page_tab ? ' is-active' : ''; ?>" data-tutor-spotlight-tab-target="tutor-course-spotlight-tab-3" data-tutor-query-string="comments">
170 <span class="tutor-icon-comment-filled"></span>
171 <span><?php _e( 'Comments', 'tutor' ); ?></span>
172 </div>
173 <?php endif; ?>
174 </div>
175 <div class="tab-body">
176 <div class="tab-body-item<?php echo (!isset($page_tab) || 'overview'==$page_tab) ? ' is-active' : ''; ?>" id="tutor-course-spotlight-tab-1" data-tutor-query-string-content="overview">
177 <div class="text-medium-h6 tutor-color-black">
178 <?php _e( 'About Lesson', 'tutor' ); ?>
179 </div>
180 <div class="text-regular-body tutor-color-black-60 tutor-mt-12" style="min-height:293px;">
181 <?php the_content(); ?>
182 </div>
183 </div>
184 <div class="tab-body-item<?php echo 'files'==$page_tab ? ' is-active' : ''; ?>" id="tutor-course-spotlight-tab-2" data-tutor-query-string-content="files">
185 <div class="text-medium-h6 tutor-color-black"><?php _e( 'Exercise Files', 'tutor' ); ?></div>
186 <?php get_tutor_posts_attachments(); ?>
187 </div>
188 <?php if ( $is_comment_enabled ) : ?>
189 <div class="tab-body-item<?php echo 'comments'==$page_tab ? ' is-active' : ''; ?>" id="tutor-course-spotlight-tab-3" data-tutor-query-string-content="comments">
190 <?php require __DIR__ . '/comment.php'; ?>
191 </div>
192 <?php endif; ?>
193 </div>
194 </div>
195 </div>
196
197 <?php do_action( 'tutor_lesson/single/after/content' ); ?>
198