course-filter
3 years ago
dashboard
3 years ago
email
4 years ago
global
4 years ago
instructor
4 years ago
loop
3 years ago
modal
4 years ago
profile
4 years ago
shortcode
4 years ago
single
3 years ago
template-part
3 years ago
widget
4 years ago
archive-course-init.php
3 years ago
archive-course.php
3 years ago
course-embed.php
3 years ago
course-none.php
3 years ago
dashboard.php
3 years ago
feature_disabled.php
3 years ago
instructor-setting.php
3 years ago
login-form.php
3 years ago
login.php
3 years ago
permission-denied.php
3 years ago
public-profile.php
3 years ago
single-assignment.php
3 years ago
single-content-loader.php
3 years ago
single-course.php
3 years ago
single-lesson.php
3 years ago
single-preview-lesson.php
3 years ago
single-quiz.php
3 years ago
template.php
3 years ago
single-quiz.php
52 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying single quiz |
| 4 | * |
| 5 | * @author Themeum |
| 6 | * @link https://themeum.com |
| 7 | * @package TutorLMS/Templates |
| 8 | * @since 1.0.0 |
| 9 | * @version 1.4.3 |
| 10 | */ |
| 11 | |
| 12 | global $previous_id; |
| 13 | |
| 14 | // Get the ID of this content and the corresponding course |
| 15 | $course_content_id = get_the_ID(); |
| 16 | $course_id = tutor_utils()->get_course_id_by_subcontent( $course_content_id ); |
| 17 | $content_id = tutor_utils()->get_post_id( $course_content_id ); |
| 18 | $contents = tutor_utils()->get_course_prev_next_contents_by_id( $content_id ); |
| 19 | $previous_id = $contents->previous_id; |
| 20 | $course = tutor_utils()->get_course_by_quiz( get_the_ID() ); |
| 21 | $enable_spotlight_mode = tutor_utils()->get_option( 'enable_spotlight_mode' ); |
| 22 | ob_start(); |
| 23 | ?> |
| 24 | <input type="hidden" name="tutor_quiz_id" id="tutor_quiz_id" value="<?php the_ID(); ?>"> |
| 25 | <?php tutor_load_template( 'single.common.header', array( 'course_id' => $course_id ) ); ?> |
| 26 | |
| 27 | <?php ob_start(); ?> |
| 28 | <div class="tutor-quiz-wrapper tutor-d-flex tutor-justify-center tutor-mt-80 tutor-pb-80 tutor-px-16"> |
| 29 | <input type="hidden" name="tutor_quiz_id" id="tutor_quiz_id" value="<?php the_ID(); ?>"> |
| 30 | |
| 31 | <?php |
| 32 | if ( $course ) { |
| 33 | tutor_single_quiz_top(); |
| 34 | tutor_single_quiz_body(); |
| 35 | } else { |
| 36 | tutor_single_quiz_no_course_belongs(); |
| 37 | } |
| 38 | ?> |
| 39 | </div> |
| 40 | <?php |
| 41 | tutor_load_template( 'single.common.footer', array( 'course_id' => $course_id ) ); |
| 42 | echo apply_filters( 'tutor_quiz/single/wrapper', ob_get_clean() ); |
| 43 | tutor_load_template_from_custom_path( |
| 44 | __DIR__ . '/single-content-loader.php', |
| 45 | array( |
| 46 | 'context' => 'quiz', |
| 47 | 'html_content' => ob_get_clean(), |
| 48 | ), |
| 49 | false |
| 50 | ); |
| 51 | ?> |
| 52 |