Skip to content

Commit

Permalink
added dependacy for quiz navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Dec 3, 2023
1 parent 10751d2 commit 9f8e03c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1493,11 +1493,11 @@ jQuery(function () {
$this.find('.qsm-inline-correct-info').remove();
$this.find('.qmn_radio_answers').children().removeClass('data-correct-answer');
if ( 0 < value.length && data.success == 'correct') {
$this.append('<div style="color: green" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_correct_answer_text + '</div>')
$this.append('<div style="color: green" class="quick-question-res-p qsm-correct-answer-info">' + qmn_quiz_data[quizID].quick_result_correct_answer_text + '</div>')
$this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
} else if ( 0 < value.length && data.success == 'incorrect') {
$this.find('.qmn_radio_answers').children().eq(parseInt(data.correct_index)).addClass('data-correct-answer');
$this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
$this.append('<div style="color: red" class="quick-question-res-p qsm-incorrect-answer-info">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
$this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
}
if (1 != qmn_quiz_data[quizID].disable_mathjax) {
Expand Down Expand Up @@ -1640,7 +1640,7 @@ jQuery(function () {
if(!$container.find('.qsm-submit-btn').is(':visible')) {
QSM.nextPage(quiz_id);
qsmScrollTo($container);
}else{
}else{
$container.find(".mlw_custom_next").hide();
}
});
Expand Down
2 changes: 1 addition & 1 deletion php/admin/options-page-questions-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ class="save-page-button button button-primary"><?php esc_html_e( 'Save Questions
</div>
<div class="qsm-row <?php echo esc_attr($disable_class); ?>">
<input <?php echo esc_html($read_only); ?> name="warning_checkbox" type="checkbox" value="" /><span><?php esc_html_e( 'Show warning at', 'quiz-master-next' ); ?></span>
<input <?php echo esc_html($read_only); ?> type="number" step="1" class="small-text" min="0" placeholder="<?php _e( 'MM', 'quiz-master-next' ); ?>" id="pagetimer_warning" name="pagetimer_warning" value="0"> :
<input <?php echo esc_html($read_only); ?> type="number" step="1" class="small-text" min="0" placeholder="<?php _e( 'MM', 'quiz-master-next' ); ?>" id="pagetimer_warning" name="pagetimer_warning" value="0"> :
<input <?php echo esc_html($read_only); ?> type="number" step="1" class="small-text" min="0" placeholder="<?php _e( 'SS', 'quiz-master-next' ); ?>" id="pagetimer_warning_second" name="pagetimer_warning_second" value="0">
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions php/classes/class-qmn-quiz-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,8 @@ public function display_pages( $options, $quiz_data ) {
$page_key = ( isset( $qpage['pagekey'] ) ? $qpage['pagekey'] : $key );
$hide_prevbtn = ( isset( $qpage['hide_prevbtn'] ) ? $qpage['hide_prevbtn'] : 0 );
?>
<section class="qsm-page <?php echo esc_attr( $animation_effect ); ?> qsm-page-<?php echo esc_attr( $qpage_id ); ?>"
data-pid="<?php echo esc_attr( $qpage_id ); ?>" data-prevbtn="<?php echo esc_attr( $hide_prevbtn ); ?>" style='display: none;'>
<section class="qsm-page qsm-question-page <?php echo esc_attr( $animation_effect ); ?> qsm-page-<?php echo esc_attr( $qpage_id ); ?>"
data-pid="<?php echo esc_attr( $qpage_id ); ?>" data-qpid="<?php echo esc_attr( $pages_count ); ?>" data-prevbtn="<?php echo esc_attr( $hide_prevbtn ); ?>" style='display: none;'>
<?php do_action( 'qsm_action_before_page', $qpage_id, $qpage ); ?>
<?php
foreach ( $page as $question_id ) {
Expand Down Expand Up @@ -1378,7 +1378,7 @@ public function display_questions( $qmn_quiz_options, $qmn_quiz_questions, $qmn_
if ( 0 != $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 ); ?>" data-apid="<?php echo esc_attr($current_page_number); ?>" style="display: none;">
<div class="qsm-auto-page-row qsm-question-page qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" data-apid="<?php echo esc_attr($current_page_number); ?>" data-qpid="<?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 );
Expand Down
2 changes: 1 addition & 1 deletion php/classes/class-qsm-emails.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static function send_emails( $transient_id ) {
}
}

if ( $show ) {
if ( $show ) {
do_action( 'qsm_send_result_email_before', $response_data, $email['to'], $email_subject, $email_content, $email['replyTo'], $index );
self::send_results_email( $response_data, $email['to'], $email_subject, $email_content, $email['replyTo'], $index );
}
Expand Down
2 changes: 1 addition & 1 deletion php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function mlw_qmn_variable_amount_incorrect( $content, $mlw_quiz_array ) {

function mlw_qmn_variable_total_questions( $content, $mlw_quiz_array ) {
global $wp_current_filter;
if ( 'mlw_qmn_template_variable_quiz_page' == $wp_current_filter[1] ) {
if ( ! empty( $wp_current_filter[1] ) && 'mlw_qmn_template_variable_quiz_page' == $wp_current_filter[1] ) {
global $wpdb;
$table_name = $wpdb->prefix . 'mlw_quizzes';
$quiz_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE quiz_id=%d", $mlw_quiz_array['quiz_id'] ) );
Expand Down

0 comments on commit 9f8e03c

Please sign in to comment.