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

Version Description

(November 10, 2020) = * Bug: Fixed math formula not showing on result page. * Bug: Fixed incorrect results while using %POLL_RESULTS_X% template variable. * Bug: Fixed advanced timer not showing while questions per page option. * Bug: Fixed translation issue with string 'No Answer Provided'.

Download this release

Release Info

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

Code changes from version 7.1.6 to 7.1.7

js/qsm-quiz.js CHANGED
@@ -56,7 +56,7 @@ var QSMPageTimer;
56
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.mlw_next').on('click', function (event) {
57
  event.preventDefault();
58
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
59
- var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
60
  if ($('#quizForm' + quizID).closest('.qmn_quiz_container').find('.qmn_pagination > .current_page_hidden').val() == start_timer) {
61
  QSM.activateTimer(quizID);
62
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
@@ -79,9 +79,8 @@ var QSMPageTimer;
79
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.mlw_next').on('click', function (event) {
80
  event.preventDefault();
81
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
82
- var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
83
-
84
- if ($('#quizForm' + quizID).closest('.qmn_quiz_container').find('.qmn_pagination > .current_page_hidden').val() == start_timer) {
85
  QSM.activateTimer(quizID);
86
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
87
  }
@@ -730,7 +729,7 @@ function qmnValidation( element, quiz_form_id ) {
730
  }
731
  if( jQuery( this ).attr( 'class' ).indexOf( 'mlwRequiredRadio' ) > -1 ) {
732
  check_val = jQuery( this ).find( 'input:checked' ).val();
733
- if ( check_val == "No Answer Provided" ) {
734
  qmnDisplayError( empty_error, jQuery( this ), quiz_form_id );
735
  result = false;
736
  }
@@ -744,7 +743,7 @@ function qmnValidation( element, quiz_form_id ) {
744
  }
745
  if( jQuery( this ).attr( 'class' ).indexOf( 'qsmRequiredSelect' ) > -1 ) {
746
  check_val = jQuery( this ).val();
747
- if ( check_val == "No Answer Provided" ) {
748
  qmnDisplayError( empty_error, jQuery( this ), quiz_form_id );
749
  result = false;
750
  }
@@ -1301,6 +1300,7 @@ jQuery(function() {
1301
  e.preventDefault();
1302
  jQuery(this).parents('.quiz_section').find('input[type="radio"]').prop('checked', false);
1303
  jQuery(this).parents('.quiz_section').find('input[type="radio"][value="No Answer Provided"]').prop('checked', true);
 
1304
  });
1305
 
1306
  //Submit the form on popup click
56
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.mlw_next').on('click', function (event) {
57
  event.preventDefault();
58
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
59
+ var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
60
  if ($('#quizForm' + quizID).closest('.qmn_quiz_container').find('.qmn_pagination > .current_page_hidden').val() == start_timer) {
61
  QSM.activateTimer(quizID);
62
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
79
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.mlw_next').on('click', function (event) {
80
  event.preventDefault();
81
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
82
+ var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
83
+ if ($('#quizForm' + quizID).closest('.qmn_quiz_container').find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
 
84
  QSM.activateTimer(quizID);
85
  $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
86
  }
729
  }
730
  if( jQuery( this ).attr( 'class' ).indexOf( 'mlwRequiredRadio' ) > -1 ) {
731
  check_val = jQuery( this ).find( 'input:checked' ).val();
732
+ if ( check_val == "No Answer Provided" || check_val == "" ) {
733
  qmnDisplayError( empty_error, jQuery( this ), quiz_form_id );
734
  result = false;
735
  }
743
  }
744
  if( jQuery( this ).attr( 'class' ).indexOf( 'qsmRequiredSelect' ) > -1 ) {
745
  check_val = jQuery( this ).val();
746
+ if ( check_val == "No Answer Provided" || check_val == "" ) {
747
  qmnDisplayError( empty_error, jQuery( this ), quiz_form_id );
748
  result = false;
749
  }
1300
  e.preventDefault();
1301
  jQuery(this).parents('.quiz_section').find('input[type="radio"]').prop('checked', false);
1302
  jQuery(this).parents('.quiz_section').find('input[type="radio"][value="No Answer Provided"]').prop('checked', true);
1303
+ jQuery(this).parents('.quiz_section').find('input[type="radio"][value=""]').prop('checked', true);
1304
  });
1305
 
1306
  //Submit the form on popup click
lang/quiz-master-next.pot CHANGED
@@ -9,7 +9,7 @@ msgid ""
9
  msgstr ""
10
  "Project-Id-Version: PACKAGE VERSION\n"
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2020-10-22 11:51+0530\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -233,7 +233,7 @@ msgstr ""
233
  msgid "User ID"
234
  msgstr ""
235
 
236
- #: php/gdpr.php:178 php/admin/admin-results-page.php:330
237
  msgid "IP Address"
238
  msgstr ""
239
 
@@ -253,65 +253,65 @@ msgstr ""
253
  msgid "File Upload"
254
  msgstr ""
255
 
256
- #: php/question-types.php:208
257
  msgid "Date"
258
  msgstr ""
259
 
260
- #: php/question-types.php:280
261
  msgid "Horizontal Multiple Choice"
262
  msgstr ""
263
 
264
- #: php/question-types.php:390
265
  msgid "Drop Down"
266
  msgstr ""
267
 
268
- #: php/question-types.php:416
269
  msgid "Please select your answer"
270
  msgstr ""
271
 
272
- #: php/question-types.php:489
273
  msgid "Short Answer"
274
  msgstr ""
275
 
276
- #: php/question-types.php:567
277
  msgid "Multiple Response"
278
  msgstr ""
279
 
280
- #: php/question-types.php:674
281
  msgid "Paragraph"
282
  msgstr ""
283
 
284
- #: php/question-types.php:756
285
  msgid "Text/HTML Section"
286
  msgstr ""
287
 
288
- #: php/question-types.php:790
289
  msgid "Number"
290
  msgstr ""
291
 
292
- #: php/question-types.php:873
293
  msgid "Opt-in"
294
  msgstr ""
295
 
296
- #: php/question-types.php:918
297
  msgid "Captcha"
298
  msgstr ""
299
 
300
- #: php/question-types.php:977
301
  msgid "Horizontal Multiple Response"
302
  msgstr ""
303
 
304
- #: php/question-types.php:1096
305
  msgid ""
306
  "For fill in the blank types, use %BLANK% to represent where to put the text "
307
  "box in your text."
308
  msgstr ""
309
 
310
- #: php/question-types.php:1101
311
  msgid "Fill In The Blank"
312
  msgstr ""
313
 
314
- #: php/question-types.php:1192
315
  msgid "Polar"
316
  msgstr ""
317
 
@@ -322,7 +322,7 @@ msgid "User not logged in"
322
  msgstr ""
323
 
324
  #: php/rest-api.php:183 php/admin/admin-dashboard.php:381
325
- #: php/admin/admin-results-page.php:366
326
  msgid "Not Graded"
327
  msgstr ""
328
 
@@ -330,10 +330,14 @@ msgstr ""
330
  msgid "No quiz found"
331
  msgstr ""
332
 
333
- #: php/template-variables.php:879 php/template-variables.php:888
334
  msgid "No answer provided"
335
  msgstr ""
336
 
 
 
 
 
337
  #: php/admin/about-page.php:29
338
  msgid "Welcome To Quiz And Survey Master (Formerly Quiz Master Next)"
339
  msgstr ""
@@ -592,7 +596,7 @@ msgstr ""
592
 
593
  #: php/admin/admin-results-details-page.php:26
594
  #: php/admin/admin-results-page.php:21 php/admin/admin-results-page.php:26
595
- #: php/admin/admin-results-page.php:68
596
  msgid "Quiz Results"
597
  msgstr ""
598
 
@@ -652,96 +656,96 @@ msgstr ""
652
  msgid "seconds"
653
  msgstr ""
654
 
655
- #: php/admin/admin-results-page.php:106
656
  #: php/classes/class-qmn-quiz-creator.php:305
657
  msgid "Unknown error"
658
  msgstr ""
659
 
660
- #: php/admin/admin-results-page.php:108
661
  #, php-format
662
  msgid "There was an error when deleting this result. Error from WordPress: %s"
663
  msgstr ""
664
 
665
- #: php/admin/admin-results-page.php:111
666
  msgid "Your results has been deleted successfully."
667
  msgstr ""
668
 
669
- #: php/admin/admin-results-page.php:238
670
  #, php-format
671
  msgid "One result"
672
  msgid_plural "%s results"
673
  msgstr[0] ""
674
  msgstr[1] ""
675
 
676
- #: php/admin/admin-results-page.php:298 php/admin/admin-results-page.php:308
677
  msgid "Search Results"
678
  msgstr ""
679
 
680
- #: php/admin/admin-results-page.php:300
681
  msgid "Order By"
682
  msgstr ""
683
 
684
- #: php/admin/admin-results-page.php:302 php/admin/admin-results-page.php:321
685
  msgid "Quiz Name"
686
  msgstr ""
687
 
688
- #: php/admin/admin-results-page.php:303
689
  msgid "User Name"
690
  msgstr ""
691
 
692
- #: php/admin/admin-results-page.php:304 php/classes/class-qsm-install.php:78
693
  msgid "Points"
694
  msgstr ""
695
 
696
- #: php/admin/admin-results-page.php:305
697
  msgid "Correct Percent"
698
  msgstr ""
699
 
700
- #: php/admin/admin-results-page.php:306
701
  msgid "Default (Time)"
702
  msgstr ""
703
 
704
- #: php/admin/admin-results-page.php:322
705
  msgid "Score"
706
  msgstr ""
707
 
708
- #: php/admin/admin-results-page.php:323
709
  msgid "Time To Complete"
710
  msgstr ""
711
 
712
- #: php/admin/admin-results-page.php:324 php/admin/quiz-options-page.php:176
713
  msgid "Name"
714
  msgstr ""
715
 
716
- #: php/admin/admin-results-page.php:325
717
  msgid "Business"
718
  msgstr ""
719
 
720
- #: php/admin/admin-results-page.php:326
721
  msgid "Email"
722
  msgstr ""
723
 
724
- #: php/admin/admin-results-page.php:327
725
  msgid "Phone"
726
  msgstr ""
727
 
728
- #: php/admin/admin-results-page.php:328 php/admin/tools-page.php:185
729
  msgid "User"
730
  msgstr ""
731
 
732
- #: php/admin/admin-results-page.php:329
733
  msgid "Time Taken"
734
  msgstr ""
735
 
736
- #: php/admin/admin-results-page.php:395
737
  msgid "No record found."
738
  msgstr ""
739
 
740
- #: php/admin/admin-results-page.php:404
741
  msgid "Are you sure you want to delete these results?"
742
  msgstr ""
743
 
744
- #: php/admin/admin-results-page.php:409
745
  msgid "Delete Results"
746
  msgstr ""
747
 
@@ -2133,24 +2137,24 @@ msgstr ""
2133
 
2134
  #: php/classes/class-qmn-quiz-manager.php:559
2135
  #: php/classes/class-qmn-quiz-manager.php:783
2136
- #: php/classes/class-qmn-quiz-manager.php:949
2137
  msgid " out of "
2138
  msgstr ""
2139
 
2140
- #: php/classes/class-qmn-quiz-manager.php:1253
2141
  #: php/classes/class-qsm-install.php:533
2142
  msgid "Retake Quiz"
2143
  msgstr ""
2144
 
2145
- #: php/classes/class-qmn-quiz-manager.php:1420
2146
  msgid "Click here to view"
2147
  msgstr ""
2148
 
2149
- #: php/classes/class-qmn-quiz-manager.php:1885
2150
  msgid "Not collected"
2151
  msgstr ""
2152
 
2153
- #: php/classes/class-qmn-quiz-manager.php:1895
2154
  msgid "Unknown"
2155
  msgstr ""
2156
 
@@ -2184,11 +2188,11 @@ msgstr ""
2184
  msgid "There was an error when updating the settings. Please try again."
2185
  msgstr ""
2186
 
2187
- #: php/classes/class-qsm-fields.php:81 php/classes/class-qsm-fields.php:93
2188
  msgid "Save Changes"
2189
  msgstr ""
2190
 
2191
- #: php/classes/class-qsm-fields.php:209
2192
  msgid "Allowed Variables:"
2193
  msgstr ""
2194
 
9
  msgstr ""
10
  "Project-Id-Version: PACKAGE VERSION\n"
11
  "Report-Msgid-Bugs-To: \n"
12
+ "POT-Creation-Date: 2020-11-06 12:59+0530\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
233
  msgid "User ID"
234
  msgstr ""
235
 
236
+ #: php/gdpr.php:178 php/admin/admin-results-page.php:344
237
  msgid "IP Address"
238
  msgstr ""
239
 
253
  msgid "File Upload"
254
  msgstr ""
255
 
256
+ #: php/question-types.php:211
257
  msgid "Date"
258
  msgstr ""
259
 
260
+ #: php/question-types.php:283
261
  msgid "Horizontal Multiple Choice"
262
  msgstr ""
263
 
264
+ #: php/question-types.php:393
265
  msgid "Drop Down"
266
  msgstr ""
267
 
268
+ #: php/question-types.php:419
269
  msgid "Please select your answer"
270
  msgstr ""
271
 
272
+ #: php/question-types.php:492
273
  msgid "Short Answer"
274
  msgstr ""
275
 
276
+ #: php/question-types.php:570
277
  msgid "Multiple Response"
278
  msgstr ""
279
 
280
+ #: php/question-types.php:677
281
  msgid "Paragraph"
282
  msgstr ""
283
 
284
+ #: php/question-types.php:759
285
  msgid "Text/HTML Section"
286
  msgstr ""
287
 
288
+ #: php/question-types.php:793
289
  msgid "Number"
290
  msgstr ""
291
 
292
+ #: php/question-types.php:876
293
  msgid "Opt-in"
294
  msgstr ""
295
 
296
+ #: php/question-types.php:921
297
  msgid "Captcha"
298
  msgstr ""
299
 
300
+ #: php/question-types.php:980
301
  msgid "Horizontal Multiple Response"
302
  msgstr ""
303
 
304
+ #: php/question-types.php:1099
305
  msgid ""
306
  "For fill in the blank types, use %BLANK% to represent where to put the text "
307
  "box in your text."
308
  msgstr ""
309
 
310
+ #: php/question-types.php:1104
311
  msgid "Fill In The Blank"
312
  msgstr ""
313
 
314
+ #: php/question-types.php:1195
315
  msgid "Polar"
316
  msgstr ""
317
 
322
  msgstr ""
323
 
324
  #: php/rest-api.php:183 php/admin/admin-dashboard.php:381
325
+ #: php/admin/admin-results-page.php:386
326
  msgid "Not Graded"
327
  msgstr ""
328
 
330
  msgid "No quiz found"
331
  msgstr ""
332
 
333
+ #: php/template-variables.php:890 php/template-variables.php:899
334
  msgid "No answer provided"
335
  msgstr ""
336
 
337
+ #: php/template-variables.php:997
338
+ msgid "No Answer Provided"
339
+ msgstr ""
340
+
341
  #: php/admin/about-page.php:29
342
  msgid "Welcome To Quiz And Survey Master (Formerly Quiz Master Next)"
343
  msgstr ""
596
 
597
  #: php/admin/admin-results-details-page.php:26
598
  #: php/admin/admin-results-page.php:21 php/admin/admin-results-page.php:26
599
+ #: php/admin/admin-results-page.php:69
600
  msgid "Quiz Results"
601
  msgstr ""
602
 
656
  msgid "seconds"
657
  msgstr ""
658
 
659
+ #: php/admin/admin-results-page.php:108
660
  #: php/classes/class-qmn-quiz-creator.php:305
661
  msgid "Unknown error"
662
  msgstr ""
663
 
664
+ #: php/admin/admin-results-page.php:110
665
  #, php-format
666
  msgid "There was an error when deleting this result. Error from WordPress: %s"
667
  msgstr ""
668
 
669
+ #: php/admin/admin-results-page.php:113
670
  msgid "Your results has been deleted successfully."
671
  msgstr ""
672
 
673
+ #: php/admin/admin-results-page.php:245
674
  #, php-format
675
  msgid "One result"
676
  msgid_plural "%s results"
677
  msgstr[0] ""
678
  msgstr[1] ""
679
 
680
+ #: php/admin/admin-results-page.php:310 php/admin/admin-results-page.php:320
681
  msgid "Search Results"
682
  msgstr ""
683
 
684
+ #: php/admin/admin-results-page.php:312
685
  msgid "Order By"
686
  msgstr ""
687
 
688
+ #: php/admin/admin-results-page.php:314 php/admin/admin-results-page.php:333
689
  msgid "Quiz Name"
690
  msgstr ""
691
 
692
+ #: php/admin/admin-results-page.php:315
693
  msgid "User Name"
694
  msgstr ""
695
 
696
+ #: php/admin/admin-results-page.php:316 php/classes/class-qsm-install.php:78
697
  msgid "Points"
698
  msgstr ""
699
 
700
+ #: php/admin/admin-results-page.php:317
701
  msgid "Correct Percent"
702
  msgstr ""
703
 
704
+ #: php/admin/admin-results-page.php:318
705
  msgid "Default (Time)"
706
  msgstr ""
707
 
708
+ #: php/admin/admin-results-page.php:336
709
  msgid "Score"
710
  msgstr ""
711
 
712
+ #: php/admin/admin-results-page.php:337
713
  msgid "Time To Complete"
714
  msgstr ""
715
 
716
+ #: php/admin/admin-results-page.php:338 php/admin/quiz-options-page.php:176
717
  msgid "Name"
718
  msgstr ""
719
 
720
+ #: php/admin/admin-results-page.php:339
721
  msgid "Business"
722
  msgstr ""
723
 
724
+ #: php/admin/admin-results-page.php:340
725
  msgid "Email"
726
  msgstr ""
727
 
728
+ #: php/admin/admin-results-page.php:341
729
  msgid "Phone"
730
  msgstr ""
731
 
732
+ #: php/admin/admin-results-page.php:342 php/admin/tools-page.php:185
733
  msgid "User"
734
  msgstr ""
735
 
736
+ #: php/admin/admin-results-page.php:343
737
  msgid "Time Taken"
738
  msgstr ""
739
 
740
+ #: php/admin/admin-results-page.php:417
741
  msgid "No record found."
742
  msgstr ""
743
 
744
+ #: php/admin/admin-results-page.php:426
745
  msgid "Are you sure you want to delete these results?"
746
  msgstr ""
747
 
748
+ #: php/admin/admin-results-page.php:432
749
  msgid "Delete Results"
750
  msgstr ""
751
 
2137
 
2138
  #: php/classes/class-qmn-quiz-manager.php:559
2139
  #: php/classes/class-qmn-quiz-manager.php:783
2140
+ #: php/classes/class-qmn-quiz-manager.php:955
2141
  msgid " out of "
2142
  msgstr ""
2143
 
2144
+ #: php/classes/class-qmn-quiz-manager.php:1272
2145
  #: php/classes/class-qsm-install.php:533
2146
  msgid "Retake Quiz"
2147
  msgstr ""
2148
 
2149
+ #: php/classes/class-qmn-quiz-manager.php:1439
2150
  msgid "Click here to view"
2151
  msgstr ""
2152
 
2153
+ #: php/classes/class-qmn-quiz-manager.php:1904
2154
  msgid "Not collected"
2155
  msgstr ""
2156
 
2157
+ #: php/classes/class-qmn-quiz-manager.php:1914
2158
  msgid "Unknown"
2159
  msgstr ""
2160
 
2188
  msgid "There was an error when updating the settings. Please try again."
2189
  msgstr ""
2190
 
2191
+ #: php/classes/class-qsm-fields.php:81 php/classes/class-qsm-fields.php:109
2192
  msgid "Save Changes"
2193
  msgstr ""
2194
 
2195
+ #: php/classes/class-qsm-fields.php:225
2196
  msgid "Allowed Variables:"
2197
  msgstr ""
2198
 
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
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.6
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.6';
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.7
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.7
13
  * @package QSM
14
  */
15
 
37
  * @var string
38
  * @since 4.0.0
39
  */
40
+ public $version = '7.1.7';
41
 
42
  /**
43
  * QSM Alert Manager Object
php/admin/options-page-email-tab.php CHANGED
@@ -111,6 +111,7 @@ function qsm_options_emails_tab_content() {
111
  <?php do_action( 'qsm_email_condition_operator' ); ?>
112
  </select>
113
  <input type="text" class="email-condition-value" value="{{ data.value }}">
 
114
  </div>
115
  </script>
116
 
111
  <?php do_action( 'qsm_email_condition_operator' ); ?>
112
  </select>
113
  <input type="text" class="email-condition-value" value="{{ data.value }}">
114
+ <?php do_action('qsm_email_condition_value'); ?>
115
  </div>
116
  </script>
117
 
php/classes/class-qmn-quiz-manager.php CHANGED
@@ -1553,7 +1553,7 @@ class QMNQuizManager {
1553
  if( trim( $user_answer ) != '' ){
1554
  if( $user_answer != 'No Answer Provided' ){
1555
  $attempted_question++;
1556
- }
1557
  }
1558
  // If a comment was submitted
1559
  if (isset($_POST["mlwComment" . $question['question_id']])) {
1553
  if( trim( $user_answer ) != '' ){
1554
  if( $user_answer != 'No Answer Provided' ){
1555
  $attempted_question++;
1556
+ }
1557
  }
1558
  // If a comment was submitted
1559
  if (isset($_POST["mlwComment" . $question['question_id']])) {
php/question-types.php CHANGED
@@ -124,11 +124,11 @@ function qmn_multiple_choice_display($id, $question, $answers)
124
  }else{
125
  $question_display .= "<div class='qmn_mc_answer_wrap' id='question".$id."-".str_replace(" ","-",esc_attr($answer[0]))."'>";
126
  }
127
- $question_display .= "<input type='radio' class='qmn_quiz_radio' name='question".$id."' id='question".$id."_".$mlw_answer_total."' value='". trim( htmlspecialchars_decode($answer[0], ENT_QUOTES) ) ."' /> <label for='question".$id."_".$mlw_answer_total."'>". trim( htmlspecialchars_decode($answer[0], ENT_QUOTES) ) ."</label>";
128
  $question_display .= "</div>";
129
  }
130
  }
131
- $question_display .= "<input type='radio' style='display: none;' name='question".$id."' id='question".$id."_none' checked='checked' value='No Answer Provided' />";
132
  }
133
  $question_display .= "</div>";
134
  return apply_filters('qmn_multiple_choice_display_front',$question_display,$id, $question, $answers);
@@ -179,9 +179,12 @@ function qmn_multiple_choice_review($id, $question, $answers)
179
  $mlw_user_answer = '';
180
  if ( isset( $_POST["question".$id] ) ) {
181
  $mlw_user_answer = $_POST["question".$id];
182
- $mlw_user_answer = trim( stripslashes( htmlspecialchars_decode($mlw_user_answer, ENT_QUOTES) ) );
183
- }
184
- if ( $mlw_user_answer == trim( stripslashes( htmlspecialchars_decode($answer[0], ENT_QUOTES) ) ) ){
 
 
 
185
  $return_array["points"] = $answer[1];
186
  $return_array["user_text"] = $answer[0];
187
  if ($answer[2] == 1){
@@ -191,7 +194,7 @@ function qmn_multiple_choice_review($id, $question, $answers)
191
  if ($answer[2] == 1){
192
  $return_array["correct_text"] = htmlspecialchars_decode($answer[0], ENT_QUOTES);
193
  }
194
- }
195
  }
196
  return $return_array;
197
  }
@@ -310,7 +313,7 @@ function qmn_horizontal_multiple_choice_display($id, $question, $answers)
310
  $question_display .= "<span class='mlw_horizontal_choice'><input type='radio' class='qmn_quiz_radio' name='question".$id."' id='question".$id."_".$mlw_answer_total."' value='".esc_attr($answer[0])."' /><label for='question".$id."_".$mlw_answer_total."'>".htmlspecialchars_decode($answer[0], ENT_QUOTES)."</label></span>";
311
  }
312
  }
313
- $question_display .= "<input type='radio' style='display: none;' name='question".$id."' id='question".$id."_none' checked='checked' value='No Answer Provided' />";
314
  }
315
  $question_display .= "</div>";
316
 
@@ -413,7 +416,7 @@ function qmn_drop_down_display($id, $question, $answers)
413
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting($id, 'question_title');
414
  $question_display .= qsm_question_title_func($question, '', $new_question_title);
415
  $question_display .= "<select class='qsm_select $require_class' name='question".$id."'>";
416
- $question_display .= "<option value='No Answer Provided'>" . __('Please select your answer','quiz-master-next') . "</option>";
417
  if (is_array($answers))
418
  {
419
  $mlw_answer_total = 0;
124
  }else{
125
  $question_display .= "<div class='qmn_mc_answer_wrap' id='question".$id."-".str_replace(" ","-",esc_attr($answer[0]))."'>";
126
  }
127
+ $question_display .= "<input type='radio' class='qmn_quiz_radio' name='question".$id."' id='question".$id."_".$mlw_answer_total."' value='". $answer[0] ."' /> <label for='question".$id."_".$mlw_answer_total."'>". trim( htmlspecialchars_decode($answer[0], ENT_QUOTES) ) ."</label>";
128
  $question_display .= "</div>";
129
  }
130
  }
131
+ $question_display .= "<input type='radio' style='display: none;' name='question".$id."' id='question".$id."_none' checked='checked' value='' />";
132
  }
133
  $question_display .= "</div>";
134
  return apply_filters('qmn_multiple_choice_display_front',$question_display,$id, $question, $answers);
179
  $mlw_user_answer = '';
180
  if ( isset( $_POST["question".$id] ) ) {
181
  $mlw_user_answer = $_POST["question".$id];
182
+ $mlw_user_answer = trim( htmlspecialchars_decode($mlw_user_answer, ENT_QUOTES) );
183
+ $mlw_user_answer = str_replace('\\', "", $mlw_user_answer);
184
+ }
185
+ $single_answer = trim( htmlspecialchars_decode($answer[0], ENT_QUOTES) );
186
+ $single_answer = str_replace('\\', "", $single_answer);
187
+ if ( $mlw_user_answer == $single_answer ){
188
  $return_array["points"] = $answer[1];
189
  $return_array["user_text"] = $answer[0];
190
  if ($answer[2] == 1){
194
  if ($answer[2] == 1){
195
  $return_array["correct_text"] = htmlspecialchars_decode($answer[0], ENT_QUOTES);
196
  }
197
+ }
198
  }
199
  return $return_array;
200
  }
313
  $question_display .= "<span class='mlw_horizontal_choice'><input type='radio' class='qmn_quiz_radio' name='question".$id."' id='question".$id."_".$mlw_answer_total."' value='".esc_attr($answer[0])."' /><label for='question".$id."_".$mlw_answer_total."'>".htmlspecialchars_decode($answer[0], ENT_QUOTES)."</label></span>";
314
  }
315
  }
316
+ $question_display .= "<input type='radio' style='display: none;' name='question".$id."' id='question".$id."_none' checked='checked' value='' />";
317
  }
318
  $question_display .= "</div>";
319
 
416
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting($id, 'question_title');
417
  $question_display .= qsm_question_title_func($question, '', $new_question_title);
418
  $question_display .= "<select class='qsm_select $require_class' name='question".$id."'>";
419
+ $question_display .= "<option value=''>" . __('Please select your answer','quiz-master-next') . "</option>";
420
  if (is_array($answers))
421
  {
422
  $mlw_answer_total = 0;
php/template-variables.php CHANGED
@@ -210,12 +210,14 @@ function mlw_qmn_get_string_between($string, $start, $end){
210
  }
211
 
212
  function qsm_find_key_from_array($search_value,$array){
213
- if($array){
214
- foreach ($array as $key => $value) {
215
- if($value[0] == $search_value){
 
 
216
  return true;
217
  }
218
- }
219
  }
220
  return false;
221
  }
@@ -810,7 +812,7 @@ add_filter( 'wp_kses_allowed_html', 'qsm_custom_wpkses_post_tags', 10, 2 );
810
  * @param int $total_question_cnt
811
  * @return string
812
  */
813
- function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt) {
814
  global $mlwQuizMasterNext;
815
  if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'qsm_quiz_result_details') {
816
  $user_answer_class = "";
@@ -847,10 +849,10 @@ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_
847
  if ($disable_description_on_result == 1) {
848
  $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . htmlspecialchars_decode($answer['question_title'], ENT_QUOTES) . '</b>', $mlw_question_answer_display);
849
  } else {
850
- $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . htmlspecialchars_decode($answer['question_title'], ENT_QUOTES) . '</b>' . $add_br . stripslashes( htmlspecialchars_decode($answer[0], ENT_QUOTES) ), $mlw_question_answer_display);
851
  }
