PluginProbe
Tutor LMS – eLearning and online course solution / 2.1.8
Tutor LMS – eLearning and online course solution v2.1.8
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
tutor / templates / single / quiz / content.php
content.php
31 lines 816 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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