parts
2 years ago
body.php
3 years ago
content.php
3 years ago
no_course_belongs.php
3 years ago
previous-attempts.php
3 years ago
single_quiz_contents.php
3 years ago
top.php
2 years ago
content.php
31 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Quiz content |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Single\Quiz |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.4.3 |
| 10 | */ |
| 11 | |
| 12 | global $post; |
| 13 | |
| 14 | $currentPost = $post; //phpcs:ignore |
| 15 | $quiz_id = get_the_ID(); |
| 16 | $previous_attempts = tutor_utils()->quiz_attempts(); |
| 17 | $attempted_count = is_array( $previous_attempts ) ? count( $previous_attempts ) : 0; |
| 18 | $attempts_allowed = tutor_utils()->get_quiz_option( $quiz_id, 'attempts_allowed', 0 ); |
| 19 | $attempt_remaining = $attempts_allowed - $attempted_count; |
| 20 | |
| 21 | if ( 0 !== $attempted_count ) { |
| 22 | ?> |
| 23 | <div id="tutor-quiz-content" class="tutor-quiz-content tutor-quiz-content-<?php the_ID(); ?>"> |
| 24 | <?php |
| 25 | do_action( 'tutor_quiz/content/before', $quiz_id ); |
| 26 | |
| 27 | do_action( 'tutor_quiz/content/after', $quiz_id ); |
| 28 | ?> |
| 29 | </div> |
| 30 | <?php } ?> |
| 31 |