852
  } else {
853
- $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . stripslashes( htmlspecialchars_decode($answer[0], ENT_QUOTES) ) . '</b>', $mlw_question_answer_display);
854
  }
855
  $mlw_question_answer_display = qsm_question_title_func($mlw_question_answer_display);
856
  $extra_border_bottom_class = '';
@@ -932,13 +934,14 @@ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_
932
  $question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
933
  }
934
  }
935
- } else {
936
  foreach ($total_answers as $single_answer) {
937
- if (isset($single_answer[2]) && $single_answer[2] == 1 && htmlspecialchars_decode($answer[1], ENT_QUOTES) == $single_answer[0] ) {
 
938
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
939
  } else if (isset($single_answer[2]) && $single_answer[2] == 1) {
940
  $question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
941
- } else if (htmlspecialchars_decode($answer[1], ENT_QUOTES) == $single_answer[0] && $single_answer[2] !== 1) {
942
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
943
  } else {
944
  $question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
@@ -989,7 +992,11 @@ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_
989
  $mlw_question_answer_display = str_replace("%USER_ANSWER%", "<span class='$user_answer_class'>" . trim(htmlspecialchars_decode($answer[1], ENT_QUOTES)) . '</span>', $mlw_question_answer_display);
990
  }
991
  } else {
992
- $mlw_question_answer_display = str_replace("%USER_ANSWER%", "<span class='$user_answer_class'>" . htmlspecialchars_decode($answer[1], ENT_QUOTES) . '</span>', $mlw_question_answer_display);
 
 
 
 
993
  }
994
  $answer_2 = !empty($answer[2]) ? $answer[2] : 'NA';
995
  $mlw_question_answer_display = str_replace("%CORRECT_ANSWER%", htmlspecialchars_decode($answer_2, ENT_QUOTES), $mlw_question_answer_display);
210
  }
