Skip to content

Commit

Permalink
Merge pull request #2351 from QuizandSurveyMaster/CU-85ztxyrwt-per-pa…
Browse files Browse the repository at this point in the history
…ge-timer

per page timer with auto pagination
  • Loading branch information
zubairraeen authored Sep 18, 2023
2 parents f7e37a7 + 8e3b87c commit 82b8438
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions php/classes/class-qmn-quiz-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1292,19 +1292,13 @@ public function display_questions( $qmn_quiz_options, $qmn_quiz_questions, $qmn_
$current_page_number = 1;
foreach ( $qmn_quiz_questions as $mlw_question ) {
if ( 0 != $pagination_option ) {
if ( 1 == $pagination_option ) {
if ( 1 == $pagination_option || 1 == $pages_count % $pagination_option || 1 == $pages_count ) {
?>
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" data-apid="<?php echo esc_attr($current_page_number); ?>" style="display: none;">
<?php
$current_page_number++;
} else {
if ( 1 == $pages_count % $pagination_option || 1 == $pages_count ) { // beginning of the row or first.
?>
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
<?php
$current_page_number++;
}
}
echo apply_filters( 'qsm_auto_page_begin_pagination', '', ( $current_page_number - 1 ), $qmn_quiz_options, $qmn_quiz_questions );
}
echo apply_filters( 'qsm_auto_page_begin_row', '', ( $current_page_number - 1 ), $qmn_quiz_options, $qmn_quiz_questions );
}
$category_class = '';
Expand Down

0 comments on commit 82b8438

Please sign in to comment.