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.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 comments-loop.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
156 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 $prev_is_preview = get_post_meta( $previous_id, '_is_preview', true );
32 $next_is_preview = get_post_meta( $next_id, '_is_preview', true );
33 $is_enrolled = tutor_utils()->is_enrolled( $course_id );
34 $is_public = get_post_meta( $course_id, '_tutor_is_public_course', true );
35
36 $prev_is_locked = !($is_enrolled || $prev_is_preview || $is_public);
37 $next_is_locked = !($is_enrolled || $next_is_preview || $is_public);
38
39 $jsonData = array();
40 $jsonData['post_id'] = get_the_ID();
41 $jsonData['best_watch_time'] = 0;
42 $jsonData['autoload_next_course_content'] = (bool) get_tutor_option( 'autoload_next_course_content' );
43
44 $best_watch_time = tutor_utils()->get_lesson_reading_info( get_the_ID(), 0, 'video_best_watched_time' );
45 if ( $best_watch_time > 0 ) {
46 $jsonData['best_watch_time'] = $best_watch_time;
47 }
48
49 $is_comment_enabled = tutor_utils()->get_option( 'enable_comment_for_lesson' ) && comments_open();
50
51 ?>
52
53 <?php do_action( 'tutor_lesson/single/before/content' ); ?>
54
55 <?php tutor_load_template( 'single.common.header', array( 'course_id' => $course_id, 'mark_as_complete' => true ) ); ?>
56
57 <div class="tutor-course-topic-single-body">
58 <!-- Load Lesson Video -->
59 <?php
60 $video_info = tutor_utils()->get_video_info();
61 $source_key = is_object($video_info) && 'html5' !== $video_info->source ? 'source_'.$video_info->source : null;
62 $has_source = (is_object($video_info) && $video_info->source_video_id) || (isset($source_key) ? $video_info->$source_key : null);
63 ?>
64 <?php if ($has_source) : ?>
65 <input type="hidden" id="tutor_video_tracking_information" value="<?php echo esc_attr( json_encode( $jsonData ) ); ?>">
66 <?php endif; ?>
67 <div class="tutor-video-player-wrapper">
68 <?php tutor_lesson_video(); ?>
69 </div>
70
71 <?php
72 $referer_url = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
73 $referer_comment_id = explode( '#', $_SERVER['REQUEST_URI'] );
74 $url_components = parse_url( $referer_url );
75 isset( $url_components['query'] ) ? parse_str( $url_components['query'], $output ) : null;
76 $page_tab = isset( $_GET['page_tab'] ) ? esc_attr( $_GET['page_tab'] ) : ( isset( $output['page_tab'] ) ? $output['page_tab'] : null );
77 ?>
78
79 <style>
80 .tutor-actual-comment.viewing {
81 box-shadow: 0 0 10px #cdcfd5;
82 animation: blinkComment 1s infinite;
83 }
84 @keyframes blinkComment { 50% { box-shadow:0 0 0px #ffffff; } }
85 </style>
86
87 <div class="tutor-course-spotlight-wrapper">
88 <ul class="tutor-nav tutor-course-spotlight-nav tutor-justify-center">
89 <li class="tutor-nav-item">
90 <a href="#" class="tutor-nav-link<?php echo ( ! isset( $page_tab ) || 'overview' == $page_tab ) ? ' is-active' : ''; ?>" data-tutor-nav-target="tutor-course-spotlight-overview" data-tutor-query-variable="page_tab" data-tutor-query-value="overview">
91 <span class="tutor-icon-document-text tutor-mr-8" area-hidden="true"></span>
92 <span><?php _e( 'Overview', 'tutor' ); ?></span>
93 </a>
94 </li>
95
96 <li class="tutor-nav-item">
97 <a href="#" class="tutor-nav-link<?php echo 'files' == $page_tab ? ' is-active' : ''; ?>" data-tutor-nav-target="tutor-course-spotlight-files" data-tutor-query-variable="page_tab" data-tutor-query-value="files">
98 <span class="tutor-icon-paperclip tutor-mr-8" area-hidden="true"></span>
99 <span><?php _e( 'Exercise Files', 'tutor' ); ?></span>
100 </a>
101 </li>
102
103 <?php if ( $is_comment_enabled ) : ?>
104 <li class="tutor-nav-item">
105 <a href="#" class="tutor-nav-link<?php echo 'comments' == $page_tab ? ' is-active' : ''; ?>" data-tutor-nav-target="tutor-course-spotlight-comments" data-tutor-query-variable="page_tab" data-tutor-query-value="comments">
106 <span class="tutor-icon-comment tutor-mr-8" area-hidden="true"></span>
107 <span><?php _e( 'Comments', 'tutor' ); ?></span>
108 </a>
109 </li>
110 <?php endif; ?>
111 </ul>
112
113 <div class="tutor-tab tutor-course-spotlight-tab">
114 <div id="tutor-course-spotlight-overview" class="tutor-tab-item<?php echo ( ! isset( $page_tab ) || 'overview' == $page_tab ) ? ' is-active' : ''; ?>">
115 <div class="tutor-container">
116 <div class="tutor-row tutor-justify-center">
117 <div class="tutor-col-xl-8">
118 <div class="tutor-fs-5 tutor-fw-medium tutor-color-black tutor-mb-12">
119 <?php _e( 'About Lesson', 'tutor' ); ?>
120 </div>
121 <div class="tutor-fs-6 tutor-color-secondary">
122 <?php the_content(); ?>
123 </div>
124 </div>
125 </div>
126 </div>
127 </div>
128
129 <div id="tutor-course-spotlight-files" class="tutor-tab-item<?php echo 'files' == $page_tab ? ' is-active' : ''; ?>">
130 <div class="tutor-container">
131 <div class="tutor-row tutor-justify-center">
132 <div class="tutor-col-xl-8">
133 <div class="tutor-fs-5 tutor-fw-medium tutor-color-black"><?php _e( 'Exercise Files', 'tutor' ); ?></div>
134 <?php get_tutor_posts_attachments(); ?>
135 </div>
136 </div>
137 </div>
138 </div>
139
140 <?php if ( $is_comment_enabled ) : ?>
141 <div id="tutor-course-spotlight-comments" class="tutor-tab-item<?php echo 'comments' == $page_tab ? ' is-active' : ''; ?>">
142 <div class="tutor-container">
143 <div class="tutor-course-spotlight-comments">
144 <?php require __DIR__ . '/comment.php'; ?>
145 </div>
146 </div>
147 </div>
148 <?php endif; ?>
149 </div>
150 </div>
151 </div>
152
153 <?php tutor_load_template( 'single.common.footer', array( 'course_id' => $course_id )); ?>
154
155 <?php do_action( 'tutor_lesson/single/after/content' ); ?>
156