Version Description
(April 13, 2021) = * Bug: Fixed SQL errors due to which questions were disappearing from some old quizzes. * Bug: Fixed [qsm_result] shortcode format in results page. * Bug: Fixed the issue with incorrect points while using Latex commands along with the anchor tags in the rich answers.
Download this release
Release Info
Developer | expresstech |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 7.1.15 |
Comparing to | |
See all releases |
Code changes from version 7.1.14 to 7.1.15
- mlw_quizmaster2.php +3 -3
- php/classes/class-qmn-quiz-manager.php +9 -2
- php/question-types.php +1 -1
- php/template-variables.php +5 -2
- readme.txt +6 -1
mlw_quizmaster2.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
-
* Version: 7.1.
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author QSM Team
|
12 |
-
* @version 7.1.
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
@@ -37,7 +37,7 @@ class MLWQuizMasterNext {
|
|
37 |
* @var string
|
38 |
* @since 4.0.0
|
39 |
*/
|
40 |
-
public $version = '7.1.
|
41 |
|
42 |
/**
|
43 |
* QSM Alert Manager Object
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
+
* Version: 7.1.15
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author QSM Team
|
12 |
+
* @version 7.1.15
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
37 |
* @var string
|
38 |
* @since 4.0.0
|
39 |
*/
|
40 |
+
public $version = '7.1.15';
|
41 |
|
42 |
/**
|
43 |
* QSM Alert Manager Object
|
php/classes/class-qmn-quiz-manager.php
CHANGED
@@ -232,9 +232,12 @@ class QMNQuizManager {
|
|
232 |
ob_start();
|
233 |
if(isset($_GET['result_id']) && $_GET['result_id'] != ''){
|
234 |
global $wpdb;
|
|
|
235 |
wp_enqueue_style('qmn_quiz_common_style', plugins_url('../../css/common.css', __FILE__));
|
236 |
wp_enqueue_style('dashicons');
|
237 |
wp_enqueue_script( 'jquery' );
|
|
|
|
|
238 |
wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
|
239 |
$result_unique_id =sanitize_text_field($_GET['result_id']);
|
240 |
$query = $wpdb->prepare("SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE unique_id = %s",$result_unique_id);
|
@@ -242,6 +245,7 @@ class QMNQuizManager {
|
|
242 |
if( !empty($result) && isset($result['result_id']) ){
|
243 |
$result_id = $result['result_id'];
|
244 |
$return_display = do_shortcode( '[qsm_result id="'. $result_id .'"]' );
|
|
|
245 |
}else{
|
246 |
$return_display = 'Result id is wrong!';
|
247 |
}
|
@@ -368,6 +372,9 @@ class QMNQuizManager {
|
|
368 |
global $wpdb;
|
369 |
$result_data = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}mlw_results WHERE result_id = %d", $id), ARRAY_A);
|
370 |
if( $result_data ){
|
|
|
|
|
|
|
371 |
$quiz_result = unserialize($result_data['quiz_results']);
|
372 |
$response_data = array(
|
373 |
'quiz_id' => $result_data['quiz_id'],
|
@@ -479,9 +486,9 @@ class QMNQuizManager {
|
|
479 |
$question_sql = '';
|
480 |
if (!empty($question_ids)) {
|
481 |
$qids = implode(', ', $question_ids);
|
482 |
-
$question_sql = " AND question_id IN (
|
483 |
}
|
484 |
-
$questions = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}mlw_questions WHERE quiz_id=%d AND deleted=0
|
485 |
}
|
486 |
$questions = apply_filters('qsm_load_questions_filter', $questions, $quiz_id, $quiz_options);
|
487 |
// Returns an array of all the loaded questions.
|
232 |
ob_start();
|
233 |
if(isset($_GET['result_id']) && $_GET['result_id'] != ''){
|
234 |
global $wpdb;
|
235 |
+
global $mlwQuizMasterNext;
|
236 |
wp_enqueue_style('qmn_quiz_common_style', plugins_url('../../css/common.css', __FILE__));
|
237 |
wp_enqueue_style('dashicons');
|
238 |
wp_enqueue_script( 'jquery' );
|
239 |
+
wp_enqueue_script( 'jquery-ui-tooltip' );
|
240 |
+
wp_enqueue_script('qsm_quiz', plugins_url('../../js/qsm-quiz.js', __FILE__), array('wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip'), $mlwQuizMasterNext->version);
|
241 |
wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
|
242 |
$result_unique_id =sanitize_text_field($_GET['result_id']);
|
243 |
$query = $wpdb->prepare("SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE unique_id = %s",$result_unique_id);
|
245 |
if( !empty($result) && isset($result['result_id']) ){
|
246 |
$result_id = $result['result_id'];
|
247 |
$return_display = do_shortcode( '[qsm_result id="'. $result_id .'"]' );
|
248 |
+
$return_display = str_replace('%FB_RESULT_ID%', $result_unique_id, $return_display);
|
249 |
}else{
|
250 |
$return_display = 'Result id is wrong!';
|
251 |
}
|
372 |
global $wpdb;
|
373 |
$result_data = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}mlw_results WHERE result_id = %d", $id), ARRAY_A);
|
374 |
if( $result_data ){
|
375 |
+
wp_enqueue_style('qmn_quiz_common_style', plugins_url('../../css/common.css', __FILE__));
|
376 |
+
wp_enqueue_style('dashicons');
|
377 |
+
wp_enqueue_script( 'math_jax', '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' );
|
378 |
$quiz_result = unserialize($result_data['quiz_results']);
|
379 |
$response_data = array(
|
380 |
'quiz_id' => $result_data['quiz_id'],
|
486 |
$question_sql = '';
|
487 |
if (!empty($question_ids)) {
|
488 |
$qids = implode(', ', $question_ids);
|
489 |
+
$question_sql = " AND question_id IN ($qids) ";
|
490 |
}
|
491 |
+
$questions = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}mlw_questions WHERE quiz_id=%d AND deleted=0 %1s %2s %3s", $quiz_id, $question_sql, $order_by_sql, $limit_sql));
|
492 |
}
|
493 |
$questions = apply_filters('qsm_load_questions_filter', $questions, $quiz_id, $quiz_options);
|
494 |
// Returns an array of all the loaded questions.
|
php/question-types.php
CHANGED
@@ -164,7 +164,7 @@ function qmn_multiple_choice_review( $id, $question, $answers ) {
|
|
164 |
$correct_text = array();
|
165 |
foreach ( $answers as $answer ) {
|
166 |
if ( $answerEditor === 'rich' ) {
|
167 |
-
$answer_option =
|
168 |
$sinel_answer_cmp = preg_replace( "/\s+|\n+|\r/", ' ', htmlentities( $answer_option ) );
|
169 |
if ( $rich_text_comapre == $sinel_answer_cmp ) {
|
170 |
$return_array['points'] = $answer[1];
|
164 |
$correct_text = array();
|
165 |
foreach ( $answers as $answer ) {
|
166 |
if ( $answerEditor === 'rich' ) {
|
167 |
+
$answer_option = htmlspecialchars_decode( $answer[0], ENT_QUOTES );
|
168 |
$sinel_answer_cmp = preg_replace( "/\s+|\n+|\r/", ' ', htmlentities( $answer_option ) );
|
169 |
if ( $rich_text_comapre == $sinel_answer_cmp ) {
|
170 |
$return_array['points'] = $answer[1];
|
php/template-variables.php
CHANGED
@@ -1004,7 +1004,10 @@ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_
|
|
1004 |
if( strpos($answer[1], '<') !== false || strpos($answer[1], '"') !== false ){
|
1005 |
$answer_value = htmlentities( $answer[1] );
|
1006 |
}else {
|
1007 |
-
$answer_value = $answer[1];
|
|
|
|
|
|
|
1008 |
}
|
1009 |
} else {
|
1010 |
$answer_value = htmlspecialchars_decode($answer[1], ENT_QUOTES);
|
@@ -1013,7 +1016,7 @@ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_
|
|
1013 |
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1014 |
} else if (isset($single_answer[2]) && $single_answer[2] == 1) {
|
1015 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1016 |
-
} else if ($
|
1017 |
$question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1018 |
} else {
|
1019 |
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1004 |
if( strpos($answer[1], '<') !== false || strpos($answer[1], '"') !== false ){
|
1005 |
$answer_value = htmlentities( $answer[1] );
|
1006 |
}else {
|
1007 |
+
$answer_value = htmlspecialchars_decode($answer[1], ENT_QUOTES);
|
1008 |
+
$answer_value = htmlspecialchars_decode($answer_value, ENT_QUOTES);
|
1009 |
+
$answer_value = htmlentities($answer_value);
|
1010 |
+
$answer_value = htmlspecialchars($answer_value);
|
1011 |
}
|
1012 |
} else {
|
1013 |
$answer_value = htmlspecialchars_decode($answer[1], ENT_QUOTES);
|
1016 |
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1017 |
} else if (isset($single_answer[2]) && $single_answer[2] == 1) {
|
1018 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1019 |
+
} else if ($answer_value == $single_answer_option && $single_answer[2] !== 1) {
|
1020 |
$question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
1021 |
} else {
|
1022 |
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress q
|
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.7
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 7.1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -140,6 +140,11 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
= 7.1.14 (March 25, 2021) =
|
144 |
* Bug: Fixed security and Vulnerability issues.
|
145 |
* Bug: Fixed the inability to recognize correct answer for Question type Paragraph.
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.7
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 7.1.15
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 7.1.15 (April 13, 2021) =
|
144 |
+
* Bug: Fixed SQL errors due to which questions were disappearing from some old quizzes.
|
145 |
+
* Bug: Fixed [qsm_result] shortcode format in results page.
|
146 |
+
* Bug: Fixed the issue with incorrect points while using Latex commands along with the anchor tags in the rich answers.
|
147 |
+
|
148 |
= 7.1.14 (March 25, 2021) =
|
149 |
* Bug: Fixed security and Vulnerability issues.
|
150 |
* Bug: Fixed the inability to recognize correct answer for Question type Paragraph.
|