Changeset 3393448
- Timestamp:
- 11/11/2025 07:55:55 AM (5 months ago)
- Location:
- quiz-master-next/trunk
- Files:
-
- 4 edited
-
css/common.css (modified) (1 diff)
-
js/qsm-quiz.js (modified) (3 diffs)
-
mlw_quizmaster2.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quiz-master-next/trunk/css/common.css
r3357783 r3393448 737 737 width: 100%; 738 738 } 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 1117 1117 let numberToAdd = 2; 1118 1118 // 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 ) { 1120 1120 numberToAdd = 1; 1121 1121 } 1122 1122 if(total_pages != parseInt(page_number) + numberToAdd){ // check if not last page based on condition (1140) 1123 1123 container.find(".mlw_custom_next").show(); 1124 if ( jQuery('.quiz_end').is(':visible')) {1124 if (container.find('.quiz_end').is(':visible')) { 1125 1125 container.find(".mlw_custom_next").hide(); 1126 1126 } … … 1579 1579 qsm_inline_result_timer = setTimeout(() => { 1580 1580 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) { 1582 1585 let $allBlanks = $this.find('.qmn_fill_blank'); 1583 let totalBlanks = $allBlanks.length;1584 1586 let filledBlanks = $allBlanks.filter(function() { 1585 1587 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 1589 1591 if (!showFeedback) { 1590 1592 $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 }); 1591 1601 } 1592 1602 } 1593 1603 1594 1604 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)); 1599 1626 $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>`); 1602 1634 } 1603 1635 } … … 1904 1936 $this.find('.qmn_radio_answers').children().removeClass('data-correct-answer'); 1905 1937 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>') 1907 1939 $this.append('<div class="qsm-inline-correct-info">' + qsm_check_shortcode(data.message) + '</div>'); 1908 1940 } else if (0 < value.length && data.success == 'incorrect') { 1909 1941 $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>') 1911 1943 $this.append('<div class="qsm-inline-correct-info">' + qsm_check_shortcode(data.message) + '</div>'); 1912 1944 } -
quiz-master-next/trunk/mlw_quizmaster2.php
r3390528 r3393448 3 3 * Plugin Name: Quiz And Survey Master 4 4 * Description: Easily and quickly add quizzes and surveys to your website. 5 * Version: 10.3. 05 * Version: 10.3.1 6 6 * Author: ExpressTech 7 7 * Author URI: https://quizandsurveymaster.com/ … … 44 44 * @since 4.0.0 45 45 */ 46 public $version = '10.3. 0';46 public $version = '10.3.1'; 47 47 48 48 /** … … 799 799 } 800 800 $roles = (array) $user->roles; 801 if ( empty( $roles ) ) { 802 return; 803 } 801 804 $rolename = $roles[0]; 802 805 $role = get_role( $rolename ); -
quiz-master-next/trunk/readme.txt
r3390528 r3393448 5 5 Tested up to: 6.8 6 6 Requires PHP: 5.4 7 Stable tag: 10.3. 07 Stable tag: 10.3.1 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 222 222 223 223 == 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 224 228 = 10.3.0 ( November 5, 2025 ) = 225 229 * Feature: Added option to randomize questions within each page
Note: See TracChangeset
for help on using the changeset viewer.