diff --git a/css/qsm-admin.css b/css/qsm-admin.css
index f15f72b6..6dc4748b 100644
--- a/css/qsm-admin.css
+++ b/css/qsm-admin.css
@@ -1378,6 +1378,7 @@ tr .qsm-opt-desc {
#quiz_settings_wrapper .qsm-opt-desc {
display: none !important;
}
+.qsm_page_qmn_global_settings .form-table td fieldset label,
.qsm_tab_content .form-table td fieldset label {
margin-right: 20px !important;
width: 100%;
diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js
index bbd87c64..125b4e41 100644
--- a/js/qsm-quiz.js
+++ b/js/qsm-quiz.js
@@ -170,9 +170,12 @@ var qsmTimerInterval = [];
}
var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
var secondsConsumed = qmn_quiz_data[quizID].timerConsumed;
- jQuery(document).trigger('qmn_timer_consumed_seconds', [quizID, qmn_quiz_data, qsm_timer_consumed_obj]);
if (localStorage.getItem('mlw_time_quiz' + quizID) != null ) {
secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed + 1;
+ if(qsm_timer_consumed_obj.qmn_count_upward_status){
+ secondsConsumed = qmn_quiz_data[quizID].timerConsumed - 1;
+ secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed;
+ }
if(secondsRemaining < 0) {
secondsRemaining = 0;
}
diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php
index ce63fc21..2a6e8e6b 100644
--- a/mlw_quizmaster2.php
+++ b/mlw_quizmaster2.php
@@ -2,7 +2,7 @@
/**
* Plugin Name: Quiz And Survey Master
* Description: Easily and quickly add quizzes and surveys to your website.
- * Version: 9.2.0
+ * Version: 9.2.1
* Author: ExpressTech
* Author URI: https://quizandsurveymaster.com/
* Plugin URI: https://expresstech.io/
@@ -43,7 +43,7 @@ class MLWQuizMasterNext {
* @var string
* @since 4.0.0
*/
- public $version = '9.2.0';
+ public $version = '9.2.1';
/**
* QSM Alert Manager Object
@@ -756,11 +756,15 @@ public function qsm_add_user_capabilities() {
);
$user = wp_get_current_user();
+ if ( empty( $user->roles ) || ! is_array( $user->roles ) ) {
+ return;
+ }
$roles = (array) $user->roles;
$rolename = $roles[0];
-
$role = get_role( $rolename );
-
+ if ( ! $role ) {
+ return;
+ }
// Remove all capabilities first.
foreach ( $administrator_capabilities as $cap ) {
if ( $role->has_cap( $cap ) ) {
diff --git a/php/classes/class-qsm-fields.php b/php/classes/class-qsm-fields.php
index bd6b9a05..bc81b4c3 100644
--- a/php/classes/class-qsm-fields.php
+++ b/php/classes/class-qsm-fields.php
@@ -77,6 +77,9 @@ public static function generate_section( $fields, $section ) {
case 'number':
$sanitized_value = isset( $_POST[ $key ] ) ? intval( $_POST[ $key ] ) : "";
break;
+ case 'image':
+ $sanitized_value = isset( $_POST[ $key ] ) ? esc_url_raw( wp_unslash( $_POST[ $key ] ) ) : "";
+ break;
default:
$sanitized_value = isset( $_POST[ $key ] ) ? sanitize_text_field( wp_unslash( $_POST[ $key ] ) ) : "";
break;
diff --git a/php/classes/class-qsm-results-pages.php b/php/classes/class-qsm-results-pages.php
index 2f7d6e46..d74b6615 100644
--- a/php/classes/class-qsm-results-pages.php
+++ b/php/classes/class-qsm-results-pages.php
@@ -180,6 +180,7 @@ public static function generate_pages( $response_data ) {
// variables, and then outputs the text.
$page = wp_kses_post( htmlspecialchars_decode( $content, ENT_QUOTES) );
+ $response_data['result_page_index'] = $index;
//last chance to filter $page
$page = apply_filters( 'qsm_template_variable_results_page', $page, $response_data );
diff --git a/php/shortcodes.php b/php/shortcodes.php
index ef7e5a2a..45dad941 100644
--- a/php/shortcodes.php
+++ b/php/shortcodes.php
@@ -183,12 +183,11 @@ function qsm_generate_fb_header_metadata() {
$sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'facebook_sharing_text', '' );
$sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $results_array );
$default_fb_image = QSM_PLUGIN_URL . 'assets/icon-200x200.png';
- $get_fb_sharing_image = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'result_page_fb_image', '' );
- if ( empty( $get_fb_sharing_image ) ) {
- $get_fb_sharing_image = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'result_page_fb_image', '' );
- }
- if ( '' !== $get_fb_sharing_image && filter_var( $get_fb_sharing_image, FILTER_VALIDATE_URL ) ) {
- $default_fb_image = $get_fb_sharing_image;
+ $fb_sharing_image_quiz_options = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'result_page_fb_image', '' );
+ $fb_sharing_image_quiz_text = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'result_page_fb_image', '' );
+ $get_fb_sharing_image = ! empty($fb_sharing_image_quiz_options) ? $fb_sharing_image_quiz_options : $fb_sharing_image_quiz_text;
+ if ( ! empty($get_fb_sharing_image) && filter_var($get_fb_sharing_image, FILTER_VALIDATE_URL) ) {
+ $default_fb_image = esc_url($get_fb_sharing_image);
}
$post = $wp_query->get_queried_object();
$pagename = $post->post_title;
diff --git a/php/template-variables.php b/php/template-variables.php
index 564fe870..5a561122 100644
--- a/php/template-variables.php
+++ b/php/template-variables.php
@@ -1194,14 +1194,16 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
}
} else {
$options = array();
+ $question_correct_fill_answer_text = '';
foreach ( $total_answers as $key => $single_answer ) {
if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
$options[] = htmlspecialchars_decode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $answer['id'] . '-' . $key, 'QSM Answers' ), ENT_QUOTES );
} else {
$options[] = mb_strtoupper( htmlspecialchars_decode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $answer['id'] . '-' . $key, 'QSM Answers' ), ENT_QUOTES ) );
}
+ $question_correct_fill_answer_text .= '(' . $key + 1 . ') ' . strval( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $answer['id'] . '-' . $key, 'QSM Answers' ) ) . '';
}
-
+ $is_any_incorrect = false;
if ( sizeof( $new_array_user_answer ) < sizeof( $total_answers ) ) {
foreach ( $new_array_user_answer as $show_user_answer ) {
if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
@@ -1212,6 +1214,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
if ( false !== $key ) {
$question_with_answer_text .= '' . htmlspecialchars_decode( $show_user_answer, ENT_QUOTES ) . '';
} else {
+ $is_any_incorrect = true;
if ( '' === $show_user_answer ) {
$show_user_answer = $quiz_options->no_answer_text;
}
@@ -1229,7 +1232,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
if ( false !== $key ) {
$question_with_answer_text .= '' . $show_user_answer . '';
} else {
-
+ $is_any_incorrect = true;
if ( '' === $show_user_answer ) {
$show_user_answer = $quiz_options->no_answer_text;
}
@@ -1237,6 +1240,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
}
}
}
+ $question_with_answer_text = $is_any_incorrect ? $question_with_answer_text . $question_correct_fill_answer_text : $question_with_answer_text;
}
} else {
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
diff --git a/readme.txt b/readme.txt
index 93fc2ba8..94243444 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: quiz, survey, test, exam, online assessment
Requires at least: 4.9
Tested up to: 6.6
Requires PHP: 5.4
-Stable tag: 9.2.0
+Stable tag: 9.2.1
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,7 +12,7 @@ Create engaging quizzes, surveys, tests, & more, with the versatile quiz maker a
== Description ==
-**Quiz and Survey Master** is the easiest quiz and survey maker plugin for creating quizzes, surveys, and forms on your WordPress website. Create everything from fun trivia quizzes to in-depth customer satisfaction assessments, using a user-friendly drag-and-drop quiz maker interface. Go beyond basic questions with multimedia support for richer content, analyze results to gain valuable insights, and even integrate with email marketing services to capture leads. Quiz & Survey Master is a powerful WordPress plugin to increase user engagement, gather valuable data, and build a stronger connection with your audience.
+**Quiz and Survey Master** is the easiest quiz and survey maker plugin for creating quizzes, surveys, and forms on your WordPress website. Create everything from fun trivia quizzes to in-depth customer satisfaction assessments, using a user-friendly **drag-and-drop quiz maker** interface. Go beyond basic questions with multimedia support for richer content, analyze results to gain valuable insights, and even integrate with email marketing services to capture leads. Quiz & Survey Master is a **powerful WordPress plugin** to increase user engagement, gather valuable data, and build a stronger connection with your audience.
**Try Demo ➡️ [Get a personal sandbox demo with QSM](https://instawp.io/plugins/quiz-master-next?utm_source=wp.org&utm_medium=wp_org_description&utm_campaign=wp_org_to_qsm)**
@@ -20,9 +20,9 @@ https://youtu.be/DyiCCNnDpHk?si=7nda3koRTGw7BW_J
### CREATE UNLIMITED QUIZZES AND QUESTIONS
-Create without limits with our online quiz maker— QSM—to craft unlimited quizzes with endless questions in diverse formats. Utilize the built-in text editor to format text and incorporate images, audio, and video. Build forms, quizzes, and surveys that resonate with your audience, creating a fulfilling learning and engagement experience.
+Create without limits with our [online quiz maker](https://quizandsurveymaster.com/)— QSM—to craft unlimited quizzes with endless questions in diverse formats. Utilize the built-in text editor to format text and incorporate images, audio, and video. Build forms, quizzes, and surveys that resonate with your audience, creating a fulfilling learning and engagement experience.
-This WordPress quiz maker allows you to create from lead generation quizzes, and customer satisfaction surveys, to assessments, personality tests, fun trivia quizzes, and more.
+This [WordPress quiz maker](https://quizandsurveymaster.com/free-quiz-maker-wordpress-plugins/) allows you to create from lead generation quizzes, and customer satisfaction surveys, to assessments, personality tests, fun trivia quizzes, and more.
### QUIZ DEMOS
@@ -35,7 +35,7 @@ This WordPress quiz maker allows you to create from lead generation quizzes, and
### DIVERSE RANGE OF QUESTIONS
-Create quizzes, forms, or surveys with a variety of question types tailored to your specific goals:
+Engage your audience effortlessly with our **interactive quiz builder**! Easily create tailored quizzes, forms, or surveys using diverse question types that align with your goals and make interaction fun.
- **Multiple Choice**: Choose one correct answer option.
- **Multiple Response**: Select multiple correct answer options.
@@ -50,23 +50,7 @@ Create quizzes, forms, or surveys with a variety of question types tailored to y
- **Polar**: Answer by choosing a spot on the slider scale.
- **Opt-in**: Use the checkbox selection to give permission/agree to a text.
-
-Engage your audience effortlessly with our interactive quiz builder! Easily create tailored quizzes, forms, or surveys using diverse question types that align with your goals and make interaction fun.
-
-- **Multiple Choice**: Choose one correct answer option.
-- **Multiple Response**: Select multiple correct answer options.
-- **Dropdown**: Pick one correct answer from the dropdown menu options.
-- **Short Answer**: Provide concise written responses.
-- **Paragraph**: Write longer, detailed answers.
-- **Fill in the Blank**: Complete sentences with the correct missing words.
-- **Date**: Select a specific calendar date.
-- **File Upload**: Attach images, PDFs, and documents.
-- **Number**: Enter answers in numerical format.
-- **Captcha**: Verify identity with anti-bot check.
-- **Polar**: Answer by choosing a spot on the slider scale.
-- **Opt-in**: Use the checkbox selection to give permission/agree to a text.
-
-ADVANCED QUESTION TYPES
+**ADVANCED QUESTION TYPES**
QSM comes with some advanced question types in their pro plan;
- **Matching Pairs** - Drag and drop answers vertically to match with the correct option.
@@ -75,15 +59,15 @@ QSM comes with some advanced question types in their pro plan;
### CREATE QUIZ WITH BLOCK EDITOR
-Block Editors in WordPress simplify content creation and customization through intuitive drag-and-drop functionality. QSM incorporates its own block editor, making it the easiest and most convenient way to create quizzes in WordPress, enhancing user experience and workflow efficiency.
+Block Editors in WordPress simplify content creation and customization through intuitive drag-and-drop functionality. QSM incorporates its own block editor, making it the easiest and most convenient way to [create quizzes in WordPress](https://quizandsurveymaster.com/create-quiz-using-quiz-builder-plugin-in-wordpress/), enhancing user experience and workflow efficiency.
### GAIN BUSINESS INSIGHTS WITH SURVEYS
-With the QSM plugin, effortlessly create detailed market research surveys and share them on social platforms to gather valuable consumer information. Store the data in a database or export it for analysis using QSM's advanced features like the export add-on and reporting and analysis add-on. Gain valuable insights from efficient data collection and analysis, enabling you to make informed business decisions and share the findings with your audience.
+With the QSM plugin, effortlessly create detailed [market research surveys](https://quizandsurveymaster.com/create-market-research-surveys/) and share them on social platforms to gather valuable consumer information. As a comprehensive **survey plugin for WordPress**, QSM allows you to store data in a database or export it for analysis using advanced features like the export add-on and reporting and analysis addon. Gain valuable insights from efficient data collection and analysis, enabling you to make informed business decisions and share the findings with your audience.
### FULLY CUSTOMIZABLE
-Create custom quiz and survey forms by customizing every aspect of your quizzes and surveys that users interact with, using our WordPress quiz builder’s flexible features;
+Create **custom quiz and survey forms** by customizing every aspect of your quizzes and surveys that users interact with, using our **WordPress quiz builder’s** flexible features;
**Custom Style CSS**: Personalize the look and feel of your quizzes and surveys to match your brand and style perfectly.
@@ -95,11 +79,11 @@ Create custom quiz and survey forms by customizing every aspect of your quizzes
### RESPONSIVE DESIGN
-Quiz and Survey Master ensures that your WordPress forms, quizzes, and surveys look and perform flawlessly on any device and browser, thanks to its responsive quiz design. This WordPress quiz maker offers smooth performance, even when using its various themes. You can also create unlimited questions without lag and easily share your quizzes with an audience.
+Quiz and Survey Master ensures that your WordPress forms, quizzes, and surveys look and perform flawlessly on any device and browser, thanks to its **responsive quiz design**. This WordPress quiz maker offers smooth performance, even when using its various themes. You can also create unlimited questions without lag and easily share your quizzes with an audience.
### DISPLAY SCORE-BASED CUSTOM RESULTS
-With the QSM plugin, you can create customized results based on quiz scores. Tailor multiple result pages to different score ranges, offering a unique and engaging experience for each participant.
+With the QSM plugin, you can [create customized results](https://quizandsurveymaster.com/docs/v8/setting-up-results-pages/) based on quiz scores. Tailor multiple result pages to different score ranges, offering a unique and engaging experience for each participant.
For example, based on a high score, display a result with a congratulatory message and additional resources, providing high-achieving participants with further learning opportunities. While for a lower score, you might display a result with encouragement and tips for improvement to help users progress.
@@ -117,23 +101,23 @@ Organize your questions by assigning parent and sub-categories. Create category-
### GENERATE LEADS WITH BUILT-IN CONTACT FORM
-Expand your customer base and nurture leads effectively with QSM’s in-built contact forms. Easily collect emails and smoothly integrate with top marketing tools like Mailchimp, ActiveCampaign, Zapier, Campaign Monitor, and GetResponse to drive targeted marketing campaigns.
+Expand your customer base and nurture leads effectively with QSM’s **lead capture quizzes** with in-built contact forms. Collect emails easily and smoothly integrate with top marketing tools like Mailchimp, ActiveCampaign, Zapier, Campaign Monitor, and GetResponse to drive targeted marketing campaigns.
### OTHER USEFUL FEATURES
-- Set countdown timer
-- Schedule active date and timeframe for quizzes/surveys
-- Set Multi-Page surveys and quizzes with a limited number of questions per page
-- Enable social sharing of quiz/survey results
-- Require user login for privacy and access restrictions
-- Personalized quiz experience with randomized questions, answers, or both
-- Import questions from the Question Bank across quizzes and surveys.
-- Set a limit for incorrect answers that automatically ends the quiz.
-- Limit the number of total entries to quiz or survey
-- Set the number of user attempts to complete the form
-- Display the welcome quiz page with animation
-- Enable comment boxes for each question
-- Enable hints for questions to assist participants.
-- Create math formulas in questions, using TeX and LaTeX notation.
+- Set **countdown timer**
+- **Schedule active date and timeframe** for quizzes/surveys
+- **Set Multi-Page** surveys and quizzes with a limited number of questions per page
+- **Enable social sharing** of quiz/survey results
+- **Require user login** for privacy and access restrictions
+- Personalized quiz experience with **randomized questions, answers, or both**
+- Import questions from the **Question Bank** across quizzes and surveys.
+- Set a **limit for incorrect answers** that automatically ends the quiz.
+- Limit the **number of total entries** to quiz or survey
+- **Set the number of user attempts** to complete the form
+- Display the welcome **quiz page with animation**
+- **Enable comment boxes** for each question
+- **Enable hints** for questions to assist participants.
+- **Create math formulas** in questions, using TeX and LaTeX notation.
- Compatible with [WPML](https://wpml.org/?utm_source=wp.org&utm_medium=wp_org_description&utm_campaign=wp_org_to_qsm) and its extensions
- And Much More…
@@ -188,25 +172,25 @@ This section describes how to install the plugin and get it working.
= How do I get started with QSM - A free quiz maker in WordPress? =
-The quickest way to build a quiz is using the QSM - Block Editor in WordPress. Simply navigate to a New Page or Post, select the QSM Block, and add a new quiz. Enter the quiz's name, set advanced options if required, and click Create Quiz. From there, start adding questions and options, choosing question types from the right-side panel, and Save your draft. Once ready, click Publish to post the quiz on the WordPress website.
+The quickest way to build a quiz is using the **QSM - Block Editor** in WordPress. Simply navigate to a New Page or Post, select the QSM Block, and add a new quiz. Enter the quiz's name, set advanced options if required, and click **Create Quiz**. From there, start adding questions and options, choosing question types from the right-side panel, and Save your draft. Once ready, click Publish to post the quiz on the WordPress website.
Alternatively, you can create a quiz or survey using the default method, which offers more features and settings. If you have started a quiz in the block editor, simply save the draft and go to QSM > Quizzes/Surveys to edit your existing quiz or add a new one to continue building it with full customization options.
= Can this plugin be translated? =
-Yes, it’s completely possible! With integration to the WPML plugin, this online quiz tool enables you to translate your quizzes and surveys into multiple languages. For more information, refer to the documentation on translating the QSM WordPress plugin.
+Yes, it’s completely possible! With integration to the WPML plugin, this **online quiz tool** enables you to translate your quizzes and surveys into multiple languages. For more information, refer to the documentation on [translating the QSM WordPress plugin](https://quizandsurveymaster.com/docs/advanced-topics/qsm-wpml/#Translating_QSM_Defaults).
= How can I get access to all advanced features? =
-To access advanced features, integrations, and themes, you can upgrade to the QSM All Access plan. The pro license gives you access to our 40 add-ons such as advanced assessment, flashcards, email integrations, advanced analytics, and 8 premium themes
+To access advanced features, integrations, and themes, you can upgrade to the [QSM All Access plan](https://quizandsurveymaster.com/pricing/). The pro license gives you access to our 40 add-ons such as advanced assessment, flashcards, email integrations, advanced analytics, and 8 premium themes
= Can I create paid quizzes and surveys? =
-Yes, this is achievable by our Payment Integration add-on. Using PayPal and Stripe, you can easily add payments to your online quizzes and surveys, allowing you to monetize your content easily.
+Yes, this is achievable by our [Payment Integration add-on](https://quizandsurveymaster.com/downloads/paypal-and-stripe-payment-integration/). Using **PayPal** and **Stripe**, you can easily add payments to your online quizzes and surveys, allowing you to monetize your content easily.
= Can I display different content based on user responses? =
-Absolutely! With QSM, you can create conditional logic-based quizzes and surveys, where specific questions or content are displayed based on the user's previous responses. This feature is particularly useful for creating personalized experiences, such as personality quizzes or branching surveys.
+Absolutely! With QSM, you can create conditional logic-based **quizzes** and surveys, where specific questions or content are displayed based on the user's previous responses. This feature is particularly useful for creating personalized experiences, such as personality quizzes or branching surveys.
= Can I collect and analyze user data from my quizzes and surveys? =
@@ -238,6 +222,11 @@ As a WordPress quiz maker, QSM is designed to be compatible with most other plug
18. Database
== Changelog ==
+= 9.2.1 ( October 16, 2024 ) =
+* Bug: Resolved vulnerability issue with question settings
+* Bug: Fixed issue with fill in the blanks question type while using random answers
+* Bug: Fixed php warning with user permission function
+
= 9.2.0 ( October 07, 2024 ) =
* Bug: Resolved HTML tag issue with the %USER_ANSWER% variable
* Bug: Fixed the issue with contact form position settings