Quiz And Survey Master (Formerly Quiz Master Next) - Version 8.0.2

Version Description

(June 23, 2022) = * Bug: Fixed scoring issue while using random questions * Bug: Fixed issue with file question type validation settings * Bug: Fixed issue with video player in rich text answer type

Download this release

Release Info

Developer expresstech
Plugin Icon 128x128 Quiz And Survey Master (Formerly Quiz Master Next)
Version 8.0.2
Comparing to
See all releases

Code changes from version 8.0.1 to 8.0.2

js/qsm-admin.js CHANGED
@@ -1777,7 +1777,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1777
  var comments = $("#comments").val();
1778
  advanced_option['required'] = $(".questionElements input[name='required']").is(":checked") ? 0 : 1;
1779
  var category = $(".category-radio:checked").val();
1780
- var autofill = $("#hide_autofill").val();
1781
  var limit_text = $("#limit_text").val();
1782
  var limit_multiple_response = $("#limit_multiple_response").val();
1783
  var file_upload_limit = $("#file_upload_limit").val();
@@ -1833,7 +1832,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1833
  }
1834
 
1835
  });
1836
- $('.questionElements .advanced-content > .qsm-row ').each(function () {
1837
  if ($(this).find('input[type="text"]').length > 0) {
1838
  var element_id = $(this).find('input[type="text"]').attr('id');
1839
  advanced_option[element_id] = $(this).find('input[type="text"]').val();
@@ -2033,11 +2032,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2033
  if (answerEditor === null || typeof answerEditor === "undefined") {
2034
  answerEditor = 'text';
2035
  }
2036
- //Check autofill setting
2037
- var disableAutofill = question.get('autofill');
2038
- if (disableAutofill === null || typeof disableAutofill === "undefined") {
2039
- disableAutofill = '0';
2040
- }
2041
  //Get text limit value
2042
  var get_limit_text = question.get('limit_text');
2043
  if (get_limit_text === null || typeof get_limit_text === "undefined") {
@@ -2105,7 +2099,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2105
  //Changed checked logic based on new structure for required.
2106
  $("input#required[value='" + question.get('required') + "']").prop('checked', true);
2107
 
2108
- $("#hide_autofill").val(disableAutofill);
2109
  $("#limit_text").val(get_limit_text);
2110
  $("#limit_multiple_response").val(get_limit_mr);
2111
  $("#file_upload_limit").val(get_limit_fu);
@@ -2129,14 +2122,17 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2129
  if (all_setting === null || typeof all_setting === "undefined") {} else {
2130
  $.each(all_setting, function (index, value) {
2131
  if ($('#' + index + '_area').length > 0) {
2132
- if ($('#' + index + '_area').find('input[type="checkbox"]').length > 1) {
 
 
2133
  var fut_arr = value.split(",");
2134
  $.each(fut_arr, function (i) {
2135
  $(".questionElements input[name='" + index + "[]']:checkbox[value='" + fut_arr[i] + "']").attr("checked", "true").prop('checked', true);
2136
  });
2137
  } else {
2138
- if (value != null)
2139
  $('#' + index).val(value);
 
2140
  }
2141
  }
2142
  if (index == 'matchAnswer') {
1777
  var comments = $("#comments").val();
1778
  advanced_option['required'] = $(".questionElements input[name='required']").is(":checked") ? 0 : 1;
1779
  var category = $(".category-radio:checked").val();
 
1780
  var limit_text = $("#limit_text").val();
1781
  var limit_multiple_response = $("#limit_multiple_response").val();
1782
  var file_upload_limit = $("#file_upload_limit").val();
1832
  }
1833
 
1834
  });
1835
+ $('.questionElements .advanced-content > .qsm-row:not(.core-option)').each(function () {
1836
  if ($(this).find('input[type="text"]').length > 0) {
1837
  var element_id = $(this).find('input[type="text"]').attr('id');
1838
  advanced_option[element_id] = $(this).find('input[type="text"]').val();
2032
  if (answerEditor === null || typeof answerEditor === "undefined") {
2033
  answerEditor = 'text';
2034
  }
 
 
 
 
 
2035
  //Get text limit value
2036
  var get_limit_text = question.get('limit_text');
2037
  if (get_limit_text === null || typeof get_limit_text === "undefined") {
2099
  //Changed checked logic based on new structure for required.
2100
  $("input#required[value='" + question.get('required') + "']").prop('checked', true);
2101
 
 
2102
  $("#limit_text").val(get_limit_text);
2103
  $("#limit_multiple_response").val(get_limit_mr);
2104
  $("#file_upload_limit").val(get_limit_fu);
2122
  if (all_setting === null || typeof all_setting === "undefined") {} else {
2123
  $.each(all_setting, function (index, value) {
2124
  if ($('#' + index + '_area').length > 0) {
2125
+ if (1 == $('#' + index + '_area').find('input[type=checkbox]').length) {
2126
+ $(".questionElements input[name='" + index + "'][value='" + value + "']").attr("checked", "true").prop('checked', true);
2127
+ } else if ($('#' + index + '_area').find('input[type=checkbox]').length > 1) {
2128
  var fut_arr = value.split(",");
2129
  $.each(fut_arr, function (i) {
2130
  $(".questionElements input[name='" + index + "[]']:checkbox[value='" + fut_arr[i] + "']").attr("checked", "true").prop('checked', true);
2131
  });
2132
  } else {
2133
+ if (value != null) {
2134
  $('#' + index).val(value);
2135
+ }
2136
  }
2137
  }
2138
  if (index == 'matchAnswer') {
mlw_quizmaster2.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 8.0.1
6
  * Author: ExpressTech
7
  * Author URI: https://quizandsurveymaster.com/
8
  * Plugin URI: https://expresstech.io/
@@ -43,7 +43,7 @@ class MLWQuizMasterNext {
43
  * @var string
44
  * @since 4.0.0
45
  */
46
- public $version = '8.0.1';
47
 
48
  /**
49
  * QSM Alert Manager Object
@@ -334,6 +334,7 @@ class MLWQuizMasterNext {
334
  break;
335
  case 'style':
336
  wp_enqueue_style( 'wp-color-picker' );
 
337
  wp_enqueue_media();
338
  break;
339
  case 'options':
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 8.0.2
6
  * Author: ExpressTech
7
  * Author URI: https://quizandsurveymaster.com/
8
  * Plugin URI: https://expresstech.io/
43
  * @var string
44
  * @since 4.0.0
45
  */
46
+ public $version = '8.0.2';
47
 
48
  /**
49
  * QSM Alert Manager Object
334
  break;
335
  case 'style':
336
  wp_enqueue_style( 'wp-color-picker' );
337
+ wp_enqueue_script( 'wp-color-picker');
338
  wp_enqueue_media();
339
  break;
340
  case 'options':
php/admin/functions.php CHANGED
@@ -472,11 +472,14 @@ function qsm_generate_question_option( $key, $single_option ) {
472
  $type = isset( $single_option['type'] ) ? $single_option['type'] : 'text';
473
  $show = isset( $single_option['show'] ) ? explode( ',', $single_option['show'] ) : array();
474
  $show_class = '';
 
 
 
475
  if ( $show ) {
 
476
  foreach ( $show as $show_value ) {
477
  $show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
478
  }
479
- $show_class .= ' qsm_hide_for_other';
480
  }
481
  $tooltip = '';
482
  if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
@@ -998,7 +1001,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
998
  <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
999
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1000
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1001
- <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1002
  <?php } ?>
1003
  <img alt="" src="<?php echo esc_url( $folder_slug . $theme_name . '/screenshot.png' ); ?>" />
1004
  <div class="downloaded-theme-button">
@@ -1081,7 +1084,7 @@ function qsm_get_default_wizard_themes() {
1081
  <div class="theme-wrapper theme market-theme">
1082
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1083
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1084
- <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1085
  <?php } ?>
1086
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1087
  <div class="market-theme-url">
@@ -1089,7 +1092,7 @@ function qsm_get_default_wizard_themes() {
1089
  href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1090
  <a class="button" target="_blank" rel="noopener"
1091
  href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1092
- <?php echo in_array( $theme_name, $pro_themes , true) ? __( 'Buy Now', 'quiz-master-next' ) : __( 'Download', 'quiz-master-next' ) ; ?>
1093
  </a>
1094
  </div>
1095
  </div>
@@ -1115,13 +1118,13 @@ function qsm_get_market_themes() {
1115
  <div class="theme-wrapper theme market-theme">
1116
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1117
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1118
- <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1119
  <?php } ?>
1120
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1121
  <div class="market-theme-url">
1122
  <a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1123
  <a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1124
- <?php echo in_array( $theme_name, $pro_themes , true) ? __( 'Buy Now', 'quiz-master-next' ) : __( 'Download', 'quiz-master-next' ) ; ?>
1125
  </a>
1126
  </div>
1127
  </div>
472
  $type = isset( $single_option['type'] ) ? $single_option['type'] : 'text';
473
  $show = isset( $single_option['show'] ) ? explode( ',', $single_option['show'] ) : array();
474
  $show_class = '';
475
+ if ( in_array( $key, array( 'correct_answer_info', 'comments', 'hint' ), true ) ) {
476
+ $show_class .= 'core-option ';
477
+ }
478
  if ( $show ) {
479
+ $show_class .= 'qsm_hide_for_other ';
480
  foreach ( $show as $show_value ) {
481
  $show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
482
  }
 
483
  }
484
  $tooltip = '';
485
  if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
1001
  <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
1002
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1003
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1004
+ <span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
1005
  <?php } ?>
1006
  <img alt="" src="<?php echo esc_url( $folder_slug . $theme_name . '/screenshot.png' ); ?>" />
1007
  <div class="downloaded-theme-button">
1084
  <div class="theme-wrapper theme market-theme">
1085
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1086
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1087
+ <span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
1088
  <?php } ?>
1089
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1090
  <div class="market-theme-url">
1092
  href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1093
  <a class="button" target="_blank" rel="noopener"
1094
  href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1095
+ <?php echo in_array( $theme_name, $pro_themes , true) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ) ; ?>
1096
  </a>
1097
  </div>
1098
  </div>
1118
  <div class="theme-wrapper theme market-theme">
1119
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1120
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1121
+ <span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
1122
  <?php } ?>
1123
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1124
  <div class="market-theme-url">
1125
  <a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1126
  <a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1127
+ <?php echo in_array( $theme_name, $pro_themes , true) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ) ; ?>
1128
  </a>
1129
  </div>
1130
  </div>
php/admin/options-page-questions-tab.php CHANGED
@@ -304,7 +304,7 @@ function qsm_options_questions_tab_content() {
304
  </div>
305
  <?php do_action('qsm_after_options'); ?>
306
  </div>
307
- <div class="qsm-question-misc-options">
308
  <?php
309
  $show_correct_answer_info = '';
310
  $show_autofill = '';
304
  </div>
305
  <?php do_action('qsm_after_options'); ?>
306
  </div>
307
+ <div class="qsm-question-misc-options advanced-content">
308
  <?php
309
  $show_correct_answer_info = '';
310
  $show_autofill = '';
php/classes/class-qmn-quiz-manager.php CHANGED
@@ -114,6 +114,7 @@ class QMNQuizManager {
114
  } elseif ( 'excel' === $value ) {
115
  $mimes[] = 'application/excel, application/vnd.ms-excel, application/x-excel, application/x-msexcel';
116
  $mimes[] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
 
117
  } elseif ( empty( $value ) ) {
118
  // don't add blank mime type
119
  } else {
@@ -661,7 +662,7 @@ class QMNQuizManager {
661
  }
662
  }
663
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
664
- $question_sql = implode( ', ', $question_ids );
665
 
666
  if ( 1 == $quiz_options->randomness_order || 2 == $quiz_options->randomness_order ) {
667
  if ( isset($_COOKIE[ 'question_ids_'.$quiz_id ]) ) {
@@ -669,7 +670,7 @@ class QMNQuizManager {
669
  }else {
670
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
671
  $question_ids = QMNPluginHelper::qsm_shuffle_assoc( $question_ids );
672
- $question_sql = implode( ', ', $question_ids );
673
  ?>
674
  <script>
675
  const d = new Date();
@@ -1308,7 +1309,7 @@ class QMNQuizManager {
1308
  $message_comments = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->message_comment, ENT_QUOTES ), "quiz_message_comment-{$qmn_quiz_options->quiz_id}" );
1309
  $message_comments = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_comments ), $qmn_array_for_variables );
1310
  ?>
1311
- <label for="mlwQuizComments" class="mlw_qmn_comment_section_text"><?php echo wp_kses_post( $message_comments ); ?></label><br />
1312
  <textarea cols="60" rows="10" id="mlwQuizComments" name="mlwQuizComments" class="qmn_comment_section"></textarea>
1313
  </div>
1314
  <?php
@@ -1747,13 +1748,13 @@ class QMNQuizManager {
1747
  public static function check_answers( $options, $quiz_data ) {
1748
 
1749
  global $mlwQuizMasterNext;
1750
-
1751
  // Load the pages and questions
1752
  $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
1753
  $questions = QSM_Questions::load_questions_by_pages( $options->quiz_id );
1754
  if ( ( 1 == $options->randomness_order || 2 == $options->randomness_order ) && isset($_COOKIE[ 'question_ids_'.$options->quiz_id ]) ) {
1755
  $question_sql = sanitize_text_field( wp_unslash( $_COOKIE[ 'question_ids_'.$options->quiz_id ] ) );
1756
- $question_array = explode(", ",$question_sql);
1757
  foreach ( $question_array as $key ) {
1758
  if ( isset( $questions[ $key ] ) ) {
1759
  $new_questions[ $key ] = $questions[ $key ];
114
  } elseif ( 'excel' === $value ) {
115
  $mimes[] = 'application/excel, application/vnd.ms-excel, application/x-excel, application/x-msexcel';
116
  $mimes[] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
117
+ $mimes[] = 'text/csv';
118
  } elseif ( empty( $value ) ) {
119
  // don't add blank mime type
120
  } else {
662
  }
663
  }
664
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
665
+ $question_sql = implode( ',', $question_ids );
666
 
667
  if ( 1 == $quiz_options->randomness_order || 2 == $quiz_options->randomness_order ) {
668
  if ( isset($_COOKIE[ 'question_ids_'.$quiz_id ]) ) {
670
  }else {
671
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
672
  $question_ids = QMNPluginHelper::qsm_shuffle_assoc( $question_ids );
673
+ $question_sql = implode( ',', $question_ids );
674
  ?>
675
  <script>
676
  const d = new Date();
1309
  $message_comments = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->message_comment, ENT_QUOTES ), "quiz_message_comment-{$qmn_quiz_options->quiz_id}" );
1310
  $message_comments = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_comments ), $qmn_array_for_variables );
1311
  ?>
1312
+ <label for="mlwQuizComments" class="mlw_qmn_comment_section_text"><?php echo do_shortcode( wp_kses_post( $message_comments ) ); ?></label><br />
1313
  <textarea cols="60" rows="10" id="mlwQuizComments" name="mlwQuizComments" class="qmn_comment_section"></textarea>
1314
  </div>
1315
  <?php
1748
  public static function check_answers( $options, $quiz_data ) {
1749
 
1750
  global $mlwQuizMasterNext;
1751
+ $new_questions = array();
1752
  // Load the pages and questions
1753
  $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
1754
  $questions = QSM_Questions::load_questions_by_pages( $options->quiz_id );
1755
  if ( ( 1 == $options->randomness_order || 2 == $options->randomness_order ) && isset($_COOKIE[ 'question_ids_'.$options->quiz_id ]) ) {
1756
  $question_sql = sanitize_text_field( wp_unslash( $_COOKIE[ 'question_ids_'.$options->quiz_id ] ) );
1757
+ $question_array = explode(",",$question_sql);
1758
  foreach ( $question_array as $key ) {
1759
  if ( isset( $questions[ $key ] ) ) {
1760
  $new_questions[ $key ] = $questions[ $key ];
php/question-types/qsm-question-title.php CHANGED
@@ -34,12 +34,12 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_
34
  $polar_extra_class .= ' qsm_remove_bold';
35
  }
36
  if ( ! empty( $question_title ) ) {
37
- $question_title = do_shortcode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question_title, ENT_QUOTES ), "question-description-{$question_id}", "QSM Questions" ) );
38
  }
39
  ?>
40
  <div class='mlw_qmn_question <?php echo esc_attr( $polar_extra_class ); ?>' >
41
  <?php do_action('qsm_before_question_title',$question, $question_type, $new_question_title, $question_id ); ?>
42
- <?php echo wp_kses_post( $question_title . $deselect_answer ); ?>
43
  </div>
44
  <?php
45
  }
34
  $polar_extra_class .= ' qsm_remove_bold';
35
  }
36
  if ( ! empty( $question_title ) ) {
37
+ $question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question_title, ENT_QUOTES ), "question-description-{$question_id}", "QSM Questions" );
38
  }
39
  ?>
40
  <div class='mlw_qmn_question <?php echo esc_attr( $polar_extra_class ); ?>' >
41
  <?php do_action('qsm_before_question_title',$question, $question_type, $new_question_title, $question_id ); ?>
42
+ <?php echo do_shortcode( wp_kses_post( $question_title . $deselect_answer ) ); ?>
43
  </div>
44
  <?php
45
  }
php/question-types/qsm-question-type-file-upload.php CHANGED
@@ -27,6 +27,7 @@ function qmn_file_upload_display( $id, $question, $answers ) {
27
  <input class="mlw_file_upload_hidden_value" type="hidden" name="question<?php echo esc_attr( $id ); ?>" value="" />
28
  <span style="display: none;" class='mlw-file-upload-error-msg'></span>
29
  <input class="mlw_file_upload_hidden_path" type="hidden" value="" />
 
30
  <?php
31
  echo apply_filters( 'qmn_file_upload_display_front', '', $id, $question, $answers );
32
  }
27
  <input class="mlw_file_upload_hidden_value" type="hidden" name="question<?php echo esc_attr( $id ); ?>" value="" />
28
  <span style="display: none;" class='mlw-file-upload-error-msg'></span>
29
  <input class="mlw_file_upload_hidden_path" type="hidden" value="" />
30
+ <input class="mlw_file_upload_media_id" type="hidden" value="" />
31
  <?php
32
  echo apply_filters( 'qmn_file_upload_display_front', '', $id, $question, $answers );
33
  }
php/question-types/qsm-question-type-multiple-choice-horizontal.php CHANGED
@@ -58,7 +58,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
58
  } else {
59
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
60
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
61
- echo wp_kses_post( do_shortcode( $answer_text ) );
62
  }
63
  ?>
64
  </label>
58
  } else {
59
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
60
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
61
+ echo do_shortcode( wp_kses_post( $answer_text ) );
62
  }
63
  ?>
64
  </label>
php/question-types/qsm-question-type-multiple-choice.php CHANGED
@@ -65,7 +65,7 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
65
  } else {
66
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
67
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
68
- echo wp_kses_post( do_shortcode( $answer_text ) );
69
  }
70
  ?>
71
  </label>
65
  } else {
66
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
67
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
68
+ echo do_shortcode( wp_kses_post( $answer_text ) );
69
  }
70
  ?>
71
  </label>
php/question-types/qsm-question-type-multiple-response-horizontal.php CHANGED
@@ -54,7 +54,7 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
54
  } else {
55
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
56
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
57
- echo wp_kses_post( do_shortcode( $answer_text ) );
58
  }
59
  ?>
60
  </label>
54
  } else {
55
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
56
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
57
+ echo do_shortcode( wp_kses_post( $answer_text ) );
58
  }
59
  ?>
60
  </label>
php/question-types/qsm-question-type-multiple-response.php CHANGED
@@ -57,7 +57,7 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
57
  } else {
58
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
59
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
60
- echo wp_kses_post( do_shortcode( $answer_text ) );
61
  }
62
  ?>
63
  </label>
57
  } else {
58
  $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
59
  $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
60
+ echo do_shortcode( wp_kses_post( $answer_text ) );
61
  }
62
  ?>
63
  </label>
php/question-types/qsm-question-type-opt-in.php CHANGED
@@ -26,9 +26,8 @@ function qmn_accept_display( $id, $question, $answers ) {
26
  <label class="qsm-input-label" for="mlwAcceptance">
27
  <span class="qmn_accept_text">
28
  <?php
29
- $question = do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) );
30
- $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question, "question-description-{$id}", 'QSM Questions' );
31
- echo wp_kses_post( $question );
32
  ?>
33
  </span>
34
  </label>
26
  <label class="qsm-input-label" for="mlwAcceptance">
27
  <span class="qmn_accept_text">
28
  <?php
29
+ $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question, ENT_QUOTES ), "question-description-{$id}", 'QSM Questions' );
30
+ echo do_shortcode( wp_kses_post( $question ) );
 
31
  ?>
32
  </span>
33
  </label>
php/question-types/qsm-question-type-text-or-html.php CHANGED
@@ -14,8 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  */
15
  function qmn_text_block_display( $id, $question, $answers ) {
16
  global $mlwQuizMasterNext;
17
- $question = do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) );
18
- $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question, "question-description-{$id}", "QSM Questions" );
19
  $question = apply_filters( 'qmn_text_block_display_front', $question, $id, $answers);
20
- echo wp_kses_post( $question );
21
  }
14
  */
15
  function qmn_text_block_display( $id, $question, $answers ) {
16
  global $mlwQuizMasterNext;
17
+ $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question, ENT_QUOTES ), "question-description-{$id}", "QSM Questions" );
 
18
  $question = apply_filters( 'qmn_text_block_display_front', $question, $id, $answers);
19
+ echo do_shortcode( wp_kses_post( $question ) );
20
  }
php/template-variables.php CHANGED
@@ -938,7 +938,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
938
  $question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer['question_title'], "Question-{$answer['id']}", "QSM Questions");
939
  $question_description = '';
940
  if ( ! empty( $answer[0] ) ) {
941
- $question_description = do_shortcode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[0], "question-description-{$answer['id']}", "QSM Questions" ) );
942
  }
943
  if ( isset( $answer['question_title'] ) && '' !== $answer['question_title'] ) {
944
  $add_br = '';
@@ -1194,7 +1194,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1194
  $question_max_point = ( isset( $questions[ $answer['id'] ] ) ? qsm_get_question_maximum_points( $questions[ $answer['id'] ] ) : 0 );
1195
  $mlw_question_answer_display = str_replace( '%QUESTION_MAX_POINTS%', $question_max_point, $mlw_question_answer_display );
1196
 
1197
- $mlw_question_answer_display = wp_kses_post( $mlw_question_answer_display );
1198
 
1199
  if ( $total_question_cnt == $qsm_question_cnt && false == $remove_border ) {
1200
  $extra_border_bottom_class = 'qsm-remove-border-bottom';
938
  $question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer['question_title'], "Question-{$answer['id']}", "QSM Questions");
939
  $question_description = '';
940
  if ( ! empty( $answer[0] ) ) {
941
+ $question_description = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[0], "question-description-{$answer['id']}", "QSM Questions" );
942
  }
943
  if ( isset( $answer['question_title'] ) && '' !== $answer['question_title'] ) {
944
  $add_br = '';
1194
  $question_max_point = ( isset( $questions[ $answer['id'] ] ) ? qsm_get_question_maximum_points( $questions[ $answer['id'] ] ) : 0 );
1195
  $mlw_question_answer_display = str_replace( '%QUESTION_MAX_POINTS%', $question_max_point, $mlw_question_answer_display );
1196
 
1197
+ $mlw_question_answer_display = do_shortcode( wp_kses_post( $mlw_question_answer_display ) );
1198
 
1199
  if ( $total_question_cnt == $qsm_question_cnt && false == $remove_border ) {
1200
  $extra_border_bottom_class = 'qsm-remove-border-bottom';
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: 6.0
6
  Requires PHP: 5.4
7
- Stable tag: 8.0.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -163,6 +163,11 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
163
  18. Database
164
 
165
  == Changelog ==
 
 
 
 
 
166
  = 8.0.1 (June 17, 2022) =
167
  * Hotfix: Fixed issues while using random questions with question limit
168
 
4
  Requires at least: 4.9
5
  Tested up to: 6.0
6
  Requires PHP: 5.4
7
+ Stable tag: 8.0.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
163
  18. Database
164
 
165
  == Changelog ==
166
+ = 8.0.2 (June 23, 2022) =
167
+ * Bug: Fixed scoring issue while using random questions
168
+ * Bug: Fixed issue with file question type validation settings
169
+ * Bug: Fixed issue with video player in rich text answer type
170
+
171
  = 8.0.1 (June 17, 2022) =
172
  * Hotfix: Fixed issues while using random questions with question limit
173