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