Plugin Directory

Changeset 3393448


Ignore:
Timestamp:
11/11/2025 07:55:55 AM (5 months ago)
Author:
expresstech
Message:

10.3.1 to trunk

Location:
quiz-master-next/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • quiz-master-next/trunk/css/common.css

    r3357783 r3393448  
    737737    width: 100%;
    738738}
     739.qsm-correct-answer-info {
     740    color: green;
     741}
     742.qsm-incorrect-answer-info {
     743    color: #dc3232;
     744}
  • quiz-master-next/trunk/js/qsm-quiz.js

    r3390528 r3393448  
    11171117        let numberToAdd = 2;
    11181118        // Fixed Missing Next Button in single question quiz created with text after quiz
    1119         if ( '3' == total_pages && 0 < jQuery('.quiz_end .mlw_qmn_message_end').length ) {
     1119        if ( '3' == total_pages && 0 < container.find('.quiz_end .mlw_qmn_message_end').length ) {
    11201120            numberToAdd = 1;
    11211121        }
    11221122        if(total_pages != parseInt(page_number) + numberToAdd){ // check if not last page based on condition (1140)
    11231123            container.find(".mlw_custom_next").show();
    1124             if (jQuery('.quiz_end').is(':visible')) {
     1124            if (container.find('.quiz_end').is(':visible')) {
    11251125                container.find(".mlw_custom_next").hide();
    11261126            }
     
    15791579        qsm_inline_result_timer = setTimeout(() => {
    15801580            let showFeedback = true;
    1581             if ($i_this.hasClass('qmn_fill_blank')) {
     1581            let allCorrect = true;
     1582            let isFillBlank = $i_this.hasClass('qmn_fill_blank');
     1583           
     1584            if (isFillBlank) {
    15821585                let $allBlanks = $this.find('.qmn_fill_blank');
    1583                 let totalBlanks = $allBlanks.length;
    15841586                let filledBlanks = $allBlanks.filter(function() {
    15851587                    return jQuery(this).val().trim() !== '';
    1586                 }).length;
    1587                 showFeedback = (totalBlanks > 0 && filledBlanks === totalBlanks);
    1588 
     1588                });
     1589                showFeedback = filledBlanks.length === $allBlanks.length && $allBlanks.length > 0;
     1590               
    15891591                if (!showFeedback) {
    15901592                    $this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
     1593                } else {
     1594                    filledBlanks.each(function(index) {
     1595                        let blankData = qsm_question_quick_result_js(question_id, jQuery(this).val().trim(), 'input', qmn_quiz_data[quizID].enable_quick_correct_answer_info, quizID, index);
     1596                        if (blankData.success !== 'correct') {
     1597                            allCorrect = false;
     1598                            return false;
     1599                        }
     1600                    });
    15911601                }
    15921602            }
    15931603           
    15941604            if (showFeedback) {
    1595                 if (qmn_quiz_data[quizID].enable_quick_result_mc == 1) {
    1596                     qsm_show_inline_result(quizID, question_id, sendValue, $this, 'input', $i_this, $this.find('.qmn_fill_blank').index($i_this));
    1597                 } else if (qmn_quiz_data[quizID].enable_quick_correct_answer_info != 0) {
    1598                     let data = qsm_question_quick_result_js(question_id, sendValue, 'input', qmn_quiz_data[quizID].enable_quick_correct_answer_info, quizID, $this.find('.qmn_fill_blank').index($i_this));
     1605                let quickResultEnabled = qmn_quiz_data[quizID].enable_quick_result_mc == 1;
     1606                let correctInfoEnabled = qmn_quiz_data[quizID].enable_quick_correct_answer_info != 0;
     1607               
     1608                if (quickResultEnabled) {
     1609                    if (isFillBlank) {
     1610                        $this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
     1611                        let displayData = qsm_question_quick_result_js(question_id, sendValue, 'input', qmn_quiz_data[quizID].enable_quick_correct_answer_info, quizID, $this.find('.qmn_fill_blank').index($i_this));
     1612                        let resultClass = allCorrect ? 'qsm-correct-answer-info' : 'qsm-incorrect-answer-info';
     1613                        let resultText = allCorrect ? qmn_quiz_data[quizID].quick_result_correct_answer_text : qmn_quiz_data[quizID].quick_result_wrong_answer_text;
     1614                       
     1615                        $this.append(`<div class="quick-question-res-p ${resultClass}">${resultText}</div>`);
     1616                        if (displayData.message) {
     1617                            $this.append(`<div class="qsm-inline-correct-info">${qsm_check_shortcode(displayData.message)}</div>`);
     1618                        }
     1619                        if (1 != qmn_quiz_data[quizID].disable_mathjax) MathJax.typesetPromise();
     1620                        jQuery('.qsm-spinner-loader').remove();
     1621                    } else {
     1622                        qsm_show_inline_result(quizID, question_id, sendValue, $this, 'input', $i_this, $this.find('.qmn_fill_blank').index($i_this));
     1623                    }
     1624                } else if (correctInfoEnabled) {
     1625                    let data = qsm_question_quick_result_js(question_id, sendValue, 'input', correctInfoEnabled, quizID, $this.find('.qmn_fill_blank').index($i_this));
    15991626                    $this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
    1600                     if ( 0 < value.length && data.success != '') {
    1601                         $this.append('<div class="qsm-inline-correct-info">' + qsm_check_shortcode(data.message) + '</div>');
     1627                   
     1628                    if (isFillBlank) {
     1629                        data.success = allCorrect ? 'correct' : 'incorrect';
     1630                    }
     1631                   
     1632                    if (0 < value.length && data.success != '' && data.message) {
     1633                        $this.append(`<div class="qsm-inline-correct-info">${qsm_check_shortcode(data.message)}</div>`);
    16021634                    }
    16031635                }
     
    19041936    $this.find('.qmn_radio_answers').children().removeClass('data-correct-answer');
    19051937    if ( 0 < value.length && data.success == 'correct') {
    1906         $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>')
     1938        $this.append('<div class="quick-question-res-p qsm-correct-answer-info">' + qmn_quiz_data[quizID].quick_result_correct_answer_text + '</div>')
    19071939        $this.append('<div class="qsm-inline-correct-info">' + qsm_check_shortcode(data.message) + '</div>');
    19081940    } else if (0 < value.length && data.success == 'incorrect') {
    19091941        $this.find('.qmn_radio_answers input[value="' + data.correct_index + '"]').parent().addClass('data-correct-answer');
    1910         $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>')
     1942        $this.append('<div class="quick-question-res-p qsm-incorrect-answer-info">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
    19111943        $this.append('<div class="qsm-inline-correct-info">' + qsm_check_shortcode(data.message) + '</div>');
    19121944    }
  • quiz-master-next/trunk/mlw_quizmaster2.php

    r3390528 r3393448  
    33 * Plugin Name: Quiz And Survey Master
    44 * Description: Easily and quickly add quizzes and surveys to your website.
    5  * Version: 10.3.0
     5 * Version: 10.3.1
    66 * Author: ExpressTech
    77 * Author URI: https://quizandsurveymaster.com/
     
    4444     * @since 4.0.0
    4545     */
    46     public $version = '10.3.0';
     46    public $version = '10.3.1';
    4747
    4848    /**
     
    799799        }
    800800        $roles    = (array) $user->roles;
     801        if ( empty( $roles ) ) {
     802            return;
     803        }
    801804        $rolename = $roles[0];
    802805        $role = get_role( $rolename );
  • quiz-master-next/trunk/readme.txt

    r3390528 r3393448  
    55Tested up to: 6.8
    66Requires PHP: 5.4
    7 Stable tag: 10.3.0
     7Stable tag: 10.3.1
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    222222
    223223== Changelog ==
     224= 10.3.1 ( November 11, 2025 ) =
     225* Bug: Resolved issue with the "Next" button when multiple quizzes are present on a single page
     226* Bug: Fixed inline results display issue occurring when sequential answers are enabled
     227
    224228= 10.3.0 ( November 5, 2025 ) =
    225229* Feature: Added option to randomize questions within each page
Note: See TracChangeset for help on using the changeset viewer.