211
 
212
  function qsm_find_key_from_array($search_value,$array){
213
+ if($array){
214
+ $search_value = htmlspecialchars_decode( $search_value, ENT_QUOTES );
215
+ foreach ($array as $key => $value) {
216
+ $value_val = $value[0];
217
+ if( $value_val == $search_value ){
218
  return true;
219
  }
220
+ }
221
  }
222
  return false;
223
  }
812
  * @param int $total_question_cnt
813
  * @return string
814
  */
815
+ function qsm_questions_answers_shortcode_to_text($mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt) {
816
  global $mlwQuizMasterNext;
817
  if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'qsm_quiz_result_details') {
818
  $user_answer_class = "";
849
  if ($disable_description_on_result == 1) {
850
  $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . htmlspecialchars_decode($answer['question_title'], ENT_QUOTES) . '</b>', $mlw_question_answer_display);
851
  } else {
852
+ $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . htmlspecialchars_decode($answer['question_title'], ENT_QUOTES) . '</b>' . $add_br . htmlspecialchars_decode($answer[0], ENT_QUOTES), $mlw_question_answer_display);
853
  }
854
  } else {
855
+ $mlw_question_answer_display = str_replace("%QUESTION%", '<b>' . htmlspecialchars_decode($answer[0], ENT_QUOTES) . '</b>', $mlw_question_answer_display);
856
  }
857
  $mlw_question_answer_display = qsm_question_title_func($mlw_question_answer_display);
858
  $extra_border_bottom_class = '';
934
  $question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
935
  }
936
  }
937
+ } else {
938
  foreach ($total_answers as $single_answer) {
939
+ $single_answer_option = htmlspecialchars_decode($single_answer[0], ENT_QUOTES);
940
+ if (isset($single_answer[2]) && $single_answer[2] == 1 && htmlspecialchars_decode($answer[1], ENT_QUOTES) == $single_answer_option ) {
941
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
942
  } else if (isset($single_answer[2]) && $single_answer[2] == 1) {
943
  $question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
944
+ } else if (htmlspecialchars_decode($answer[1], ENT_QUOTES) == $single_answer_option && $single_answer[2] !== 1) {
945
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
946
  } else {
947
  $question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode($single_answer[0], ENT_QUOTES) . '</span>';
992
  $mlw_question_answer_display = str_replace("%USER_ANSWER%", "<span class='$user_answer_class'>" . trim(htmlspecialchars_decode($answer[1], ENT_QUOTES)) . '</span>', $mlw_question_answer_display);
993
  }
994
  } else {
995
+ $user_answer_new = $answer[1];
996
+ if( ( $answer['question_type'] == 0 || $answer['question_type'] == 1 || $answer['question_type'] == 2 ) && $answer[1] == '' ){
997
+ $user_answer_new = __('No Answer Provided', 'quiz-master-next');
998
+ }
999
+ $mlw_question_answer_display = str_replace("%USER_ANSWER%", "<span class='$user_answer_class'>" . htmlspecialchars_decode($user_answer_new, ENT_QUOTES) . '</span>', $mlw_question_answer_display);
1000
  }
1001
  $answer_2 = !empty($answer[2]) ? $answer[2] : 'NA';
1002
  $mlw_question_answer_display = str_replace("%CORRECT_ANSWER%", htmlspecialchars_decode($answer_2, ENT_QUOTES), $mlw_question_answer_display);
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: quizsurvey,expresstech
3
  Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress quiz plugin
4
  Requires at least: 4.9
5
- Tested up to: 5.5.1
6
  Requires PHP: 5.4
7
- Stable tag: 7.1.6
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -135,6 +135,12 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
135
 
136
  == Changelog ==
137
 
 
 
 
 
 
 
138
  = 7.1.6 (October 29, 2020) =
139
  * Bug: Fixed division by zero error while limiting number of questions.
140
  * Bug: Fixed inclusion of file upload question type in calculation of average point and average category point.
2
  Contributors: quizsurvey,expresstech
3
  Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress quiz plugin
4
  Requires at least: 4.9
5
+ Tested up to: 5.5.3
6
  Requires PHP: 5.4
7
+ Stable tag: 7.1.7
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
135
 
136
  == Changelog ==
137
 
138
+ = 7.1.7 (November 10, 2020) =
139
+ * Bug: Fixed math formula not showing on result page.
140
+ * Bug: Fixed incorrect results while using %POLL_RESULTS_X% template variable.
141
+ * Bug: Fixed advanced timer not showing while questions per page option.
142
+ * Bug: Fixed translation issue with string 'No Answer Provided'.
143
+
144
  = 7.1.6 (October 29, 2020) =
145
  * Bug: Fixed division by zero error while limiting number of questions.
146
  * Bug: Fixed inclusion of file upload question type in calculation of average point and average category point.