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

Version Description

(July 26, 2022) = * Feature: Added option to enable/disable case sensitive answer for fill-in blank question * Feature: Added option to enable/disable MathJax * Feature: Added option to enable/disable emails notifications * Feature: Added option to set images size for image type answers * Feature: Added %ANSWER_X% variables to show user's answer to a specific question * Feature: Added translation support for all Javascript string messages * Feature: Added image answer support for polar question type * Bug: Fixed display issue with leaderboard customization block * Bug: Fixed issue with questions count in quiz list page * Bug: Fixed issue with %QUESTION_ANSWER_X% variables * Bug: Fixed issue while deleting/duplicating old quizzes * Bug: Fixed issue with timer while using pagination * Enhancement: Improved UI for image type answers options

Download this release

Release Info

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

Code changes from version 8.0.2 to 8.0.3

Files changed (51) hide show
  1. css/admin-dashboard.css +1 -27
  2. css/common.css +80 -52
  3. css/qsm-admin-question.css +4 -1
  4. css/qsm-admin.css +17 -0
  5. js/qsm-admin.js +2264 -2146
  6. js/qsm-common.js +0 -14
  7. js/qsm-quiz.js +146 -129
  8. lang/quiz-master-next.pot +2236 -1172
  9. mlw_quizmaster2.php +74 -8
  10. php/admin/about-page.php +2 -5
  11. php/admin/addons-page.php +2 -4
  12. php/admin/admin-dashboard.php +42 -57
  13. php/admin/admin-results-details-page.php +5 -0
  14. php/admin/functions.php +57 -34
  15. php/admin/options-page-contact-tab.php +1 -0
  16. php/admin/options-page-email-tab.php +8 -1
  17. php/admin/options-page-questions-tab.php +45 -17
  18. php/admin/options-page-style-tab.php +21 -5
  19. php/admin/quiz-options-page.php +9 -9
  20. php/admin/quizzes-page.php +7 -10
  21. php/admin/settings-page.php +30 -9
  22. php/classes/class-qmn-background-process.php +2 -2
  23. php/classes/class-qmn-plugin-helper.php +30 -17
  24. php/classes/class-qmn-quiz-creator.php +3 -8
  25. php/classes/class-qmn-quiz-manager.php +57 -40
  26. php/classes/class-qsm-contact-manager.php +21 -18
  27. php/classes/class-qsm-emails.php +8 -36
  28. php/classes/class-qsm-fields.php +11 -5
  29. php/classes/class-qsm-install.php +73 -9
  30. php/classes/class-qsm-migrate.php +63 -0
  31. php/classes/class-qsm-results-pages.php +8 -5
  32. php/classes/class-qsm-settings.php +6 -5
  33. php/classes/class-qsm-tracking.php +1 -1
  34. php/classes/question-types/class-question-review-fill-in-blanks.php +28 -16
  35. php/question-types/qsm-question-title.php +1 -1
  36. php/question-types/qsm-question-type-fill-in-the-blanks.php +3 -0
  37. php/question-types/qsm-question-type-multiple-choice-horizontal.php +10 -1
  38. php/question-types/qsm-question-type-multiple-choice.php +10 -1
  39. php/question-types/qsm-question-type-multiple-response-horizontal.php +10 -1
  40. php/question-types/qsm-question-type-multiple-response.php +10 -1
  41. php/question-types/qsm-question-type-polar.php +50 -5
  42. php/rest-api.php +6 -0
  43. php/template-variables.php +159 -43
  44. php/template-variables/qsm-tempvar-question-answers.php +8 -1
  45. readme.txt +16 -1
  46. templates/qmn_amethyst.css +24 -6
  47. templates/qmn_base.css +25 -6
  48. templates/qmn_emerald.css +24 -6
  49. templates/qmn_gray.css +24 -6
  50. templates/qmn_primary.css +24 -25
  51. templates/qmn_turquoise.css +24 -6
css/admin-dashboard.css CHANGED
@@ -276,13 +276,6 @@ ul.popuar-addon-ul::after {
276
  box-sizing: border-box;
277
  }
278
 
279
- #model-wizard .qsm-popup__content .quiz_name {
280
- width: 100%;
281
- padding: 5px 10px 5px 10px;
282
- border-radius: 0;
283
- border: 1px solid #dfd4d4;
284
- }
285
-
286
  #model-wizard .qsm-popup__content .quiz_name.qsm-required {
287
  border-color: #ff0000;
288
  outline: none !important;
@@ -440,13 +433,6 @@ ul.popuar-addon-ul::after {
440
  float: left;
441
  }
442
 
443
- #model-wizard #quiz_settings .input-group:nth-child(5),
444
- #model-wizard #quiz_settings .input-group:nth-child(6),
445
- #model-wizard #quiz_settings .input-group:nth-child(8),
446
- #model-wizard #quiz_settings .input-group:nth-child(10) {
447
- display: none;
448
- }
449
-
450
  #new-quiz-form {
451
  display: inline-block;
452
  width: 100%;
@@ -600,18 +586,6 @@ ul.popuar-addon-ul::after {
600
  opacity: 0.1;
601
  }
602
 
603
- .qsm-badge {
604
- background: linear-gradient(225deg, #344ad6, #42d96b);
605
- z-index: 9999;
606
- position: absolute;
607
- color: #fff;
608
- right: 5px;
609
- top: 5px;
610
- border-radius: 10px;
611
- padding: 0 10px;
612
- text-transform: uppercase;
613
- }
614
-
615
  #accordion .ui-accordion-header-icon {
616
  position: absolute;
617
  right: 24px;
@@ -848,12 +822,12 @@ h2.hndle.ui-sortable-handle {
848
  }
849
 
850
  #model-wizard .qsm-new-menu-elements input[type="text"],
 
851
  #model-wizard .qsm-new-menu-elements select {
852
  width: 60%;
853
  max-width: 100%;
854
  height: 35px;
855
  border: solid 1px #dddddd;
856
- box-shadow: 0px 0px 5px rgba(10, 10, 10, 0.3);
857
  border-radius: 0;
858
  }
859
 
276
  box-sizing: border-box;
277
  }
278
 
 
 
 
 
 
 
 
279
  #model-wizard .qsm-popup__content .quiz_name.qsm-required {
280
  border-color: #ff0000;
281
  outline: none !important;
433
  float: left;
434
  }
435
 
 
 
 
 
 
 
 
436
  #new-quiz-form {
437
  display: inline-block;
438
  width: 100%;
586
  opacity: 0.1;
587
  }
588
 
 
 
 
 
 
 
 
 
 
 
 
 
589
  #accordion .ui-accordion-header-icon {
590
  position: absolute;
591
  right: 24px;
822
  }
823
 
824
  #model-wizard .qsm-new-menu-elements input[type="text"],
825
+ #model-wizard .qsm-new-menu-elements input[type="number"],
826
  #model-wizard .qsm-new-menu-elements select {
827
  width: 60%;
828
  max-width: 100%;
829
  height: 35px;
830
  border: solid 1px #dddddd;
 
831
  border-radius: 0;
832
  }
833
 
css/common.css CHANGED
@@ -13,9 +13,6 @@
13
  .MJXc-display{
14
  display: inline-block !important;
15
  }
16
- body .quiz_section .mlw_qmn_question{
17
- display: inline-block;
18
- }
19
 
20
  body .quiz_section .qsm_contact_div .mlw_qmn_question{
21
  display: block;
@@ -31,36 +28,39 @@ body .quiz_section .qsm_contact_div .mlw_qmn_question{
31
  line-height: 20px;
32
  }
33
 
34
- .question-type-polar-s{
35
- display: inline-block !important;
36
- position: relative;
 
 
37
  width: 100%;
 
 
 
 
 
 
 
38
  }
 
39
  .question-type-polar-s br{
40
  display: none;
41
  }
42
  .question-type-polar-s .left-polar-title{
43
- width: 25%;
44
- position: absolute;
45
- left: 0;
46
- top: 50%;
47
- transform: translateY(-50%);
48
- line-height: normal;
49
  }
50
  .question-type-polar-s .slider-main-wrapper{
51
- width: 45%;
52
- position: absolute;
53
- left: 50%;
54
- top: 50%;
55
- transform: translate(-50%,-50%);
56
  }
57
  .question-type-polar-s .right-polar-title{
58
- width: 25%;
59
- position: absolute;
60
- right: 0;
61
- top: 50%;
62
- transform: translateY(-50%);
63
- line-height: normal;
64
  }
65
  .question-type-polar-s .ui-widget-content{
66
  background: #A5A5A5;
@@ -133,9 +133,18 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
133
  background-color: #808080 !important;
134
  opacity: 0.9;
135
  }
136
- .qsm-quiz-container .qsm-contact-type-checkbox input{
137
- display: inline-block;
 
 
138
  }
 
 
 
 
 
 
 
139
  .mlw_qmn_question_number{
140
  font-weight: bold;
141
  }
@@ -301,14 +310,7 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
301
  .question-type-polar-s .slider-main-wrapper,
302
  .question-type-polar-s .right-polar-title{
303
  width: 100%;
304
- position: relative;
305
- top: auto;
306
- left: auto;
307
- right: auto;
308
- bottom: auto;
309
- transform: none;
310
  margin-bottom: 30px;
311
- float: left;
312
  }
313
  .question-type-polar-s{
314
  height: auto !important;
@@ -318,34 +320,60 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
318
  body .quiz_section .qmn_accept_answers label{
319
  font-size: 14px !important;
320
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  }
322
  .qsm_tooltip {
323
- position: relative;
324
- display: inline-block;
 
325
  }
326
 
327
  .qsm_tooltip .qsm_tooltiptext{
328
- visibility: hidden;
329
- width: 120px;
330
- background-color: black;
331
- color: #fff;
332
- text-align: center;
333
- border-radius: 6px;
334
- padding: 5px 0;
335
 
336
- /* Position the tooltip */
337
- position: absolute;
338
- z-index: 1;
339
- bottom: 100%;
340
- left: 50%;
341
- margin-left: -60px;
342
  }
343
  .qsm_tooltip .qsm_tooltiptext a{
344
- background-color: black !important;
345
- color: #fff!important;
346
  }
347
  .qsm_tooltip:hover .qsm_tooltiptext {
348
- visibility: visible;
 
 
 
 
 
 
 
 
 
 
 
349
  }
350
  .qsm_quiz_processing_box {
351
  display: inline-block;
@@ -358,5 +386,5 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
358
  margin: 10px 0;
359
  }
360
  .qsm-text-correct-option.not-opted {
361
- color: #6f7479;
362
- }
13
  .MJXc-display{
14
  display: inline-block !important;
15
  }
 
 
 
16
 
17
  body .quiz_section .qsm_contact_div .mlw_qmn_question{
18
  display: block;
28
  line-height: 20px;
29
  }
30
 
31
+ div .quiz_section .question-type-polar-s,
32
+ .qsm_questions_answers_section .mlw_qmn_question .question-type-polar-s,
33
+ .qsm-quiz-container .mlw_qmn_question .question-type-polar-s{
34
+ display: inline-flex;
35
+ flex-wrap: wrap;
36
  width: 100%;
37
+ align-content: space-between;
38
+ align-items: center;
39
+ }
40
+
41
+ .question-type-polar-s img {
42
+ max-width: 100%;
43
+ object-fit: cover;
44
  }
45
+
46
  .question-type-polar-s br{
47
  display: none;
48
  }
49
  .question-type-polar-s .left-polar-title{
50
+ width: auto;
51
+ max-width: 25%;
 
 
 
 
52
  }
53
  .question-type-polar-s .slider-main-wrapper{
54
+ width: calc(50% - 20px);
55
+ padding-left: 10px;
56
+ padding-right: 10px;
 
 
57
  }
58
  .question-type-polar-s .right-polar-title{
59
+ width: auto;
60
+ max-width: 25%;
61
+ }
62
+ .question-type-polar-s .qsm_image_caption{
63
+ display: block;
 
64
  }
65
  .question-type-polar-s .ui-widget-content{
66
  background: #A5A5A5;
133
  background-color: #808080 !important;
134
  opacity: 0.9;
135
  }
136
+ .qsm-quiz-container select,
137
+ .qsm-quiz-container input[type=checkbox],
138
+ .qsm-quiz-container input[type=radio]{
139
+ cursor: pointer;
140
  }
141
+ .qsm-quiz-container .qsm-contact-type-checkbox{
142
+ display: flex;
143
+ align-items: center;
144
+ flex-wrap: nowrap;
145
+ align-content: center;
146
+ }
147
+ .qsm-quiz-container .qsm-contact-type-checkbox input{margin: 0 5px 0 3px;}
148
  .mlw_qmn_question_number{
149
  font-weight: bold;
150
  }
310
  .question-type-polar-s .slider-main-wrapper,
311
  .question-type-polar-s .right-polar-title{
312
  width: 100%;
 
 
 
 
 
 
313
  margin-bottom: 30px;
 
314
  }
315
  .question-type-polar-s{
316
  height: auto !important;
320
  body .quiz_section .qmn_accept_answers label{
321
  font-size: 14px !important;
322
  }
323
+ .question-type-polar-s .left-polar-title {
324
+ order: 1;
325
+ max-width: calc(50% - 10px);
326
+ padding-right: 10px;
327
+ }
328
+ .question-type-polar-s .right-polar-title {
329
+ order: 2;
330
+ max-width: calc(50% - 10px);
331
+ text-align: right;
332
+ padding-left: 10px;
333
+ }
334
+ .question-type-polar-s .slider-main-wrapper{
335
+ order: 3;
336
+ }
337
  }
338
  .qsm_tooltip {
339
+ position: relative;
340
+ display: inline-block;
341
+ cursor: pointer;
342
  }
343
 
344
  .qsm_tooltip .qsm_tooltiptext{
345
+ visibility: hidden;
346
+ width: 120px;
347
+ background-color: black;
348
+ color: #fff;
349
+ text-align: center;
350
+ border-radius: 6px;
351
+ padding: 5px 0;
352
 
353
+ /* Position the tooltip */
354
+ position: absolute;
355
+ z-index: 1;
356
+ bottom: 100%;
357
+ left: 50%;
358
+ margin-left: -60px;
359
  }
360
  .qsm_tooltip .qsm_tooltiptext a{
361
+ background-color: black !important;
362
+ color: #fff!important;
363
  }
364
  .qsm_tooltip:hover .qsm_tooltiptext {
365
+ visibility: visible;
366
+ }
367
+ body .ui-tooltip, body .ui-tooltip.ui-widget-content{
368
+ box-shadow: none;
369
+ background: #222;
370
+ color: #fff;
371
+ border-radius: 6px;
372
+ box-sizing: border-box;
373
+ padding: 6px 10px;
374
+ font-size: 14px;
375
+ line-height: 22px;
376
+ text-align: justify;
377
  }
378
  .qsm_quiz_processing_box {
379
  display: inline-block;
386
  margin: 10px 0;
387
  }
388
  .qsm-text-correct-option.not-opted {
389
+ color: #6f7479;
390
+ }
css/qsm-admin-question.css CHANGED
@@ -54,7 +54,7 @@
54
  }
55
  .modal-7-table tr td, .modal-8-table tr td {
56
  vertical-align: top;
57
- padding: 0 10px 5px 0
58
  }
59
  #modal-8 footer {
60
  margin-top: 15px;
@@ -308,6 +308,9 @@
308
  margin: 10px 0 0;
309
  text-decoration: none;
310
  }
 
 
 
311
  .questionElements .qsm-row>label {
312
  position: relative;
313
  }
54
  }
55
  .modal-7-table tr td, .modal-8-table tr td {
56
  vertical-align: top;
57
+ padding: 0 10px 5px 0
58
  }
59
  #modal-8 footer {
60
  margin-top: 15px;
308
  margin: 10px 0 0;
309
  text-decoration: none;
310
  }
311
+ input#image_size-width {
312
+ margin-left: 6px;
313
+ }
314
  .questionElements .qsm-row>label {
315
  position: relative;
316
  }
css/qsm-admin.css CHANGED
@@ -1177,6 +1177,12 @@ tr .qsm-opt-desc {
1177
  margin-top: 5px;
1178
  display: block;
1179
  }
 
 
 
 
 
 
1180
  #quiz_settings_wrapper .qsm-opt-desc {
1181
  display: none !important;
1182
  }
@@ -2230,6 +2236,17 @@ input#duplicate_questions {
2230
  #qsm-global-default-popup .qsm-popup__footer button{
2231
  margin: 0 5px;
2232
  }
 
 
 
 
 
 
 
 
 
 
 
2233
  /** Quiz Contact Tab Style **/
2234
  .contact-form-builder-wrap{
2235
  display: flex;
1177
  margin-top: 5px;
1178
  display: block;
1179
  }
1180
+ .form-table .send_email .qsm-opt-tr, .form-table .send_email td {
1181
+ padding-top: 0;
1182
+ }
1183
+ .form-table .store_responses .qsm-opt-tr, .form-table .store_responses td {
1184
+ padding-bottom: 0;
1185
+ }
1186
  #quiz_settings_wrapper .qsm-opt-desc {
1187
  display: none !important;
1188
  }
2236
  #qsm-global-default-popup .qsm-popup__footer button{
2237
  margin: 0 5px;
2238
  }
2239
+ .qsm-badge {
2240
+ background: linear-gradient(225deg, #344ad6, #42d96b);
2241
+ z-index: 9999;
2242
+ position: absolute;
2243
+ color: #fff;
2244
+ right: 5px;
2245
+ top: 5px;
2246
+ border-radius: 10px;
2247
+ padding: 0 10px;
2248
+ text-transform: uppercase;
2249
+ }
2250
  /** Quiz Contact Tab Style **/
2251
  .contact-form-builder-wrap{
2252
  display: flex;
js/qsm-admin.js CHANGED
@@ -10,13 +10,13 @@ var QSMAdmin;
10
  * Catches an error from a jQuery function (i.e. $.ajax())
11
  */
12
  displayjQueryError: function (jqXHR, textStatus, errorThrown) {
13
- QSMAdmin.displayAlert('Error: ' + errorThrown + '! Please try again.', 'error');
14
  },
15
  /**
16
  * Catches an error from a BackBone function (i.e. model.save())
17
  */
18
  displayError: function (jqXHR, textStatus, errorThrown) {
19
- QSMAdmin.displayAlert('Error: ' + errorThrown.errorThrown + '! Please try again.', 'error');
20
  },
21
  /**
22
  * Displays an alert within the "Quiz Settings" page
@@ -45,348 +45,366 @@ var QSMAdmin;
45
  }
46
  };
47
  $(function () {
48
- $('.qsm-tab').on('click', function (event) {
49
- event.preventDefault();
50
- QSMAdmin.selectTab($(this));
51
- });
52
-
53
- //show set global default potion popup
54
- $(document).on('click', '#qsm-blobal-settings', function () {
55
- MicroModal.show('qsm-global-default-popup');
56
- });
57
 
58
- $('#qmn_check_all').change(function () {
59
- $('.qmn_delete_checkbox').prop('checked', jQuery('#qmn_check_all').prop('checked'));
60
- });
 
61
 
62
- $('.edit-quiz-name').click(function (e) {
63
- e.preventDefault();
64
- MicroModal.show('modal-3');
65
- });
66
- $('#edit-name-button').on('click', function (event) {
67
- event.preventDefault();
68
- $('#edit-name-form').submit();
69
- });
70
- $('#sendySignupForm').submit(function (e) {
71
 
72
- e.preventDefault();
73
- var $form = $(this),
74
- name = $form.find('input[name="name"]').val(),
75
- email = $form.find('input[name="email"]').val(),
76
- action = 'qsm_send_data_sendy';
77
- $form.find('#submit').attr('disabled', true);
78
- $.post(ajaxurl, { name: name, email: email, nonce: qsmAdminObject.saveNonce, action: action },
79
- function (data) {
80
- if (data) {
81
- $("#status").text('');
82
- if (data == "Some fields are missing.") {
83
- $("#status").text("Please fill in your name and email.");
84
- $("#status").css("color", "red");
85
- } else if (data == "Invalid email address.") {
86
- $("#status").text("Your email address is invalid.");
87
- $("#status").css("color", "red");
88
- } else if (data == "Invalid list ID.") {
89
- $("#status").text("Your list ID is invalid.");
90
- $("#status").css("color", "red");
91
- } else if (data == "Already subscribed.") {
92
- $("#status").text("You're already subscribed!");
93
- $("#status").css("color", "red");
94
- } else {
95
- $("#status").text("Thanks, you are now subscribed to our mailing list!");
96
- $("#status").css("color", "green");
97
- }
98
- $form.find('#submit').attr('disabled', false);
99
- } else {
100
- alert("Sorry, unable to subscribe. Please try again later!");
101
- }
102
- }
103
- );
104
- });
105
- jQuery('.category_selection_random').change(function () {
106
- var checked_data = jQuery(this).val().toString();
107
- jQuery('.catergory_comma_values').val(checked_data);
108
- });
109
- jQuery('.row-actions-c > .rtq-delete-result').click(function (e) {
110
- e.preventDefault();
111
- var $this = jQuery(this);
112
- if (confirm('are you sure?')) {
113
- var action = 'qsm_dashboard_delete_result';
114
- var result_id = jQuery(this).data('result_id');
115
- $.post(ajaxurl, { result_id: result_id, action: action },
116
  function (data) {
117
- if (data == 'failed') {
118
- alert('Error to delete the result!');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  } else {
120
- $this.parents('li').slideUp();
121
- $this.parents('li').remove();
122
  }
123
  }
124
  );
125
- }
126
- });
127
- jQuery('.load-quiz-wizard').click(function (e) {
128
- e.preventDefault();
129
- MicroModal.show('model-wizard');
130
- var height = jQuery(".qsm-wizard-template-section").css("height");
131
- jQuery(".qsm-wizard-setting-section").css("height", height);
132
- if (jQuery("#accordion").length > 0) {
133
- var icons = {
134
- header: "iconClosed", // custom icon class
135
- activeHeader: "iconOpen" // custom icon class
136
- };
137
- jQuery("#accordion").accordion({
138
- collapsible: true,
139
- icons: icons,
140
- heightStyle: "content"
141
- });
142
- jQuery('#accordion h3.ui-accordion-header').next().slideDown();
143
- jQuery('.template-list .template-list-inner:first-child').trigger('click');
144
- }
145
- });
146
- //Get quiz options
147
- jQuery('.template-list-inner').click(function () {
148
- var action = 'qsm_wizard_template_quiz_options';
149
- var settings = jQuery(this).data('settings');
150
- var addons = jQuery(this).data('addons');
151
- jQuery('.template-list .template-list-inner').removeClass('selected-quiz-template');
152
- jQuery(this).addClass('selected-quiz-template');
153
- jQuery('#quiz_settings_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
154
- jQuery('#recomm_addons_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
155
- $.post(ajaxurl, { settings: settings, addons: addons, action: action },
156
- function (data) {
157
- var diff_html = data.split('=====');
158
- jQuery('#quiz_settings_wrapper').html('');
159
- jQuery('#quiz_settings_wrapper').html(diff_html[0]);
160
- jQuery('#recomm_addons_wrapper').html('');
161
- jQuery('#recomm_addons_wrapper').html(diff_html[1]);
162
- jQuery("#accordion").accordion();
163
- jQuery('#accordion h3.ui-accordion-header').next().slideDown();
164
- $('#quiz_settings_wrapper select').each(function () {
165
- var name = $(this).attr('name');
166
- var value = $(this).val();
167
- if ($('.' + name + '_' + value).length > 0) {
168
- $('.' + name + '_' + value).show();
169
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  });
 
 
171
  }
172
- );
173
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
- //Dismiss the welcome panel
176
- jQuery('.qsm-welcome-panel-dismiss').click(function (e) {
177
- e.preventDefault();
178
- jQuery('#welcome_panel').addClass('hidden');
179
- jQuery('#screen-options-wrap').find('#welcome_panel-hide').prop('checked', false);
180
- postboxes.save_state('toplevel_page_qsm_dashboard');
181
- });
182
- //Get the message in text tab
183
- jQuery(document).on('change', '#qsm_question_text_message_id', function () {
184
- var text_id = jQuery(this).val();
185
- jQuery('.qsm-text-main-wrap .qsm-text-tab-message-loader').show();
186
- jQuery.post(ajaxurl, { text_id: text_id, 'quiz_id': qsmTextTabObject.quiz_id, action: 'qsm_get_question_text_message' }, function (response) {
187
- var data = jQuery.parseJSON(response);
188
- if (data.success === true) {
189
- var text_msg = data.text_message;
190
- if ($('#wp-qsm_question_text_message-wrap').hasClass('html-active')) {
191
- jQuery("#qsm_question_text_message").val(text_msg);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  } else {
193
- text_msg = text_msg.replace(/\n/g, "<br>");
194
- tinyMCE.get('qsm_question_text_message').setContent(text_msg);
195
  }
196
- jQuery('.qsm-text-allowed-variables > .qsm-text-variable-wrap').html('').html(data.allowed_variable_text);
197
- jQuery('.qsm-text-main-wrap .qsm-text-tab-message-loader').hide();
 
 
 
 
 
 
 
 
 
 
198
  } else {
199
- console.log(data.message);
200
  }
201
  });
202
- });
203
- //Save the message in text tab
204
- jQuery(document).on('click', '#qsm_save_text_message', function () {
205
- var $this = jQuery(this);
206
- $this.siblings('.spinner').addClass('is-active');
207
- var text_id = jQuery('#qsm_question_text_message_id').val();
208
- var message = wp.editor.getContent('qsm_question_text_message');
209
- jQuery.post(ajaxurl, { text_id: text_id, 'message': message, 'quiz_id': qsmTextTabObject.quiz_id, action: 'qsm_update_text_message' }, function (response) {
210
- var data = jQuery.parseJSON(response);
211
- if (data.success === true) {
212
- //Do nothing
213
- } else {
214
- console.log(data.message);
215
  }
216
- $this.siblings('.spinner').removeClass('is-active');
217
  });
218
- });
219
- //On click append on tiny mce
220
- jQuery(document).on('click', '.qsm-text-allowed-variables button.button', function () {
221
- var content = jQuery(this).text();
222
- if (jQuery('.qsm-question-text-tab .html-active').length > 0) {
223
- var $txt = jQuery("#qsm_question_text_message");
224
- var caretPos = $txt[0].selectionStart;
225
- var textAreaTxt = $txt.val();
226
- var txtToAdd = content;
227
- $txt.val(textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos));
228
- } else {
229
- tinyMCE.activeEditor.execCommand('mceInsertContent', false, content);
230
- }
231
- });
232
- //Show all the variable list
233
- jQuery('.qsm-show-all-variable-text').click(function (e) {
234
- e.preventDefault();
235
- MicroModal.show('show-all-variable');
236
- });
237
- //Hide/show tr based on selection
238
- $('.qsm_tab_content select').each(function () {
239
- var name = $(this).attr('name');
240
- var value = $(this).val();
241
- if ($('.' + name + '_' + value).length > 0) {
242
- $('.' + name + '_' + value).show();
243
- }
244
- });
245
- $(document).on('change', '.qsm_tab_content select, #quiz_settings_wrapper select', function () {
246
- var name = $(this).attr('name');
247
- var value = $(this).val();
248
- $('.qsm_hidden_tr').hide();
249
- if ($('.' + name + '_' + value).length > 0) {
250
- $('.' + name + '_' + value).show();
251
- }
252
- });
253
- $(document).on('click', '.qsm_tab_content input[name="system"]', function () {
254
  var name = $(this).attr('name');
255
- var value = $(this).val();
256
- $('.qsm_hidden_tr_gradingsystem').hide();
257
- if (value == 0 || value == 3) {
258
- $('.qsm_hidden_tr_gradingsystem').show();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  }
260
- });
261
- $(document).ready(function () {
262
- var system_option = $("input[type=radio][name='system']:checked").val();
263
- $('.qsm_hidden_tr_gradingsystem').hide();
264
- if (system_option == 0 || system_option == 3) {
265
- $('.qsm_hidden_tr_gradingsystem').show();
 
 
 
266
  }
267
- });
268
- if ($('.qsm-text-label-wrapper').length > 0) {
269
- var element_position = $('.qsm-text-label-wrapper').offset().top;
270
- $(window).scroll(function () {
271
- var y_scroll_pos = window.pageYOffset;
272
- var scroll_pos_test = element_position;
273
- if (y_scroll_pos > scroll_pos_test) {
274
- $('.qsm_text_customize_label').fadeOut('slow');
275
  } else {
276
- $('.qsm_text_customize_label').fadeIn('slow');
277
  }
278
  });
279
- }
280
- $(document).on('click', '.qsm_text_customize_label', function () {
281
- $('html, body').animate({
282
- scrollTop: $(".qsm-text-label-wrapper").offset().top - 30
283
- }, 2000);
284
- });
285
- //New template design hide show
286
- var new_template_result_detail = $('.new_template_result_detail:checked').val();
287
- if (new_template_result_detail == 1) {
288
- $('.new_template_result_detail:checked').parents('tr').next('tr').hide();
289
- }
290
- $(document).on('change', '.new_template_result_detail', function () {
291
- if ($(this).val() == 1) {
292
- $(this).parents('tr').next('tr').hide();
293
- } else {
294
- $(this).parents('tr').next('tr').show();
295
- }
296
- });
297
- $(document).on('click', '#show-all-variable .qsm-text-template-span ', function (e) {
298
- e.preventDefault();
299
- let templateSpan = jQuery(this);
300
- let templateVariable= jQuery(this).children('.template-variable');
301
- var $temp = $("<input>");
302
- $("body").append($temp);
303
- $temp.val(templateVariable.text()).select();
304
- document.execCommand("copy");
305
- $temp.remove();
306
- var button_width = templateSpan.width();
307
- var button_txt = templateSpan.html()
308
- templateSpan.css('width', button_width);
309
- templateSpan.text('').html('<span class="popup-copied-des"><span class="dashicons dashicons-yes"></span> Copied!</span>');
310
- setTimeout(function () {
311
- templateSpan.css('width', 'auto');
312
- templateSpan.html(button_txt);
313
- }, 1000);
314
- });
315
- $(document).on('click', ' .qsm-active-addons .no_addons_installed a', function (e) {
316
- $('.qsm-addon-anchor-left .qsm-install-addon a').trigger('click');
317
- });
318
- $(document).on('click', '.qsm-addon-anchor-left .qsm-install-addon a', function (e) {
319
- e.preventDefault();
320
- var href = $(this).attr('href');
321
- $('.qsm-addon-anchor-left .qsm-install-addon').find('a').removeClass('active');
322
- $(this).addClass('active');
323
- $('.qsm-addon-setting-wrap .qsm-primary-acnhor').hide();
324
- $(href).show();
325
- if (href == '#qsm_add_addons') {
326
- $('.qsm-add-addon').css('display', 'inline-block');
327
- } else {
328
- $('.qsm-add-addon').css('display', 'none');
329
- }
330
- });
331
- $(document).on('click', '.qsm-addon-anchor-left .qsm-add-addon a', function (e) {
332
- e.preventDefault();
333
- var href = $(this).attr('href');
334
- $('.qsm-addon-anchor-left .qsm-add-addon').find('a').removeClass('active');
335
- $(this).addClass('active');
336
- $('.qsm-addon-setting-wrap .qsm_popular_addons').hide();
337
- $(href).show();
338
- });
339
 
340
- // opens media library o set featured image for quiz
341
- $(document).on('click', '#set_featured_image', function (e) {
342
- var button = $(this);
343
- e.preventDefault();
344
  custom_uploader = wp.media({
345
- title: 'Set Featured Image',
346
- library: {
347
- type: 'image'
348
- },
349
- button: {
350
- text: 'Use this image' // button label text
351
- },
352
- multiple: false
353
- }).on('select', function () { // it also has "open" and "close" events
354
- var attachment = custom_uploader.state().get('selection').first().toJSON();
355
- button.prev().val(attachment.url);
356
- button.nextAll('.qsm_featured_image_preview').attr('src', attachment.url);
357
- }).open();
358
- });
359
 
360
- $(document).on('change', '.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]', function () {
361
- var value = $(this).val();
362
- if (value == '0' ) {
363
- $('.global_setting_system').parents('tr').show();
364
- $('.global_setting_score_roundoff').parents('tr').show();
365
- }else {
366
- $('.global_setting_system').parents('tr').hide();
367
- $('.global_setting_score_roundoff').parents('tr').hide();
 
 
 
 
 
 
 
 
 
 
368
 
369
- }
370
- });
371
- $(document).on('change', '.global_setting_system input[name="qsm-quiz-settings[system]"]', function () {
372
- var value = $('input[name="qsm-quiz-settings[system]"]:checked').val();
373
- var value1 = $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').val();
374
- if (value != '1' && value1 == '0' ) {
375
- $('.global_setting_score_roundoff').parents('tr').show();
376
- }else {
377
- $('.global_setting_score_roundoff').parents('tr').hide();
378
- }
379
- });
380
- $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').trigger('change');
381
- $('.global_setting_system input[name="qsm-quiz-settings[system]"]').trigger('change');
 
 
 
 
 
 
 
 
 
382
 
383
  });
384
  $(document).on('change', '.global_setting_system input[name="qsm-quiz-settings[system]"]', function () {
385
  var value = $('input[name="qsm-quiz-settings[system]"]:checked').val();
386
  var value1 = $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').val();
387
- if (value != '1' && value1 == '0' ) {
388
  $('.global_setting_score_roundoff').parents('tr').show();
389
- }else {
390
  $('.global_setting_score_roundoff').parents('tr').hide();
391
  }
392
  });
@@ -400,7 +418,7 @@ var QSMAdmin;
400
  deleteResults(qid, qname);
401
  });
402
 
403
- jQuery(document).on('click', '#btn_export', function(e) {
404
  e.preventDefault();
405
  jQuery.ajax({
406
  type: 'POST',
@@ -409,7 +427,7 @@ var QSMAdmin;
409
  action: "qsm_export_data",
410
  nonce: qsm_tools_page.nonce,
411
  },
412
- success: function(response) {
413
  /*
414
  * Make CSV downloadable
415
  */
@@ -435,16 +453,16 @@ var QSMAdmin;
435
  downloadLink.click();
436
  document.body.removeChild(downloadLink);
437
  },
438
- error: function(errorThrown) {
439
  alert(errorThrown);
440
  }
441
  });
442
  });
443
 
444
- jQuery(document).on('click', '#btn_clear_logs', function(e) {
445
  e.preventDefault();
446
- var delete_logs=confirm(qsm_tools_page.qsm_delete_audit_logs);
447
- if ( delete_logs ) {
448
  // your deletion code
449
  jQuery.ajax({
450
  type: 'POST',
@@ -453,10 +471,10 @@ var QSMAdmin;
453
  action: "qsm_clear_audit_data",
454
  nonce: qsm_tools_page.nonce,
455
  },
456
- success: function(response) {
457
  location.reload();
458
  },
459
- error: function(errorThrown) {
460
  alert(errorThrown);
461
  }
462
  });
@@ -467,65 +485,65 @@ var QSMAdmin;
467
  e.preventDefault();
468
  MicroModal.show('qsm_fetch_audit_data');
469
  var qsm_get_setting_data = jQuery(this).attr('data-auditid');
470
- jQuery('.qsm_setting__data').html('<p>'+JSON.stringify(JSON.parse(qsm_get_setting_data), null, 2)+'</p>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  });
472
 
473
- jQuery( document ).on( 'click', '.qsm-toggle-box-handle', function ( e ) {
474
- e.preventDefault();
475
- var parent = jQuery(this).parent('.qsm-toggle-box');
476
- var content = parent.find('.qsm-toggle-box-content');
477
- if (content.is(":visible")) {
478
- content.hide();
479
- parent.removeClass('opened');
480
- } else {
481
- content.show();
482
- parent.addClass('opened');
483
- }
484
- } );
485
-
486
- jQuery( document ).on( 'click', '.qsm-help-tab-handle', function ( e ) {
487
- e.preventDefault();
488
- jQuery('.qsm-help-tab-dropdown-list').toggleClass('opened');
489
- } );
490
-
491
- $( document ).mouseup( function ( e ){
492
- var link = $( ".qsm-help-tab-handle" );
493
- var container = $( ".qsm-help-tab-dropdown-list" );
494
- if ( !link.is( e.target ) && !container.is( e.target ) && container.has( e.target ).length === 0 ) {
495
- container.removeClass('opened');
496
- }
497
- } );
498
 
499
  }(jQuery));
500
 
501
  // result page
502
- jQuery('#results-screen-option-button').on('click', function(event){
503
  event.preventDefault();
504
  MicroModal.show('modal-results-screen-option');
505
  });
506
- jQuery('#save-results-screen-option-button').on('click', function(event){
507
  event.preventDefault();
508
  MicroModal.close('modal-results-screen-option');
509
  jQuery('#results-screen-option-form').submit();
510
  });
511
  function deleteResults(id, quizName) {
512
- jQuery("#delete_dialog").dialog({
513
- autoOpen: false,
514
- buttons: {
515
- Cancel: function() {
516
- $jQuery(this).dialog('close');
517
- }
518
- }
519
- });
520
- jQuery("#delete_dialog").dialog('open');
521
- var idHidden = document.getElementById("result_id");
522
- var idHiddenName = document.getElementById("delete_quiz_name");
523
- idHidden.value = id;
524
- idHiddenName.value = quizName;
525
  }
526
 
527
  //quiz options style tab
528
- jQuery('.quiz_style_tab').click(function(e) {
529
  e.preventDefault();
530
  var current_id = jQuery(this).attr('data-id');
531
  jQuery('.quiz_style_tab').removeClass('current');
@@ -534,43 +552,43 @@ jQuery('.quiz_style_tab').click(function(e) {
534
  jQuery('#' + current_id).show();
535
  });
536
 
537
- if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
538
- if (window.location.href.indexOf('tab=style')> 0 ){
539
  function mlw_qmn_theme(theme) {
540
  document.getElementById('save_quiz_theme').value = theme;
541
  jQuery("div.mlw_qmn_themeBlockActive").toggleClass("mlw_qmn_themeBlockActive");
542
  jQuery("#mlw_qmn_theme_block_" + theme).toggleClass("mlw_qmn_themeBlockActive");
543
  }
544
 
545
- jQuery(document).ready(function() {
546
- jQuery(document).on('click', '.qsm-activate-theme', function() {
547
- jQuery(this).parents('.theme-wrapper').find('input[name=quiz_theme_id]').prop("checked", true);
548
- });
549
- jQuery(document).on('input', '.quiz_featured_image', function() {
550
- jQuery('.qsm_featured_image_preview').attr('src', jQuery(this).val());
551
- });
552
-
553
- jQuery(document).on('click', '.filter-links a', function() {
554
- let current_id = jQuery(this).attr('data-id');
555
- jQuery(this).parents('.filter-links').find('li a').each(function() {
556
- jQuery(this).removeClass('current');
557
  });
558
- jQuery(this).addClass('current');
559
- jQuery(this).parents('#qsm_themes').find('.themes-container').children('div').each(function() {
560
- if (jQuery(this).hasClass(current_id)) {
561
- jQuery(this).show();
562
- } else {
563
- jQuery(this).hide();
564
- }
565
  });
566
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
567
  });
568
 
569
  jQuery(document).ready(function () {
570
  jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
571
  e.preventDefault();
572
  MicroModal.show('qsm-theme-color-settings');
573
- if( jQuery('.my-color-field').length > 0 ){
574
  jQuery('.my-color-field').wpColorPicker();
575
  }
576
  });
@@ -582,7 +600,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
582
  //QSM - Quizzes/Surveys Page
583
 
584
  (function ($) {
585
- if (jQuery('body').hasClass('post-type-qsm_quiz')){
586
 
587
  $('#new_quiz_button_two').on('click', function (event) {
588
  event.preventDefault();
@@ -621,10 +639,10 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
621
  $('#quiz_settings_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
622
  $('#recomm_addons_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
623
  $.post(ajaxurl, {
624
- settings: settings,
625
- addons: addons,
626
- action: action
627
- },
628
  function (data) {
629
  var diff_html = data.split('=====');
630
  $('#quiz_settings_wrapper').html('');
@@ -658,21 +676,21 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
658
 
659
  $(document).on('click', '#the-list .qsm-action-link-delete', function (event) {
660
  event.preventDefault();
661
- var dataid = $(this).data('id');
662
- var dataname = $(this).data('name');
663
- $('#delete_quiz_id').val(dataid+'QID');
664
- $('#delete_quiz_name').val(dataname);
665
  MicroModal.show('modal-5');
666
  });
667
  $(document).on('click', '#the-list .qsm-action-link-duplicate', function (event) {
668
  event.preventDefault();
669
- var dataid = $(this).data('id');
670
- $('#duplicate_quiz_id').val(dataid+'QID');
671
  MicroModal.show('modal-4');
672
  });
673
  $(document).on('click', '#the-list .qsm-action-link-reset', function (event) {
674
  event.preventDefault();
675
- var dataid = $(this).data('id');
676
  $('#reset_quiz_id').val(dataid);
677
  MicroModal.show('modal-1');
678
  });
@@ -689,12 +707,12 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
689
  $('#delete-quiz-form').submit();
690
  });
691
 
692
- $( document ).on( 'click', '.post-type-qsm_quiz #doaction, .post-type-qsm_quiz #doaction2', function ( event ) {
693
- event.preventDefault();
694
- if ( $( "#bulk-action-selector-top" ).val() == "delete_pr" || $( "#bulk-action-selector-bottom" ).val() == "delete_pr" ) {
695
- MicroModal.show( 'modal-bulk-delete' );
696
- } else {
697
- $( '#posts-filter' ).submit();
698
  }
699
  });
700
  $(document).on('click', '.qsm-list-shortcode-view', function (e) {
@@ -717,19 +735,19 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
717
  });
718
  $('#bulk-delete-quiz-button').on('click', function (event) {
719
  event.preventDefault();
720
- if($("#bult-delete-quiz-form input[name='qsm_delete_question_from_qb']").is(":checked")){
721
- $("<input>",{
722
- "type":"hidden",
723
  "name": "qsm_delete_question_from_qb",
724
  "value": "1"
725
- } ).appendTo("#posts-filter");
726
  }
727
- if($("#bult-delete-quiz-form input[name='qsm_delete_from_db']").is(":checked")){
728
- $("<input>",{
729
- "type":"hidden",
730
  "name": "qsm_delete_from_db",
731
  "value": "1"
732
- } ).appendTo("#posts-filter");
733
  }
734
  $('#posts-filter').submit();
735
  });
@@ -739,9 +757,9 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
739
  // QSM - Quiz Wizard
740
 
741
  (function ($) {
742
- if (jQuery('body').hasClass('post-type-qsm_quiz') || jQuery('body').hasClass('toplevel_page_qsm_dashboard')){
743
  $('#create-quiz-button').on('click', function (event) {
744
- event.preventDefault();
745
  if ($('#new-quiz-form').find('.quiz_name').val() === '') {
746
  $('#new-quiz-form').find('.quiz_name').addClass('qsm-required');
747
  $('.qsm-wizard-wrap[data-show="quiz_settings"]').trigger('click');
@@ -887,64 +905,64 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
887
  //QSM - Admin Notices for enabling multiple categories in QSM 7.3+
888
 
889
  (function ($) {
890
- $(document).on('click', '.enable-multiple-category', function (e) {
891
- e.preventDefault();
892
- $('.category-action').html('Updating database<span></span>');
893
- $('.category-action').prev().hide();
894
- $('.category-action').prev().prev().hide();
895
- i = 0;
896
- category_interval = setInterval(() => {
897
- if (i % 3 == 0) {
898
- $('.category-action span').html(' .');
899
- } else {
900
- $('.category-action span').append(' .');
901
- }
902
- i++;
903
- }, 500);
904
- $.ajax({
905
- type: "POST",
906
- url: ajaxurl,
907
- data: {
908
- action: 'enable_multiple_categories',
909
- value: 'enable'
910
- },
911
- success: function (r) {
912
- response = JSON.parse(r);
913
- clearInterval(category_interval);
914
- if (response.status) {
915
- $('.category-action').parents('.multiple-category-notice').removeClass('notice-info').addClass('notice-success').html('<p>Database updated successfully.</p>');
916
- } else {
917
- $('.category-action').parents('.multiple-category-notice').removeClass('notice-info').addClass('notice-error').html('Error! Please try again');
918
- }
919
-
920
- }
921
- });
922
- });
923
-
924
- $(document).on('click', '.cancel-multiple-category', function (e) {
925
- e.preventDefault();
926
- $('.category-action').html('');
927
- $.ajax({
928
- type: "POST",
929
- url: ajaxurl,
930
- data: {
931
- action: 'enable_multiple_categories',
932
- value: 'cancel'
933
- },
934
- success: function (status) {
935
- if (status) {
936
- $('.multiple-category-notice').hide();
937
- }
938
- }
939
- });
940
- });
941
- $('.multiple-category-notice').show();
942
  }(jQuery));
943
 
944
  // QSM - Admin Stats Page
945
  (function ($) {
946
  if (jQuery('body').hasClass('qsm_page_qmn_stats')) {
947
- if (window.stats_graph instanceof Chart){
948
  window.stats_graph.destroy();
949
  }
950
  var graph_ctx = document.getElementById("graph_canvas").getContext("2d");
@@ -953,16 +971,17 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
953
  data: {
954
  labels: qsm_admin_stats.labels,
955
  datasets: [{
956
- label: 'Quiz Submissions', // Name the series
957
  data: qsm_admin_stats.value, // Specify the data values array
958
  fill: false,
959
  borderColor: '#2196f3', // Add custom color border (Line)
960
  backgroundColor: '#2196f3', // Add custom color background (Points and Fill)
961
  borderWidth: 1 // Specify bar border width
962
- }]},
963
- options: {
964
- responsive: true, // Instruct chart js to respond nicely.
965
- maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
 
966
  }
967
  });
968
  }
@@ -973,266 +992,266 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
973
  * QSM - Contact Form
974
  */
975
 
976
- var QSMContact;
977
- (function ($) {
978
- if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
979
- if (window.location.href.indexOf('tab=contact') > 0 ){
980
 
981
  QSMContact = {
982
  load: function () {
983
- if ( $.isArray( qsmContactObject.contactForm ) && qsmContactObject.contactForm.length > 0 ) {
984
- $.each( qsmContactObject.contactForm, function ( i, val ) {
985
- QSMContact.addField( val );
986
- } );
987
- }
988
- },
989
- addField: function ( fieldArray ) {
990
- var template = wp.template( 'contact-form-field' );
991
-
992
- $( '.contact-form' ).append( template( fieldArray ) );
993
-
994
- $( '.contact-form-field' ).each( function () {
995
- QSMContact.hideShowSettings( $( this ) );
996
- } );
997
- setTimeout( QSMContact.removeNew, 250 );
998
- },
999
- removeNew: function () {
1000
- $( '.contact-form-field' ).removeClass( 'new' );
1001
- },
1002
- duplicateField: function ( linkClicked ) {
1003
- var fieldArray = QSMContact.prepareFieldData( linkClicked.parents( '.contact-form-field' ) );
1004
- QSMContact.addField( fieldArray );
1005
- },
1006
- deleteField: function ( field ) {
1007
- var parent = field.parents( '.contact-form-field' );
1008
- parent.addClass( 'deleting' );
1009
- setTimeout( function () {
1010
- parent.remove();
1011
- }, 250 );
1012
- },
1013
- newField: function () {
1014
- var fieldArray = {
1015
- label: '',
1016
- type: 'text',
1017
- answers: [],
1018
- required: false,
1019
- use: '',
1020
- enable: true,
1021
- is_default: false
1022
- };
1023
- jQuery( document ).trigger( 'qsm_add_contact_field', [fieldArray] );
1024
- QSMContact.addField( fieldArray );
1025
- },
1026
- prepareFieldData: function ( field ) {
1027
- var fieldArray = {
1028
- label: field.find( '.label-control' ).val(),
1029
- type: field.find( '.type-control' ).val(),
1030
- required: field.find( '.required-control' ).prop( 'checked' ),
1031
- use: field.find( '.use-control' ).val(),
1032
- enable: field.find( '.enable-control' ).prop( 'checked' ),
1033
- };
1034
- /**
1035
- * Store Other settings
1036
- */
1037
- field.find( '.contact-form-field-settings :input' ).each( function () {
1038
- var inputName = $( this ).attr( 'name' );
1039
- var inputVal = $( this ).val();
1040
- if ( 'checkbox' == $( this ).attr( 'type' ) ) {
1041
- inputVal = $( this ).prop( 'checked' );
1042
- }
1043
- fieldArray[inputName] = inputVal;
1044
- } );
1045
- return fieldArray;
1046
- },
1047
- save: function () {
1048
- QSMContact.displayAlert( 'Saving contact fields...', 'info' );
1049
- var contactFields = $( '.contact-form-field' );
1050
- var contactForm = [];
1051
- var contactEach;
1052
- $.each( contactFields, function ( i, val ) {
1053
- contactEach = QSMContact.prepareFieldData( $( this ) );
1054
- contactForm.push( contactEach );
1055
- } );
1056
-
1057
- var settings = {};
1058
- $('#contactformsettings input').each(function (){
1059
- if ('checkbox' == $(this).attr('type')) {
1060
- settings[$(this).attr('name')] = ($(this).prop( 'checked' ) ? '1' : '0');
1061
- } else {
1062
- settings[$(this).attr('name')] = $(this).val();
1063
- }
1064
- });
1065
-
1066
- var data = {
1067
- action: 'qsm_save_contact',
1068
- contact_form: contactForm,
1069
- settings: settings,
1070
- quiz_id: qsmContactObject.quizID,
1071
- nonce: qsmContactObject.saveNonce,
1072
- };
1073
-
1074
- jQuery.post( ajaxurl, data, function ( response ) {
1075
- QSMContact.saved( JSON.parse( response ) );
1076
- } );
1077
- },
1078
- saved: function ( response ) {
1079
- if ( response.status ) {
1080
- QSMContact.displayAlert( '<strong>Success</strong> Your contact fields have been saved!', 'success' );
1081
- } else {
1082
- QSMContact.displayAlert( '<strong>Error</strong> There was an error encountered when saving your contact fields. Please try again.', 'error' );
1083
- }
1084
- },
1085
- displayAlert: function ( message, type ) {
1086
- QSMContact.clearAlerts();
1087
- $( '.contact-message' ).addClass( 'notice' );
1088
- switch ( type ) {
1089
- case 'info':
1090
- $( '.contact-message' ).addClass( 'notice-info' );
1091
- break;
1092
- case 'error':
1093
- $( '.contact-message' ).addClass( 'notice-error' );
1094
- break;
1095
- case 'success':
1096
- $( '.contact-message' ).addClass( 'notice-success' );
1097
- break;
1098
- default:
1099
- }
1100
- $( '.contact-message' ).append( '<p>' + message + '</p>' );
1101
- },
1102
- clearAlerts: function () {
1103
- $( '.contact-message' ).empty().removeClass().addClass( 'contact-message' );
1104
- },
1105
- hideShowSettings: function ( field ) {
1106
- var type = field.find( '.type-control' ).val();
1107
- if ( field.find( '.required-control' ).prop( 'checked' ) ) {
1108
- field.find( '.field-required-flag' ).show();
1109
- }
1110
- if ( !field.find( '.enable-control' ).prop( 'checked' ) ) {
1111
- field.addClass( 'disabled-field' );
1112
- if ( !$( '.show-disabled-fields' ).prop( 'checked' ) ) {
1113
- field.addClass( 'hidden-field' );
1114
- }
1115
- }
1116
- field.find( '.contact-form-field-settings .contact-form-group:not(.required-option)' ).hide();
1117
- if ( 'text' == type || 'number' == type ) {
1118
- field.find( '.contact-form-field-settings .min-max-option' ).show();
1119
- }
1120
- if ( 'email' == type ) {
1121
- field.find( '.contact-form-field-settings .email-option' ).show();
1122
- }
1123
- jQuery( document ).trigger( 'qsm_contact_field_hide_show_settings', [field, type] );
1124
- }
1125
- };
1126
- $(function() {
1127
- QSMContact.load();
1128
- if ( $( '.contact-form > .contact-form-field' ).length === 0 ) {
1129
- $( '.save-contact' ).hide();
1130
- }
1131
- $( '.add-contact-field' ).on( 'click', function () {
1132
- QSMContact.newField();
1133
- if ( $( '.contact-form > .contact-form-field' ).length === 0 ) {
1134
- $( '.save-contact' ).hide();
1135
- } else {
1136
- $( '.save-contact' ).show();
1137
- }
1138
- } );
1139
- $( '.save-contact' ).on( 'click', function () {
1140
- QSMContact.save();
1141
- } );
1142
- $( '.contact-form' ).on( 'click', '.delete-field', function ( event ) {
1143
- event.preventDefault();
1144
- if ( !$( this ).hasClass( 'disabled' ) ) {
1145
- QSMContact.deleteField( $( this ) );
1146
- }
1147
- return false;
1148
- } );
1149
- $( '.contact-form' ).on( 'click', '.copy-field', function ( event ) {
1150
- event.preventDefault();
1151
- QSMContact.duplicateField( $( this ) );
1152
- } );
1153
- $( '.contact-form' ).on( 'click', '.settings-field', function ( event ) {
1154
- event.preventDefault();
1155
- var target = $( this ).parents( '.contact-form-field' ).find( '.contact-form-field-settings' );
1156
- $( '.contact-form-field-settings' ).not( target ).hide();
1157
- target.toggle();
1158
- } );
1159
- $( '.contact-form' ).on( 'change', '.type-control', function ( event ) {
1160
- event.preventDefault();
1161
- QSMContact.hideShowSettings( $( this ).parents( '.contact-form-field' ) );
1162
- } );
1163
- $( '.contact-form' ).on( 'change', '.required-control', function ( event ) {
1164
- event.preventDefault();
1165
- $( this ).parents( '.contact-form-field' ).find( '.field-required-flag' ).hide();
1166
- if ( $( this ).is( ':checked' ) ) {
1167
- $( this ).parents( '.contact-form-field' ).find( '.field-required-flag' ).show();
1168
- }
1169
- } );
1170
- $( '.contact-form' ).on( 'change', '.enable-control', function ( event ) {
1171
- event.preventDefault();
1172
- $( this ).parents( '.contact-form-field' ).addClass( 'disabled-field' );
1173
- if ( $( this ).is( ':checked' ) ) {
1174
- $( this ).parents( '.contact-form-field' ).removeClass( 'disabled-field' );
1175
- }
1176
- QSMContact.hideShowSettings( $( this ).parents( '.contact-form-field' ) );
1177
- } );
1178
- $( document ).on( 'change', '.show-disabled-fields', function ( event ) {
1179
- event.preventDefault();
1180
- var is_show = $( this ).prop( 'checked' );
1181
- jQuery.post( ajaxurl, { action: 'qsm_show_disabled_contact_fields', show: is_show } );
1182
- if ( is_show ) {
1183
- $( '.contact-form-field' ).removeClass( 'hidden-field' );
1184
- } else {
1185
- $( '.contact-form-field.disabled-field' ).addClass( 'hidden-field' );
1186
- }
1187
- } );
1188
- $( '.contact-form' ).sortable( {
1189
- opacity: 70,
1190
- cursor: 'grabbing',
1191
- handle: 'span.dashicons-move'
1192
- } );
1193
- });
1194
- }
1195
- }
1196
- }(jQuery));
1197
-
1198
- /**
1199
- * QSM - Admin emails
1200
- */
1201
 
 
1202
 
1203
- (function ($) {
1204
- if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1205
- if (window.location.href.indexOf('tab=emails')> 0 ){
1206
- var QSMAdminEmails;
1207
- QSMAdminEmails = {
1208
- total: 0,
1209
- saveEmails: function() {
1210
- QSMAdmin.displayAlert( 'Saving emails...', 'info' );
1211
- var emails = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1212
  var email = {};
1213
- $( '.qsm-email' ).each( function() {
1214
  var email_content = '';
1215
- if( $( this ).find( '.email-template' ).parent('.wp-editor-container').length > 0 ){
1216
- email_content = wp.editor.getContent( $( this ).find( '.email-template' ).attr( 'id' ) );
1217
  } else {
1218
- email_content = $( this ).find( '.email-template' ).val()
1219
  }
1220
  email = {
1221
  'conditions': [],
1222
- 'to': $( this ).find( '.to-email' ).val(),
1223
- 'subject': $( this ).find( '.subject' ).val(),
1224
  'content': email_content,
1225
- 'replyTo': $( this ).find( '.reply-to' ).prop( 'checked' ),
1226
  };
1227
- $( this ).find( '.email-condition' ).each( function() {
1228
  email.conditions.push({
1229
  'category': $(this).children('.email-condition-category').val(),
1230
- 'criteria': $( this ).children( '.email-condition-criteria' ).val(),
1231
- 'operator': $( this ).children( '.email-condition-operator' ).val(),
1232
- 'value': $( this ).children( '.email-condition-value' ).val()
1233
  });
1234
  });
1235
- emails.push( email );
1236
  });
1237
  var data = {
1238
  'emails': emails,
@@ -1244,68 +1263,68 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1244
  data: data,
1245
  headers: { 'X-WP-Nonce': qsmEmailsObject.nonce },
1246
  })
1247
- .done(function( results ) {
1248
- if ( results.status ) {
1249
- QSMAdmin.displayAlert( 'Emails were saved!', 'success' );
1250
  } else {
1251
- QSMAdmin.displayAlert( 'There was an error when saving the emails. Please try again.', 'error' );
1252
  }
1253
  })
1254
  .fail(QSMAdmin.displayjQueryError);
1255
  },
1256
- loadEmails: function() {
1257
  $.ajax({
1258
  url: wpApiSettings.root + 'quiz-survey-master/v1/quizzes/' + qsmEmailsObject.quizID + '/emails',
1259
  headers: { 'X-WP-Nonce': qsmEmailsObject.nonce },
1260
  })
1261
- .done(function( emails ) {
1262
- $( '#qsm_emails' ).find( '.qsm-spinner-loader' ).remove();
1263
- emails.forEach( function( email, i, emails ) {
1264
- QSMAdminEmails.addEmail( email.conditions, email.to, email.subject, email.content, email.replyTo );
1265
  });
1266
  QSMAdmin.clearAlerts();
1267
  })
1268
  .fail(QSMAdmin.displayjQueryError);
1269
  },
1270
  addCondition: function ($email, category, criteria, operator, value) {
1271
- var template = wp.template( 'email-condition' );
1272
  $email.find('.email-when-conditions').append(template({
1273
- 'category': category,
1274
- 'criteria': criteria,
1275
- 'operator': operator,
1276
- 'value': value
1277
  }));
1278
  },
1279
- newCondition: function( $email ) {
1280
  QSMAdminEmails.addCondition($email, '', 'score', 'equal', 0);
1281
  },
1282
- addEmail: function( conditions, to, subject, content, replyTo ) {
1283
  QSMAdminEmails.total += 1;
1284
- var template = wp.template( 'email' );
1285
- $( '#qsm_emails' ).append( template( { id: QSMAdminEmails.total, to: to, subject: subject, content: content, replyTo: replyTo } ) );
1286
- conditions.forEach( function( condition, i, conditions) {
1287
  QSMAdminEmails.addCondition(
1288
- $( '.qsm-email:last-child' ),
1289
  condition.category,
1290
  condition.criteria,
1291
  condition.operator,
1292
  condition.value
1293
  );
1294
  });
1295
- if(qsmEmailsObject.qsm_user_ve === 'true'){
1296
- var settings = {
1297
- mediaButtons: true,
1298
- tinymce: {
1299
- forced_root_block : '',
1300
- toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
1301
- },
1302
- quicktags: true,
1303
- };
1304
- wp.editor.initialize( 'email-template-' + QSMAdminEmails.total, settings );
1305
- }
1306
  jQuery(document).trigger('qsm_after_add_email_block', [conditions, to, subject, content, replyTo]);
1307
  },
1308
- newEmail: function() {
1309
  var conditions = [{
1310
  'category': '',
1311
  'criteria': 'score',
@@ -1316,33 +1335,33 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1316
  var subject = 'Quiz Results For %QUIZ_NAME%';
1317
  var content = '%QUESTIONS_ANSWERS_EMAIL%';
1318
  var replyTo = false;
1319
- QSMAdminEmails.addEmail( conditions, to, subject, content, replyTo );
1320
  }
1321
  };
1322
- $(function() {
1323
  QSMAdminEmails.loadEmails();
1324
- $( '.add-new-email' ).on( 'click', function( event ) {
1325
  event.preventDefault();
1326
  QSMAdminEmails.newEmail();
1327
  });
1328
- $( '.save-emails' ).on( 'click', function( event ) {
1329
  event.preventDefault();
1330
  QSMAdminEmails.saveEmails();
1331
  });
1332
- $( '#qsm_emails' ).on( 'click', '.new-condition', function( event ) {
1333
  event.preventDefault();
1334
- $page = $( this ).closest( '.qsm-email' );
1335
- QSMAdminEmails.newCondition( $page );
1336
  });
1337
- $( '#qsm_emails' ).on( 'click', '.delete-email-button', function( event ) {
1338
  event.preventDefault();
1339
- $( this ).closest( '.qsm-email' ).remove();
1340
  });
1341
- $( '#qsm_emails' ).on( 'click', '.delete-condition-button', function( event ) {
1342
  event.preventDefault();
1343
- $( this ).closest( '.email-condition' ).remove();
1344
  });
1345
- });
1346
  }
1347
  }
1348
  }(jQuery));
@@ -1350,613 +1369,875 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1350
  /**
1351
  * QSM Question Tab
1352
  */
1353
- var QSMQuestion;
1354
- var import_button;
1355
  (function ($) {
1356
- if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1357
- if (window.location.href.indexOf('tab') == -1 ||window.location.href.indexOf('tab=questions')> 0 ){
1358
-
1359
- $.QSMSanitize = function (input) {
1360
- return input.replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');
1361
- };
1362
- QSMQuestion = {
1363
- question: Backbone.Model.extend({
1364
- defaults: {
1365
- id: null,
1366
- quizID: 1,
1367
- type: '0',
1368
- name: '',
1369
- question_title: '',
1370
- answerInfo: '',
1371
- comments: '1',
1372
- hint: '',
1373
- category: '',
1374
- required: 1,
1375
- answers: [],
1376
- page: 0
1377
- }
1378
- }),
1379
- questions: null,
1380
- page: Backbone.Model.extend({
1381
- defaults: {
1382
- id: null,
1383
- quizID: 1,
1384
- pagekey: qsmRandomID(8),
1385
- hide_prevbtn: 0,
1386
- questions: null,
1387
- }
1388
- }),
1389
- qpages: null,
1390
- questionCollection: null,
1391
- pageCollection: null,
1392
- categories: [],
1393
- /**
1394
- * Counts the total number of questions and then updates #total-questions span.
1395
- */
1396
- countTotal: function () {
1397
- var total = 0;
1398
-
1399
- // Cycles through each page.
1400
- _.each(jQuery('.page'), function (page) {
1401
-
1402
- // If page is empty, continue to the next.
1403
- if (0 == jQuery(page).children('.question').length) {
1404
- return;
1405
  }
1406
- // Cycle through each question and add to our total.
1407
- _.each(jQuery(page).children('.question'), function (question) {
1408
- total += 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1409
  });
1410
- });
1411
- $('#total-questions').text(total);
1412
- },
1413
- openQuestionBank: function (pageID) {
1414
- QSMQuestion.loadQuestionBank();
1415
- $('#add-question-bank-page').val(pageID);
1416
- MicroModal.show('modal-2', {
1417
- onClose: function () {
1418
- $('.save-page-button').trigger('click');
 
 
 
 
 
 
 
 
 
 
 
 
 
1419
  }
1420
- });
1421
- },
1422
- loadQuestionBank: function (action = '') {
1423
- if (action == 'change') {
1424
- $('.qb-load-more-wrapper').remove();
1425
- $('#question-bank').find('.question-bank-question').remove();
1426
- $('#question-bank').append('<div style="top: 45px;position: relative;" class="qsm-spinner-loader"></div>');
1427
- } else if ($('.qb-load-more-wrapper').length > 0) {
1428
- $('.qb-load-more-question').hide();
1429
- $('.qb-load-more-wrapper').append('<div class="qsm-spinner-loader"></div>');
1430
- } else {
1431
- $('#question-bank').empty();
1432
- $('#question-bank').append('<div class="qsm-spinner-loader"></div>');
1433
- }
1434
- $.ajax({
1435
- url: wpApiSettings.root + 'quiz-survey-master/v1/bank_questions/0/',
1436
- method: 'GET',
1437
- beforeSend: function (xhr) {
1438
- xhr.setRequestHeader('X-WP-Nonce', qsmQuestionSettings.nonce);
1439
- },
1440
- data: {
1441
- 'quizID': 0,
1442
- 'page': $('#question_back_page_number').length > 0 ? parseInt($('#question_back_page_number').val()) + 1 : 1,
1443
- 'category': $('#question-bank-cat').val(),
1444
- 'search': $('#question-bank-search-input').val()
1445
- },
1446
- success: QSMQuestion.questionBankLoadSuccess
1447
- });
1448
- },
1449
- questionBankLoadSuccess: function (response) {
1450
- var pagination = response.pagination;
1451
- var questions = response.questions;
1452
- if ($('.qb-load-more-wrapper').length > 0) {
1453
- $('.qb-load-more-wrapper').remove();
1454
- } else {
1455
- $('#question-bank').empty();
1456
- }
1457
- for (var i = 0; i < questions.length; i++) {
1458
- QSMQuestion.addQuestionToQuestionBank(questions[i]);
1459
- }
1460
- if (pagination.total_pages > pagination.current_page) {
1461
- var pagination_html = '<div class="qb-load-more-wrapper" style="text-align: center;margin: 20px 0 10px 0;"><input type="hidden" id="question_back_page_number" value="' + pagination.current_page + '"/>';
1462
- pagination_html += '<input type="hidden" id="question_back_total_pages" value="' + pagination.total_pages + '"/>';
1463
- pagination_html += '<a href="javascript:void(0)" class="qb-load-more-question">Load More Questions</a></div>';
1464
- $('#question-bank').append(pagination_html);
1465
- }
1466
- if (pagination.current_page == 1) {
1467
- if ( qsmQuestionSettings.categories.length > 0) {
1468
- var category_arr = qsmQuestionSettings.categories;
1469
- $cat_html = '<option value="">All Categories</option>';
1470
- $.each(category_arr, function (index, value) {
1471
- if (value.category !== '') {
1472
- if (typeof value.cat_id !== 'undefined' && value.cat_id !== '') {
1473
- $cat_html += '<option value="' + value.cat_id + '">' + value.category + '</option>';
1474
- } else {
1475
- $cat_html += '<option value="' + value.category + '">' + value.category + '</option>';
1476
- }
1477
- }
1478
- });
1479
- $('#question-bank-cat').html($cat_html);
1480
- $('#question-bank-cat').val(pagination.category);
1481
- }
1482
- }
1483
- },
1484
- addQuestionToQuestionBank: function (question) {
1485
- var questionText = QSMQuestion.prepareQuestionText(question.name);
1486
- var template = wp.template('single-question-bank-question');
1487
- if (question.question_title !== "undefined" && question.question_title !== "") {
1488
- questionText = question.question_title;
1489
- }
1490
- $('#question-bank').append(template({
1491
- id: question.id,
1492
- question: questionText,
1493
- category: question.category,
1494
- quiz_name: question.quiz_name
1495
- }));
1496
- },
1497
- addQuestionFromQuestionBank: function (questionID) {
1498
- QSMAdmin.displayAlert('Adding question...', 'info');
1499
- var model = new QSMQuestion.question({
1500
- id: questionID
1501
- });
1502
- model.fetch({
1503
- headers: {
1504
- 'X-WP-Nonce': qsmQuestionSettings.nonce
1505
- },
1506
- url: wpApiSettings.root + 'quiz-survey-master/v1/questions/' + questionID,
1507
- success: QSMQuestion.questionBankSuccess,
1508
- error: QSMAdmin.displayError
1509
- });
1510
- },
1511
- questionBankSuccess: function (model) {
1512
- var newModel = _.clone(model.attributes);
1513
- newModel.id = null;
1514
- QSMQuestion.questions.create(
1515
- newModel, {
1516
- headers: {
1517
- 'X-WP-Nonce': qsmQuestionSettings.nonce
1518
  },
1519
- success: QSMQuestion.addNewQuestionFromQuestionBank,
1520
- error: QSMAdmin.displayError
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1521
  }
1522
- );
1523
- },
1524
- prepareCategories: function () {
1525
- QSMQuestion.categories = [];
1526
- QSMQuestion.questions.each(function (question) {
1527
- var category = question.get('category');
1528
- if (0 !== category.length && !_.contains(QSMQuestion.categories, category)) {
1529
- QSMQuestion.categories.push(category);
1530
  }
1531
- });
1532
- },
1533
- processCategories: function () {
1534
- $('.category').remove();
1535
- _.each(QSMQuestion.categories, function (category) {
1536
- QSMQuestion.addCategory(category);
1537
- });
1538
- },
1539
- addCategory: function (category) {
1540
- var template = wp.template('single-category');
1541
- $('#categories').prepend(template({
1542
- category: category
1543
- }));
1544
- },
1545
- loadQuestions: function () {
1546
- QSMAdmin.displayAlert('Loading questions...', 'info');
1547
- QSMQuestion.questions.fetch({
1548
- headers: {
1549
- 'X-WP-Nonce': qsmQuestionSettings.nonce
1550
- },
1551
- data: {
1552
- quizID: qsmQuestionSettings.quizID
1553
- },
1554
- success: QSMQuestion.loadSuccess,
1555
- error: QSMAdmin.displayError
1556
- });
1557
- },
1558
- loadSuccess: function () {
1559
- QSMAdmin.clearAlerts();
1560
- $('.qsm-showing-loader').remove();
1561
- var question;
1562
- _.each(qsmQuestionSettings.qpages, function (page) {
1563
- QSMQuestion.qpages.add(page);
1564
- });
1565
- if (qsmQuestionSettings.pages.length > 0) {
1566
- for (var i = 0; i < qsmQuestionSettings.pages.length; i++) {
1567
- for (var j = 0; j < qsmQuestionSettings.pages[i].length; j++) {
1568
- question = QSMQuestion.questions.get(qsmQuestionSettings.pages[i][j]);
1569
- if( 'undefined' !== typeof question ){
1570
- QSMQuestion.addQuestionToPage(question);
1571
- }
1572
  }
1573
  }
1574
- } else {
1575
- //We have removed this code in 7.0.0 because not allow to delete the single page.
1576
- QSMQuestion.questions.each(QSMQuestion.addQuestionToPage);
1577
- }
1578
- //Create Default pages and one question.
1579
- if (qsmQuestionSettings.pages.length == 0 && QSMQuestion.questions.length == 0) {
1580
- $('.new-page-button').trigger('click');
1581
- $('.questions .new-question-button').trigger('click');
1582
- }
1583
- QSMQuestion.countTotal();
1584
- },
1585
- updateQPage: function (pageID) {
1586
- QSMAdmin.displayAlert('Saving page info', 'info');
1587
- var pageInfo = QSMQuestion.qpages.get(pageID);
1588
- jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
1589
- pageInfo.set(field.name, field.value);
1590
- });
1591
- },
1592
- savePages: function () {
1593
- QSMAdmin.displayAlert('Saving pages and questions...', 'info');
1594
- var pages = [];
1595
- var qpages = [];
1596
- var pageInfo = null;
1597
- var post_id = jQuery('#edit_quiz_post_id').val();
1598
-
1599
- // Cycles through each page and add page + questions to pages variable
1600
- _.each(jQuery('.page'), function (page) {
1601
-
1602
- // If page is empty, do not add it.
1603
- if (0 == jQuery(page).children('.question').length) {
1604
- return;
1605
  }
1606
- var singlePage = [];
1607
- // Cycle through each question and add to the page.
1608
- _.each(jQuery(page).children('.question'), function (question) {
1609
- singlePage.push(jQuery(question).data('question-id'))
 
 
 
 
 
 
 
1610
  });
1611
- pages.push(singlePage);
1612
- /**
1613
- * Prepare qpages Object
1614
- */
1615
- pageInfo = QSMQuestion.qpages.get(jQuery(page).data('page-id'));
1616
- pageInfo.set('questions', singlePage);
1617
- qpages.push(pageInfo.attributes);
1618
- });
1619
- var data = {
1620
- action: 'qsm_save_pages',
1621
- quiz_id: qsmQuestionSettings.quizID,
1622
- nonce: qsmQuestionSettings.saveNonce,
1623
- pages: pages,
1624
- qpages: qpages,
1625
- post_id: post_id,
1626
- };
1627
-
1628
- jQuery.ajax(ajaxurl, {
1629
- data: data,
1630
- method: 'POST',
1631
- success: QSMQuestion.savePagesSuccess,
1632
- error: QSMAdmin.displayjQueryError
1633
- });
1634
- },
1635
- savePagesSuccess: function () {
1636
- QSMAdmin.displayAlert('Questions and pages were saved!', 'success');
1637
- $('#save-edit-quiz-pages').removeClass('is-active');
1638
- },
1639
- addNewPage: function (pageID) {
1640
- var template = wp.template('page');
1641
- if (typeof pageID == 'undefined' || pageID == '') {
1642
- var newPageID = QSMQuestion.qpages.length + 1;
1643
- var pageID = newPageID;
1644
- var pageInfo = QSMQuestion.qpages.add({
1645
- id: newPageID,
1646
- quizID: qsmQuestionSettings.quizID,
1647
- pagekey: qsmRandomID(8),
1648
- hide_prevbtn: 0
1649
  });
1650
- }
1651
- var pageInfo = QSMQuestion.qpages.get(pageID);
1652
- $('.questions').append(template(pageInfo));
1653
- var page = $('.questions').find('.page').length;
1654
- $('.page:nth-child(' + page + ')').find('.page-number').text('Page ' + page);
1655
- $('.page').sortable({
1656
- items: '.question',
1657
- opacity: 70,
1658
- cursor: 'move',
1659
- handle: 'span.dashicons-move',
1660
- placeholder: "ui-state-highlight",
1661
- connectWith: '.page',
1662
- stop: function (evt, ui) {
1663
- setTimeout(
1664
- function () {
1665
- $('.save-page-button').trigger('click');
1666
- },
1667
- 200
1668
- )
1669
- }
1670
- });
1671
- setTimeout(QSMQuestion.removeNew, 250);
1672
- },
1673
- addNewQuestionFromQuestionBank: function (model) {
1674
- var page = parseInt($('#add-question-bank-page').val(), 10);
1675
- model.set('page', page);
1676
- QSMQuestion.questions.add(model);
1677
- QSMQuestion.addQuestionToPage(model);
1678
- $('.import-button').removeClass('disable_import');
1679
- QSMQuestion.countTotal();
1680
- import_button.html('').html('Add Question');
1681
- import_button.attr("onclick", "return confirm('Are you sure! you want to import this question again?')");
1682
- QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
1683
- $('#save-popup-button').trigger('click');
1684
- },
1685
- addNewQuestion: function (model) {
1686
- var default_answers = parseInt(qsmQuestionSettings.default_answers);
1687
- var count = 0;
1688
- QSMAdmin.displayAlert('Question created!', 'success');
1689
- QSMQuestion.addQuestionToPage(model);
1690
- QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
1691
- QSMQuestion.countTotal();
1692
- if ($('#answers').find('.answers-single').length < default_answers) {
1693
- while(count < default_answers){
1694
- $('#new-answer-button').trigger('click');
1695
- count++;
1696
- }
1697
- }
1698
- $('.save-page-button').trigger('click');
1699
- },
1700
- addQuestionToPage: function (model) {
1701
- var page = model.get('page') + 1;
1702
- var template = wp.template('question');
1703
- var page_exists = $('.page:nth-child(' + page + ')').length;
1704
- var count = 0;
1705
- while (!page_exists) {
1706
- QSMQuestion.addNewPage(page);
1707
- page_exists = $('.page:nth-child(' + page + ')').length;
1708
- count++;
1709
- if (count > 5) {
1710
- page_exists = true;
1711
- console.log('count reached');
1712
- }
1713
- }
1714
- var questionName = QSMQuestion.prepareQuestionText(model.get('name'));
1715
- var new_question_title = model.get('question_title');
1716
- if (new_question_title === null || typeof new_question_title === "undefined" || new_question_title === "") {
1717
- //Do nothing
1718
- } else {
1719
- questionName = new_question_title;
1720
- }
1721
- if (questionName == '') {
1722
- questionName = 'Your new question!';
1723
- }
1724
- $('.page:nth-child(' + page + ')').append(template({
1725
- id: model.id,
1726
- category: model.get('category'),
1727
- question: questionName
1728
- }));
1729
- setTimeout(QSMQuestion.removeNew, 250);
1730
- },
1731
- createQuestion: function (page) {
1732
- QSMAdmin.displayAlert('Creating question...', 'info');
1733
- QSMQuestion.questions.create({
1734
- quizID: qsmQuestionSettings.quizID,
1735
- page: page
1736
- }, {
1737
- headers: {
1738
- 'X-WP-Nonce': qsmQuestionSettings.nonce
1739
- },
1740
- success: QSMQuestion.addNewQuestion,
1741
- error: QSMAdmin.displayError
1742
- });
1743
- },
1744
- duplicateQuestion: function (questionID) {
1745
- QSMAdmin.displayAlert('Duplicating question...', 'info');
1746
- var model = QSMQuestion.questions.get(questionID);
1747
- var newModel = _.clone(model.attributes);
1748
- newModel.id = null;
1749
- QSMQuestion.questions.create(
1750
- newModel, {
1751
  headers: {
1752
  'X-WP-Nonce': qsmQuestionSettings.nonce
1753
  },
1754
- success: QSMQuestion.addNewQuestion,
1755
  error: QSMAdmin.displayError
1756
  }
1757
- );
1758
- },
1759
- saveQuestion: function (questionID, CurrentElement) {
1760
- QSMAdmin.displayAlert('Saving question...', 'info');
1761
- var model = QSMQuestion.questions.get(questionID);
1762
- var hint = $('#hint').val();
1763
- var name = wp.editor.getContent('question-text');
1764
- //Save new question title
1765
- var question_title = $('#question_title').val();
1766
- if (name == '' && question_title == '') {
1767
- alert('Enter Question title or description');
1768
- setTimeout(function () {
1769
- $('#save-edit-question-spinner').removeClass('is-active');
1770
- }, 250);
1771
- return false;
1772
- }
1773
- var advanced_option = {};
1774
- var answerInfo = wp.editor.getContent('correct_answer_info');
1775
- var quizID = parseInt( qsmTextTabObject.quiz_id );
1776
- var type = $("#question_type").val();
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();
1783
- var type_arr = [];
1784
- $.each($("input[name='file_upload_type[]']:checked"), function () {
1785
- type_value = $(this).val().replace(/,/g, '');
1786
- type_arr.push(type_value);
1787
- });
1788
- if ('new_category' == category) {
1789
- category = $('#new_category').val();
1790
- }
1791
- if (!category) {
1792
- category = '';
1793
- }
1794
- var multicategories = [];
1795
- $.each($("input[name='tax_input[qsm_category][]']:checked"), function () {
1796
- multicategories.push($(this).val());
1797
- });
1798
- var featureImageID = $('.qsm-feature-image-id').val();
1799
- var featureImageSrc = $('.qsm-feature-image-src').val();
1800
- var answerType = $('#change-answer-editor').val();
1801
- var matchAnswer = $('#match-answer').val();
1802
-
1803
- var answers = [];
1804
- var $answers = jQuery('.answers-single');
1805
- _.each($answers, function (answer) {
1806
- var $answer = jQuery(answer);
1807
- var answer = '';
1808
- var caption = '';
1809
- if (answerType == 'rich') {
1810
- var ta_id = $answer.find('textarea').attr('id')
1811
- answer = wp.editor.getContent(ta_id);
1812
- } else if (answerType == 'image') {
1813
- answer = $answer.find('.answer-text').val().trim();
1814
- answer = $.QSMSanitize(answer);
1815
- caption = $answer.find('.answer-caption').val().trim();
1816
- caption = $.QSMSanitize(caption);
1817
  } else {
1818
- answer = $answer.find('.answer-text').val().trim();
1819
- answer = $.QSMSanitize(answer);
1820
  }
1821
-
1822
- var points = $answer.find('.answer-points').val();
1823
- var correct = 0;
1824
- if ($answer.find('.answer-correct').prop('checked')) {
1825
- correct = 1;
1826
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1827
 
1828
- if (answerType == 'image') {
1829
- answers.push([answer, points, correct, caption]);
1830
- } else {
1831
- answers.push([answer, points, correct]);
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();
1839
- } else if ($(this).find('input[type="number"]').length > 0) {
1840
- var element_id = $(this).find('input[type="number"]').attr('id');
1841
- advanced_option[element_id] = $(this).find('input[type="number"]').val();
1842
- } else if ($(this).find('select').length > 0) {
1843
- var element_id = $(this).find('select').attr('id');
1844
- advanced_option[element_id] = $(this).find('select').val();
1845
- } else if ($(this).find('input[type="checkbox"]').length > 0) {
1846
- var element_id = $(this).find('input[type="checkbox"]').attr('name');
1847
- var multi_value = $(this).find('input[type="checkbox"]:checked').map(function () {
1848
- return this.value;
1849
- }).get().join(',');
1850
- element_id = element_id.replace('[]', '');
1851
- advanced_option[element_id] = multi_value;
1852
- }
1853
- });
1854
- model.save({
1855
- quizID: quizID,
1856
- type: type,
1857
- name: name,
1858
- question_title: question_title,
1859
- answerInfo: answerInfo,
1860
- comments: comments,
1861
- hint: hint,
1862
- category: category,
1863
- multicategories: multicategories,
1864
- featureImageID: featureImageID,
1865
- featureImageSrc: featureImageSrc,
1866
- answers: answers,
1867
- answerEditor: answerType,
1868
- matchAnswer: matchAnswer,
1869
- other_settings: advanced_option,
1870
- rest_nonce: qsmQuestionSettings.rest_user_nonce
1871
- }, {
1872
- headers: {
1873
- 'X-WP-Nonce': qsmQuestionSettings.nonce
1874
- },
1875
- success: QSMQuestion.saveSuccess,
1876
- error: QSMAdmin.displayError,
1877
- type: 'POST'
1878
- });
1879
- jQuery(document).trigger('qsm_save_question', [questionID, CurrentElement]);
1880
- },
1881
- saveSuccess: function (model) {
1882
- QSMAdmin.displayAlert('Question was saved!', 'success');
1883
- var template = wp.template('question');
1884
- var page = model.get('page') + 1;
1885
- var questionName = model.get('name');
1886
- var new_question_title = model.get('question_title');
1887
- if (new_question_title !== '') {
1888
- questionName = $.QSMSanitize(new_question_title);
1889
- }
1890
- var category = [];
1891
- var multicategories = model.get('multicategories');
1892
- if (multicategories === null || typeof multicategories === "undefined") {
1893
- //No Action Require
1894
- } else {
1895
- $.each(multicategories, function (i, val) {
1896
- category.push($(".qsm-popup__content #qsm_category-" + val + " label:first-child")[0].textContent);
1897
  });
1898
- category = category.filter(item => item);
1899
- }
1900
- $('.question[data-question-id=' + model.id + ']').replaceWith(template({
1901
- id: model.id,
1902
- type: model.get('type'),
1903
- category: category.join(', '),
1904
- question: questionName
1905
- }));
1906
- setTimeout(function () {
1907
- $('#save-edit-question-spinner').removeClass('is-active');
1908
- }, 250);
1909
- setTimeout(QSMQuestion.removeNew, 250);
1910
- },
1911
- addNewAnswer: function (answer, questionType = false) {
1912
- if (!questionType) {
1913
- questionType = $('#question_type').val();
1914
- }
1915
- var answerTemplate = wp.template('single-answer');
1916
- if (answer.length >= 7 && answer[6] == 'image') {
1917
- $('#answers').append(answerTemplate({
1918
- answer: decodeEntities(answer[0]),
1919
- points: answer[1],
1920
- correct: answer[2],
1921
- caption: answer[3],
1922
- count: answer[4],
1923
- question_id: answer[5],
1924
- answerType: answer[6],
1925
- form_type: qsmQuestionSettings.form_type,
1926
- quiz_system: qsmQuestionSettings.quiz_system
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1927
  }));
1928
- } else {
1929
- $('#answers').append(answerTemplate({
1930
- answer: decodeEntities(answer[0]),
1931
- points: answer[1],
1932
- correct: answer[2],
1933
- count: answer[3],
1934
- question_id: answer[4],
1935
- answerType: answer[5],
1936
- form_type: qsmQuestionSettings.form_type,
1937
- quiz_system: qsmQuestionSettings.quiz_system
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1938
  }));
1939
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1940
 
1941
- // show points field only for polar in survey and simple form
1942
- if (qsmQuestionSettings.form_type != 0) {
1943
- if (questionType == 13) {
1944
- $('#answers .answer-points').show();
1945
  } else {
1946
- $('#answers .answer-points').val('').hide();
1947
  }
1948
- }
1949
- if (qsmQuestionSettings.form_type == 0) {
1950
- if (questionType == 14) {
1951
- $('.correct-answer').hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1952
  } else {
1953
- $('.correct-answer').show();
 
 
1954
  }
1955
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1956
 
1957
- if (answer[5] == 'rich' && qsmQuestionSettings.qsm_user_ve === 'true') {
1958
- var textarea_id = 'answer-' + answer[4] + '-' + answer[3];
1959
- wp.editor.remove(textarea_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1960
  var settings = {
1961
  mediaButtons: true,
1962
  tinymce: {
@@ -1965,851 +2246,688 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1965
  },
1966
  quicktags: true,
1967
  };
1968
- wp.editor.initialize(textarea_id, settings);
1969
- var anser = QSMQuestion.prepareQuestionText(answer[0]);
1970
- $(textarea_id).val(anser);
1971
- tinyMCE.get(textarea_id).setContent(anser);
1972
- }
1973
- },
1974
- openEditPopup: function (questionID, CurrentElement) {
1975
- if (CurrentElement.parents('.question').next('.questionElements').length > 0) {
1976
- if (CurrentElement.parents('.question').next('.questionElements').is(":visible")) {
1977
- CurrentElement.parents('.question').next('.questionElements').slideUp('slow');
1978
- $('.questions').sortable('enable');
1979
- $('.page').sortable('enable');
1980
- CurrentElement.parents('.question').removeClass('opened');
1981
- } else {
1982
- CurrentElement.parents('.question').addClass('opened');
1983
- CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
1984
- }
1985
- return;
1986
- } else {
1987
- CurrentElement.parents('.question').addClass('opened');
1988
- $('.questions .questionElements').slideDown('slow');
1989
- $('.questions .questionElements').remove();
1990
- }
1991
- //Copy and remove popup div
1992
- var questionElements = $('#modal-1-content').html();
1993
- $('#modal-1-content').children().remove();
1994
- CurrentElement.parents('.question').after("<div style='display: none;' class='questionElements'>" + questionElements + "</div>");
1995
-
1996
- //Show question id on question edit screen
1997
- $('#qsm-question-id').text('ID: ' + questionID);
1998
- QSMQuestion.prepareCategories();
1999
- QSMQuestion.processCategories();
2000
- var question = QSMQuestion.questions.get(questionID);
2001
- var questionText = QSMQuestion.prepareQuestionText(question.get('name'));
2002
- $('#edit_question_id').val(questionID);
2003
- var answerInfo = question.get('answerInfo');
2004
- var CAI_editor = '';
2005
- var question_editor = ''
2006
- if (qsmQuestionSettings.qsm_user_ve === 'true') {
2007
- wp.editor.remove('question-text');
2008
- wp.editor.remove('correct_answer_info');
2009
- QSMQuestion.prepareEditor();
2010
- question_editor = tinyMCE.get('question-text');
2011
- CAI_editor = tinyMCE.get('correct_answer_info');
2012
- }
2013
- if ($('#wp-question-text-wrap').hasClass('html-active')) {
2014
- jQuery("#question-text").val(questionText);
2015
- } else if (question_editor) {
2016
- tinyMCE.get('question-text').setContent(questionText);
2017
- } else {
2018
- jQuery("#question-text").val(questionText);
2019
- }
2020
-
2021
- if ($('#wp-correct_answer_info-wrap').hasClass('html-active')) {
2022
- jQuery("#correct_answer_info").val(answerInfo);
2023
- } else if (CAI_editor) {
2024
- tinyMCE.get('correct_answer_info').setContent(answerInfo);
2025
- } else {
2026
- jQuery("#correct_answer_info").val(answerInfo);
2027
- }
2028
-
2029
- $('#answers').empty();
2030
- var answers = question.get('answers');
2031
- var answerEditor = question.get('answerEditor');
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") {
2038
- get_limit_text = '0';
2039
- }
2040
- //Get limit multiple response value
2041
- var get_limit_mr = question.get('limit_multiple_response');
2042
- if (get_limit_mr === null || typeof get_limit_mr === "undefined") {
2043
- get_limit_mr = '0';
2044
- }
2045
- //Get file upload limit
2046
- var get_limit_fu = question.get('file_upload_limit');
2047
- if (get_limit_fu === null || typeof get_limit_fu === "undefined") {
2048
- get_limit_fu = '0';
2049
- }
2050
- //Get checked question type
2051
- var multicategories = question.get('multicategories');
2052
- $("input[name='tax_input[qsm_category][]']:checkbox").attr("checked", false);
2053
- if (multicategories === null || typeof multicategories === "undefined") {
2054
- //No Action Require
2055
- } else {
2056
- $.each(multicategories, function (i, val) {
2057
- $("input[name='tax_input[qsm_category][]']:checkbox[value='" + val + "']").attr("checked", "true");
2058
- });
2059
- }
2060
- //Get featured image
2061
- var get_featureImageSrc = question.get('featureImageSrc');
2062
- var get_featureImageID = question.get('featureImageID');
2063
- if (get_featureImageSrc === null || typeof get_featureImageSrc === "undefined") {
2064
- get_featureImageSrc = get_featureImageID = '';
2065
- }
2066
- //Get checked question type
2067
- var get_file_upload_type = question.get('file_upload_type');
2068
- $("input[name='file_upload_type[]']:checkbox").attr("checked", false);
2069
- if (get_file_upload_type === null || typeof get_file_upload_type === "undefined") {} else {
2070
- var fut_arr = get_file_upload_type.split(",");
2071
- $.each(fut_arr, function (i) {
2072
- $("input[name='file_upload_type[]']:checkbox[value='" + fut_arr[i] + "']").attr("checked", "true");
2073
- });
2074
- }
2075
- var al = 0;
2076
- _.each(answers, function (answer) {
2077
- answer.push(al + 1);
2078
- answer.push(questionID);
2079
- answer.push(answerEditor);
2080
- QSMQuestion.addNewAnswer(answer, question.get('type'));
2081
- al++;
2082
- });
2083
- //get new question type
2084
- var get_question_title = question.get('question_title');
2085
- if (get_question_title === null || typeof get_question_title === "undefined") {
2086
- get_question_title = '';
2087
- }
2088
-
2089
- //Hide the question settings based on question type
2090
- $('.qsm_hide_for_other').hide();
2091
- if ($('.qsm_show_question_type_' + question.get('type')).length > 0) {
2092
- $('.qsm_show_question_type_' + question.get('type')).show();
2093
- }
2094
-
2095
- qsm_hide_show_question_desc(question.get('type'));
2096
- $('#hint').val(question.get('hint'));
2097
- $("#question_type").val(question.get('type'));
2098
- $("#comments").val(question.get('comments'));
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);
2105
- $("#change-answer-editor").val(answerEditor);
2106
- $(".category-radio").removeAttr('checked');
2107
- $("#edit-question-id").text('').text(questionID);
2108
- $("#question_title").val(get_question_title);
2109
- if (0 !== question.get('category').length) {
2110
- $(".category-radio").val([question.get('category')]);
2111
- }
2112
- //Append feature image
2113
- if (get_featureImageSrc) {
2114
- var button = $('.qsm-feature-image-upl');
2115
- button.html('<img src="' + get_featureImageSrc + '" style="width:150px">');
2116
- button.next('.qsm-feature-image-rmv').show();
2117
- button.next().next('.qsm-feature-image-id').val(get_featureImageID);
2118
- button.next().next().next('.qsm-feature-image-src').val(get_featureImageSrc);
2119
- }
2120
- //Append extra settings
2121
- var all_setting = question.get('settings');
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') {
2139
- $('#match-answer').val(value);
2140
  }
2141
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2142
  }
2143
- CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
2144
- $('#modal-1-content').html(questionElements);
2145
- //MicroModal.show( 'modal-1' );
2146
- $('.questions').sortable('disable');
2147
- $('.page').sortable('disable');
2148
-
2149
- QSMQuestion.sync_child_parent_category(questionID);
2150
 
2151
- jQuery(document).trigger('qsm_open_edit_popup', [questionID, CurrentElement]);
2152
- },
2153
- openEditPagePopup: function (pageID) {
2154
- var page = QSMQuestion.qpages.get(pageID);
2155
- $('#edit_page_id').val(pageID);
2156
- $("#edit-page-id").text('').text(pageID);
2157
- jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
2158
- field.value = page.get(field.name);
2159
  });
2160
- MicroModal.show('modal-page-1');
2161
- },
2162
- removeNew: function () {
2163
- $('.page-new').removeClass('page-new');
2164
- $('.question-new').removeClass('question-new');
2165
- },
2166
- prepareQuestionText: function (question) {
2167
- return jQuery('<textarea />').html(question).text();
2168
- },
2169
- prepareEditor: function () {
2170
- var settings = {
2171
- mediaButtons: true,
2172
- tinymce: {
2173
- forced_root_block: '',
2174
- toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
2175
- },
2176
- quicktags: true,
2177
- };
2178
- wp.editor.initialize('question-text', settings);
2179
- wp.editor.initialize('correct_answer_info', settings);
2180
- },
2181
- sync_child_parent_category: function (questionID) {
2182
- $('.qsm_category_checklist').find('input').each(function (index, input) {
2183
- $(input).bind('change', function () {
2184
- var checkbox = $(this);
2185
- var is_checked = $(checkbox).is(':checked');
2186
- if (is_checked) {
2187
- $(checkbox).parents('li').children('label').children('input').prop("checked", true);
2188
- } else {
2189
- $(checkbox).parentsUntil('ul').find('input').prop("checked", false);
2190
- }
2191
- jQuery(document).trigger('qsm_sync_child_parent_category', [checkbox, questionID]);
2192
- });
2193
  });
2194
- },
2195
- question_type_change: function (previous_question_val, questionID) {
2196
- //you can override this object
2197
- var ans_type = $('#change-answer-editor').val();
2198
- if (2 == questionID && 'text' !== ans_type){
2199
- $('#change-answer-editor').val('text');
2200
- $('.answers-single').remove();
2201
- }
2202
- }
2203
- };
2204
-
2205
- $(function () {
2206
- QSMQuestion.pageCollection = Backbone.Collection.extend({
2207
- model: QSMQuestion.page
2208
- });
2209
- QSMQuestion.qpages = new QSMQuestion.pageCollection();
2210
- QSMQuestion.questionCollection = Backbone.Collection.extend({
2211
- url: wpApiSettings.root + 'quiz-survey-master/v1/questions',
2212
- model: QSMQuestion.question
2213
- });
2214
- QSMQuestion.questions = new QSMQuestion.questionCollection();
2215
- $('.new-page-button').on('click', function (event) {
2216
- event.preventDefault();
2217
- QSMQuestion.addNewPage();
2218
- });
2219
-
2220
- $('.questions').on('click', '.new-question-button', function (event) {
2221
- event.preventDefault();
2222
- if (jQuery('.questionElements').is(':visible')) {
2223
- $('#save-popup-button').trigger('click');
2224
- }
2225
- QSMQuestion.createQuestion($(this).parents('.page').index());
2226
- });
2227
-
2228
- $('.questions').on('click', '.add-question-bank-button', function (event) {
2229
- event.preventDefault();
2230
- if (jQuery('.questionElements').is(':visible')) {
2231
- $('#save-popup-button').trigger('click');
2232
- }
2233
- QSMQuestion.openQuestionBank($(this).parents('.page').index());
2234
- });
2235
 
2236
- //Show more question on load more
2237
- $(document).on('click', '.qb-load-more-question', function (event) {
2238
- event.preventDefault();
2239
- QSMQuestion.loadQuestionBank();
2240
- });
 
 
2241
 
2242
- //Show category related question
2243
- $(document).on('change', '#question-bank-cat', function (event) {
2244
- event.preventDefault();
2245
- QSMQuestion.loadQuestionBank('change');
2246
- });
 
 
2247
 
2248
- //Show searched question
2249
- $(document).on('submit', '#question-bank-search-form', function (event) {
2250
- event.preventDefault();
2251
- QSMQuestion.loadQuestionBank('change');
2252
- });
2253
 
2254
- $('.questions').on('click', '.edit-question-button', function (event) {
2255
- event.preventDefault();
2256
- $('.qsm-category-filter').trigger('keyup');
2257
- QSMQuestion.openEditPopup($(this).parents('.question').data('question-id'), $(this));
2258
- });
2259
- $('.questions').on('click', '.edit-page-button', function (event) {
2260
- event.preventDefault();
2261
- QSMQuestion.openEditPagePopup($(this).parents('.page').data('page-id'));
2262
- });
2263
 
2264
- $(document).on('click', '.questions .duplicate-question-button', function (event) {
2265
- event.preventDefault();
2266
- QSMQuestion.duplicateQuestion($(this).parents('.question').data('question-id'));
2267
- });
2268
- $('.questions').on('click', '.delete-question-button', function (event) {
2269
- event.preventDefault();
2270
- remove = $(this);
2271
- // opens-up question-delete modal
2272
- MicroModal.show('modal-7');
2273
- $('#unlink-question-button').attr('data-question-iid', $(this).data('question-iid'));
2274
- $('#delete-question-button').attr('data-question-iid', $(this).data('question-iid'));
2275
- });
2276
- // removes question from database
2277
- $('#delete-question-button').click(function (event) {
2278
- event.preventDefault();
2279
- var question_id = $(this).data('question-iid');
2280
- $.ajax({
2281
- url: ajaxurl,
2282
- method: 'POST',
2283
- data: {
2284
- 'action': 'qsm_delete_question_from_database',
2285
- 'question_id': question_id,
2286
- 'nonce': qsmQuestionSettings.single_question_nonce
2287
- },
2288
- success: function (response) {
2289
- // do nothing
2290
- }
2291
  });
2292
- remove.parents('.question').remove();
2293
- QSMQuestion.countTotal();
2294
- $('.save-page-button').trigger('click');
2295
- MicroModal.close('modal-7');
2296
- });
2297
 
2298
- // unlink question from a particular quiz.
2299
- $('#unlink-question-button').click(function (event) {
2300
- event.preventDefault();
2301
- var question_id = $(this).data('question-iid');
2302
- remove.parents('.question').remove();
2303
- QSMQuestion.countTotal();
2304
- $('.save-page-button').trigger('click');
2305
- MicroModal.close('modal-7');
2306
- });
2307
 
2308
- $(document).on('click', '.delete-page-button', function (event) {
2309
- event.preventDefault();
2310
- if (confirm('Are you sure?')) {
2311
- var pageID = $(this).parent().siblings('main').children('#edit_page_id').val();
2312
- $('.page[data-page-id='+pageID+']').remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2313
  $('.save-page-button').trigger('click');
 
 
 
 
 
 
 
 
2314
  QSMQuestion.countTotal();
2315
- MicroModal.close('modal-page-1');
2316
- }
2317
- });
2318
- $(document).on('click', '#answers .delete-answer-button', function (event) {
2319
- event.preventDefault();
2320
- $(this).parents('.answers-single').remove();
2321
- });
2322
- $(document).on('click', '#delete-action .deletion', function (event) {
2323
- event.preventDefault();
2324
- $(this).parents('.questionElements').slideUp('slow');
2325
- });
2326
- $(document).on('click', '#save-popup-button', function (event) {
2327
- event.preventDefault();
2328
- questionElements = $(this).parents('.questionElements');
2329
- if (6 == questionElements.find('#question_type').val()) {
2330
- question_description = wp.editor.getContent('question-text').trim();
2331
- if (question_description == '' || question_description == null) {
2332
- alert('Text/HTML Section cannot be empty');
2333
- return false;
2334
  }
2335
- }
2336
- if (14 == questionElements.find('#question_type').val()) {
2337
- question_description = wp.editor.getContent('question-text').trim();
2338
- blanks = question_description.match(/%BLANK%/g);
2339
- options_length = $('.answer-text-div').length
2340
- if ($('#match-answer').val() == 'sequence') {
2341
- if (blanks == null || blanks.length != options_length) {
2342
- $('.modal-8-table').html('Number of <strong>%BLANK%</strong> should be equal to options for sequential matching');
2343
- MicroModal.show('modal-8');
2344
- return false;
2345
- }
2346
- } else {
2347
- if (blanks == null || options_length === 0) {
2348
- $('.modal-8-table').html('Atleast one <strong>%BLANK%</strong> and one option is required.');
2349
- MicroModal.show('modal-8');
 
2350
  return false;
2351
  }
2352
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2353
 
2354
 
2355
- }
2356
- $('#save-edit-question-spinner').addClass('is-active');
2357
- var model_html = $('#modal-1-content').html();
2358
- $('#modal-1-content').children().remove();
2359
-
2360
- QSMQuestion.saveQuestion($(this).parents('.questionElements').children('#edit_question_id').val(), $(this));
2361
- $('.save-page-button').trigger('click');
2362
- $('#modal-1-content').html(model_html);
2363
- });
2364
- $(document).on('click', '#new-answer-button', function (event) {
2365
- event.preventDefault();
2366
- var answer_length = $('#answers').find('.answers-single').length;
2367
- if (answer_length > 1 && $('#question_type').val() == 13) {
2368
- alert('You can not add more than 2 answer for Polar Question type');
2369
- return;
2370
- }
2371
- var question_id = $('#edit_question_id').val();
2372
- var answerType = $('#change-answer-editor').val();
2373
- var answer = ['', '', 0, answer_length + 1, question_id, answerType];
2374
- QSMQuestion.addNewAnswer(answer, 0);
2375
- });
2376
 
2377
- $(document).on('click', '.qsm-popup-bank .import-button', function (event) {
2378
- event.preventDefault();
2379
- $(this).text('').text('Adding Question');
2380
- import_button = $(this);
2381
- $('.import-button').addClass('disable_import');
2382
- QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
2383
- MicroModal.close('modal-2');
2384
- });
 
 
 
 
 
 
 
 
2385
 
2386
- //Click on selected question button.
2387
- $('.qsm-popup-bank').on('click', '#qsm-import-selected-question', function (event) {
2388
- var $total_selction = $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').length;
2389
- if ($total_selction === 0) {
2390
- alert('No question is selected.');
2391
- } else {
2392
- $.fn.reverse = [].reverse;
2393
- $($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).each(function () {
2394
- $(this).find('.import-button').text('').text('Adding Question');
2395
- import_button = $(this).find('.import-button');
2396
- QSMQuestion.countTotal();
2397
- QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
2398
- $(this).find('.import-button').text('').text('Add Question');
2399
- });
2400
  $('.import-button').addClass('disable_import');
2401
- $('#question-bank').find('[name="qsm-question-checkbox[]"]').attr('checked', false);
2402
- MicroModal.close('modal-2');
2403
- }
2404
- });
2405
- //Delete question from question bank
2406
- $('.qsm-popup-bank').on('click', '#qsm-delete-selected-question', function (event) {
2407
- if (confirm('are you sure?')) {
2408
  var $total_selction = $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').length;
2409
  if ($total_selction === 0) {
2410
- alert('No question is selected.');
2411
  } else {
2412
  $.fn.reverse = [].reverse;
2413
- var question_ids = $($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).map(function () {
2414
- return $(this).data('question-id');
2415
- }).get().join(',');
2416
- if (question_ids) {
2417
- $.ajax({
2418
- url: ajaxurl,
2419
- method: 'POST',
2420
- data: {
2421
- 'action': 'qsm_delete_question_question_bank',
2422
- 'question_ids': question_ids,
2423
- 'nonce': qsmQuestionSettings.question_bank_nonce
2424
- },
2425
- success: function (response) {
2426
- var data = jQuery.parseJSON(response);
2427
- if (data.success === true) {
2428
- $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').slideUp('slow');
2429
- alert(data.message);
2430
- } else {
2431
- alert(data.message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2432
  }
2433
- }
2434
- });
2435
  }
2436
  }
2437
- }
2438
- });
2439
-
2440
- //Select all button.
2441
- $(document).on('change', '.qsm-question-checkbox', function (event) {
2442
- event.preventDefault();
2443
- if ($('.qsm-question-checkbox:checked').length > 0) {
2444
- $('.qsm-question-bank-footer').addClass('opened');
2445
- } else {
2446
- $('.qsm-question-bank-footer').removeClass('opened');
2447
- }
2448
- });
2449
- $(document).on('change', '#qsm_select_all_question', function (event) {
2450
- event.preventDefault();
2451
- $('.qsm-question-checkbox').prop('checked', jQuery('#qsm_select_all_question').prop('checked'));
2452
- if ($('.qsm-question-checkbox:checked').length > 0) {
2453
- $('.qsm-question-bank-footer').addClass('opened');
2454
- } else {
2455
- $('.qsm-question-bank-footer').removeClass('opened');
2456
- }
2457
- });
2458
-
2459
- $('.save-page-button').on('click', function (event) {
2460
- event.preventDefault();
2461
- $('#save-edit-quiz-pages').addClass('is-active');
2462
- QSMQuestion.savePages();
2463
- });
2464
- $('#save-page-popup-button').on('click', function (event) {
2465
- event.preventDefault();
2466
- var pageID = $(this).parent().siblings('main').children('#edit_page_id').val();
2467
- var pageKey = jQuery('#pagekey').val();
2468
- if (pageKey.replace(/^\s+|\s+$/g, "").length == 0) {
2469
- alert('Page Name is required!');
2470
- return false;
2471
- } else if (null == pageKey.match(/^[A-Za-z0-9\-\s]+$/)) {
2472
- alert('Please use only Alphanumeric characters.');
2473
- return false;
2474
- } else {
2475
- QSMQuestion.updateQPage(pageID);
2476
- QSMQuestion.savePages();
2477
- MicroModal.close('modal-page-1');
2478
- }
2479
- });
2480
-
2481
- $(document).on('change', '#change-answer-editor', function (event) {
2482
- var newVal = $(this).val();
2483
- if (confirm('All answer will be reset, Do you want to still continue?')) {
2484
- $('#answers').find('.answers-single').remove();
2485
- } else {
2486
- if (newVal == 'rich') {
2487
- $(this).val('text');
2488
- } else {
2489
- $(this).val('rich');
2490
- }
2491
- return false;
2492
- }
2493
- });
2494
 
2495
- // Adds event handlers for searching questions
2496
- $('#question_search').on('keyup', function () {
2497
- $('.question').each(function () {
2498
- if ($(this).text().toLowerCase().indexOf($('#question_search').val().toLowerCase()) === -1) {
2499
- $(this).hide();
2500
  } else {
2501
- $(this).show();
2502
- $(this).parent('.page').show();
2503
-
2504
  }
2505
  });
2506
- $('.page').each(function () {
2507
- if (0 === $(this).children('.question:visible').length) {
2508
- $(this).hide();
 
 
2509
  } else {
2510
- $(this).show();
2511
  }
2512
  });
2513
- if (0 === $('#question_search').val().length) {
2514
- $('.page').show();
2515
- $('.question').show();
2516
- }
2517
- });
2518
-
2519
- qsm_init_sortable();
2520
 
2521
- if (qsmQuestionSettings.qsm_user_ve === 'true') {
2522
- QSMQuestion.prepareEditor();
2523
- }
2524
- QSMQuestion.loadQuestions();
2525
-
2526
- /**
2527
- * Hide/show advanced option
2528
- */
2529
- $(document).on('click', '#show-advanced-option', function () {
2530
- var $this = $(this);
2531
- $(this).next('div.advanced-content').slideToggle('slow', function () {
2532
- if ($(this).is(':visible')) {
2533
- $this.text('').html('Hide advance options &laquo;');
 
 
2534
  } else {
2535
- $this.text('').html('Show advance options &raquo;');
 
 
2536
  }
2537
  });
2538
- });
2539
 
2540
- //Hide the question settings based on question type
2541
- var previous_question_val;
2542
- $(document).on('focus', '#question_type', function () {
2543
- previous_question_val = this.value;
2544
- })
2545
- $(document).on('change', '#question_type', function() {
2546
- var question_val = $('#question_type').val();
2547
- QSMQuestion.question_type_change(previous_question_val, question_val);
2548
- if (6 == question_val) {
2549
- var question_description = wp.editor.getContent('question-text');
2550
- if (question_description == 'Add description here!') {
2551
- tinyMCE.get('question-text').setContent('');
 
 
 
2552
  }
2553
- }
2554
- if (14 == question_val) {
2555
- $('.correct-answer').hide();
2556
- }
2557
- else{
2558
- $('.correct-answer').show();
2559
- }
2560
-
2561
- // show points field only for polar in survey and simple form
2562
- if (qsmQuestionSettings.form_type != 0) {
2563
  if (13 == question_val) {
2564
- $('.answer-points').show();
2565
- } else {
2566
- $('.answer-points').val('').hide();
2567
  }
2568
- }
2569
 
 
 
 
 
 
 
 
 
2570
 
2571
- $('.qsm_hide_for_other').hide();
2572
- if ($('.qsm_show_question_type_' + question_val).length > 0) {
2573
- $('.qsm_show_question_type_' + question_val).show();
2574
- }
2575
- qsm_hide_show_question_desc(question_val);
2576
- });
 
 
 
 
 
 
 
 
2577
 
2578
- //Add new category
2579
- $(document).on('click', '#qsm-category-add-toggle', function () {
2580
- if ($('#qsm-category-add').is(":visible")) {
2581
- $('.questionElements #new_category_new').attr('checked', false);
2582
- $('#qsm-category-add').slideUp('slow');
2583
- } else {
2584
- $('.questionElements #new_category_new').attr('checked', true).prop('checked', 'checked');
2585
- $('#qsm-category-add').slideDown('slow');
2586
  }
2587
- });
2588
 
2589
- //Hide/show quesion description
2590
- $(document).on('click', '.qsm-show-question-desc-box', function (e) {
2591
- e.preventDefault();
2592
- $(this).hide();
2593
- var question_description = wp.editor.getContent('question-text');
2594
- if (question_description == '' || question_description == null) {
2595
- var questionElements = $(this).parents('.questionElements');
2596
- if (6 == questionElements.find('#question_type').val()) {
2597
- tinyMCE.get('question-text').setContent('');
2598
- } else {
2599
- tinyMCE.get('question-text').setContent('Add description here!');
2600
- }
2601
- }
2602
- $(this).next('.qsm-row').show();
2603
- });
2604
- $(document).on('click', '.qsm-hide-question-desc-box', function (e) {
2605
- e.preventDefault();
2606
- $(this).parents('.qsm-row.qsm-editor-wrap').hide();
2607
- $('.qsm-show-question-desc-box').show();
2608
- });
2609
 
2610
- //Open file upload on feature image
2611
- $('body').on('click', '.qsm-feature-image-upl', function (e) {
2612
- e.preventDefault();
2613
- var button = $(this),
2614
- custom_uploader = wp.media({
2615
- title: 'Insert image',
2616
- library: {
2617
- // uploadedTo : wp.media.view.settings.post.id, // attach to the current post?
2618
- type: 'image'
2619
- },
2620
- button: {
2621
- text: 'Use this image' // button label text
2622
- },
2623
- multiple: false
2624
- }).on('select', function () { // it also has "open" and "close" events
2625
- var attachment = custom_uploader.state().get('selection').first().toJSON();
2626
- button.html('<img src="' + attachment.url + '" style="width:150px">');
2627
- button.next('.qsm-feature-image-rmv').show();
2628
- button.next().next('.qsm-feature-image-id').val(attachment.id);
2629
- button.next().next().next('.qsm-feature-image-src').val(attachment.url);
2630
- }).open();
2631
- });
2632
 
2633
- // on remove button click
2634
- $('body').on('click', '.qsm-feature-image-rmv', function (e) {
2635
- e.preventDefault();
2636
- var button = $(this);
2637
- button.next().val(''); // emptying the hidden field
2638
- button.next().next().val(''); // emptying the hidden field
2639
- button.hide().prev().html('Upload image');
2640
- });
2641
 
2642
- });
2643
- var decodeEntities = (function () {
2644
- //create a new html document (doesn't execute script tags in child elements)
2645
- var doc = document.implementation.createHTMLDocument("");
2646
- var element = doc.createElement('div');
 
 
 
 
2647
 
2648
- function getText(str) {
2649
- element.innerHTML = str;
2650
- str = element.textContent;
2651
- element.textContent = '';
2652
- return str;
2653
- }
 
 
 
 
2654
 
2655
- function decodeHTMLEntities(str) {
2656
- if (str && typeof str === 'string') {
2657
- var x = getText(str);
2658
- while (str !== x) {
2659
- str = x;
2660
- x = getText(x);
 
 
 
 
2661
  }
2662
- return x;
2663
- }
2664
- }
2665
- return decodeHTMLEntities;
2666
- })();
 
 
2667
 
2668
- function qsm_hide_show_question_desc(question_type) {
2669
- $('.question-type-description').hide();
2670
- if ($('#question_type_' + question_type + '_description').length > 0) {
2671
- $('#question_type_' + question_type + '_description').show();
2672
- }
2673
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2674
 
2675
- function qsm_init_sortable() {
2676
- $('.questions').sortable({
2677
- opacity: 70,
2678
- cursor: 'move',
2679
- handle: 'span.dashicons-move',
2680
- placeholder: "ui-state-highlight",
2681
- stop: function (evt, ui) {
2682
- $('.questions > .page').each(function () {
2683
- var page = parseInt($(this).index()) + 1;
2684
- $(this).find('.page-number').text('Page ' + page);
2685
- });
2686
- setTimeout(
2687
- function () {
2688
- $('.save-page-button').trigger('click');
2689
- },
2690
- 200
2691
- )
2692
- }
2693
  });
2694
- $('.page').sortable({
2695
- items: '.question',
2696
- handle: 'span.dashicons-move',
2697
- opacity: 70,
2698
- cursor: 'move',
2699
- placeholder: "ui-state-highlight",
2700
- connectWith: '.page',
2701
- stop: function (evt, ui) {
2702
- setTimeout(
2703
- function () {
2704
- $('.save-page-button').trigger('click');
2705
- },
2706
- 200
2707
- )
 
 
 
 
 
 
 
2708
  }
2709
- });
2710
- }
2711
 
2712
- function qsmRandomID(length) {
2713
- var result = '';
2714
- var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
2715
- var charactersLength = characters.length;
2716
- for (var i = 0; i < length; i++) {
2717
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
2718
  }
2719
- return result;
2720
- }
2721
- $(document).on('keyup', '.qsm-category-filter', function () {
2722
- search_term = $.trim($(this).val());
2723
- if (search_term == '') {
2724
- $('.qsm_category_checklist li').each(function () {
2725
- $(this).show()
 
 
 
 
 
 
 
 
 
 
 
 
2726
  });
2727
- } else {
2728
- search_term = new RegExp(search_term, 'i');
2729
- $('.qsm_category_checklist li').each(function () {
2730
- search_string = $(this).children('label').text();
2731
- result = search_string.search(search_term);
2732
- if (result > -1) {
2733
- $(this).show();
2734
- if ($(this).parent('ul').hasClass('children')) {
2735
- $(this).parents('li').show();
2736
- }
2737
- } else {
2738
- $(this).hide();
 
 
2739
  }
2740
  });
 
2741
 
 
 
 
 
 
 
 
 
2742
  }
2743
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2744
 
2745
- $(document).on('click', '.add-multiple-category', function (e) {
2746
- e.preventDefault();
2747
- MicroModal.show('modal-9', {
2748
- onShow: function () {
2749
- $('#new-category-name').val($('.qsm-category-filter').val());
2750
- $('.qsm-category-filter').val('').trigger('keyup');
2751
- },
2752
- onClose: function () {
2753
- $('#modal-9-content .info').html('');
2754
- $('#new-category-name').val('');
2755
- $('#qsm-parent-category').val(-1);
2756
  }
2757
  });
2758
- });
2759
 
2760
- $(document).on('click', '#save-multi-category-button', function (e) {
2761
- e.preventDefault();
2762
- duplicate = false;
2763
- new_category = $('#new-category-name').val().trim();
2764
- parent_category = $('#qsm-parent-category option:selected').val();
2765
- if (new_category == '') {
2766
- $('#modal-9-content .info').html('Category cannot be empty');
2767
- return false;
2768
- } else {
2769
- $('#qsm-parent-category option').each(function () {
2770
- if ($(this).text().toLowerCase() == new_category.toLowerCase()) {
2771
- duplicate = true;
2772
- $('#modal-9-content .info').html('Category ' + new_category + ' already exists in database');
2773
- return false;
2774
  }
2775
  });
 
2776
 
2777
- if (!duplicate) {
2778
- var new_category_data = {
2779
- action: 'save_new_category',
2780
- name: new_category,
2781
- parent: parent_category
2782
- };
2783
- $('#modal-9-content .info').html('');
2784
- jQuery.ajax(ajaxurl, {
2785
- data: new_category_data,
2786
- method: 'POST',
2787
- success: function (response) {
2788
- result = JSON.parse(response);
2789
- if (result.term_id > 0) {
2790
- $('#qsm-parent-category').append('<option class="level-0" value="' + result.term_id + '">' + new_category + '</option>');
2791
- if (parent_category == -1) {
2792
- $('.qsm_category_checklist').prepend('<li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" checked="checked" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li>');
2793
- } else {
2794
- if ($('.qsm_category_checklist li#qsm_category-' + parent_category).children('ul').length > 0) {
2795
- $('.qsm_category_checklist li#qsm_category-' + parent_category).children('ul').append('<li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2796
  } else {
2797
- $('.qsm_category_checklist li#qsm_category-' + parent_category).append('<ul class="children"><li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li></ul>')
 
 
 
 
 
 
 
 
2798
  }
2799
- $('.qsm_category_checklist li#qsm_category-' + result.term_id).children('label').children('input').prop('checked', true);
2800
- $('.qsm_category_checklist li#qsm_category-' + result.term_id).parents('li').each(function () {
2801
- $(this).children('label').children('input').prop('checked', true);
2802
- });
2803
  }
2804
- MicroModal.close('modal-9')
2805
  }
2806
- }
2807
- });
2808
  }
2809
- }
2810
- });
2811
  }
2812
- }
2813
  }(jQuery));
2814
 
2815
 
@@ -2818,32 +2936,32 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2818
  */
2819
 
2820
  (function ($) {
2821
- if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2822
- if (window.location.href.indexOf('tab=results-pages')> 0 ){
2823
  var QSMAdminResults;
2824
  QSMAdminResults = {
2825
  total: 0,
2826
- saveResults: function() {
2827
- QSMAdmin.displayAlert( 'Saving results pages...', 'info' );
2828
  var pages = [];
2829
  var page = {};
2830
  var redirect_value = '';
2831
- $( '.results-page' ).each( function() {
2832
  page = {
2833
  'conditions': [],
2834
- 'page': wp.editor.getContent( $( this ).find( '.results-page-template' ).attr( 'id' ) ),
2835
  'redirect': false,
2836
  };
2837
- redirect_value = $( this ).find( '.results-page-redirect' ).val();
2838
- if ( '' != redirect_value ) {
2839
  page.redirect = redirect_value;
2840
  }
2841
- $( this ).find( '.results-page-condition' ).each( function() {
2842
  page.conditions.push({
2843
  'category': $(this).children('.results-page-condition-category').val(),
2844
- 'criteria': $( this ).children( '.results-page-condition-criteria' ).val(),
2845
- 'operator': $( this ).children( '.results-page-condition-operator' ).val(),
2846
- 'value': $( this ).children( '.results-page-condition-value' ).val()
2847
  });
2848
  });
2849
  pages.push(page);
@@ -2858,67 +2976,67 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2858
  data: data,
2859
  headers: { 'X-WP-Nonce': qsmResultsObject.nonce },
2860
  })
2861
- .done(function( results ) {
2862
- if ( results.status ) {
2863
- QSMAdmin.displayAlert( 'Results pages were saved!', 'success' );
2864
- } else {
2865
- QSMAdmin.displayAlert( 'There was an error when saving the results pages. Please try again.', 'error' );
2866
- }
2867
- })
2868
- .fail(QSMAdmin.displayjQueryError);
2869
  },
2870
- loadResults: function() {
2871
  //QSMAdmin.displayAlert( 'Loading results pages...', 'info' );
2872
  $.ajax({
2873
  url: wpApiSettings.root + 'quiz-survey-master/v1/quizzes/' + qsmResultsObject.quizID + '/results',
2874
  headers: { 'X-WP-Nonce': qsmResultsObject.nonce },
2875
  })
2876
- .done(function( pages ) {
2877
- $( '#results-pages' ).find( '.qsm-spinner-loader' ).remove();
2878
- pages.forEach( function( page, i, pages ) {
2879
- QSMAdminResults.addResultsPage( page.conditions, page.page, page.redirect );
2880
  });
2881
  QSMAdmin.clearAlerts();
2882
  })
2883
  .fail(QSMAdmin.displayjQueryError);
2884
  },
2885
  addCondition: function ($page, category, criteria, operator, value) {
2886
- var template = wp.template( 'results-page-condition' );
2887
  $page.find('.results-page-when-conditions').append(template({
2888
- 'category': category,
2889
- 'criteria': criteria,
2890
- 'operator': operator,
2891
- 'value': value
2892
  }));
2893
  },
2894
- newCondition: function( $page ) {
2895
  QSMAdminResults.addCondition($page, '', 'score', 'equal', 0);
2896
  },
2897
  addResultsPage: function (conditions, page, redirect) {
2898
  QSMAdminResults.total += 1;
2899
- var template = wp.template( 'results-page' );
2900
- $( '#results-pages' ).append( template( { id: QSMAdminResults.total, page: page, redirect: redirect } ) );
2901
- conditions.forEach( function( condition, i, conditions) {
2902
  QSMAdminResults.addCondition(
2903
  $('.results-page:last-child'),
2904
- condition.category,
2905
- condition.criteria,
2906
- condition.operator,
2907
- condition.value
2908
  );
2909
  });
2910
  var settings = {
2911
  mediaButtons: true,
2912
- tinymce: {
2913
- forced_root_block : '',
2914
  toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
2915
  },
2916
- quicktags: true,
2917
  };
2918
- wp.editor.initialize( 'results-page-' + QSMAdminResults.total, settings );
2919
  jQuery(document).trigger('qsm_after_add_result_block', [conditions, page, redirect]);
2920
  },
2921
- newResultsPage: function() {
2922
  var conditions = [{
2923
  'category': '',
2924
  'criteria': 'score',
@@ -2926,32 +3044,32 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2926
  'value': '0'
2927
  }];
2928
  var page = '%QUESTIONS_ANSWERS%';
2929
- QSMAdminResults.addResultsPage( conditions, page );
2930
  }
2931
  };
2932
- $(function() {
2933
  QSMAdminResults.loadResults();
2934
 
2935
- $( '.add-new-page' ).on( 'click', function( event ) {
2936
  event.preventDefault();
2937
  QSMAdminResults.newResultsPage();
2938
  });
2939
- $( '.save-pages' ).on( 'click', function( event ) {
2940
  event.preventDefault();
2941
  QSMAdminResults.saveResults();
2942
  });
2943
- $( '#results-pages' ).on( 'click', '.new-condition', function( event ) {
2944
  event.preventDefault();
2945
- $page = $( this ).closest( '.results-page' );
2946
- QSMAdminResults.newCondition( $page );
2947
  });
2948
- $( '#results-pages' ).on( 'click', '.delete-page-button', function( event ) {
2949
  event.preventDefault();
2950
- $( this ).closest( '.results-page' ).remove();
2951
  });
2952
- $( '#results-pages' ).on( 'click', '.delete-condition-button', function( event ) {
2953
  event.preventDefault();
2954
- $( this ).closest( '.results-page-condition' ).remove();
2955
  });
2956
  });
2957
  }
10
  * Catches an error from a jQuery function (i.e. $.ajax())
11
  */
12
  displayjQueryError: function (jqXHR, textStatus, errorThrown) {
13
+ QSMAdmin.displayAlert(qsm_admin_messages.error + ': ' + errorThrown + '! ' + qsm_admin_messages.try_again + '.', 'error');
14
  },
15
  /**
16
  * Catches an error from a BackBone function (i.e. model.save())
17
  */
18
  displayError: function (jqXHR, textStatus, errorThrown) {
19
+ QSMAdmin.displayAlert(qsm_admin_messages.error + ': ' + errorThrown.errorThrown + '! ' + qsm_admin_messages.try_again + '.', 'error');
20
  },
21
  /**
22
  * Displays an alert within the "Quiz Settings" page
45
  }
46
  };
47
  $(function () {
48
+ $('.qsm-tab').on('click', function (event) {
49
+ event.preventDefault();
50
+ QSMAdmin.selectTab($(this));
51
+ });
 
 
 
 
 
52
 
53
+ //show set global default potion popup
54
+ $(document).on('click', '#qsm-blobal-settings', function () {
55
+ MicroModal.show('qsm-global-default-popup');
56
+ });
57
 
58
+ $('#qmn_check_all').change(function () {
59
+ $('.qmn_delete_checkbox').prop('checked', jQuery('#qmn_check_all').prop('checked'));
60
+ });
 
 
 
 
 
 
61
 
62
+ $('.edit-quiz-name').click(function (e) {
63
+ e.preventDefault();
64
+ MicroModal.show('modal-3');
65
+ });
66
+ $('#edit-name-button').on('click', function (event) {
67
+ event.preventDefault();
68
+ $('#edit-name-form').submit();
69
+ });
70
+ $('#sendySignupForm').submit(function (e) {
71
+ e.preventDefault();
72
+ var $form = $(this),
73
+ name = $form.find('input[name="name"]').val(),
74
+ email = $form.find('input[name="email"]').val(),
75
+ action = 'qsm_send_data_sendy';
76
+ $form.find('#submit').attr('disabled', true);
77
+ $.post(ajaxurl, { name: name, email: email, nonce: qsmAdminObject.saveNonce, action: action },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  function (data) {
79
+ if (data) {
80
+ $("#status").text('');
81
+ if (data == "Some fields are missing.") {
82
+ $("#status").text(qsm_admin_messages.sendy_signup_validation.required_message);
83
+ $("#status").css("color", "red");
84
+ } else if (data == "Invalid email address.") {
85
+ $("#status").text(qsm_admin_messages.sendy_signup_validation.email_validation);
86
+ $("#status").css("color", "red");
87
+ } else if (data == "Invalid list ID.") {
88
+ $("#status").text(qsm_admin_messages.sendy_signup_validation.list_validation);
89
+ $("#status").css("color", "red");
90
+ } else if (data == "Already subscribed.") {
91
+ $("#status").text(qsm_admin_messages.sendy_signup_validation.already_subscribed);
92
+ $("#status").css("color", "red");
93
+ } else {
94
+ $("#status").text(qsm_admin_messages.sendy_signup_validation.success_message);
95
+ $("#status").css("color", "green");
96
+ }
97
+ $form.find('#submit').attr('disabled', false);
98
  } else {
99
+ alert(qsm_admin_messages.sendy_signup_validation.error_message);
 
100
  }
101
  }
102
  );
103
+ });
104
+ jQuery('.category_selection_random').change(function () {
105
+ var checked_data = jQuery(this).val().toString();
106
+ jQuery('.catergory_comma_values').val(checked_data);
107
+ });
108
+ jQuery('.row-actions-c > .rtq-delete-result').click(function (e) {
109
+ e.preventDefault();
110
+ var $this = jQuery(this);
111
+ if (confirm(qsm_admin_messages.confirm_message)) {
112
+ var action = 'qsm_dashboard_delete_result';
113
+ var result_id = jQuery(this).data('result_id');
114
+ $.post(ajaxurl, { result_id: result_id, action: action },
115
+ function (data) {
116
+ if (data == 'failed') {
117
+ alert(qsm_admin_messages.error_delete_result);
118
+ } else {
119
+ $this.parents('li').slideUp();
120
+ $this.parents('li').remove();
121
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
+ );
124
+ }
125
+ });
126
+ jQuery('.load-quiz-wizard').click(function (e) {
127
+ e.preventDefault();
128
+ MicroModal.show('model-wizard');
129
+ var height = jQuery(".qsm-wizard-template-section").css("height");
130
+ jQuery(".qsm-wizard-setting-section").css("height", height);
131
+ if (jQuery("#accordion").length > 0) {
132
+ var icons = {
133
+ header: "iconClosed", // custom icon class
134
+ activeHeader: "iconOpen" // custom icon class
135
+ };
136
+ jQuery("#accordion").accordion({
137
+ collapsible: true,
138
+ icons: icons,
139
+ heightStyle: "content"
140
  });
141
+ jQuery('#accordion h3.ui-accordion-header').next().slideDown();
142
+ jQuery('.template-list .template-list-inner:first-child').trigger('click');
143
  }
144
+ });
145
+ //Get quiz options
146
+ jQuery('.template-list-inner').click(function () {
147
+ var action = 'qsm_wizard_template_quiz_options';
148
+ var settings = jQuery(this).data('settings');
149
+ var addons = jQuery(this).data('addons');
150
+ jQuery('.template-list .template-list-inner').removeClass('selected-quiz-template');
151
+ jQuery(this).addClass('selected-quiz-template');
152
+ jQuery('#quiz_settings_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
153
+ jQuery('#recomm_addons_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
154
+ $.post(ajaxurl, { settings: settings, addons: addons, action: action },
155
+ function (data) {
156
+ var diff_html = data.split('=====');
157
+ jQuery('#quiz_settings_wrapper').html('');
158
+ jQuery('#quiz_settings_wrapper').html(diff_html[0]);
159
+ jQuery('#recomm_addons_wrapper').html('');
160
+ jQuery('#recomm_addons_wrapper').html(diff_html[1]);
161
+ jQuery("#accordion").accordion();
162
+ jQuery('#accordion h3.ui-accordion-header').next().slideDown();
163
+ $('#quiz_settings_wrapper select').each(function () {
164
+ var name = $(this).attr('name');
165
+ var value = $(this).val();
166
+ if ($('.' + name + '_' + value).length > 0) {
167
+ $('.' + name + '_' + value).show();
168
+ }
169
+ });
170
+ }
171
+ );
172
+ });
173
 
174
+ //Dismiss the welcome panel
175
+ jQuery('.qsm-welcome-panel-dismiss').click(function (e) {
176
+ e.preventDefault();
177
+ jQuery('#welcome_panel').addClass('hidden');
178
+ jQuery('#screen-options-wrap').find('#welcome_panel-hide').prop('checked', false);
179
+ postboxes.save_state('toplevel_page_qsm_dashboard');
180
+ });
181
+ //Get the message in text tab
182
+ jQuery(document).on('change', '#qsm_question_text_message_id', function () {
183
+ var text_id = jQuery(this).val();
184
+ jQuery('.qsm-text-main-wrap .qsm-text-tab-message-loader').show();
185
+ jQuery.post(ajaxurl, { text_id: text_id, 'quiz_id': qsmTextTabObject.quiz_id, action: 'qsm_get_question_text_message' }, function (response) {
186
+ var data = jQuery.parseJSON(response);
187
+ if (data.success === true) {
188
+ var text_msg = data.text_message;
189
+ if ($('#wp-qsm_question_text_message-wrap').hasClass('html-active')) {
190
+ jQuery("#qsm_question_text_message").val(text_msg);
191
+ } else {
192
+ text_msg = text_msg.replace(/\n/g, "<br>");
193
+ tinyMCE.get('qsm_question_text_message').setContent(text_msg);
194
+ }
195
+ jQuery('.qsm-text-allowed-variables > .qsm-text-variable-wrap').html('').html(data.allowed_variable_text);
196
+ jQuery('.qsm-text-main-wrap .qsm-text-tab-message-loader').hide();
197
+ } else {
198
+ console.log(data.message);
199
+ }
200
+ });
201
+ });
202
+ //Save the message in text tab
203
+ jQuery(document).on('click', '#qsm_save_text_message', function () {
204
+ var $this = jQuery(this);
205
+ $this.siblings('.spinner').addClass('is-active');
206
+ var text_id = jQuery('#qsm_question_text_message_id').val();
207
+ var message = wp.editor.getContent('qsm_question_text_message');
208
+ jQuery.post(ajaxurl, { text_id: text_id, 'message': message, 'quiz_id': qsmTextTabObject.quiz_id, action: 'qsm_update_text_message' }, function (response) {
209
+ var data = jQuery.parseJSON(response);
210
+ if (data.success === true) {
211
+ //Do nothing
212
  } else {
213
+ console.log(data.message);
 
214
  }
215
+ $this.siblings('.spinner').removeClass('is-active');
216
+ });
217
+ });
218
+ //On click append on tiny mce
219
+ jQuery(document).on('click', '.qsm-text-allowed-variables button.button', function () {
220
+ var content = jQuery(this).text();
221
+ if (jQuery('.qsm-question-text-tab .html-active').length > 0) {
222
+ var $txt = jQuery("#qsm_question_text_message");
223
+ var caretPos = $txt[0].selectionStart;
224
+ var textAreaTxt = $txt.val();
225
+ var txtToAdd = content;
226
+ $txt.val(textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos));
227
  } else {
228
+ tinyMCE.activeEditor.execCommand('mceInsertContent', false, content);
229
  }
230
  });
231
+ //Show all the variable list
232
+ jQuery('.qsm-show-all-variable-text').click(function (e) {
233
+ e.preventDefault();
234
+ MicroModal.show('show-all-variable');
235
+ });
236
+ //Hide/show tr based on selection
237
+ $('.qsm_tab_content select').each(function () {
238
+ var name = $(this).attr('name');
239
+ var value = $(this).val();
240
+ if ($('.' + name + '_' + value).length > 0) {
241
+ $('.' + name + '_' + value).show();
 
 
242
  }
 
243
  });
244
+ $(document).on('change', '.qsm_tab_content select, #quiz_settings_wrapper select', function () {
245
+ var name = $(this).attr('name');
246
+ var value = $(this).val();
247
+ $('.qsm_hidden_tr').hide();
248
+ if ($('.' + name + '_' + value).length > 0) {
249
+ $('.' + name + '_' + value).show();
250
+ }
251
+ });
252
+ $(document).on('click', '.qsm_tab_content input[name="system"]', function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  var name = $(this).attr('name');
254
+ var value = $(this).val();
255
+ $('.qsm_hidden_tr_gradingsystem').hide();
256
+ if (value == 0 || value == 3) {
257
+ $('.qsm_hidden_tr_gradingsystem').show();
258
+ }
259
+ });
260
+ $(document).ready(function () {
261
+ var system_option = $("input[type=radio][name='system']:checked").val();
262
+ $('.qsm_hidden_tr_gradingsystem').hide();
263
+ if (system_option == 0 || system_option == 3) {
264
+ $('.qsm_hidden_tr_gradingsystem').show();
265
+ }
266
+ });
267
+ if ($('.qsm-text-label-wrapper').length > 0) {
268
+ var element_position = $('.qsm-text-label-wrapper').offset().top;
269
+ $(window).scroll(function () {
270
+ var y_scroll_pos = window.pageYOffset;
271
+ var scroll_pos_test = element_position;
272
+ if (y_scroll_pos > scroll_pos_test) {
273
+ $('.qsm_text_customize_label').fadeOut('slow');
274
+ } else {
275
+ $('.qsm_text_customize_label').fadeIn('slow');
276
+ }
277
+ });
278
  }
279
+ $(document).on('click', '.qsm_text_customize_label', function () {
280
+ $('html, body').animate({
281
+ scrollTop: $(".qsm-text-label-wrapper").offset().top - 30
282
+ }, 2000);
283
+ });
284
+ //New template design hide show
285
+ var new_template_result_detail = $('.new_template_result_detail:checked').val();
286
+ if (new_template_result_detail == 1) {
287
+ $('.new_template_result_detail:checked').parents('tr').next('tr').hide();
288
  }
289
+ $(document).on('change', '.new_template_result_detail', function () {
290
+ if ($(this).val() == 1) {
291
+ $(this).parents('tr').next('tr').hide();
 
 
 
 
 
292
  } else {
293
+ $(this).parents('tr').next('tr').show();
294
  }
295
  });
296
+ $(document).on('click', '#show-all-variable .qsm-text-template-span ', function (e) {
297
+ e.preventDefault();
298
+ let templateSpan = jQuery(this);
299
+ let templateVariable = jQuery(this).children('.template-variable');
300
+ var $temp = $("<input>");
301
+ $("body").append($temp);
302
+ $temp.val(templateVariable.text()).select();
303
+ document.execCommand("copy");
304
+ $temp.remove();
305
+ var button_width = templateSpan.width();
306
+ var button_txt = templateSpan.html()
307
+ templateSpan.css('width', button_width);
308
+ templateSpan.text('').html('<span class="popup-copied-des"><span class="dashicons dashicons-yes"></span> ' + qsm_admin_messages.copied + '</span>');
309
+ setTimeout(function () {
310
+ templateSpan.css('width', 'auto');
311
+ templateSpan.html(button_txt);
312
+ }, 1000);
313
+ });
314
+ $(document).on('click', ' .qsm-active-addons .no_addons_installed a', function (e) {
315
+ $('.qsm-addon-anchor-left .qsm-install-addon a').trigger('click');
316
+ });
317
+ $(document).on('click', '.qsm-addon-anchor-left .qsm-install-addon a', function (e) {
318
+ e.preventDefault();
319
+ var href = $(this).attr('href');
320
+ $('.qsm-addon-anchor-left .qsm-install-addon').find('a').removeClass('active');
321
+ $(this).addClass('active');
322
+ $('.qsm-addon-setting-wrap .qsm-primary-acnhor').hide();
323
+ $(href).show();
324
+ if (href == '#qsm_add_addons') {
325
+ $('.qsm-add-addon').css('display', 'inline-block');
326
+ } else {
327
+ $('.qsm-add-addon').css('display', 'none');
328
+ }
329
+ });
330
+ $(document).on('click', '.qsm-addon-anchor-left .qsm-add-addon a', function (e) {
331
+ e.preventDefault();
332
+ var href = $(this).attr('href');
333
+ $('.qsm-addon-anchor-left .qsm-add-addon').find('a').removeClass('active');
334
+ $(this).addClass('active');
335
+ $('.qsm-addon-setting-wrap .qsm_popular_addons').hide();
336
+ $(href).show();
337
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
+ // opens media library o set featured image for quiz
340
+ $(document).on('click', '#set_featured_image', function (e) {
341
+ var button = $(this);
342
+ e.preventDefault();
343
  custom_uploader = wp.media({
344
+ title: qsm_admin_messages.set_feature_img,
345
+ library: {
346
+ type: 'image'
347
+ },
348
+ button: {
349
+ text: qsm_admin_messages.use_img // button label text
350
+ },
351
+ multiple: false
352
+ }).on('select', function () { // it also has "open" and "close" events
353
+ var attachment = custom_uploader.state().get('selection').first().toJSON();
354
+ button.prev().val(attachment.url);
355
+ button.nextAll('.qsm_featured_image_preview').attr('src', attachment.url);
356
+ }).open();
357
+ });
358
 
359
+ // opens media library o set background image for quiz
360
+ $(document).on('click', '.set_background_image', function (e) {
361
+ let button = $(this);
362
+ e.preventDefault();
363
+ custom_uploader = wp.media({
364
+ title: qsm_admin_messages.set_bg_img,
365
+ library: {
366
+ type: 'image'
367
+ },
368
+ button: {
369
+ text: qsm_admin_messages.use_img // button label text
370
+ },
371
+ multiple: false
372
+ }).on('select', function () { // it also has "open" and "close" events
373
+ let attachment = custom_uploader.state().get('selection').first().toJSON();
374
+ button.prev('.quiz_background_image').val(attachment.url);
375
+ }).open();
376
+ });
377
 
378
+ $(document).on('change', '.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]', function () {
379
+ var value = $(this).val();
380
+ if (value == '0') {
381
+ $('.global_setting_system').parents('tr').show();
382
+ $('.global_setting_score_roundoff').parents('tr').show();
383
+ } else {
384
+ $('.global_setting_system').parents('tr').hide();
385
+ $('.global_setting_score_roundoff').parents('tr').hide();
386
+
387
+ }
388
+ });
389
+ $(document).on('change', '.global_setting_system input[name="qsm-quiz-settings[system]"]', function () {
390
+ var value = $('input[name="qsm-quiz-settings[system]"]:checked').val();
391
+ var value1 = $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').val();
392
+ if (value != '1' && value1 == '0') {
393
+ $('.global_setting_score_roundoff').parents('tr').show();
394
+ } else {
395
+ $('.global_setting_score_roundoff').parents('tr').hide();
396
+ }
397
+ });
398
+ $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').trigger('change');
399
+ $('.global_setting_system input[name="qsm-quiz-settings[system]"]').trigger('change');
400
 
401
  });
402
  $(document).on('change', '.global_setting_system input[name="qsm-quiz-settings[system]"]', function () {
403
  var value = $('input[name="qsm-quiz-settings[system]"]:checked').val();
404
  var value1 = $('.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]').val();
405
+ if (value != '1' && value1 == '0') {
406
  $('.global_setting_score_roundoff').parents('tr').show();
407
+ } else {
408
  $('.global_setting_score_roundoff').parents('tr').hide();
409
  }
410
  });
418
  deleteResults(qid, qname);
419
  });
420
 
421
+ jQuery(document).on('click', '#btn_export', function (e) {
422
  e.preventDefault();
423
  jQuery.ajax({
424
  type: 'POST',
427
  action: "qsm_export_data",
428
  nonce: qsm_tools_page.nonce,
429
  },
430
+ success: function (response) {
431
  /*
432
  * Make CSV downloadable
433
  */
453
  downloadLink.click();
454
  document.body.removeChild(downloadLink);
455
  },
456
+ error: function (errorThrown) {
457
  alert(errorThrown);
458
  }
459
  });
460
  });
461
 
462
+ jQuery(document).on('click', '#btn_clear_logs', function (e) {
463
  e.preventDefault();
464
+ var delete_logs = confirm(qsm_tools_page.qsm_delete_audit_logs);
465
+ if (delete_logs) {
466
  // your deletion code
467
  jQuery.ajax({
468
  type: 'POST',
471
  action: "qsm_clear_audit_data",
472
  nonce: qsm_tools_page.nonce,
473
  },
474
+ success: function (response) {
475
  location.reload();
476
  },
477
+ error: function (errorThrown) {
478
  alert(errorThrown);
479
  }
480
  });
485
  e.preventDefault();
486
  MicroModal.show('qsm_fetch_audit_data');
487
  var qsm_get_setting_data = jQuery(this).attr('data-auditid');
488
+ jQuery('.qsm_setting__data').html('<p>' + JSON.stringify(JSON.parse(qsm_get_setting_data), null, 2) + '</p>');
489
+ });
490
+
491
+ jQuery(document).on('click', '.qsm-toggle-box-handle', function (e) {
492
+ e.preventDefault();
493
+ var parent = jQuery(this).parent('.qsm-toggle-box');
494
+ var content = parent.find('.qsm-toggle-box-content');
495
+ if (content.is(":visible")) {
496
+ content.hide();
497
+ parent.removeClass('opened');
498
+ } else {
499
+ content.show();
500
+ parent.addClass('opened');
501
+ }
502
+ });
503
+
504
+ jQuery(document).on('click', '.qsm-help-tab-handle', function (e) {
505
+ e.preventDefault();
506
+ jQuery('.qsm-help-tab-dropdown-list').toggleClass('opened');
507
  });
508
 
509
+ $(document).mouseup(function (e) {
510
+ var link = $(".qsm-help-tab-handle");
511
+ var container = $(".qsm-help-tab-dropdown-list");
512
+ if (!link.is(e.target) && !container.is(e.target) && container.has(e.target).length === 0) {
513
+ container.removeClass('opened');
514
+ }
515
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
  }(jQuery));
518
 
519
  // result page
520
+ jQuery('#results-screen-option-button').on('click', function (event) {
521
  event.preventDefault();
522
  MicroModal.show('modal-results-screen-option');
523
  });
524
+ jQuery('#save-results-screen-option-button').on('click', function (event) {
525
  event.preventDefault();
526
  MicroModal.close('modal-results-screen-option');
527
  jQuery('#results-screen-option-form').submit();
528
  });
529
  function deleteResults(id, quizName) {
530
+ jQuery("#delete_dialog").dialog({
531
+ autoOpen: false,
532
+ buttons: {
533
+ Cancel: function () {
534
+ $jQuery(this).dialog('close');
535
+ }
536
+ }
537
+ });
538
+ jQuery("#delete_dialog").dialog('open');
539
+ var idHidden = document.getElementById("result_id");
540
+ var idHiddenName = document.getElementById("delete_quiz_name");
541
+ idHidden.value = id;
542
+ idHiddenName.value = quizName;
543
  }
544
 
545
  //quiz options style tab
546
+ jQuery('.quiz_style_tab').click(function (e) {
547
  e.preventDefault();
548
  var current_id = jQuery(this).attr('data-id');
549
  jQuery('.quiz_style_tab').removeClass('current');
552
  jQuery('#' + current_id).show();
553
  });
554
 
555
+ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
556
+ if (window.location.href.indexOf('tab=style') > 0) {
557
  function mlw_qmn_theme(theme) {
558
  document.getElementById('save_quiz_theme').value = theme;
559
  jQuery("div.mlw_qmn_themeBlockActive").toggleClass("mlw_qmn_themeBlockActive");
560
  jQuery("#mlw_qmn_theme_block_" + theme).toggleClass("mlw_qmn_themeBlockActive");
561
  }
562
 
563
+ jQuery(document).ready(function () {
564
+ jQuery(document).on('click', '.qsm-activate-theme', function () {
565
+ jQuery(this).parents('.theme-wrapper').find('input[name=quiz_theme_id]').prop("checked", true);
 
 
 
 
 
 
 
 
 
566
  });
567
+ jQuery(document).on('input', '.quiz_featured_image', function () {
568
+ jQuery('.qsm_featured_image_preview').attr('src', jQuery(this).val());
 
 
 
 
 
569
  });
570
+
571
+ jQuery(document).on('click', '.filter-links a', function () {
572
+ let current_id = jQuery(this).attr('data-id');
573
+ jQuery(this).parents('.filter-links').find('li a').each(function () {
574
+ jQuery(this).removeClass('current');
575
+ });
576
+ jQuery(this).addClass('current');
577
+ jQuery(this).parents('#qsm_themes').find('.themes-container').children('div').each(function () {
578
+ if (jQuery(this).hasClass(current_id)) {
579
+ jQuery(this).show();
580
+ } else {
581
+ jQuery(this).hide();
582
+ }
583
+ });
584
+ })
585
  });
586
 
587
  jQuery(document).ready(function () {
588
  jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
589
  e.preventDefault();
590
  MicroModal.show('qsm-theme-color-settings');
591
+ if (jQuery('.my-color-field').length > 0) {
592
  jQuery('.my-color-field').wpColorPicker();
593
  }
594
  });
600
  //QSM - Quizzes/Surveys Page
601
 
602
  (function ($) {
603
+ if (jQuery('body').hasClass('post-type-qsm_quiz')) {
604
 
605
  $('#new_quiz_button_two').on('click', function (event) {
606
  event.preventDefault();
639
  $('#quiz_settings_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
640
  $('#recomm_addons_wrapper').html('').html('<div class="qsm-spinner-loader"></div>');
641
  $.post(ajaxurl, {
642
+ settings: settings,
643
+ addons: addons,
644
+ action: action
645
+ },
646
  function (data) {
647
  var diff_html = data.split('=====');
648
  $('#quiz_settings_wrapper').html('');
676
 
677
  $(document).on('click', '#the-list .qsm-action-link-delete', function (event) {
678
  event.preventDefault();
679
+ var dataid = $(this).data('id');
680
+ var dataname = $(this).data('name');
681
+ $('#delete_quiz_id').val(dataid + 'QID');
682
+ $('#delete_quiz_name').val(dataname);
683
  MicroModal.show('modal-5');
684
  });
685
  $(document).on('click', '#the-list .qsm-action-link-duplicate', function (event) {
686
  event.preventDefault();
687
+ var dataid = $(this).data('id');
688
+ $('#duplicate_quiz_id').val(dataid + 'QID');
689
  MicroModal.show('modal-4');
690
  });
691
  $(document).on('click', '#the-list .qsm-action-link-reset', function (event) {
692
  event.preventDefault();
693
+ var dataid = $(this).data('id');
694
  $('#reset_quiz_id').val(dataid);
695
  MicroModal.show('modal-1');
696
  });
707
  $('#delete-quiz-form').submit();
708
  });
709
 
710
+ $(document).on('click', '.post-type-qsm_quiz #doaction, .post-type-qsm_quiz #doaction2', function (event) {
711
+ event.preventDefault();
712
+ if ($("#bulk-action-selector-top").val() == "delete_pr" || $("#bulk-action-selector-bottom").val() == "delete_pr") {
713
+ MicroModal.show('modal-bulk-delete');
714
+ } else {
715
+ $('#posts-filter').submit();
716
  }
717
  });
718
  $(document).on('click', '.qsm-list-shortcode-view', function (e) {
735
  });
736
  $('#bulk-delete-quiz-button').on('click', function (event) {
737
  event.preventDefault();
738
+ if ($("#bult-delete-quiz-form input[name='qsm_delete_question_from_qb']").is(":checked")) {
739
+ $("<input>", {
740
+ "type": "hidden",
741
  "name": "qsm_delete_question_from_qb",
742
  "value": "1"
743
+ }).appendTo("#posts-filter");
744
  }
745
+ if ($("#bult-delete-quiz-form input[name='qsm_delete_from_db']").is(":checked")) {
746
+ $("<input>", {
747
+ "type": "hidden",
748
  "name": "qsm_delete_from_db",
749
  "value": "1"
750
+ }).appendTo("#posts-filter");
751
  }
752
  $('#posts-filter').submit();
753
  });
757
  // QSM - Quiz Wizard
758
 
759
  (function ($) {
760
+ if (jQuery('body').hasClass('post-type-qsm_quiz') || jQuery('body').hasClass('toplevel_page_qsm_dashboard')) {
761
  $('#create-quiz-button').on('click', function (event) {
762
+ event.preventDefault();
763
  if ($('#new-quiz-form').find('.quiz_name').val() === '') {
764
  $('#new-quiz-form').find('.quiz_name').addClass('qsm-required');
765
  $('.qsm-wizard-wrap[data-show="quiz_settings"]').trigger('click');
905
  //QSM - Admin Notices for enabling multiple categories in QSM 7.3+
906
 
907
  (function ($) {
908
+ $(document).on('click', '.enable-multiple-category', function (e) {
909
+ e.preventDefault();
910
+ $('.category-action').html('<span>' + qsm_admin_messages.updating_db + '</span>');
911
+ $('.category-action').prev().hide();
912
+ $('.category-action').prev().prev().hide();
913
+ i = 0;
914
+ category_interval = setInterval(() => {
915
+ if (i % 3 == 0) {
916
+ $('.category-action span').html(' .');
917
+ } else {
918
+ $('.category-action span').append(' .');
919
+ }
920
+ i++;
921
+ }, 500);
922
+ $.ajax({
923
+ type: "POST",
924
+ url: ajaxurl,
925
+ data: {
926
+ action: 'enable_multiple_categories',
927
+ value: 'enable'
928
+ },
929
+ success: function (r) {
930
+ response = JSON.parse(r);
931
+ clearInterval(category_interval);
932
+ if (response.status) {
933
+ $('.category-action').parents('.multiple-category-notice').removeClass('notice-info').addClass('notice-success').html('<p>' + qsm_admin_messages.update_db_success + '</p>');
934
+ } else {
935
+ $('.category-action').parents('.multiple-category-notice').removeClass('notice-info').addClass('notice-error').html(qsm_admin_messages.error + '! ' + qsm_admin_messages.try_again);
936
+ }
937
+
938
+ }
939
+ });
940
+ });
941
+
942
+ $(document).on('click', '.cancel-multiple-category', function (e) {
943
+ e.preventDefault();
944
+ $('.category-action').html('');
945
+ $.ajax({
946
+ type: "POST",
947
+ url: ajaxurl,
948
+ data: {
949
+ action: 'enable_multiple_categories',
950
+ value: 'cancel'
951
+ },
952
+ success: function (status) {
953
+ if (status) {
954
+ $('.multiple-category-notice').hide();
955
+ }
956
+ }
957
+ });
958
+ });
959
+ $('.multiple-category-notice').show();
960
  }(jQuery));
961
 
962
  // QSM - Admin Stats Page
963
  (function ($) {
964
  if (jQuery('body').hasClass('qsm_page_qmn_stats')) {
965
+ if (window.stats_graph instanceof Chart) {
966
  window.stats_graph.destroy();
967
  }
968
  var graph_ctx = document.getElementById("graph_canvas").getContext("2d");
971
  data: {
972
  labels: qsm_admin_stats.labels,
973
  datasets: [{
974
+ label: qsm_admin_messages.quiz_submissions, // Name the series
975
  data: qsm_admin_stats.value, // Specify the data values array
976
  fill: false,
977
  borderColor: '#2196f3', // Add custom color border (Line)
978
  backgroundColor: '#2196f3', // Add custom color background (Points and Fill)
979
  borderWidth: 1 // Specify bar border width
980
+ }]
981
+ },
982
+ options: {
983
+ responsive: true, // Instruct chart js to respond nicely.
984
+ maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
985
  }
986
  });
987
  }
992
  * QSM - Contact Form
993
  */
994
 
995
+ var QSMContact;
996
+ (function ($) {
997
+ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
998
+ if (window.location.href.indexOf('tab=contact') > 0) {
999
 
1000
  QSMContact = {
1001
  load: function () {
1002
+ if ($.isArray(qsmContactObject.contactForm) && qsmContactObject.contactForm.length > 0) {
1003
+ $.each(qsmContactObject.contactForm, function (i, val) {
1004
+ QSMContact.addField(val);
1005
+ });
1006
+ }
1007
+ },
1008
+ addField: function (fieldArray) {
1009
+ var template = wp.template('contact-form-field');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
 
1011
+ $('.contact-form').append(template(fieldArray));
1012
 
1013
+ $('.contact-form-field').each(function () {
1014
+ QSMContact.hideShowSettings($(this));
1015
+ });
1016
+ setTimeout(QSMContact.removeNew, 250);
1017
+ },
1018
+ removeNew: function () {
1019
+ $('.contact-form-field').removeClass('new');
1020
+ },
1021
+ duplicateField: function (linkClicked) {
1022
+ var fieldArray = QSMContact.prepareFieldData(linkClicked.parents('.contact-form-field'));
1023
+ QSMContact.addField(fieldArray);
1024
+ },
1025
+ deleteField: function (field) {
1026
+ var parent = field.parents('.contact-form-field');
1027
+ parent.addClass('deleting');
1028
+ setTimeout(function () {
1029
+ parent.remove();
1030
+ }, 250);
1031
+ },
1032
+ newField: function () {
1033
+ var fieldArray = {
1034
+ label: '',
1035
+ type: 'text',
1036
+ answers: [],
1037
+ required: false,
1038
+ use: '',
1039
+ enable: true,
1040
+ is_default: false
1041
+ };
1042
+ jQuery(document).trigger('qsm_add_contact_field', [fieldArray]);
1043
+ QSMContact.addField(fieldArray);
1044
+ },
1045
+ prepareFieldData: function (field) {
1046
+ var fieldArray = {
1047
+ label: field.find('.label-control').val(),
1048
+ type: field.find('.type-control').val(),
1049
+ required: field.find('.required-control').prop('checked'),
1050
+ use: field.find('.use-control').val(),
1051
+ enable: field.find('.enable-control').prop('checked'),
1052
+ };
1053
+ /**
1054
+ * Store Other settings
1055
+ */
1056
+ field.find('.contact-form-field-settings :input').each(function () {
1057
+ var inputName = $(this).attr('name');
1058
+ var inputVal = $(this).val();
1059
+ if ('checkbox' == $(this).attr('type')) {
1060
+ inputVal = $(this).prop('checked');
1061
+ }
1062
+ fieldArray[inputName] = inputVal;
1063
+ });
1064
+ return fieldArray;
1065
+ },
1066
+ save: function () {
1067
+ QSMContact.displayAlert(qsm_admin_messages.saving_contact_fields, 'info');
1068
+ var contactFields = $('.contact-form-field');
1069
+ var contactForm = [];
1070
+ var contactEach;
1071
+ $.each(contactFields, function (i, val) {
1072
+ contactEach = QSMContact.prepareFieldData($(this));
1073
+ contactForm.push(contactEach);
1074
+ });
1075
+
1076
+ var settings = {};
1077
+ $('#contactformsettings input').each(function () {
1078
+ if ('checkbox' == $(this).attr('type')) {
1079
+ settings[$(this).attr('name')] = ($(this).prop('checked') ? '1' : '0');
1080
+ } else {
1081
+ settings[$(this).attr('name')] = $(this).val();
1082
+ }
1083
+ });
1084
+
1085
+ var data = {
1086
+ action: 'qsm_save_contact',
1087
+ contact_form: contactForm,
1088
+ settings: settings,
1089
+ quiz_id: qsmContactObject.quizID,
1090
+ nonce: qsmContactObject.saveNonce,
1091
+ };
1092
+
1093
+ jQuery.post(ajaxurl, data, function (response) {
1094
+ QSMContact.saved(JSON.parse(response));
1095
+ });
1096
+ },
1097
+ saved: function (response) {
1098
+ if (response.status) {
1099
+ QSMContact.displayAlert('<strong>' + qsm_admin_messages.success + '</strong> ' + qsm_admin_messages.contact_fields_saved, 'success');
1100
+ } else {
1101
+ QSMContact.displayAlert('<strong>' + qsm_admin_messages.error + '</strong> ' + qsm_admin_messages.contact_fields_save_error + ' ' + qsm_admin_messages.try_again, 'error');
1102
+ }
1103
+ },
1104
+ displayAlert: function (message, type) {
1105
+ QSMContact.clearAlerts();
1106
+ $('.contact-message').addClass('notice');
1107
+ switch (type) {
1108
+ case 'info':
1109
+ $('.contact-message').addClass('notice-info');
1110
+ break;
1111
+ case 'error':
1112
+ $('.contact-message').addClass('notice-error');
1113
+ break;
1114
+ case 'success':
1115
+ $('.contact-message').addClass('notice-success');
1116
+ break;
1117
+ default:
1118
+ }
1119
+ $('.contact-message').append('<p>' + message + '</p>');
1120
+ },
1121
+ clearAlerts: function () {
1122
+ $('.contact-message').empty().removeClass().addClass('contact-message');
1123
+ },
1124
+ hideShowSettings: function (field) {
1125
+ var type = field.find('.type-control').val();
1126
+ if (field.find('.required-control').prop('checked')) {
1127
+ field.find('.field-required-flag').show();
1128
+ }
1129
+ if (!field.find('.enable-control').prop('checked')) {
1130
+ field.addClass('disabled-field');
1131
+ if (!$('.show-disabled-fields').prop('checked')) {
1132
+ field.addClass('hidden-field');
1133
+ }
1134
+ }
1135
+ field.find('.contact-form-field-settings .contact-form-group:not(.required-option)').hide();
1136
+ if ('text' == type || 'number' == type) {
1137
+ field.find('.contact-form-field-settings .min-max-option').show();
1138
+ }
1139
+ if ('email' == type) {
1140
+ field.find('.contact-form-field-settings .email-option').show();
1141
+ }
1142
+ jQuery(document).trigger('qsm_contact_field_hide_show_settings', [field, type]);
1143
+ }
1144
+ };
1145
+ $(function () {
1146
+ QSMContact.load();
1147
+ if ($('.contact-form > .contact-form-field').length === 0) {
1148
+ $('.save-contact').hide();
1149
+ }
1150
+ $('.add-contact-field').on('click', function () {
1151
+ QSMContact.newField();
1152
+ if ($('.contact-form > .contact-form-field').length === 0) {
1153
+ $('.save-contact').hide();
1154
+ } else {
1155
+ $('.save-contact').show();
1156
+ }
1157
+ });
1158
+ $('.save-contact').on('click', function () {
1159
+ QSMContact.save();
1160
+ });
1161
+ $('.contact-form').on('click', '.delete-field', function (event) {
1162
+ event.preventDefault();
1163
+ if (!$(this).hasClass('disabled')) {
1164
+ QSMContact.deleteField($(this));
1165
+ }
1166
+ return false;
1167
+ });
1168
+ $('.contact-form').on('click', '.copy-field', function (event) {
1169
+ event.preventDefault();
1170
+ QSMContact.duplicateField($(this));
1171
+ });
1172
+ $('.contact-form').on('click', '.settings-field', function (event) {
1173
+ event.preventDefault();
1174
+ var target = $(this).parents('.contact-form-field').find('.contact-form-field-settings');
1175
+ $('.contact-form-field-settings').not(target).hide();
1176
+ target.toggle();
1177
+ });
1178
+ $('.contact-form').on('change', '.type-control', function (event) {
1179
+ event.preventDefault();
1180
+ QSMContact.hideShowSettings($(this).parents('.contact-form-field'));
1181
+ });
1182
+ $('.contact-form').on('change', '.required-control', function (event) {
1183
+ event.preventDefault();
1184
+ $(this).parents('.contact-form-field').find('.field-required-flag').hide();
1185
+ if ($(this).is(':checked')) {
1186
+ $(this).parents('.contact-form-field').find('.field-required-flag').show();
1187
+ }
1188
+ });
1189
+ $('.contact-form').on('change', '.enable-control', function (event) {
1190
+ event.preventDefault();
1191
+ $(this).parents('.contact-form-field').addClass('disabled-field');
1192
+ if ($(this).is(':checked')) {
1193
+ $(this).parents('.contact-form-field').removeClass('disabled-field');
1194
+ }
1195
+ QSMContact.hideShowSettings($(this).parents('.contact-form-field'));
1196
+ });
1197
+ $(document).on('change', '.show-disabled-fields', function (event) {
1198
+ event.preventDefault();
1199
+ var is_show = $(this).prop('checked');
1200
+ jQuery.post(ajaxurl, { action: 'qsm_show_disabled_contact_fields', show: is_show });
1201
+ if (is_show) {
1202
+ $('.contact-form-field').removeClass('hidden-field');
1203
+ } else {
1204
+ $('.contact-form-field.disabled-field').addClass('hidden-field');
1205
+ }
1206
+ });
1207
+ $('.contact-form').sortable({
1208
+ opacity: 70,
1209
+ cursor: 'grabbing',
1210
+ handle: 'span.dashicons-move'
1211
+ });
1212
+ });
1213
+ }
1214
+ }
1215
+ }(jQuery));
1216
+
1217
+ /**
1218
+ * QSM - Admin emails
1219
+ */
1220
+
1221
+
1222
+ (function ($) {
1223
+ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
1224
+ if (window.location.href.indexOf('tab=emails') > 0) {
1225
+ var QSMAdminEmails;
1226
+ QSMAdminEmails = {
1227
+ total: 0,
1228
+ saveEmails: function () {
1229
+ QSMAdmin.displayAlert(qsm_admin_messages.saving_emails, 'info');
1230
+ var emails = [];
1231
  var email = {};
1232
+ $('.qsm-email').each(function () {
1233
  var email_content = '';
1234
+ if ($(this).find('.email-template').parent('.wp-editor-container').length > 0) {
1235
+ email_content = wp.editor.getContent($(this).find('.email-template').attr('id'));
1236
  } else {
1237
+ email_content = $(this).find('.email-template').val()
1238
  }
1239
  email = {
1240
  'conditions': [],
1241
+ 'to': $(this).find('.to-email').val(),
1242
+ 'subject': $(this).find('.subject').val(),
1243
  'content': email_content,
1244
+ 'replyTo': $(this).find('.reply-to').prop('checked'),
1245
  };
1246
+ $(this).find('.email-condition').each(function () {
1247
  email.conditions.push({
1248
  'category': $(this).children('.email-condition-category').val(),
1249
+ 'criteria': $(this).children('.email-condition-criteria').val(),
1250
+ 'operator': $(this).children('.email-condition-operator').val(),
1251
+ 'value': $(this).children('.email-condition-value').val()
1252
  });
1253
  });
1254
+ emails.push(email);
1255
  });
1256
  var data = {
1257
  'emails': emails,
1263
  data: data,
1264
  headers: { 'X-WP-Nonce': qsmEmailsObject.nonce },
1265
  })
1266
+ .done(function (results) {
1267
+ if (results.status) {
1268
+ QSMAdmin.displayAlert(qsm_admin_messages.emails_saved, 'success');
1269
  } else {
1270
+ QSMAdmin.displayAlert(qsm_admin_messages.emails_save_error + ' ' + qsm_admin_messages.try_again, 'error');
1271
  }
1272
  })
1273
  .fail(QSMAdmin.displayjQueryError);
1274
  },
1275
+ loadEmails: function () {
1276
  $.ajax({
1277
  url: wpApiSettings.root + 'quiz-survey-master/v1/quizzes/' + qsmEmailsObject.quizID + '/emails',
1278
  headers: { 'X-WP-Nonce': qsmEmailsObject.nonce },
1279
  })
1280
+ .done(function (emails) {
1281
+ $('#qsm_emails').find('.qsm-spinner-loader').remove();
1282
+ emails.forEach(function (email, i, emails) {
1283
+ QSMAdminEmails.addEmail(email.conditions, email.to, email.subject, email.content, email.replyTo);
1284
  });
1285
  QSMAdmin.clearAlerts();
1286
  })
1287
  .fail(QSMAdmin.displayjQueryError);
1288
  },
1289
  addCondition: function ($email, category, criteria, operator, value) {
1290
+ var template = wp.template('email-condition');
1291
  $email.find('.email-when-conditions').append(template({
1292
+ 'category': category,
1293
+ 'criteria': criteria,
1294
+ 'operator': operator,
1295
+ 'value': value
1296
  }));
1297
  },
1298
+ newCondition: function ($email) {
1299
  QSMAdminEmails.addCondition($email, '', 'score', 'equal', 0);
1300
  },
1301
+ addEmail: function (conditions, to, subject, content, replyTo) {
1302
  QSMAdminEmails.total += 1;
1303
+ var template = wp.template('email');
1304
+ $('#qsm_emails').append(template({ id: QSMAdminEmails.total, to: to, subject: subject, content: content, replyTo: replyTo }));
1305
+ conditions.forEach(function (condition, i, conditions) {
1306
  QSMAdminEmails.addCondition(
1307
+ $('.qsm-email:last-child'),
1308
  condition.category,
1309
  condition.criteria,
1310
  condition.operator,
1311
  condition.value
1312
  );
1313
  });
1314
+ if (qsmEmailsObject.qsm_user_ve === 'true') {
1315
+ var settings = {
1316
+ mediaButtons: true,
1317
+ tinymce: {
1318
+ forced_root_block: '',
1319
+ toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
1320
+ },
1321
+ quicktags: true,
1322
+ };
1323
+ wp.editor.initialize('email-template-' + QSMAdminEmails.total, settings);
1324
+ }
1325
  jQuery(document).trigger('qsm_after_add_email_block', [conditions, to, subject, content, replyTo]);
1326
  },
1327
+ newEmail: function () {
1328
  var conditions = [{
1329
  'category': '',
1330
  'criteria': 'score',
1335
  var subject = 'Quiz Results For %QUIZ_NAME%';
1336
  var content = '%QUESTIONS_ANSWERS_EMAIL%';
1337
  var replyTo = false;
1338
+ QSMAdminEmails.addEmail(conditions, to, subject, content, replyTo);
1339
  }
1340
  };
1341
+ $(function () {
1342
  QSMAdminEmails.loadEmails();
1343
+ $('.add-new-email').on('click', function (event) {
1344
  event.preventDefault();
1345
  QSMAdminEmails.newEmail();
1346
  });
1347
+ $('.save-emails').on('click', function (event) {
1348
  event.preventDefault();
1349
  QSMAdminEmails.saveEmails();
1350
  });
1351
+ $('#qsm_emails').on('click', '.new-condition', function (event) {
1352
  event.preventDefault();
1353
+ $page = $(this).closest('.qsm-email');
1354
+ QSMAdminEmails.newCondition($page);
1355
  });
1356
+ $('#qsm_emails').on('click', '.delete-email-button', function (event) {
1357
  event.preventDefault();
1358
+ $(this).closest('.qsm-email').remove();
1359
  });
1360
+ $('#qsm_emails').on('click', '.delete-condition-button', function (event) {
1361
  event.preventDefault();
1362
+ $(this).closest('.email-condition').remove();
1363
  });
1364
+ });
1365
  }
1366
  }
1367
  }(jQuery));
1369
  /**
1370
  * QSM Question Tab
1371
  */
1372
+ var QSMQuestion;
1373
+ var import_button;
1374
  (function ($) {
1375
+ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
1376
+ if (window.location.href.indexOf('tab') == -1 || window.location.href.indexOf('tab=questions') > 0) {
1377
+
1378
+ $.QSMSanitize = function (input) {
1379
+ return input.replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');
1380
+ };
1381
+ QSMQuestion = {
1382
+ question: Backbone.Model.extend({
1383
+ defaults: {
1384
+ id: null,
1385
+ quizID: 1,
1386
+ type: '0',
1387
+ name: '',
1388
+ question_title: '',
1389
+ answerInfo: '',
1390
+ comments: '1',
1391
+ hint: '',
1392
+ category: '',
1393
+ required: 1,
1394
+ answers: [],
1395
+ page: 0
1396
+ }
1397
+ }),
1398
+ questions: null,
1399
+ page: Backbone.Model.extend({
1400
+ defaults: {
1401
+ id: null,
1402
+ quizID: 1,
1403
+ pagekey: qsmRandomID(8),
1404
+ hide_prevbtn: 0,
1405
+ questions: null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1406
  }
1407
+ }),
1408
+ qpages: null,
1409
+ questionCollection: null,
1410
+ pageCollection: null,
1411
+ categories: [],
1412
+ /**
1413
+ * Counts the total number of questions and then updates #total-questions span.
1414
+ */
1415
+ countTotal: function () {
1416
+ var total = 0;
1417
+
1418
+ // Cycles through each page.
1419
+ _.each(jQuery('.page'), function (page) {
1420
+
1421
+ // If page is empty, continue to the next.
1422
+ if (0 == jQuery(page).children('.question').length) {
1423
+ return;
1424
+ }
1425
+ // Cycle through each question and add to our total.
1426
+ _.each(jQuery(page).children('.question'), function (question) {
1427
+ total += 1;
1428
+ });
1429
  });
1430
+ $('#total-questions').text(total);
1431
+ },
1432
+ openQuestionBank: function (pageID) {
1433
+ QSMQuestion.loadQuestionBank();
1434
+ $('#add-question-bank-page').val(pageID);
1435
+ MicroModal.show('modal-2', {
1436
+ onClose: function () {
1437
+ $('.save-page-button').trigger('click');
1438
+ }
1439
+ });
1440
+ },
1441
+ loadQuestionBank: function (action = '') {
1442
+ if (action == 'change') {
1443
+ $('.qb-load-more-wrapper').remove();
1444
+ $('#question-bank').find('.question-bank-question').remove();
1445
+ $('#question-bank').append('<div style="top: 45px;position: relative;" class="qsm-spinner-loader"></div>');
1446
+ } else if ($('.qb-load-more-wrapper').length > 0) {
1447
+ $('.qb-load-more-question').hide();
1448
+ $('.qb-load-more-wrapper').append('<div class="qsm-spinner-loader"></div>');
1449
+ } else {
1450
+ $('#question-bank').empty();
1451
+ $('#question-bank').append('<div class="qsm-spinner-loader"></div>');
1452
  }
1453
+ $.ajax({
1454
+ url: wpApiSettings.root + 'quiz-survey-master/v1/bank_questions/0/',
1455
+ method: 'GET',
1456
+ beforeSend: function (xhr) {
1457
+ xhr.setRequestHeader('X-WP-Nonce', qsmQuestionSettings.nonce);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1458
  },
1459
+ data: {
1460
+ 'quizID': 0,
1461
+ 'page': $('#question_back_page_number').length > 0 ? parseInt($('#question_back_page_number').val()) + 1 : 1,
1462
+ 'category': $('#question-bank-cat').val(),
1463
+ 'search': $('#question-bank-search-input').val()
1464
+ },
1465
+ success: QSMQuestion.questionBankLoadSuccess
1466
+ });
1467
+ },
1468
+ questionBankLoadSuccess: function (response) {
1469
+ var pagination = response.pagination;
1470
+ var questions = response.questions;
1471
+ if ($('.qb-load-more-wrapper').length > 0) {
1472
+ $('.qb-load-more-wrapper').remove();
1473
+ } else {
1474
+ $('#question-bank').empty();
1475
  }
1476
+ for (var i = 0; i < questions.length; i++) {
1477
+ QSMQuestion.addQuestionToQuestionBank(questions[i]);
 
 
 
 
 
 
1478
  }
1479
+ if (pagination.total_pages > pagination.current_page) {
1480
+ var pagination_html = '<div class="qb-load-more-wrapper" style="text-align: center;margin: 20px 0 10px 0;"><input type="hidden" id="question_back_page_number" value="' + pagination.current_page + '"/>';
1481
+ pagination_html += '<input type="hidden" id="question_back_total_pages" value="' + pagination.total_pages + '"/>';
1482
+ pagination_html += '<a href="javascript:void(0)" class="qb-load-more-question">' + qsm_admin_messages.load_more_quetions + '</a></div>';
1483
+ $('#question-bank').append(pagination_html);
1484
+ }
1485
+ if (pagination.current_page == 1) {
1486
+ if (qsmQuestionSettings.categories.length > 0) {
1487
+ var category_arr = qsmQuestionSettings.categories;
1488
+ let $cat_html = '<option value="">' + qsm_admin_messages.all_categories + '</option>';
1489
+ $.each(category_arr, function (index, value) {
1490
+ if (value.category !== '') {
1491
+ if (typeof value.cat_id !== 'undefined' && value.cat_id !== '') {
1492
+ $cat_html += '<option value="' + value.cat_id + '">' + value.category + '</option>';
1493
+ } else {
1494
+ $cat_html += '<option value="' + value.category + '">' + value.category + '</option>';
1495
+ }
1496
+ }
1497
+ });
1498
+ $('#question-bank-cat').html($cat_html);
1499
+ $('#question-bank-cat').val(pagination.category);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1500
  }
1501
  }
1502
+ },
1503
+ addQuestionToQuestionBank: function (question) {
1504
+ var questionText = QSMQuestion.prepareQuestionText(question.name);
1505
+ var template = wp.template('single-question-bank-question');
1506
+ if (question.question_title !== "undefined" && question.question_title !== "") {
1507
+ questionText = question.question_title;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1508
  }
1509
+ $('#question-bank').append(template({
1510
+ id: question.id,
1511
+ question: questionText,
1512
+ category: question.category,
1513
+ quiz_name: question.quiz_name
1514
+ }));
1515
+ },
1516
+ addQuestionFromQuestionBank: function (questionID) {
1517
+ QSMAdmin.displayAlert(qsm_admin_messages.adding_question, 'info');
1518
+ var model = new QSMQuestion.question({
1519
+ id: questionID
1520
  });
1521
+ model.fetch({
1522
+ headers: {
1523
+ 'X-WP-Nonce': qsmQuestionSettings.nonce
1524
+ },
1525
+ url: wpApiSettings.root + 'quiz-survey-master/v1/questions/' + questionID,
1526
+ success: QSMQuestion.questionBankSuccess,
1527
+ error: QSMAdmin.displayError
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1528
  });
1529
+ },
1530
+ questionBankSuccess: function (model) {
1531
+ var newModel = _.clone(model.attributes);
1532
+ newModel.id = null;
1533
+ QSMQuestion.questions.create(
1534
+ newModel, {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1535
  headers: {
1536
  'X-WP-Nonce': qsmQuestionSettings.nonce
1537
  },
1538
+ success: QSMQuestion.addNewQuestionFromQuestionBank,
1539
  error: QSMAdmin.displayError
1540
  }
1541
+ );
1542
+ },
1543
+ prepareCategories: function () {
1544
+ QSMQuestion.categories = [];
1545
+ QSMQuestion.questions.each(function (question) {
1546
+ var category = question.get('category');
1547
+ if (0 !== category.length && !_.contains(QSMQuestion.categories, category)) {
1548
+ QSMQuestion.categories.push(category);
1549
+ }
1550
+ });
1551
+ },
1552
+ processCategories: function () {
1553
+ $('.category').remove();
1554
+ _.each(QSMQuestion.categories, function (category) {
1555
+ QSMQuestion.addCategory(category);
1556
+ });
1557
+ },
1558
+ addCategory: function (category) {
1559
+ var template = wp.template('single-category');
1560
+ $('#categories').prepend(template({
1561
+ category: category
1562
+ }));
1563
+ },
1564
+ loadQuestions: function () {
1565
+ QSMAdmin.displayAlert(qsm_admin_messages.loading_question, 'info');
1566
+ QSMQuestion.questions.fetch({
1567
+ headers: {
1568
+ 'X-WP-Nonce': qsmQuestionSettings.nonce
1569
+ },
1570
+ data: {
1571
+ quizID: qsmQuestionSettings.quizID
1572
+ },
1573
+ success: QSMQuestion.loadSuccess,
1574
+ error: QSMAdmin.displayError
1575
+ });
1576
+ },
1577
+ loadSuccess: function () {
1578
+ QSMAdmin.clearAlerts();
1579
+ $('.qsm-showing-loader').remove();
1580
+ var question;
1581
+ _.each(qsmQuestionSettings.qpages, function (page) {
1582
+ QSMQuestion.qpages.add(page);
1583
+ });
1584
+ if (qsmQuestionSettings.pages.length > 0) {
1585
+ for (var i = 0; i < qsmQuestionSettings.pages.length; i++) {
1586
+ for (var j = 0; j < qsmQuestionSettings.pages[i].length; j++) {
1587
+ question = QSMQuestion.questions.get(qsmQuestionSettings.pages[i][j]);
1588
+ if ('undefined' !== typeof question) {
1589
+ QSMQuestion.addQuestionToPage(question);
1590
+ }
1591
+ }
1592
+ }
 
 
 
 
 
 
 
 
1593
  } else {
1594
+ //We have removed this code in 7.0.0 because not allow to delete the single page.
1595
+ QSMQuestion.questions.each(QSMQuestion.addQuestionToPage);
1596
  }
1597
+ //Create Default pages and one question.
1598
+ if (qsmQuestionSettings.pages.length == 0 && QSMQuestion.questions.length == 0) {
1599
+ $('.new-page-button').trigger('click');
1600
+ $('.questions .new-question-button').trigger('click');
 
1601
  }
1602
+ QSMQuestion.countTotal();
1603
+ },
1604
+ updateQPage: function (pageID) {
1605
+ QSMAdmin.displayAlert(qsm_admin_messages.saving_page_info, 'info');
1606
+ var pageInfo = QSMQuestion.qpages.get(pageID);
1607
+ jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
1608
+ pageInfo.set(field.name, field.value);
1609
+ });
1610
+ },
1611
+ savePages: function () {
1612
+ QSMAdmin.displayAlert(qsm_admin_messages.saving_page_questions, 'info');
1613
+ var pages = [];
1614
+ var qpages = [];
1615
+ var pageInfo = null;
1616
+ var post_id = jQuery('#edit_quiz_post_id').val();
1617
 
1618
+ // Cycles through each page and add page + questions to pages variable
1619
+ _.each(jQuery('.page'), function (page) {
 
 
 
1620
 
1621
+ // If page is empty, do not add it.
1622
+ if (0 == jQuery(page).children('.question').length) {
1623
+ return;
1624
+ }
1625
+ var singlePage = [];
1626
+ // Cycle through each question and add to the page.
1627
+ _.each(jQuery(page).children('.question'), function (question) {
1628
+ singlePage.push(jQuery(question).data('question-id'))
1629
+ });
1630
+ pages.push(singlePage);
1631
+ /**
1632
+ * Prepare qpages Object
1633
+ */
1634
+ pageInfo = QSMQuestion.qpages.get(jQuery(page).data('page-id'));
1635
+ pageInfo.set('questions', singlePage);
1636
+ qpages.push(pageInfo.attributes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1637
  });
1638
+ var data = {
1639
+ action: 'qsm_save_pages',
1640
+ quiz_id: qsmQuestionSettings.quizID,
1641
+ nonce: qsmQuestionSettings.saveNonce,
1642
+ pages: pages,
1643
+ qpages: qpages,
1644
+ post_id: post_id,
1645
+ };
1646
+
1647
+ jQuery.ajax(ajaxurl, {
1648
+ data: data,
1649
+ method: 'POST',
1650
+ success: QSMQuestion.savePagesSuccess,
1651
+ error: QSMAdmin.displayjQueryError
1652
+ });
1653
+ },
1654
+ savePagesSuccess: function () {
1655
+ QSMAdmin.displayAlert(qsm_admin_messages.saved_page_questions, 'success');
1656
+ $('#save-edit-quiz-pages').removeClass('is-active');
1657
+ },
1658
+ addNewPage: function (pageID) {
1659
+ var template = wp.template('page');
1660
+ if (typeof pageID == 'undefined' || pageID == '') {
1661
+ var newPageID = QSMQuestion.qpages.length + 1;
1662
+ var pageID = newPageID;
1663
+ var pageInfo = QSMQuestion.qpages.add({
1664
+ id: newPageID,
1665
+ quizID: qsmQuestionSettings.quizID,
1666
+ pagekey: qsmRandomID(8),
1667
+ hide_prevbtn: 0
1668
+ });
1669
+ }
1670
+ var pageInfo = QSMQuestion.qpages.get(pageID);
1671
+ $('.questions').append(template(pageInfo));
1672
+ var page = $('.questions').find('.page').length;
1673
+ $('.page:nth-child(' + page + ')').find('.page-number').text('Page ' + page);
1674
+ $('.page').sortable({
1675
+ items: '.question',
1676
+ opacity: 70,
1677
+ cursor: 'move',
1678
+ handle: 'span.dashicons-move',
1679
+ placeholder: "ui-state-highlight",
1680
+ connectWith: '.page',
1681
+ stop: function (evt, ui) {
1682
+ setTimeout(
1683
+ function () {
1684
+ $('.save-page-button').trigger('click');
1685
+ },
1686
+ 200
1687
+ )
1688
+ }
1689
+ });
1690
+ setTimeout(QSMQuestion.removeNew, 250);
1691
+ },
1692
+ addNewQuestionFromQuestionBank: function (model) {
1693
+ var page = parseInt($('#add-question-bank-page').val(), 10);
1694
+ model.set('page', page);
1695
+ QSMQuestion.questions.add(model);
1696
+ QSMQuestion.addQuestionToPage(model);
1697
+ $('.import-button').removeClass('disable_import');
1698
+ QSMQuestion.countTotal();
1699
+ import_button.html('').html(qsm_admin_messages.add_question);
1700
+ import_button.attr("onclick", "return confirm(" + qsm_admin_messages.confirm_message + "' '" + qsm_admin_messages.import_question_again + ")");
1701
+ QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
1702
+ $('#save-popup-button').trigger('click');
1703
+ },
1704
+ addNewQuestion: function (model) {
1705
+ var default_answers = parseInt(qsmQuestionSettings.default_answers);
1706
+ var count = 0;
1707
+ QSMAdmin.displayAlert(qsm_admin_messages.question_created, 'success');
1708
+ QSMQuestion.addQuestionToPage(model);
1709
+ QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
1710
+ QSMQuestion.countTotal();
1711
+ if ($('#answers').find('.answers-single').length < default_answers) {
1712
+ while (count < default_answers) {
1713
+ $('#new-answer-button').trigger('click');
1714
+ count++;
1715
+ }
1716
+ }
1717
+ $('.save-page-button').trigger('click');
1718
+ },
1719
+ addQuestionToPage: function (model) {
1720
+ var page = model.get('page') + 1;
1721
+ var template = wp.template('question');
1722
+ var page_exists = $('.page:nth-child(' + page + ')').length;
1723
+ var count = 0;
1724
+ while (!page_exists) {
1725
+ QSMQuestion.addNewPage(page);
1726
+ page_exists = $('.page:nth-child(' + page + ')').length;
1727
+ count++;
1728
+ if (count > 5) {
1729
+ page_exists = true;
1730
+ console.log('count reached');
1731
+ }
1732
+ }
1733
+ var questionName = QSMQuestion.prepareQuestionText(model.get('name'));
1734
+ var new_question_title = model.get('question_title');
1735
+ if (new_question_title === null || typeof new_question_title === "undefined" || new_question_title === "") {
1736
+ //Do nothing
1737
+ } else {
1738
+ questionName = new_question_title;
1739
+ }
1740
+ if (questionName == '') {
1741
+ questionName = qsm_admin_messages.new_question;
1742
+ }
1743
+ $('.page:nth-child(' + page + ')').append(template({
1744
+ id: model.id,
1745
+ category: model.get('category'),
1746
+ question: questionName
1747
  }));
1748
+ setTimeout(QSMQuestion.removeNew, 250);
1749
+ },
1750
+ createQuestion: function (page) {
1751
+ QSMAdmin.displayAlert(qsm_admin_messages.creating_question, 'info');
1752
+ QSMQuestion.questions.create({
1753
+ quizID: qsmQuestionSettings.quizID,
1754
+ page: page
1755
+ }, {
1756
+ headers: {
1757
+ 'X-WP-Nonce': qsmQuestionSettings.nonce
1758
+ },
1759
+ success: QSMQuestion.addNewQuestion,
1760
+ error: QSMAdmin.displayError
1761
+ });
1762
+ },
1763
+ duplicateQuestion: function (questionID) {
1764
+ QSMAdmin.displayAlert(qsm_admin_messages.duplicating_question, 'info');
1765
+ var model = QSMQuestion.questions.get(questionID);
1766
+ var newModel = _.clone(model.attributes);
1767
+ newModel.id = null;
1768
+ QSMQuestion.questions.create(
1769
+ newModel, {
1770
+ headers: {
1771
+ 'X-WP-Nonce': qsmQuestionSettings.nonce
1772
+ },
1773
+ success: QSMQuestion.addNewQuestion,
1774
+ error: QSMAdmin.displayError
1775
+ }
1776
+ );
1777
+ },
1778
+ saveQuestion: function (questionID, CurrentElement) {
1779
+ QSMAdmin.displayAlert(qsm_admin_messages.saving_question, 'info');
1780
+ var model = QSMQuestion.questions.get(questionID);
1781
+ var hint = $('#hint').val();
1782
+ var name = wp.editor.getContent('question-text');
1783
+ //Save new question title
1784
+ var question_title = $('#question_title').val();
1785
+ if (name == '' && question_title == '') {
1786
+ alert(qsm_admin_messages.enter_question_title);
1787
+ setTimeout(function () {
1788
+ $('#save-edit-question-spinner').removeClass('is-active');
1789
+ }, 250);
1790
+ return false;
1791
+ }
1792
+ var advanced_option = {};
1793
+ var answerInfo = wp.editor.getContent('correct_answer_info');
1794
+ var quizID = parseInt(qsmTextTabObject.quiz_id);
1795
+ var type = $("#question_type").val();
1796
+ var comments = $("#comments").val();
1797
+ advanced_option['required'] = $(".questionElements input[name='required']").is(":checked") ? 0 : 1;
1798
+ var category = $(".category-radio:checked").val();
1799
+ var type_arr = [];
1800
+ $.each($("input[name='file_upload_type[]']:checked"), function () {
1801
+ type_value = $(this).val().replace(/,/g, '');
1802
+ type_arr.push(type_value);
1803
+ });
1804
+ if ('new_category' == category) {
1805
+ category = $('#new_category').val();
1806
+ }
1807
+ if (!category) {
1808
+ category = '';
1809
+ }
1810
+
1811
+ //polar question validation
1812
+ if (13 == type) {
1813
+ let polar_error = 0;
1814
+ let polar_required_error = 0;
1815
+ let old_value = "";
1816
+ $('.answers-single .answer-points').each(function () {
1817
+ $(this).css('border-color', '');
1818
+ if ("" != old_value && $(this).val() == old_value) {
1819
+ alert(qsm_admin_messages.polar_q_range_error);
1820
+ polar_error++;
1821
+ }
1822
+ if ("" == $(this).val()) {
1823
+ $(this).css('border-color', 'red');
1824
+ polar_error++;
1825
+ polar_required_error++;
1826
+ }
1827
+ old_value = $(this).val();
1828
+ });
1829
+ if (0 < polar_required_error) {
1830
+ alert(qsm_admin_messages.range_fields_required);
1831
+ }
1832
+ if (0 < polar_error) {
1833
+ setTimeout(function () {
1834
+ $('#save-edit-question-spinner').removeClass('is-active');
1835
+ }, 250);
1836
+ return false;
1837
+ }
1838
+ }
1839
+
1840
+ var multicategories = [];
1841
+ $.each($("input[name='tax_input[qsm_category][]']:checked"), function () {
1842
+ multicategories.push($(this).val());
1843
+ });
1844
+ var featureImageID = $('.qsm-feature-image-id').val();
1845
+ var featureImageSrc = $('.qsm-feature-image-src').val();
1846
+ var answerType = $('#change-answer-editor').val();
1847
+ var matchAnswer = $('#match-answer').val();
1848
+
1849
+ var answers = [];
1850
+ var $answers = jQuery('.answers-single');
1851
+ _.each($answers, function (answer) {
1852
+ var $answer = jQuery(answer);
1853
+ var answer = '';
1854
+ var caption = '';
1855
+ if (answerType == 'rich') {
1856
+ var ta_id = $answer.find('textarea').attr('id')
1857
+ answer = wp.editor.getContent(ta_id);
1858
+ } else if (answerType == 'image') {
1859
+ answer = $answer.find('.answer-text').val().trim();
1860
+ answer = $.QSMSanitize(answer);
1861
+ caption = $answer.find('.answer-caption').val().trim();
1862
+ caption = $.QSMSanitize(caption);
1863
+ } else {
1864
+ answer = $answer.find('.answer-text').val().trim();
1865
+ answer = $.QSMSanitize(answer);
1866
+ }
1867
+
1868
+ var points = $answer.find('.answer-points').val();
1869
+ var correct = 0;
1870
+ if ($answer.find('.answer-correct').prop('checked')) {
1871
+ correct = 1;
1872
+ }
1873
+
1874
+ if (answerType == 'image') {
1875
+ answers.push([answer, points, correct, caption]);
1876
+ } else {
1877
+ answers.push([answer, points, correct]);
1878
+ }
1879
+
1880
+ });
1881
+ $('.questionElements .advanced-content > .qsm-row:not(.core-option)').each(function () {
1882
+ if ($(this).find('input[type="text"]').length > 0) {
1883
+ $($(this).find('input[type="text"]')).each(function () {
1884
+ let element_id = $(this).attr('id');
1885
+ advanced_option[element_id] = $(this).val();
1886
+ });
1887
+ } else if ($(this).find('input[type="number"]').length > 0) {
1888
+ let element_id = $(this).find('input[type="number"]').attr('id');
1889
+ advanced_option[element_id] = $(this).find('input[type="number"]').val();
1890
+ } else if ($(this).find('select').length > 0) {
1891
+ let element_id = $(this).find('select').attr('id');
1892
+ advanced_option[element_id] = $(this).find('select').val();
1893
+ } else if ($(this).find('input[type="checkbox"]').length > 0) {
1894
+ let element_id = $(this).find('input[type="checkbox"]').attr('name');
1895
+ let multi_value = $(this).find('input[type="checkbox"]:checked').map(function () {
1896
+ return this.value;
1897
+ }).get().join(',');
1898
+ element_id = element_id.replace('[]', '');
1899
+ advanced_option[element_id] = multi_value;
1900
+ }
1901
+ });
1902
+ model.save({
1903
+ quizID: quizID,
1904
+ type: type,
1905
+ name: name,
1906
+ question_title: question_title,
1907
+ answerInfo: answerInfo,
1908
+ comments: comments,
1909
+ hint: hint,
1910
+ category: category,
1911
+ multicategories: multicategories,
1912
+ featureImageID: featureImageID,
1913
+ featureImageSrc: featureImageSrc,
1914
+ answers: answers,
1915
+ answerEditor: answerType,
1916
+ matchAnswer: matchAnswer,
1917
+ other_settings: advanced_option,
1918
+ rest_nonce: qsmQuestionSettings.rest_user_nonce
1919
+ }, {
1920
+ headers: {
1921
+ 'X-WP-Nonce': qsmQuestionSettings.nonce
1922
+ },
1923
+ success: QSMQuestion.saveSuccess,
1924
+ error: QSMAdmin.displayError,
1925
+ type: 'POST'
1926
+ });
1927
+ jQuery(document).trigger('qsm_save_question', [questionID, CurrentElement]);
1928
+ },
1929
+ saveSuccess: function (model) {
1930
+ QSMAdmin.displayAlert(qsm_admin_messages.question_saved, 'success');
1931
+ var template = wp.template('question');
1932
+ var page = model.get('page') + 1;
1933
+ var questionName = model.get('name');
1934
+ var new_question_title = model.get('question_title');
1935
+ if (new_question_title !== '') {
1936
+ questionName = $.QSMSanitize(new_question_title);
1937
+ }
1938
+ var category = [];
1939
+ var multicategories = model.get('multicategories');
1940
+ if (multicategories === null || typeof multicategories === "undefined") {
1941
+ //No Action Require
1942
+ } else {
1943
+ $.each(multicategories, function (i, val) {
1944
+ category.push($(".qsm-popup__content #qsm_category-" + val + " label:first-child")[0].textContent);
1945
+ });
1946
+ category = category.filter(item => item);
1947
+ }
1948
+ $('.question[data-question-id=' + model.id + ']').replaceWith(template({
1949
+ id: model.id,
1950
+ type: model.get('type'),
1951
+ category: category.join(', '),
1952
+ question: questionName
1953
  }));
1954
+ setTimeout(function () {
1955
+ $('#save-edit-question-spinner').removeClass('is-active');
1956
+ }, 250);
1957
+ setTimeout(QSMQuestion.removeNew, 250);
1958
+ },
1959
+ addNewAnswer: function (answer, questionType = false) {
1960
+ if (!questionType) {
1961
+ questionType = $('#question_type').val();
1962
+ }
1963
+ var answerTemplate = wp.template('single-answer');
1964
+ if (answer.length >= 7 && answer[6] == 'image') {
1965
+ $('#answers').append(answerTemplate({
1966
+ answer: decodeEntities(answer[0]),
1967
+ points: answer[1],
1968
+ correct: answer[2],
1969
+ caption: answer[3],
1970
+ count: answer[4],
1971
+ question_id: answer[5],
1972
+ answerType: answer[6],
1973
+ form_type: qsmQuestionSettings.form_type,
1974
+ quiz_system: qsmQuestionSettings.quiz_system
1975
+ }));
1976
+ } else {
1977
+ $('#answers').append(answerTemplate({
1978
+ answer: decodeEntities(answer[0]),
1979
+ points: answer[1],
1980
+ correct: answer[2],
1981
+ count: answer[3],
1982
+ question_id: answer[4],
1983
+ answerType: answer[5],
1984
+ form_type: qsmQuestionSettings.form_type,
1985
+ quiz_system: qsmQuestionSettings.quiz_system
1986
+ }));
1987
+ }
1988
+
1989
+ // show points field only for polar in survey and simple form
1990
+ if (qsmQuestionSettings.form_type != 0) {
1991
+ if (questionType == 13) {
1992
+ $('#answers .answer-points').show();
1993
+ } else {
1994
+ $('#answers .answer-points').val('').hide();
1995
+ }
1996
+ }
1997
+ if (qsmQuestionSettings.form_type == 0) {
1998
+ if (questionType == 14) {
1999
+ $('.correct-answer').hide();
2000
+ } else {
2001
+ $('.correct-answer').show();
2002
+ }
2003
+ }
2004
+
2005
+ if (answer[5] == 'rich' && qsmQuestionSettings.qsm_user_ve === 'true') {
2006
+ var textarea_id = 'answer-' + answer[4] + '-' + answer[3];
2007
+ wp.editor.remove(textarea_id);
2008
+ var settings = {
2009
+ mediaButtons: true,
2010
+ tinymce: {
2011
+ forced_root_block: '',
2012
+ toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
2013
+ },
2014
+ quicktags: true,
2015
+ };
2016
+ wp.editor.initialize(textarea_id, settings);
2017
+ var anser = QSMQuestion.prepareQuestionText(answer[0]);
2018
+ $(textarea_id).val(anser);
2019
+ tinyMCE.get(textarea_id).setContent(anser);
2020
+ }
2021
+ },
2022
+ openEditPopup: function (questionID, CurrentElement) {
2023
+ jQuery('.qsm_tab_content').find('.question').removeClass('opened');
2024
+ if (CurrentElement.parents('.question').next('.questionElements').length > 0) {
2025
+ if (CurrentElement.parents('.question').next('.questionElements').is(":visible")) {
2026
+ CurrentElement.parents('.question').next('.questionElements').slideUp('slow');
2027
+ $('.questions').sortable('enable');
2028
+ $('.page').sortable('enable');
2029
+ } else {
2030
+ CurrentElement.parents('.question').addClass('opened');
2031
+ CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
2032
+ }
2033
+ return;
2034
+ } else {
2035
+ CurrentElement.parents('.question').addClass('opened');
2036
+ $('.questions .questionElements').slideDown('slow');
2037
+ $('.questions .questionElements').remove();
2038
+ }
2039
+ //Copy and remove popup div
2040
+ var questionElements = $('#modal-1-content').html();
2041
+ $('#modal-1-content').children().remove();
2042
+ CurrentElement.parents('.question').after("<div style='display: none;' class='questionElements'>" + questionElements + "</div>");
2043
+
2044
+ //Show question id on question edit screen
2045
+ $('#qsm-question-id').text('ID: ' + questionID);
2046
+ QSMQuestion.prepareCategories();
2047
+ QSMQuestion.processCategories();
2048
+ var question = QSMQuestion.questions.get(questionID);
2049
+ var questionText = QSMQuestion.prepareQuestionText(question.get('name'));
2050
+ $('#edit_question_id').val(questionID);
2051
+ var answerInfo = question.get('answerInfo');
2052
+ var CAI_editor = '';
2053
+ var question_editor = ''
2054
+ if (qsmQuestionSettings.qsm_user_ve === 'true') {
2055
+ wp.editor.remove('question-text');
2056
+ wp.editor.remove('correct_answer_info');
2057
+ QSMQuestion.prepareEditor();
2058
+ question_editor = tinyMCE.get('question-text');
2059
+ CAI_editor = tinyMCE.get('correct_answer_info');
2060
+ }
2061
+ if ($('#wp-question-text-wrap').hasClass('html-active')) {
2062
+ jQuery("#question-text").val(questionText);
2063
+ } else if (question_editor) {
2064
+ tinyMCE.get('question-text').setContent(questionText);
2065
+ } else {
2066
+ jQuery("#question-text").val(questionText);
2067
+ }
2068
+ if ('' != questionText) {
2069
+ jQuery('.qsm-show-question-desc-box').trigger('click');
2070
+ }
2071
 
2072
+ if ($('#wp-correct_answer_info-wrap').hasClass('html-active')) {
2073
+ jQuery("#correct_answer_info").val(answerInfo);
2074
+ } else if (CAI_editor) {
2075
+ tinyMCE.get('correct_answer_info').setContent(answerInfo);
2076
  } else {
2077
+ jQuery("#correct_answer_info").val(answerInfo);
2078
  }
2079
+
2080
+ $('#answers').empty();
2081
+ var answers = question.get('answers');
2082
+ var answerEditor = question.get('answerEditor');
2083
+ if (answerEditor === null || typeof answerEditor === "undefined") {
2084
+ answerEditor = 'text';
2085
+ }
2086
+ //Get text limit value
2087
+ var get_limit_text = question.get('limit_text');
2088
+ if (get_limit_text === null || typeof get_limit_text === "undefined") {
2089
+ get_limit_text = '0';
2090
+ }
2091
+ //Get limit multiple response value
2092
+ var get_limit_mr = question.get('limit_multiple_response');
2093
+ if (get_limit_mr === null || typeof get_limit_mr === "undefined") {
2094
+ get_limit_mr = '0';
2095
+ }
2096
+ //Get image width value
2097
+ let image_width = question.get('img_width');
2098
+ if (image_width === null || typeof image_width === "undefined") {
2099
+ image_width = '';
2100
+ }
2101
+ //Get image height value
2102
+ let image_height = question.get('img_height');
2103
+ if (image_height === null || typeof image_height === "undefined") {
2104
+ image_height = '';
2105
+ }
2106
+ //Get file upload limit
2107
+ var get_limit_fu = question.get('file_upload_limit');
2108
+ if (get_limit_fu === null || typeof get_limit_fu === "undefined") {
2109
+ get_limit_fu = '0';
2110
+ }
2111
+ //Get checked question type
2112
+ var multicategories = question.get('multicategories');
2113
+ $("input[name='tax_input[qsm_category][]']:checkbox").attr("checked", false);
2114
+ if (multicategories === null || typeof multicategories === "undefined") {
2115
+ //No Action Require
2116
  } else {
2117
+ $.each(multicategories, function (i, val) {
2118
+ $("input[name='tax_input[qsm_category][]']:checkbox[value='" + val + "']").attr("checked", "true");
2119
+ });
2120
  }
2121
+ //Get featured image
2122
+ var get_featureImageSrc = question.get('featureImageSrc');
2123
+ var get_featureImageID = question.get('featureImageID');
2124
+ if (get_featureImageSrc === null || typeof get_featureImageSrc === "undefined") {
2125
+ get_featureImageSrc = get_featureImageID = '';
2126
+ }
2127
+ //Get checked question type
2128
+ var get_file_upload_type = question.get('file_upload_type');
2129
+ $("input[name='file_upload_type[]']:checkbox").attr("checked", false);
2130
+ if (get_file_upload_type === null || typeof get_file_upload_type === "undefined") { } else {
2131
+ var fut_arr = get_file_upload_type.split(",");
2132
+ $.each(fut_arr, function (i) {
2133
+ $("input[name='file_upload_type[]']:checkbox[value='" + fut_arr[i] + "']").attr("checked", "true");
2134
+ });
2135
+ }
2136
+ var al = 0;
2137
+ _.each(answers, function (answer) {
2138
+ answer.push(al + 1);
2139
+ answer.push(questionID);
2140
+ answer.push(answerEditor);
2141
+ QSMQuestion.addNewAnswer(answer, question.get('type'));
2142
+ al++;
2143
+ });
2144
+ //get new question type
2145
+ var get_question_title = question.get('question_title');
2146
+ if (get_question_title === null || typeof get_question_title === "undefined") {
2147
+ get_question_title = '';
2148
+ }
2149
+
2150
+ //Hide the question settings based on question type
2151
+ $('.qsm_hide_for_other').hide();
2152
+ if ($('.qsm_show_question_type_' + question.get('type')).length > 0) {
2153
+ $('.qsm_show_question_type_' + question.get('type')).show();
2154
+ }
2155
+
2156
+ qsm_hide_show_question_desc(question.get('type'));
2157
+ $('#hint').val(question.get('hint'));
2158
+ $('#image_size-width').val(image_width);
2159
+ $('#image_size-height').val(image_height);
2160
+ $("#question_type").val(question.get('type'));
2161
+ $("#comments").val(question.get('comments'));
2162
+ //Changed checked logic based on new structure for required.
2163
+ $("input#required[value='" + question.get('required') + "']").prop('checked', true);
2164
+
2165
+ $("#limit_text").val(get_limit_text);
2166
+ $("#limit_multiple_response").val(get_limit_mr);
2167
+ $("#file_upload_limit").val(get_limit_fu);
2168
+ $("#change-answer-editor").val(answerEditor);
2169
+ $(".category-radio").removeAttr('checked');
2170
+ $("#edit-question-id").text('').text(questionID);
2171
+ $("#question_title").val(get_question_title);
2172
+ if (0 !== question.get('category').length) {
2173
+ $(".category-radio").val([question.get('category')]);
2174
+ }
2175
+ //Append feature image
2176
+ if (get_featureImageSrc) {
2177
+ var button = $('.qsm-feature-image-upl');
2178
+ button.html('<img src="' + get_featureImageSrc + '" style="width:150px">');
2179
+ button.next('.qsm-feature-image-rmv').show();
2180
+ button.next().next('.qsm-feature-image-id').val(get_featureImageID);
2181
+ button.next().next().next('.qsm-feature-image-src').val(get_featureImageSrc);
2182
+ }
2183
+ //Append extra settings
2184
+ var all_setting = question.get('settings');
2185
+ if (all_setting === null || typeof all_setting === "undefined") { } else {
2186
+ $.each(all_setting, function (index, value) {
2187
+ if ($('#' + index + '_area').length > 0) {
2188
+ if (1 == $('#' + index + '_area').find('input[type=checkbox]').length) {
2189
+ $(".questionElements input[name='" + index + "'][value='" + value + "']").attr("checked", "true").prop('checked', true);
2190
+ } else if ($('#' + index + '_area').find('input[type=checkbox]').length > 1) {
2191
+ var fut_arr = value.split(",");
2192
+ $.each(fut_arr, function (i) {
2193
+ $(".questionElements input[name='" + index + "[]']:checkbox[value='" + fut_arr[i] + "']").attr("checked", "true").prop('checked', true);
2194
+ });
2195
+ } else {
2196
+ if (value != null) {
2197
+ $('#' + index).val(value);
2198
+ }
2199
+ }
2200
+ }
2201
+ if (index == 'matchAnswer') {
2202
+ $('#match-answer').val(value);
2203
+ }
2204
+ });
2205
+ }
2206
+ CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
2207
+ $('#modal-1-content').html(questionElements);
2208
+ //MicroModal.show( 'modal-1' );
2209
+ $('.questions').sortable('disable');
2210
+ $('.page').sortable('disable');
2211
+
2212
+ if (13 == question.get('type')) {
2213
+ QSMQuestion.prepareEditPolarQuestion(question.get('type'));
2214
+ }
2215
+ QSMQuestion.sync_child_parent_category(questionID);
2216
 
2217
+ $('#image_size_area').hide();
2218
+ if ('image' === answerEditor) {
2219
+ $('#image_size_area').show();
2220
+ }
2221
+
2222
+ jQuery(document).trigger('qsm_open_edit_popup', [questionID, CurrentElement]);
2223
+ },
2224
+ openEditPagePopup: function (pageID) {
2225
+ var page = QSMQuestion.qpages.get(pageID);
2226
+ $('#edit_page_id').val(pageID);
2227
+ $("#edit-page-id").text('').text(pageID);
2228
+ jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
2229
+ field.value = page.get(field.name);
2230
+ });
2231
+ MicroModal.show('modal-page-1');
2232
+ },
2233
+ removeNew: function () {
2234
+ $('.page-new').removeClass('page-new');
2235
+ $('.question-new').removeClass('question-new');
2236
+ },
2237
+ prepareQuestionText: function (question) {
2238
+ return jQuery('<textarea />').html(question).text();
2239
+ },
2240
+ prepareEditor: function () {
2241
  var settings = {
2242
  mediaButtons: true,
2243
  tinymce: {
2246
  },
2247
  quicktags: true,
2248
  };
2249
+ wp.editor.initialize('question-text', settings);
2250
+ wp.editor.initialize('correct_answer_info', settings);
2251
+ },
2252
+ sync_child_parent_category: function (questionID) {
2253
+ $('.qsm_category_checklist').find('input').each(function (index, input) {
2254
+ $(input).bind('change', function () {
2255
+ var checkbox = $(this);
2256
+ var is_checked = $(checkbox).is(':checked');
2257
+ if (is_checked) {
2258
+ $(checkbox).parents('li').children('label').children('input').prop("checked", true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2259
  } else {
2260
+ $(checkbox).parentsUntil('ul').find('input').prop("checked", false);
2261
+ }
2262
+ jQuery(document).trigger('qsm_sync_child_parent_category', [checkbox, questionID]);
2263
+ });
2264
+ });
2265
+ },
2266
+ question_type_change: function (previous_question_val, questionID) {
2267
+ //you can override this object
2268
+ var ans_type = $('#change-answer-editor').val();
2269
+ if (2 == questionID && 'text' !== ans_type) {
2270
+ $('#change-answer-editor').val('text');
2271
+ $('.answers-single').remove();
2272
+ }
2273
+ if (13 != questionID) {
2274
+ $('.new-answer-button').show();
2275
+ $('.remove-answer-icon').show();
2276
+ $('.answer-points').css('border-color', '');
2277
+ let ans_placeholder = qsm_admin_messages.your_answer;
2278
+ "image" == ans_type && (ans_placeholder = qsm_admin_messages.insert_image_url), $("#answers").find(".answers-single input.answer-text").attr("placeholder", ans_placeholder), $("#answers").find(".answers-single input.answer-points").attr("placeholder", qsm_admin_messages.points);
2279
+ }
2280
+ },
2281
+ prepareEditPolarQuestion: function (question_val) {
2282
+ var answerType = $('#change-answer-editor').val();
2283
+ if (13 == question_val) {
2284
+ if ($('#answers').find('.answers-single').length < 2) {
2285
+ $('#new-answer-button').trigger('click');
2286
+ if ($('#answers').find('.answers-single').length < 2) {
2287
+ $('#new-answer-button').trigger('click');
2288
  }
2289
  }
2290
+ if ($('#answers').find('.answers-single').length > 2) {
2291
+ jQuery('#answers').find('.answers-single').slice(2).remove();
2292
  }
2293
+ $('.new-answer-button').hide();
2294
+ $('#answers').find('.answers-single .remove-answer-icon').hide();
2295
+
2296
+ let ans_l_placeholder = qsm_admin_messages.left_label;
2297
+ "image" == answerType && (ans_l_placeholder = "Insert left image URL"), $("#answers").find(".answers-single:first-child input.answer-text").attr("placeholder", ans_l_placeholder);
2298
+ let ans_r_placeholder = qsm_admin_messages.right_label;
2299
+ "image" == answerType && (ans_r_placeholder = "Insert right image URL"), $("#answers").find(".answers-single:last-child input.answer-text").attr("placeholder", ans_r_placeholder), $("#answers").find(".answers-single:first-child input.answer-points").attr("placeholder", qsm_admin_messages.left_range), $("#answers").find(".answers-single:last-child input.answer-points").attr("placeholder", qsm_admin_messages.right_range);
2300
+ if ( "" == $("#answers").find(".answers-single:first-child input.answer-points").val() ) {
2301
+ $("#answers").find(".answers-single:first-child input.answer-points").val(0);
2302
+ }
2303
+ if ( "" == $("#answers").find(".answers-single:last-child input.answer-points").val() ) {
2304
+ $("#answers").find(".answers-single:last-child input.answer-points").val(5);
2305
+ }
2306
+ } else {
2307
+ $('.new-answer-button').show();
2308
+ $('.remove-answer-icon').show();
2309
+ let ans_placeholder = qsm_admin_messages.your_answer;
2310
+ "image" == answerType && (ans_placeholder = qsm_admin_messages.insert_image_url), $("#answers").find(".answers-single input.answer-text").attr("placeholder", ans_placeholder), $("#answers").find(".answers-single input.answer-points").attr("placeholder", qsm_admin_messages.points);
2311
+ }
2312
  }
2313
+ };
 
 
 
 
 
 
2314
 
2315
+ $(function () {
2316
+ QSMQuestion.pageCollection = Backbone.Collection.extend({
2317
+ model: QSMQuestion.page
 
 
 
 
 
2318
  });
2319
+ QSMQuestion.qpages = new QSMQuestion.pageCollection();
2320
+ QSMQuestion.questionCollection = Backbone.Collection.extend({
2321
+ url: wpApiSettings.root + 'quiz-survey-master/v1/questions',
2322
+ model: QSMQuestion.question
2323
+ });
2324
+ QSMQuestion.questions = new QSMQuestion.questionCollection();
2325
+ $('.new-page-button').on('click', function (event) {
2326
+ event.preventDefault();
2327
+ QSMQuestion.addNewPage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2328
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2329
 
2330
+ $('.questions').on('click', '.new-question-button', function (event) {
2331
+ event.preventDefault();
2332
+ if (jQuery('.questionElements').is(':visible')) {
2333
+ $('#save-popup-button').trigger('click');
2334
+ }
2335
+ QSMQuestion.createQuestion($(this).parents('.page').index());
2336
+ });
2337
 
2338
+ $('.questions').on('click', '.add-question-bank-button', function (event) {
2339
+ event.preventDefault();
2340
+ if (jQuery('.questionElements').is(':visible')) {
2341
+ $('#save-popup-button').trigger('click');
2342
+ }
2343
+ QSMQuestion.openQuestionBank($(this).parents('.page').index());
2344
+ });
2345
 
2346
+ //Show more question on load more
2347
+ $(document).on('click', '.qb-load-more-question', function (event) {
2348
+ event.preventDefault();
2349
+ QSMQuestion.loadQuestionBank();
2350
+ });
2351
 
2352
+ //Show category related question
2353
+ $(document).on('change', '#question-bank-cat', function (event) {
2354
+ event.preventDefault();
2355
+ QSMQuestion.loadQuestionBank('change');
2356
+ });
 
 
 
 
2357
 
2358
+ //Show searched question
2359
+ $(document).on('submit', '#question-bank-search-form', function (event) {
2360
+ event.preventDefault();
2361
+ QSMQuestion.loadQuestionBank('change');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2362
  });
 
 
 
 
 
2363
 
2364
+ $('.questions').on('click', '.edit-question-button', function (event) {
2365
+ event.preventDefault();
2366
+ $('.qsm-category-filter').trigger('keyup');
2367
+ QSMQuestion.openEditPopup($(this).parents('.question').data('question-id'), $(this));
2368
+ });
2369
+ $('.questions').on('click', '.edit-page-button', function (event) {
2370
+ event.preventDefault();
2371
+ QSMQuestion.openEditPagePopup($(this).parents('.page').data('page-id'));
2372
+ });
2373
 
2374
+ $(document).on('click', '.questions .duplicate-question-button', function (event) {
2375
+ event.preventDefault();
2376
+ QSMQuestion.duplicateQuestion($(this).parents('.question').data('question-id'));
2377
+ });
2378
+ $('.questions').on('click', '.delete-question-button', function (event) {
2379
+ event.preventDefault();
2380
+ remove = $(this);
2381
+ $(this).parents('.question').next('.questionElements').slideUp('slow');
2382
+ // opens-up question-delete modal
2383
+ MicroModal.show('modal-7');
2384
+ $('#unlink-question-button').attr('data-question-iid', $(this).data('question-iid'));
2385
+ $('#delete-question-button').attr('data-question-iid', $(this).data('question-iid'));
2386
+ });
2387
+ // removes question from database
2388
+ $('#delete-question-button').click(function (event) {
2389
+ event.preventDefault();
2390
+ var question_id = $(this).data('question-iid');
2391
+ $.ajax({
2392
+ url: ajaxurl,
2393
+ method: 'POST',
2394
+ data: {
2395
+ 'action': 'qsm_delete_question_from_database',
2396
+ 'question_id': question_id,
2397
+ 'nonce': qsmQuestionSettings.single_question_nonce
2398
+ },
2399
+ success: function (response) {
2400
+ // do nothing
2401
+ }
2402
+ });
2403
+ remove.parents('.question').remove();
2404
+ QSMQuestion.countTotal();
2405
  $('.save-page-button').trigger('click');
2406
+ MicroModal.close('modal-7');
2407
+ });
2408
+
2409
+ // unlink question from a particular quiz.
2410
+ $('#unlink-question-button').click(function (event) {
2411
+ event.preventDefault();
2412
+ var question_id = $(this).data('question-iid');
2413
+ remove.parents('.question').remove();
2414
  QSMQuestion.countTotal();
2415
+ $('.save-page-button').trigger('click');
2416
+ MicroModal.close('modal-7');
2417
+ });
2418
+
2419
+ $(document).on('click', '.delete-page-button', function (event) {
2420
+ event.preventDefault();
2421
+ if (confirm(qsm_admin_messages.confirm_message)) {
2422
+ var pageID = $(this).parent().siblings('main').children('#edit_page_id').val();
2423
+ $('.page[data-page-id=' + pageID + ']').remove();
2424
+ $('.save-page-button').trigger('click');
2425
+ QSMQuestion.countTotal();
2426
+ MicroModal.close('modal-page-1');
 
 
 
 
 
 
 
2427
  }
2428
+ });
2429
+ $(document).on('click', '#answers .delete-answer-button', function (event) {
2430
+ event.preventDefault();
2431
+ $(this).parents('.answers-single').remove();
2432
+ });
2433
+ $(document).on('click', '#delete-action .deletion', function (event) {
2434
+ event.preventDefault();
2435
+ $(this).parents('.questionElements').slideUp('slow');
2436
+ });
2437
+ $(document).on('click', '#save-popup-button', function (event) {
2438
+ event.preventDefault();
2439
+ questionElements = $(this).parents('.questionElements');
2440
+ if (6 == questionElements.find('#question_type').val()) {
2441
+ question_description = wp.editor.getContent('question-text').trim();
2442
+ if (question_description == '' || question_description == null) {
2443
+ alert(qsm_admin_messages.html_section_empty);
2444
  return false;
2445
  }
2446
  }
2447
+ if (14 == questionElements.find('#question_type').val()) {
2448
+ question_description = wp.editor.getContent('question-text').trim();
2449
+ blanks = question_description.match(/%BLANK%/g);
2450
+ options_length = $('.answer-text-div').length
2451
+ if ($('#match-answer').val() == 'sequence') {
2452
+ if (blanks == null || blanks.length != options_length) {
2453
+ $('.modal-8-table').html(qsm_admin_messages.blank_number_validation);
2454
+ MicroModal.show('modal-8');
2455
+ return false;
2456
+ }
2457
+ } else {
2458
+ if (blanks == null || options_length === 0) {
2459
+ $('.modal-8-table').html(qsm_admin_messages.blank_required_validation);
2460
+ MicroModal.show('modal-8');
2461
+ return false;
2462
+ }
2463
+ }
2464
 
2465
 
2466
+ }
2467
+ $('#save-edit-question-spinner').addClass('is-active');
2468
+ var model_html = $('#modal-1-content').html();
2469
+ $('#modal-1-content').children().remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2470
 
2471
+ QSMQuestion.saveQuestion($(this).parents('.questionElements').children('#edit_question_id').val(), $(this));
2472
+ $('.save-page-button').trigger('click');
2473
+ $('#modal-1-content').html(model_html);
2474
+ });
2475
+ $(document).on('click', '#new-answer-button', function (event) {
2476
+ event.preventDefault();
2477
+ var answer_length = $('#answers').find('.answers-single').length;
2478
+ if (answer_length > 1 && $('#question_type').val() == 13) {
2479
+ alert(qsm_admin_messages.polar_options_validation);
2480
+ return;
2481
+ }
2482
+ var question_id = $('#edit_question_id').val();
2483
+ var answerType = $('#change-answer-editor').val();
2484
+ var answer = ['', '', 0, answer_length + 1, question_id, answerType];
2485
+ QSMQuestion.addNewAnswer(answer, 0);
2486
+ });
2487
 
2488
+ $(document).on('click', '.qsm-popup-bank .import-button', function (event) {
2489
+ event.preventDefault();
2490
+ $(this).text('').text(qsm_admin_messages.adding_question);
2491
+ import_button = $(this);
 
 
 
 
 
 
 
 
 
 
2492
  $('.import-button').addClass('disable_import');
2493
+ QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
2494
+ MicroModal.close('modal-2');
2495
+ });
2496
+
2497
+ //Click on selected question button.
2498
+ $('.qsm-popup-bank').on('click', '#qsm-import-selected-question', function (event) {
 
2499
  var $total_selction = $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').length;
2500
  if ($total_selction === 0) {
2501
+ alert(qsm_admin_messages.no_question_selected);
2502
  } else {
2503
  $.fn.reverse = [].reverse;
2504
+ $($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).each(function () {
2505
+ $(this).find('.import-button').text('').text(qsm_admin_messages.adding_question);
2506
+ import_button = $(this).find('.import-button');
2507
+ QSMQuestion.countTotal();
2508
+ QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
2509
+ $(this).find('.import-button').text('').text(qsm_admin_messages.add_question);
2510
+ });
2511
+ $('.import-button').addClass('disable_import');
2512
+ $('#question-bank').find('[name="qsm-question-checkbox[]"]').attr('checked', false);
2513
+ MicroModal.close('modal-2');
2514
+ }
2515
+ });
2516
+ //Delete question from question bank
2517
+ $('.qsm-popup-bank').on('click', '#qsm-delete-selected-question', function (event) {
2518
+ if (confirm(qsm_admin_messages.confirm_message)) {
2519
+ var $total_selction = $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').length;
2520
+ if ($total_selction === 0) {
2521
+ alert(qsm_admin_messages.no_question_selected);
2522
+ } else {
2523
+ $.fn.reverse = [].reverse;
2524
+ var question_ids = $($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).map(function () {
2525
+ return $(this).data('question-id');
2526
+ }).get().join(',');
2527
+ if (question_ids) {
2528
+ $.ajax({
2529
+ url: ajaxurl,
2530
+ method: 'POST',
2531
+ data: {
2532
+ 'action': 'qsm_delete_question_question_bank',
2533
+ 'question_ids': question_ids,
2534
+ 'nonce': qsmQuestionSettings.question_bank_nonce
2535
+ },
2536
+ success: function (response) {
2537
+ var data = jQuery.parseJSON(response);
2538
+ if (data.success === true) {
2539
+ $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').slideUp('slow');
2540
+ alert(data.message);
2541
+ } else {
2542
+ alert(data.message);
2543
+ }
2544
  }
2545
+ });
2546
+ }
2547
  }
2548
  }
2549
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2550
 
2551
+ //Select all button.
2552
+ $(document).on('change', '.qsm-question-checkbox', function (event) {
2553
+ event.preventDefault();
2554
+ if ($('.qsm-question-checkbox:checked').length > 0) {
2555
+ $('.qsm-question-bank-footer').addClass('opened');
2556
  } else {
2557
+ $('.qsm-question-bank-footer').removeClass('opened');
 
 
2558
  }
2559
  });
2560
+ $(document).on('change', '#qsm_select_all_question', function (event) {
2561
+ event.preventDefault();
2562
+ $('.qsm-question-checkbox').prop('checked', jQuery('#qsm_select_all_question').prop('checked'));
2563
+ if ($('.qsm-question-checkbox:checked').length > 0) {
2564
+ $('.qsm-question-bank-footer').addClass('opened');
2565
  } else {
2566
+ $('.qsm-question-bank-footer').removeClass('opened');
2567
  }
2568
  });
 
 
 
 
 
 
 
2569
 
2570
+ $('.save-page-button').on('click', function (event) {
2571
+ event.preventDefault();
2572
+ $('#save-edit-quiz-pages').addClass('is-active');
2573
+ QSMQuestion.savePages();
2574
+ });
2575
+ $('#save-page-popup-button').on('click', function (event) {
2576
+ event.preventDefault();
2577
+ var pageID = $(this).parent().siblings('main').children('#edit_page_id').val();
2578
+ var pageKey = jQuery('#pagekey').val();
2579
+ if (pageKey.replace(/^\s+|\s+$/g, "").length == 0) {
2580
+ alert(qsm_admin_messages.page_name_required);
2581
+ return false;
2582
+ } else if (null == pageKey.match(/^[A-Za-z0-9\-\s]+$/)) {
2583
+ alert(qsm_admin_messages.page_name_validation);
2584
+ return false;
2585
  } else {
2586
+ QSMQuestion.updateQPage(pageID);
2587
+ QSMQuestion.savePages();
2588
+ MicroModal.close('modal-page-1');
2589
  }
2590
  });
 
2591
 
2592
+ $(document).on('change', '#change-answer-editor', function (event) {
2593
+ var newVal = $(this).val();
2594
+ if (confirm(qsm_admin_messages.question_reset_message)) {
2595
+ $('#answers').find('.answers-single').remove();
2596
+ $('#image_size_area').hide();
2597
+ if ('image' === newVal) {
2598
+ $('#image_size_area').show();
2599
+ }
2600
+ } else {
2601
+ if (newVal == 'rich') {
2602
+ $(this).val('text');
2603
+ } else {
2604
+ $(this).val('rich');
2605
+ }
2606
+ return false;
2607
  }
2608
+ var question_val = $('#question_type').val();
 
 
 
 
 
 
 
 
 
2609
  if (13 == question_val) {
2610
+ QSMQuestion.prepareEditPolarQuestion(question_val);
 
 
2611
  }
2612
+ });
2613
 
2614
+ // Adds event handlers for searching questions
2615
+ $('#question_search').on('keyup', function () {
2616
+ $('.question').each(function () {
2617
+ if ($(this).text().toLowerCase().indexOf($('#question_search').val().toLowerCase()) === -1) {
2618
+ $(this).hide();
2619
+ } else {
2620
+ $(this).show();
2621
+ $(this).parent('.page').show();
2622
 
2623
+ }
2624
+ });
2625
+ $('.page').each(function () {
2626
+ if (0 === $(this).children('.question:visible').length) {
2627
+ $(this).hide();
2628
+ } else {
2629
+ $(this).show();
2630
+ }
2631
+ });
2632
+ if (0 === $('#question_search').val().length) {
2633
+ $('.page').show();
2634
+ $('.question').show();
2635
+ }
2636
+ });
2637
 
2638
+ qsm_init_sortable();
2639
+
2640
+ if (qsmQuestionSettings.qsm_user_ve === 'true') {
2641
+ QSMQuestion.prepareEditor();
 
 
 
 
2642
  }
2643
+ QSMQuestion.loadQuestions();
2644
 
2645
+ /**
2646
+ * Hide/show advanced option
2647
+ */
2648
+ $(document).on('click', '#show-advanced-option', function () {
2649
+ var $this = $(this);
2650
+ $(this).next('div.advanced-content').slideToggle('slow', function () {
2651
+ if ($(this).is(':visible')) {
2652
+ $this.text('').html(qsm_admin_messages.hide_advance_options);
2653
+ } else {
2654
+ $this.text('').html(qsm_admin_messages.show_advance_options);
2655
+ }
2656
+ });
2657
+ });
 
 
 
 
 
 
 
2658
 
2659
+ //Hide the question settings based on question type
2660
+ var previous_question_val;
2661
+ $(document).on('focus', '#question_type', function () {
2662
+ previous_question_val = this.value;
2663
+ })
2664
+ $(document).on('change', '#question_type', function () {
2665
+ var question_val = $('#question_type').val();
2666
+ QSMQuestion.question_type_change(previous_question_val, question_val);
2667
+ if (6 == question_val) {
2668
+ var question_description = wp.editor.getContent('question-text');
2669
+ if (question_description == 'Add description here!') {
2670
+ tinyMCE.get('question-text').setContent('');
2671
+ }
2672
+ }
2673
+ if (14 == question_val) {
2674
+ $('.correct-answer').hide();
2675
+ } else {
2676
+ $('.correct-answer').show();
2677
+ }
 
 
 
2678
 
2679
+ // show points field only for polar in survey and simple form
2680
+ if (qsmQuestionSettings.form_type != 0) {
2681
+ if (13 == question_val) {
2682
+ $('.answer-points').show();
2683
+ } else {
2684
+ $('.answer-points').val('').hide();
2685
+ }
2686
+ }
2687
 
2688
+ $('.qsm_hide_for_other').hide();
2689
+ if ($('.qsm_show_question_type_' + question_val).length > 0) {
2690
+ $('.qsm_show_question_type_' + question_val).show();
2691
+ }
2692
+ qsm_hide_show_question_desc(question_val);
2693
+ if (13 == question_val) {
2694
+ QSMQuestion.prepareEditPolarQuestion(question_val);
2695
+ }
2696
+ });
2697
 
2698
+ //Add new category
2699
+ $(document).on('click', '#qsm-category-add-toggle', function () {
2700
+ if ($('#qsm-category-add').is(":visible")) {
2701
+ $('.questionElements #new_category_new').attr('checked', false);
2702
+ $('#qsm-category-add').slideUp('slow');
2703
+ } else {
2704
+ $('.questionElements #new_category_new').attr('checked', true).prop('checked', 'checked');
2705
+ $('#qsm-category-add').slideDown('slow');
2706
+ }
2707
+ });
2708
 
2709
+ //Hide/show quesion description
2710
+ $(document).on('click', '.qsm-show-question-desc-box', function (e) {
2711
+ e.preventDefault();
2712
+ $(this).hide();
2713
+ var question_description = wp.editor.getContent('question-text');
2714
+ if (question_description == '' || question_description == null) {
2715
+ var questionElements = $(this).parents('.questionElements');
2716
+ if (6 == questionElements.find('#question_type').val()) {
2717
+ tinyMCE.get('question-text').setContent('');
2718
+ }
2719
  }
2720
+ $(this).next('.qsm-row').show();
2721
+ });
2722
+ $(document).on('click', '.qsm-hide-question-desc-box', function (e) {
2723
+ e.preventDefault();
2724
+ $(this).parents('.qsm-row.qsm-editor-wrap').hide();
2725
+ $('.qsm-show-question-desc-box').show();
2726
+ });
2727
 
2728
+ //Open file upload on feature image
2729
+ $('body').on('click', '.qsm-feature-image-upl', function (e) {
2730
+ e.preventDefault();
2731
+ var button = $(this),
2732
+ custom_uploader = wp.media({
2733
+ title: qsm_admin_messages.insert_img,
2734
+ library: {
2735
+ // uploadedTo : wp.media.view.settings.post.id, // attach to the current post?
2736
+ type: 'image'
2737
+ },
2738
+ button: {
2739
+ text: qsm_admin_messages.use_img // button label text
2740
+ },
2741
+ multiple: false
2742
+ }).on('select', function () { // it also has "open" and "close" events
2743
+ var attachment = custom_uploader.state().get('selection').first().toJSON();
2744
+ button.html('<img src="' + attachment.url + '" style="width:150px">');
2745
+ button.next('.qsm-feature-image-rmv').show();
2746
+ button.next().next('.qsm-feature-image-id').val(attachment.id);
2747
+ button.next().next().next('.qsm-feature-image-src').val(attachment.url);
2748
+ }).open();
2749
+ });
2750
+
2751
+ // on remove button click
2752
+ $('body').on('click', '.qsm-feature-image-rmv', function (e) {
2753
+ e.preventDefault();
2754
+ var button = $(this);
2755
+ button.next().val(''); // emptying the hidden field
2756
+ button.next().next().val(''); // emptying the hidden field
2757
+ button.hide().prev().html(qsm_admin_messages.upload_img);
2758
+ });
2759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2760
  });
2761
+ var decodeEntities = (function () {
2762
+ //create a new html document (doesn't execute script tags in child elements)
2763
+ var doc = document.implementation.createHTMLDocument("");
2764
+ var element = doc.createElement('div');
2765
+
2766
+ function getText(str) {
2767
+ element.innerHTML = str;
2768
+ str = element.textContent;
2769
+ element.textContent = '';
2770
+ return str;
2771
+ }
2772
+
2773
+ function decodeHTMLEntities(str) {
2774
+ if (str && typeof str === 'string') {
2775
+ var x = getText(str);
2776
+ while (str !== x) {
2777
+ str = x;
2778
+ x = getText(x);
2779
+ }
2780
+ return x;
2781
+ }
2782
  }
2783
+ return decodeHTMLEntities;
2784
+ })();
2785
 
2786
+ function qsm_hide_show_question_desc(question_type) {
2787
+ $('.question-type-description').hide();
2788
+ if ($('#question_type_' + question_type + '_description').length > 0) {
2789
+ $('#question_type_' + question_type + '_description').show();
2790
+ }
 
2791
  }
2792
+
2793
+ function qsm_init_sortable() {
2794
+ $('.questions').sortable({
2795
+ opacity: 70,
2796
+ cursor: 'move',
2797
+ handle: 'span.dashicons-move',
2798
+ placeholder: "ui-state-highlight",
2799
+ stop: function (evt, ui) {
2800
+ $('.questions > .page').each(function () {
2801
+ var page = parseInt($(this).index()) + 1;
2802
+ $(this).find('.page-number').text('Page ' + page);
2803
+ });
2804
+ setTimeout(
2805
+ function () {
2806
+ $('.save-page-button').trigger('click');
2807
+ },
2808
+ 200
2809
+ )
2810
+ }
2811
  });
2812
+ $('.page').sortable({
2813
+ items: '.question',
2814
+ handle: 'span.dashicons-move',
2815
+ opacity: 70,
2816
+ cursor: 'move',
2817
+ placeholder: "ui-state-highlight",
2818
+ connectWith: '.page',
2819
+ stop: function (evt, ui) {
2820
+ setTimeout(
2821
+ function () {
2822
+ $('.save-page-button').trigger('click');
2823
+ },
2824
+ 200
2825
+ )
2826
  }
2827
  });
2828
+ }
2829
 
2830
+ function qsmRandomID(length) {
2831
+ var result = '';
2832
+ var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
2833
+ var charactersLength = characters.length;
2834
+ for (var i = 0; i < length; i++) {
2835
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
2836
+ }
2837
+ return result;
2838
  }
2839
+ $(document).on('keyup', '.qsm-category-filter', function () {
2840
+ search_term = $.trim($(this).val());
2841
+ if (search_term == '') {
2842
+ $('.qsm_category_checklist li').each(function () {
2843
+ $(this).show()
2844
+ });
2845
+ } else {
2846
+ search_term = new RegExp(search_term, 'i');
2847
+ $('.qsm_category_checklist li').each(function () {
2848
+ search_string = $(this).children('label').text();
2849
+ result = search_string.search(search_term);
2850
+ if (result > -1) {
2851
+ $(this).show();
2852
+ if ($(this).parent('ul').hasClass('children')) {
2853
+ $(this).parents('li').show();
2854
+ }
2855
+ } else {
2856
+ $(this).hide();
2857
+ }
2858
+ });
2859
 
 
 
 
 
 
 
 
 
 
 
 
2860
  }
2861
  });
 
2862
 
2863
+ $(document).on('click', '.add-multiple-category', function (e) {
2864
+ e.preventDefault();
2865
+ MicroModal.show('modal-9', {
2866
+ onShow: function () {
2867
+ $('#new-category-name').val($('.qsm-category-filter').val());
2868
+ $('.qsm-category-filter').val('').trigger('keyup');
2869
+ },
2870
+ onClose: function () {
2871
+ $('#modal-9-content .info').html('');
2872
+ $('#new-category-name').val('');
2873
+ $('#qsm-parent-category').val(-1);
 
 
 
2874
  }
2875
  });
2876
+ });
2877
 
2878
+ $(document).on('click', '#save-multi-category-button', function (e) {
2879
+ e.preventDefault();
2880
+ duplicate = false;
2881
+ new_category = $('#new-category-name').val().trim();
2882
+ parent_category = $('#qsm-parent-category option:selected').val();
2883
+ if (new_category == '') {
2884
+ $('#modal-9-content .info').html(qsm_admin_messages.category_not_empty);
2885
+ return false;
2886
+ } else {
2887
+ $('#qsm-parent-category option').each(function () {
2888
+ if ($(this).text().toLowerCase() == new_category.toLowerCase()) {
2889
+ duplicate = true;
2890
+ $('#modal-9-content .info').html(qsm_admin_messages.category + ' ' + new_category + ' ' + qsm_admin_messages.already_exists_in_database);
2891
+ return false;
2892
+ }
2893
+ });
2894
+
2895
+ if (!duplicate) {
2896
+ var new_category_data = {
2897
+ action: 'save_new_category',
2898
+ name: new_category,
2899
+ parent: parent_category
2900
+ };
2901
+ $('#modal-9-content .info').html('');
2902
+ jQuery.ajax(ajaxurl, {
2903
+ data: new_category_data,
2904
+ method: 'POST',
2905
+ success: function (response) {
2906
+ result = JSON.parse(response);
2907
+ if (result.term_id > 0) {
2908
+ $('#qsm-parent-category').append('<option class="level-0" value="' + result.term_id + '">' + new_category + '</option>');
2909
+ if (parent_category == -1) {
2910
+ $('.qsm_category_checklist').prepend('<li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" checked="checked" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li>');
2911
  } else {
2912
+ if ($('.qsm_category_checklist li#qsm_category-' + parent_category).children('ul').length > 0) {
2913
+ $('.qsm_category_checklist li#qsm_category-' + parent_category).children('ul').append('<li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li>');
2914
+ } else {
2915
+ $('.qsm_category_checklist li#qsm_category-' + parent_category).append('<ul class="children"><li id="qsm_category-' + result.term_id + '"><label class="selectit"><input value="' + result.term_id + '" type="checkbox" name="tax_input[qsm_category][]" id="in-qsm_category-' + result.term_id + '"> ' + new_category + '</label></li></ul>')
2916
+ }
2917
+ $('.qsm_category_checklist li#qsm_category-' + result.term_id).children('label').children('input').prop('checked', true);
2918
+ $('.qsm_category_checklist li#qsm_category-' + result.term_id).parents('li').each(function () {
2919
+ $(this).children('label').children('input').prop('checked', true);
2920
+ });
2921
  }
2922
+ MicroModal.close('modal-9')
 
 
 
2923
  }
 
2924
  }
2925
+ });
2926
+ }
2927
  }
2928
+ });
2929
+ }
2930
  }
 
2931
  }(jQuery));
2932
 
2933
 
2936
  */
2937
 
2938
  (function ($) {
2939
+ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
2940
+ if (window.location.href.indexOf('tab=results-pages') > 0) {
2941
  var QSMAdminResults;
2942
  QSMAdminResults = {
2943
  total: 0,
2944
+ saveResults: function () {
2945
+ QSMAdmin.displayAlert(qsm_admin_messages.saving_results_page, 'info');
2946
  var pages = [];
2947
  var page = {};
2948
  var redirect_value = '';
2949
+ $('.results-page').each(function () {
2950
  page = {
2951
  'conditions': [],
2952
+ 'page': wp.editor.getContent($(this).find('.results-page-template').attr('id')),
2953
  'redirect': false,
2954
  };
2955
+ redirect_value = $(this).find('.results-page-redirect').val();
2956
+ if ('' != redirect_value) {
2957
  page.redirect = redirect_value;
2958
  }
2959
+ $(this).find('.results-page-condition').each(function () {
2960
  page.conditions.push({
2961
  'category': $(this).children('.results-page-condition-category').val(),
2962
+ 'criteria': $(this).children('.results-page-condition-criteria').val(),
2963
+ 'operator': $(this).children('.results-page-condition-operator').val(),
2964
+ 'value': $(this).children('.results-page-condition-value').val()
2965
  });
2966
  });
2967
  pages.push(page);
2976
  data: data,
2977
  headers: { 'X-WP-Nonce': qsmResultsObject.nonce },
2978
  })
2979
+ .done(function (results) {
2980
+ if (results.status) {
2981
+ QSMAdmin.displayAlert(qsm_admin_messages.results_page_saved, 'success');
2982
+ } else {
2983
+ QSMAdmin.displayAlert( qsm_admin_messages.results_page_save_error + ' ' + qsm_admin_messages.results_page_saved, 'error');
2984
+ }
2985
+ })
2986
+ .fail(QSMAdmin.displayjQueryError);
2987
  },
2988
+ loadResults: function () {
2989
  //QSMAdmin.displayAlert( 'Loading results pages...', 'info' );
2990
  $.ajax({
2991
  url: wpApiSettings.root + 'quiz-survey-master/v1/quizzes/' + qsmResultsObject.quizID + '/results',
2992
  headers: { 'X-WP-Nonce': qsmResultsObject.nonce },
2993
  })
2994
+ .done(function (pages) {
2995
+ $('#results-pages').find('.qsm-spinner-loader').remove();
2996
+ pages.forEach(function (page, i, pages) {
2997
+ QSMAdminResults.addResultsPage(page.conditions, page.page, page.redirect);
2998
  });
2999
  QSMAdmin.clearAlerts();
3000
  })
3001
  .fail(QSMAdmin.displayjQueryError);
3002
  },
3003
  addCondition: function ($page, category, criteria, operator, value) {
3004
+ var template = wp.template('results-page-condition');
3005
  $page.find('.results-page-when-conditions').append(template({
3006
+ 'category': category,
3007
+ 'criteria': criteria,
3008
+ 'operator': operator,
3009
+ 'value': value
3010
  }));
3011
  },
3012
+ newCondition: function ($page) {
3013
  QSMAdminResults.addCondition($page, '', 'score', 'equal', 0);
3014
  },
3015
  addResultsPage: function (conditions, page, redirect) {
3016
  QSMAdminResults.total += 1;
3017
+ var template = wp.template('results-page');
3018
+ $('#results-pages').append(template({ id: QSMAdminResults.total, page: page, redirect: redirect }));
3019
+ conditions.forEach(function (condition, i, conditions) {
3020
  QSMAdminResults.addCondition(
3021
  $('.results-page:last-child'),
3022
+ condition.category,
3023
+ condition.criteria,
3024
+ condition.operator,
3025
+ condition.value
3026
  );
3027
  });
3028
  var settings = {
3029
  mediaButtons: true,
3030
+ tinymce: {
3031
+ forced_root_block: '',
3032
  toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
3033
  },
3034
+ quicktags: true,
3035
  };
3036
+ wp.editor.initialize('results-page-' + QSMAdminResults.total, settings);
3037
  jQuery(document).trigger('qsm_after_add_result_block', [conditions, page, redirect]);
3038
  },
3039
+ newResultsPage: function () {
3040
  var conditions = [{
3041
  'category': '',
3042
  'criteria': 'score',
3044
  'value': '0'
3045
  }];
3046
  var page = '%QUESTIONS_ANSWERS%';
3047
+ QSMAdminResults.addResultsPage(conditions, page);
3048
  }
3049
  };
3050
+ $(function () {
3051
  QSMAdminResults.loadResults();
3052
 
3053
+ $('.add-new-page').on('click', function (event) {
3054
  event.preventDefault();
3055
  QSMAdminResults.newResultsPage();
3056
  });
3057
+ $('.save-pages').on('click', function (event) {
3058
  event.preventDefault();
3059
  QSMAdminResults.saveResults();
3060
  });
3061
+ $('#results-pages').on('click', '.new-condition', function (event) {
3062
  event.preventDefault();
3063
+ $page = $(this).closest('.results-page');
3064
+ QSMAdminResults.newCondition($page);
3065
  });
3066
+ $('#results-pages').on('click', '.delete-page-button', function (event) {
3067
  event.preventDefault();
3068
+ $(this).closest('.results-page').remove();
3069
  });
3070
+ $('#results-pages').on('click', '.delete-condition-button', function (event) {
3071
  event.preventDefault();
3072
+ $(this).closest('.results-page-condition').remove();
3073
  });
3074
  });
3075
  }
js/qsm-common.js CHANGED
@@ -23,20 +23,6 @@
23
  let polarQuestion = jQuery(this).find('.slider-main-wrapper div');
24
  let questionID = polarQuestion.attr('id').replace('slider-','');
25
  qsmPolarSliderEach(polarQuestion,questionID,page);
26
- if ('answer' === page || 'admin' === page){
27
- let heightArray = jQuery(".mlw-qmn-question-result-"+questionID+" >> div").map(
28
- function() {
29
- return jQuery(this).height();
30
- }).get();
31
- let maxHeight = Math.max.apply(null, heightArray);
32
- jQuery('.mlw-qmn-question-result-'+questionID).height(maxHeight);
33
- } else {
34
- let heightArray = jQuery(".question-section-id-"+questionID+" .question-type-polar-s >> div").map(function() {
35
- return jQuery(this).height();
36
- }).get();
37
- let maxHeight = Math.max.apply(null,heightArray);
38
- jQuery('.question-section-id-'+questionID+' .question-type-polar-s').height(maxHeight);
39
- }
40
  });
41
  }
42
 
23
  let polarQuestion = jQuery(this).find('.slider-main-wrapper div');
24
  let questionID = polarQuestion.attr('id').replace('slider-','');
25
  qsmPolarSliderEach(polarQuestion,questionID,page);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  });
27
  }
28
 
js/qsm-quiz.js CHANGED
@@ -24,25 +24,25 @@ var qsmTimerInterval = [];
24
  _.each(qmn_quiz_data, function (quiz) {
25
  quizID = parseInt(quiz.quiz_id);
26
  QSM.initPagination(quizID);
27
- qsmTimerInterval[quizID] = setInterval(function() { qmnTimeTakenTimer(quizID) }, 1000);
28
 
29
  if (quiz.hasOwnProperty('pagination') || quiz.qpages.hasOwnProperty(2)) {
30
  qsmEndTimeTakenTimer(quizID);
31
- jQuery('.qsm-quiz-container-'+quizID+' #timer').val(0);
32
- jQuery(".qsm-quiz-container-"+quizID+" input[name='timer_ms']").val(0);
33
  quizType = 'paginated';
34
  }
35
 
36
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
37
  qsmEndTimeTakenTimer(quizID);
38
- jQuery('.qsm-quiz-container-'+quizID+' #timer').val(0);
39
- jQuery(".qsm-quiz-container-"+quizID+" input[name='timer_ms']").val(0);
40
  QSMPageTimer.endPageTimer(quizID, true);
41
  }
42
  if (quiz.hasOwnProperty('timer_limit') && 0 != quiz.timer_limit) {
43
  qsmEndTimeTakenTimer(quizID);
44
- jQuery('.qsm-quiz-container-'+quizID+' #timer').val(0);
45
- jQuery(".qsm-quiz-container-"+quizID+" input[name='timer_ms']").val(0);
46
  QSM.initTimer(quizID);
47
  quizType = 'timer';
48
  }
@@ -68,20 +68,20 @@ var qsmTimerInterval = [];
68
  // If we are using the newer pagination system...
69
  if (0 < $quizForm.children('.qsm-page').length) {
70
  // If there is a first page...
71
- if (qmn_quiz_data[quizID].hasOwnProperty('first_page') && !qmn_quiz_data[quizID].first_page) {
72
  QSM.activateTimer(quizID);
73
- $('.qsm-quiz-container-'+ quizID).find('.stoptimer-p').show();
74
  }
75
  // ...else, we must be using the questions per page option.
76
  } else {
77
  if (qmn_quiz_data[quizID].hasOwnProperty('pagination') && qmn_quiz_data[quizID].first_page) {
78
- $(document).on('click', '.qsm-quiz-container-'+ quizID + ' .mlw_next', function (event) {
79
  event.preventDefault();
80
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
81
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
82
- if ($('.qsm-quiz-container-'+ quizID).find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
83
  QSM.activateTimer(quizID);
84
- $('.qsm-quiz-container-'+ quizID).find('.stoptimer-p').show();
85
  }
86
  } else {
87
  if (!qmn_quiz_data[quizID].timerStatus && (0 == $('.quiz_begin:visible').length || (1 == $('.quiz_begin:visible').length && qmnValidatePage('quizForm' + quizID)))) {
@@ -103,10 +103,10 @@ var qsmTimerInterval = [];
103
  * @param int quizID The ID of the quiz.
104
  */
105
  activateTimer: function (quizID) {
106
- var timer_ms = jQuery(".qsm-quiz-container-"+quizID+" input[name='timer_ms']").val();
107
  if (timer_ms == 0) {
108
- qsmTimerInterval[quizID] = setInterval(function() { qmnTimeTakenTimer(quizID) }, 1000);
109
- jQuery(".qsm-quiz-container-"+quizID+" input[name='timer_ms']").each(function () {
110
  var timems = qsmTimeInMS();
111
  jQuery(this).val(timems);
112
  });
@@ -156,13 +156,13 @@ var qsmTimerInterval = [];
156
  }
157
  var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
158
  var display = QSM.secondsToTimer(secondsRemaining);
159
- var systemTime=new Date().getTime()/1000;
160
- systemTime=Math.round(systemTime);
161
- if('1'===qmn_quiz_data[quizID].not_allow_after_expired_time && systemTime > qmn_quiz_data[quizID].scheduled_time_end ){
162
  MicroModal.show('modal-4');
163
  return false;
164
  }
165
- // Sets our local storage values for the timer being started and current timer value.
166
  localStorage.setItem('mlw_time_quiz' + quizID, secondsRemaining);
167
  localStorage.setItem('mlw_started_quiz' + quizID, "yes");
168
 
@@ -282,17 +282,14 @@ var qsmTimerInterval = [];
282
  */
283
  initPagination: function (quizID) {
284
  var $quizForm = QSM.getQuizForm(quizID);
285
-
286
-
287
  /**
288
  *
289
  * CHecking if the quiz is random
290
  */
291
  $is_random = $('.qmn_quiz_container').hasClass('random');
292
- if($is_random){
293
- QSM.goToPage(quizID, 1);
294
- }
295
- else if (0 < $quizForm.children('.qsm-page').length) {
296
  $quizForm.children('.qsm-page').hide();
297
  template = wp.template('qsm-pagination-' + quizID);
298
  $quizForm.append(template());
@@ -337,7 +334,7 @@ var qsmTimerInterval = [];
337
  jQuery(document).trigger('qsm_next_button_click_before', [quizID]);
338
  event.preventDefault();
339
  QSM.nextPage(quizID);
340
- var $container = jQuery('.qsm-quiz-container-'+ quizID);
341
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
342
  qsmScrollTo($container);
343
  }
@@ -347,13 +344,24 @@ var qsmTimerInterval = [];
347
  jQuery(document).trigger('qsm_previous_button_click_before', [quizID]);
348
  event.preventDefault();
349
  QSM.prevPage(quizID);
350
- var $container = jQuery('.qsm-quiz-container-'+ quizID);
351
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
352
  qsmScrollTo($container);
353
  }
354
  jQuery(document).trigger('qsm_previous_button_click_after', [quizID]);
355
  });
356
  }
 
 
 
 
 
 
 
 
 
 
 
357
  },
358
  /**
359
  * Navigates quiz to specific page
@@ -392,12 +400,11 @@ var qsmTimerInterval = [];
392
  $quizForm.find('.qsm-previous').hide();
393
  }
394
  if ('1' == qmn_quiz_data[quizID].disable_first_page) {
395
- if(pageNumber == 1){
396
- $quizForm.find(".quiz_begin").hide();
397
- $quizForm.find(".mlw_previous").hide();
398
- $quizForm.find('.qsm-page-' + (parseInt(pageNumber))).show();
399
  }
400
- }
401
  if ('1' == qmn_quiz_data[quizID].progress_bar) {
402
  var current_page = jQuery('#quizForm' + quizID).find('.current_page_hidden').val();
403
  var total_page_length = $pages.length - 1;
@@ -437,17 +444,17 @@ var qsmTimerInterval = [];
437
  */
438
  changePage: function (quizID, difference) {
439
  var page = QSM.getPage(quizID);
440
- if(qmn_quiz_data[quizID].hasOwnProperty('first_page') && qmn_quiz_data[quizID].first_page){
441
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
442
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
443
- if ( page == start_timer ) { // check current page
444
  QSM.activateTimer(quizID);
445
- $('.qsm-quiz-container-'+ quizID).find('.stoptimer-p').show();
446
  }
447
  } else {
448
- if (!qmn_quiz_data[quizID].timerStatus ) {
449
  QSM.activateTimer(quizID);
450
- $('.qsm-quiz-container-'+ quizID).find('.stoptimer-p').show();
451
  }
452
  }
453
 
@@ -666,15 +673,15 @@ function isEmail(email) {
666
  * @param email The Email Id to validate.
667
  * @returns Boolean
668
  */
669
- function isValidDomains( email, domains ) {
670
- if ( 'undefined' == domains ) {
671
  return true;
672
  }
673
- if ( 0 == domains.length ) {
674
  return true;
675
  }
676
- for ( var i = 0; i < domains.length; i++ ) {
677
- if ( email.indexOf( domains[i] ) != -1 ) {
678
  return true;
679
  }
680
  }
@@ -687,7 +694,7 @@ function isValidDomains( email, domains ) {
687
  * @returns Boolean
688
  */
689
  function isUrlValid(url) {
690
- return /^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(url);
691
  }
692
 
693
  /**
@@ -715,10 +722,10 @@ function qmnDoInit() {
715
 
716
  jQuery(document).on("qsm_next_button_click_after", function (_event, _quiz_id) {
717
  if (quizType == 'paginated') {
718
- var timer_ms = jQuery(".qsm-quiz-container-"+_quiz_id+" input[name='timer_ms']").val();
719
  if (timer_ms == 0) {
720
- qsmTimerInterval[_quiz_id] = setInterval(function() { qmnTimeTakenTimer(_quiz_id) }, 1000);
721
- jQuery(".qsm-quiz-container-"+_quiz_id+" input[name='timer_ms']").each(function () {
722
  var timems = qsmTimeInMS();
723
  jQuery(this).val(timems);
724
  });
@@ -728,12 +735,12 @@ function qmnDoInit() {
728
  }
729
 
730
  function qmnTimeTakenTimer(quizID) {
731
- var x = +jQuery('.qsm-quiz-container-'+quizID+' #timer').val();
732
  if (NaN === x) {
733
  x = 0;
734
  }
735
  x = x + 1;
736
- jQuery('.qsm-quiz-container-'+quizID+' #timer').val(x);
737
  }
738
 
739
  function qsmEndTimeTakenTimer(quiz_id) {
@@ -778,46 +785,46 @@ function qmnValidation(element, quiz_form_id) {
778
  qmnResetError(quiz_form_id);
779
  jQuery(element).each(function () {
780
  if (jQuery(this).attr('class')) {
781
- if ( jQuery( this ).attr( 'class' ).indexOf( 'mlwEmail' ) !== -1 && this.value !== "" ) {
782
  // Remove any trailing and preceeding space.
783
- var x = jQuery.trim( this.value );
784
- if ( !isEmail( x ) ) {
785
- qmnDisplayError( error_messages.email_error_text, jQuery( this ), quiz_form_id );
786
  result = false;
787
  }
788
  /**
789
  * Validate email from allowed domains.
790
  */
791
- var domains = jQuery( this ).attr( 'data-domains' );
792
- if ( 'undefined' != typeof domains ) {
793
- if ( !isValidDomains( x, domains.split( "," ) ) ) {
794
- qmnDisplayError( error_messages.email_error_text, jQuery( this ), quiz_form_id );
795
  result = false;
796
  }
797
  }
798
  }
799
- if ( jQuery( this ).attr( 'class' ).indexOf( 'mlwUrl' ) !== -1 && this.value !== "" ) {
800
  // Remove any trailing and preceeding space.
801
- if ( !isUrlValid( jQuery.trim( this.value ) ) ) {
802
- qmnDisplayError( error_messages.url_error_text, jQuery( this ), quiz_form_id );
803
  result = false;
804
  }
805
  }
806
- if ( jQuery( this ).attr( 'class' ).indexOf( 'mlwMinLength' ) !== -1 && this.value !== "" ) {
807
  // Remove any trailing and preceeding space.
808
- if ( jQuery.trim( this.value ).length < jQuery( this ).attr( 'minlength' ) ) {
809
  var minlength_error = error_messages.minlength_error_text;
810
- minlength_error = minlength_error.replace('%minlength%', jQuery( this ).attr( 'minlength' ));
811
- qmnDisplayError( minlength_error, jQuery( this ), quiz_form_id );
812
  result = false;
813
  }
814
  }
815
- if ( jQuery( this ).attr( 'class' ).indexOf( 'mlwMaxLength' ) !== -1 && this.value !== "" ) {
816
  // Remove any trailing and preceeding space.
817
- if ( jQuery.trim( this.value ).length > jQuery( this ).attr( 'maxlength' ) ) {
818
  var maxlength_error = error_messages.maxlength_error_text;
819
- maxlength_error = maxlength_error.replace('%maxlength%', jQuery( this ).attr( 'maxlength' ));
820
- qmnDisplayError( maxlength_error, jQuery( this ), quiz_form_id );
821
  result = false;
822
  }
823
  }
@@ -905,13 +912,13 @@ function qmnFormSubmit(quiz_form_id) {
905
  var $container = jQuery('#' + quiz_form_id).closest('.qmn_quiz_container');
906
  var result = qmnValidation('#' + quiz_form_id + ' *', quiz_form_id);
907
  if (!result) { return result; }
908
-
909
  /**
910
  * Update Timer in MS
911
  */
912
- var timer_ms = jQuery('#' + quiz_form_id).find(".qsm-quiz-container-"+quiz_id+" input[name='timer_ms']").val();
913
  var new_timer_ms = qsmTimeInMS();
914
- jQuery('#' + quiz_form_id).find(".qsm-quiz-container-"+quiz_id+" input[name='timer_ms']").val(Math.abs(new_timer_ms - timer_ms));
915
 
916
  jQuery('.mlw_qmn_quiz input:radio').attr('disabled', false);
917
  jQuery('.mlw_qmn_quiz input:checkbox').attr('disabled', false);
@@ -926,9 +933,9 @@ function qmnFormSubmit(quiz_form_id) {
926
  fd.append(input.name, input.value);
927
  });
928
  fd.append("action", 'qmn_process_quiz');
929
- fd.append("nonce", qmn_ajax_object.security );
930
- fd.append("currentuserTime", Math.round(new Date().getTime()/1000));
931
- fd.append("currentuserTimeZone",Intl.DateTimeFormat().resolvedOptions().timeZone);
932
 
933
 
934
  qsmEndTimeTakenTimer(quizID);
@@ -948,23 +955,27 @@ function qmnFormSubmit(quiz_form_id) {
948
  processData: false,
949
  type: 'POST',
950
  success: function (response) {
951
- response=JSON.parse(response);
952
  if (window.qsm_results_data === undefined) {
953
  window.qsm_results_data = new Object();
954
  }
955
- window.qsm_results_data[quizID]={
956
- 'save_response' : response.result_status['save_response'],
957
- 'id' : response.result_status['id']
958
  };
959
 
960
- if(response.quizExpired){
961
  MicroModal.show('modal-4');
962
  return false;
963
- }else{
964
  qmnDisplayResults(response, quiz_form_id, $container);
 
 
 
 
965
  jQuery(document).trigger('qsm_after_quiz_submit_load_chart');
966
  jQuery(document).trigger('qsm_after_quiz_submit', [quiz_form_id]);
967
- jQuery(".hide").parent().css('display','none');
968
  }
969
  }
970
  });
@@ -976,7 +987,7 @@ function qsmDisplayLoading($container, quiz_id) {
976
  var loader_html = '<div class="qsm_quiz_processing_box">';
977
  loader_html += '<div class="qsm-spinner-loader qsm_quiz_processing_loader"></div>';
978
  if (qmn_quiz_data[quiz_id].hasOwnProperty('quiz_processing_message') && qmn_quiz_data[quiz_id].quiz_processing_message != '') {
979
- loader_html += '<div class="qsm_quiz_processing_message">'+qmn_quiz_data[quiz_id].quiz_processing_message+'</div>';
980
  }
981
  loader_html += '</div>';
982
  $container.empty();
@@ -993,8 +1004,6 @@ function qmnDisplayResults(results, quiz_form_id, $container) {
993
  $container.append('<div class="qmn_results_page"></div>');
994
  $container.find('.qmn_results_page').html(results.display);
995
  qsmScrollTo($container);
996
- // run MathJax on the new content
997
- MathJax.typesetPromise();
998
  // Fires after result is populates via ajax
999
  jQuery(document).trigger('qsm_after_display_result', [results, quiz_form_id, $container]);
1000
  }
@@ -1031,39 +1040,40 @@ function qmnInit() {
1031
  jQuery('#quizForm' + qmn_quiz_data[key].quiz_id + ' .qmn_quiz_radio').change(function () {
1032
  var radio_group = jQuery(this).attr('name');
1033
  jQuery('input[type=radio][name=' + radio_group + ']').prop('disabled', true);
1034
- let radio_value =jQuery(this).val();
1035
  let disableAnswer = {};
1036
- if ( localStorage.getItem( "disable_answer" ) ){
1037
  disableAnswer = JSON.parse(localStorage.getItem("disable_answer"));
1038
  }
1039
- if (!disableAnswer[key]){
1040
- disableAnswer[key]=[];
1041
  }
1042
  let disabledQuestions = disableAnswer[key].map(element => element[0]);
1043
- if (! disabledQuestions.includes(radio_group) ){
1044
  disableAnswer[key].push([radio_group, radio_value]);
1045
  }
1046
- localStorage.setItem("disable_answer",JSON.stringify(disableAnswer));
1047
  });
1048
 
1049
- if(localStorage.getItem("disable_answer")){
1050
  let disabledAnswer = JSON.parse(localStorage.getItem("disable_answer"));
1051
- if(disabledAnswer[key]){
1052
  disabledAnswer[key].forEach(element => {
1053
- let element1=element[1].replaceAll(' ','-');
1054
- jQuery('#'+element[0]+'-'+element1+' input').prop('checked', true).trigger('change');
1055
  });
1056
  }
1057
  }
1058
- jQuery(document).on('qsm_after_quiz_submit',function(event, quiz_form_id ){
1059
  event.preventDefault();
1060
- if(localStorage.getItem("disable_answer")){
1061
  let disabledAnswer2 = JSON.parse(localStorage.getItem("disable_answer"));
1062
- if(disabledAnswer2[key]){
1063
  delete disabledAnswer2[key];
1064
- localStorage.setItem("disable_answer",JSON.stringify(disabledAnswer2)); }
 
1065
  }
1066
-
1067
  });
1068
  }
1069
 
@@ -1135,14 +1145,14 @@ function qmnNextSlide(pagination, go_to_top, quiz_form_id) {
1135
  if (go_to_top == 1 && qmn_quiz_data[quiz_id].disable_scroll_next_previous_click != 1) {
1136
  qsmScrollTo($container);
1137
  }
1138
- if (qmn_quiz_data[quiz_id].disable_first_page == 1) {
1139
- if (slide_number == 0 && page_number == 0) {
1140
- $container.find(".qsm-auto-page-row.quiz_begin").hide();
1141
- $container.find('.qsm-auto-page-row.qsm-apc-' + (parseInt(page_number) + 1)).show();
1142
- $container.find('.slide_number_hidden').val(parseInt(slide_number) + 1);
1143
- $container.find('.current_page_hidden').val(parseInt(page_number) + 2);
1144
- $container.find(".mlw_previous").hide();
1145
- }
1146
  }
1147
  //Show the page counts
1148
  if (page_number > 0 && jQuery(quiz_form_id).closest('.qmn_quiz_container').find('.pages_count').length > 0) {
@@ -1188,10 +1198,10 @@ function qmnPrevSlide(pagination, go_to_top, quiz_form_id) {
1188
  qsmScrollTo($container);
1189
  }
1190
  if (qmn_quiz_data[quiz_id].disable_first_page == 1) {
1191
- if (page_number == 3) {
1192
- $container.find(".qsm-auto-page-row.quiz_begin").hide();
1193
- $container.find(".mlw_previous").hide();
1194
- }
1195
  }
1196
  if (page_number > 0 && jQuery(quiz_form_id).closest('.qmn_quiz_container').find('.pages_count').length > 0) {
1197
  var actual_pages = total_pages - 2;
@@ -1307,7 +1317,7 @@ function qmnInitPagination(quiz_id) {
1307
  jQuery(document).trigger('qsm_init_progressbar_after', [quiz_id, qmn_quiz_data]);
1308
  }
1309
 
1310
- jQuery(document).on( "click", ".qsm-quiz-container-" + quiz_id + " .mlw_next", function (event) {
1311
  event.preventDefault();
1312
  var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
1313
  jQuery(document).trigger('qsm_auto_next_button_click_before', [quiz_id]);
@@ -1317,7 +1327,7 @@ function qmnInitPagination(quiz_id) {
1317
  jQuery(document).trigger('qsm_next_button_click_after', [quiz_id]);
1318
  });
1319
 
1320
- jQuery(document).on( "click", ".qsm-quiz-container-" + quiz_id + " .mlw_previous", function (event) {
1321
  event.preventDefault();
1322
  var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
1323
  qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
@@ -1330,6 +1340,7 @@ function qmnInitPagination(quiz_id) {
1330
  qmnNextSlide(qmn_quiz_data[quiz_id].pagination.amount, 0, '#quizForm' + quiz_id);
1331
  }
1332
 
 
1333
  }
1334
 
1335
  function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) {
@@ -1351,9 +1362,9 @@ function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id
1351
  return false;
1352
  }
1353
 
1354
- function maxLengthCheck( object ) {
1355
- if ( object.value.length > object.maxLength ) {
1356
- object.value = object.value.slice( 0, object.maxLength )
1357
  }
1358
  }
1359
 
@@ -1371,7 +1382,7 @@ jQuery(function () {
1371
  var form = jQuery(this).closest('form')[0];
1372
  var form_id = form.id;
1373
  var recaptcha = jQuery('#' + form_id).find("#qsm_grecaptcha_v3");
1374
- if ( ! recaptcha.length ) {
1375
  qmnFormSubmit(form_id);
1376
  return false;
1377
  }
@@ -1379,8 +1390,8 @@ jQuery(function () {
1379
  // Proceed reCaptcha v3
1380
  var site_key = jQuery('#' + form_id).find("#qsm_grecaptcha_v3_sitekey").val();
1381
  var submit_action = jQuery('#' + form_id).find("#qsm_grecaptcha_v3_nonce").val();
1382
- grecaptcha.ready(function() {
1383
- grecaptcha.execute(site_key, {action: submit_action}).then(function(token) {
1384
  jQuery('#' + form_id).find("#qsm_grecaptcha_v3_response").val(token);
1385
  qmnFormSubmit(form_id);
1386
  });
@@ -1404,7 +1415,9 @@ jQuery(function () {
1404
  //Reload the timer and pagination
1405
  qmnDoInit();
1406
 
1407
- MathJax.typesetPromise();
 
 
1408
 
1409
  // trigger fired on successfull retake quiz
1410
  jQuery(document).trigger('qsm_retake_quiz', [quiz_id]);
@@ -1441,7 +1454,9 @@ jQuery(function () {
1441
  $this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
1442
  $this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
1443
  }
1444
- MathJax.typesetPromise();
 
 
1445
  },
1446
  error: function (errorThrown) {
1447
  alert(errorThrown);
@@ -1451,11 +1466,11 @@ jQuery(function () {
1451
  });
1452
 
1453
  // Autocomplete off
1454
- jQuery('.qsm-quiz-container').find('.qmn_quiz_id').each(function (){
1455
  var quizID = jQuery(this).val();
1456
  var $quizForm = QSM.getQuizForm(quizID);
1457
  if (qmn_quiz_data[quizID].form_disable_autofill == 1) {
1458
- jQuery('#quizForm' + quizID).attr('autocomplete', 'off');
1459
  }
1460
  });
1461
 
@@ -1490,7 +1505,9 @@ jQuery(function () {
1490
  $quizForm.closest('.qmn_quiz_container').find('.qsm-submit-btn').trigger('click');
1491
  }, 1000);
1492
  }
1493
- MathJax.typesetPromise();
 
 
1494
  },
1495
  error: function (errorThrown) {
1496
  alert(errorThrown);
@@ -1621,21 +1638,21 @@ jQuery(function () {
1621
 
1622
  // captcha question type
1623
  var mlw_code;
1624
- jQuery(document).ready(function() {
1625
  let captchaElement = jQuery('#mlw_code_captcha');
1626
- if (captchaElement.length !== 0){
1627
  mlw_code = '';
1628
  var mlw_chars = '0123456789ABCDEFGHIJKL!@#$%^&*()MNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
1629
  var mlw_code_length = 5;
1630
- for (var i=0; i<mlw_code_length; i++) {
1631
  var rnum = Math.floor(Math.random() * mlw_chars.length);
1632
- mlw_code += mlw_chars.substring(rnum,rnum+1);
1633
  }
1634
  var mlw_captchaCTX = document.getElementById('mlw_captcha').getContext('2d');
1635
  mlw_captchaCTX.font = 'normal 24px Verdana';
1636
  mlw_captchaCTX.strokeStyle = '#000000';
1637
- mlw_captchaCTX.clearRect(0,0,100,50);
1638
- mlw_captchaCTX.strokeText(mlw_code,10,30,70);
1639
  mlw_captchaCTX.textBaseline = 'middle';
1640
  document.getElementById('mlw_code_captcha').value = mlw_code;
1641
  }
24
  _.each(qmn_quiz_data, function (quiz) {
25
  quizID = parseInt(quiz.quiz_id);
26
  QSM.initPagination(quizID);
27
+ qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
28
 
29
  if (quiz.hasOwnProperty('pagination') || quiz.qpages.hasOwnProperty(2)) {
30
  qsmEndTimeTakenTimer(quizID);
31
+ jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
32
+ jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
33
  quizType = 'paginated';
34
  }
35
 
36
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
37
  qsmEndTimeTakenTimer(quizID);
38
+ jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
39
+ jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
40
  QSMPageTimer.endPageTimer(quizID, true);
41
  }
42
  if (quiz.hasOwnProperty('timer_limit') && 0 != quiz.timer_limit) {
43
  qsmEndTimeTakenTimer(quizID);
44
+ jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
45
+ jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
46
  QSM.initTimer(quizID);
47
  quizType = 'timer';
48
  }
68
  // If we are using the newer pagination system...
69
  if (0 < $quizForm.children('.qsm-page').length) {
70
  // If there is a first page...
71
+ if (!qmn_quiz_data[quizID].hasOwnProperty('first_page') || !qmn_quiz_data[quizID].first_page) {
72
  QSM.activateTimer(quizID);
73
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
74
  }
75
  // ...else, we must be using the questions per page option.
76
  } else {
77
  if (qmn_quiz_data[quizID].hasOwnProperty('pagination') && qmn_quiz_data[quizID].first_page) {
78
+ $(document).on('click', '.qsm-quiz-container-' + quizID + ' .mlw_next', function (event) {
79
  event.preventDefault();
80
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
81
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
82
+ if ($('.qsm-quiz-container-' + quizID).find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
83
  QSM.activateTimer(quizID);
84
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
85
  }
86
  } else {
87
  if (!qmn_quiz_data[quizID].timerStatus && (0 == $('.quiz_begin:visible').length || (1 == $('.quiz_begin:visible').length && qmnValidatePage('quizForm' + quizID)))) {
103
  * @param int quizID The ID of the quiz.
104
  */
105
  activateTimer: function (quizID) {
106
+ var timer_ms = jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val();
107
  if (timer_ms == 0) {
108
+ qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
109
+ jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").each(function () {
110
  var timems = qsmTimeInMS();
111
  jQuery(this).val(timems);
112
  });
156
  }
157
  var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
158
  var display = QSM.secondsToTimer(secondsRemaining);
159
+ var systemTime = new Date().getTime() / 1000;
160
+ systemTime = Math.round(systemTime);
161
+ if ('1' === qmn_quiz_data[quizID].not_allow_after_expired_time && systemTime > qmn_quiz_data[quizID].scheduled_time_end) {
162
  MicroModal.show('modal-4');
163
  return false;
164
  }
165
+ // Sets our local storage values for the timer being started and current timer value.
166
  localStorage.setItem('mlw_time_quiz' + quizID, secondsRemaining);
167
  localStorage.setItem('mlw_started_quiz' + quizID, "yes");
168
 
282
  */
283
  initPagination: function (quizID) {
284
  var $quizForm = QSM.getQuizForm(quizID);
 
 
285
  /**
286
  *
287
  * CHecking if the quiz is random
288
  */
289
  $is_random = $('.qmn_quiz_container').hasClass('random');
290
+ if ($is_random) {
291
+ QSM.goToPage(quizID, 1);
292
+ } else if (0 < $quizForm.children('.qsm-page').length) {
 
293
  $quizForm.children('.qsm-page').hide();
294
  template = wp.template('qsm-pagination-' + quizID);
295
  $quizForm.append(template());
334
  jQuery(document).trigger('qsm_next_button_click_before', [quizID]);
335
  event.preventDefault();
336
  QSM.nextPage(quizID);
337
+ var $container = jQuery('.qsm-quiz-container-' + quizID);
338
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
339
  qsmScrollTo($container);
340
  }
344
  jQuery(document).trigger('qsm_previous_button_click_before', [quizID]);
345
  event.preventDefault();
346
  QSM.prevPage(quizID);
347
+ var $container = jQuery('.qsm-quiz-container-' + quizID);
348
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
349
  qsmScrollTo($container);
350
  }
351
  jQuery(document).trigger('qsm_previous_button_click_after', [quizID]);
352
  });
353
  }
354
+ // Gets timer element.
355
+ let $timer = QSM.getTimer(quizID);
356
+
357
+ // Calculates starting time.
358
+ let timerStarted = localStorage.getItem('mlw_started_quiz' + quizID);
359
+ let timerRemaning = localStorage.getItem('mlw_time_quiz' + quizID);
360
+ let seconds = parseFloat(qmn_quiz_data[quizID].timer_limit) * 60;
361
+ if ('yes' == timerStarted && 0 < timerRemaning) {
362
+ seconds = parseInt(timerRemaning);
363
+ }
364
+ $timer.text(QSM.secondsToTimer(seconds));
365
  },
366
  /**
367
  * Navigates quiz to specific page
400
  $quizForm.find('.qsm-previous').hide();
401
  }
402
  if ('1' == qmn_quiz_data[quizID].disable_first_page) {
403
+ if (pageNumber == 1) {
404
+ $quizForm.find(".mlw_previous").hide();
405
+ $quizForm.find('.qsm-page-' + (parseInt(pageNumber))).show();
406
+ }
407
  }
 
408
  if ('1' == qmn_quiz_data[quizID].progress_bar) {
409
  var current_page = jQuery('#quizForm' + quizID).find('.current_page_hidden').val();
410
  var total_page_length = $pages.length - 1;
444
  */
445
  changePage: function (quizID, difference) {
446
  var page = QSM.getPage(quizID);
447
+ if (qmn_quiz_data[quizID].hasOwnProperty('first_page') && qmn_quiz_data[quizID].first_page) {
448
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
449
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
450
+ if (page == start_timer) { // check current page
451
  QSM.activateTimer(quizID);
452
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
453
  }
454
  } else {
455
+ if (!qmn_quiz_data[quizID].timerStatus) {
456
  QSM.activateTimer(quizID);
457
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
458
  }
459
  }
460
 
673
  * @param email The Email Id to validate.
674
  * @returns Boolean
675
  */
676
+ function isValidDomains(email, domains) {
677
+ if ('undefined' == domains) {
678
  return true;
679
  }
680
+ if (0 == domains.length) {
681
  return true;
682
  }
683
+ for (var i = 0; i < domains.length; i++) {
684
+ if (email.indexOf(domains[i]) != -1) {
685
  return true;
686
  }
687
  }
694
  * @returns Boolean
695
  */
696
  function isUrlValid(url) {
697
+ return /^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(url);
698
  }
699
 
700
  /**
722
 
723
  jQuery(document).on("qsm_next_button_click_after", function (_event, _quiz_id) {
724
  if (quizType == 'paginated') {
725
+ var timer_ms = jQuery(".qsm-quiz-container-" + _quiz_id + " input[name='timer_ms']").val();
726
  if (timer_ms == 0) {
727
+ qsmTimerInterval[_quiz_id] = setInterval(function () { qmnTimeTakenTimer(_quiz_id) }, 1000);
728
+ jQuery(".qsm-quiz-container-" + _quiz_id + " input[name='timer_ms']").each(function () {
729
  var timems = qsmTimeInMS();
730
  jQuery(this).val(timems);
731
  });
735
  }
736
 
737
  function qmnTimeTakenTimer(quizID) {
738
+ var x = +jQuery('.qsm-quiz-container-' + quizID + ' #timer').val();
739
  if (NaN === x) {
740
  x = 0;
741
  }
742
  x = x + 1;
743
+ jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(x);
744
  }
745
 
746
  function qsmEndTimeTakenTimer(quiz_id) {
785
  qmnResetError(quiz_form_id);
786
  jQuery(element).each(function () {
787
  if (jQuery(this).attr('class')) {
788
+ if (jQuery(this).attr('class').indexOf('mlwEmail') !== -1 && this.value !== "") {
789
  // Remove any trailing and preceeding space.
790
+ var x = jQuery.trim(this.value);
791
+ if (!isEmail(x)) {
792
+ qmnDisplayError(error_messages.email_error_text, jQuery(this), quiz_form_id);
793
  result = false;
794
  }
795
  /**
796
  * Validate email from allowed domains.
797
  */
798
+ var domains = jQuery(this).attr('data-domains');
799
+ if ('undefined' != typeof domains) {
800
+ if (!isValidDomains(x, domains.split(","))) {
801
+ qmnDisplayError(error_messages.email_error_text, jQuery(this), quiz_form_id);
802
  result = false;
803
  }
804
  }
805
  }
806
+ if (jQuery(this).attr('class').indexOf('mlwUrl') !== -1 && this.value !== "") {
807
  // Remove any trailing and preceeding space.
808
+ if (!isUrlValid(jQuery.trim(this.value))) {
809
+ qmnDisplayError(error_messages.url_error_text, jQuery(this), quiz_form_id);
810
  result = false;
811
  }
812
  }
813
+ if (jQuery(this).attr('class').indexOf('mlwMinLength') !== -1 && this.value !== "") {
814
  // Remove any trailing and preceeding space.
815
+ if (jQuery.trim(this.value).length < jQuery(this).attr('minlength')) {
816
  var minlength_error = error_messages.minlength_error_text;
817
+ minlength_error = minlength_error.replace('%minlength%', jQuery(this).attr('minlength'));
818
+ qmnDisplayError(minlength_error, jQuery(this), quiz_form_id);
819
  result = false;
820
  }
821
  }
822
+ if (jQuery(this).attr('class').indexOf('mlwMaxLength') !== -1 && this.value !== "") {
823
  // Remove any trailing and preceeding space.
824
+ if (jQuery.trim(this.value).length > jQuery(this).attr('maxlength')) {
825
  var maxlength_error = error_messages.maxlength_error_text;
826
+ maxlength_error = maxlength_error.replace('%maxlength%', jQuery(this).attr('maxlength'));
827
+ qmnDisplayError(maxlength_error, jQuery(this), quiz_form_id);
828
  result = false;
829
  }
830
  }
912
  var $container = jQuery('#' + quiz_form_id).closest('.qmn_quiz_container');
913
  var result = qmnValidation('#' + quiz_form_id + ' *', quiz_form_id);
914
  if (!result) { return result; }
915
+
916
  /**
917
  * Update Timer in MS
918
  */
919
+ var timer_ms = jQuery('#' + quiz_form_id).find(".qsm-quiz-container-" + quiz_id + " input[name='timer_ms']").val();
920
  var new_timer_ms = qsmTimeInMS();
921
+ jQuery('#' + quiz_form_id).find(".qsm-quiz-container-" + quiz_id + " input[name='timer_ms']").val(Math.abs(new_timer_ms - timer_ms));
922
 
923
  jQuery('.mlw_qmn_quiz input:radio').attr('disabled', false);
924
  jQuery('.mlw_qmn_quiz input:checkbox').attr('disabled', false);
933
  fd.append(input.name, input.value);
934
  });
935
  fd.append("action", 'qmn_process_quiz');
936
+ fd.append("nonce", qmn_ajax_object.security);
937
+ fd.append("currentuserTime", Math.round(new Date().getTime() / 1000));
938
+ fd.append("currentuserTimeZone", Intl.DateTimeFormat().resolvedOptions().timeZone);
939
 
940
 
941
  qsmEndTimeTakenTimer(quizID);
955
  processData: false,
956
  type: 'POST',
957
  success: function (response) {
958
+ response = JSON.parse(response);
959
  if (window.qsm_results_data === undefined) {
960
  window.qsm_results_data = new Object();
961
  }
962
+ window.qsm_results_data[quizID] = {
963
+ 'save_response': response.result_status['save_response'],
964
+ 'id': response.result_status['id']
965
  };
966
 
967
+ if (response.quizExpired) {
968
  MicroModal.show('modal-4');
969
  return false;
970
+ } else {
971
  qmnDisplayResults(response, quiz_form_id, $container);
972
+ // run MathJax on the new content
973
+ if (1 != qmn_quiz_data[quiz_id].disable_mathjax) {
974
+ MathJax.typesetPromise();
975
+ }
976
  jQuery(document).trigger('qsm_after_quiz_submit_load_chart');
977
  jQuery(document).trigger('qsm_after_quiz_submit', [quiz_form_id]);
978
+ jQuery(".hide").parent().css('display', 'none');
979
  }
980
  }
981
  });
987
  var loader_html = '<div class="qsm_quiz_processing_box">';
988
  loader_html += '<div class="qsm-spinner-loader qsm_quiz_processing_loader"></div>';
989
  if (qmn_quiz_data[quiz_id].hasOwnProperty('quiz_processing_message') && qmn_quiz_data[quiz_id].quiz_processing_message != '') {
990
+ loader_html += '<div class="qsm_quiz_processing_message">' + qmn_quiz_data[quiz_id].quiz_processing_message + '</div>';
991
  }
992
  loader_html += '</div>';
993
  $container.empty();
1004
  $container.append('<div class="qmn_results_page"></div>');
1005
  $container.find('.qmn_results_page').html(results.display);
1006
  qsmScrollTo($container);
 
 
1007
  // Fires after result is populates via ajax
1008
  jQuery(document).trigger('qsm_after_display_result', [results, quiz_form_id, $container]);
1009
  }
1040
  jQuery('#quizForm' + qmn_quiz_data[key].quiz_id + ' .qmn_quiz_radio').change(function () {
1041
  var radio_group = jQuery(this).attr('name');
1042
  jQuery('input[type=radio][name=' + radio_group + ']').prop('disabled', true);
1043
+ let radio_value = jQuery(this).val();
1044
  let disableAnswer = {};
1045
+ if (localStorage.getItem("disable_answer")) {
1046
  disableAnswer = JSON.parse(localStorage.getItem("disable_answer"));
1047
  }
1048
+ if (!disableAnswer[key]) {
1049
+ disableAnswer[key] = [];
1050
  }
1051
  let disabledQuestions = disableAnswer[key].map(element => element[0]);
1052
+ if (!disabledQuestions.includes(radio_group)) {
1053
  disableAnswer[key].push([radio_group, radio_value]);
1054
  }
1055
+ localStorage.setItem("disable_answer", JSON.stringify(disableAnswer));
1056
  });
1057
 
1058
+ if (localStorage.getItem("disable_answer")) {
1059
  let disabledAnswer = JSON.parse(localStorage.getItem("disable_answer"));
1060
+ if (disabledAnswer[key]) {
1061
  disabledAnswer[key].forEach(element => {
1062
+ let element1 = element[1].replaceAll(' ', '-');
1063
+ jQuery('#' + element[0] + '-' + element1 + ' input').prop('checked', true).trigger('change');
1064
  });
1065
  }
1066
  }
1067
+ jQuery(document).on('qsm_after_quiz_submit', function (event, quiz_form_id) {
1068
  event.preventDefault();
1069
+ if (localStorage.getItem("disable_answer")) {
1070
  let disabledAnswer2 = JSON.parse(localStorage.getItem("disable_answer"));
1071
+ if (disabledAnswer2[key]) {
1072
  delete disabledAnswer2[key];
1073
+ localStorage.setItem("disable_answer", JSON.stringify(disabledAnswer2));
1074
+ }
1075
  }
1076
+
1077
  });
1078
  }
1079
 
1145
  if (go_to_top == 1 && qmn_quiz_data[quiz_id].disable_scroll_next_previous_click != 1) {
1146
  qsmScrollTo($container);
1147
  }
1148
+ if (!qmn_quiz_data[quiz_id].hasOwnProperty('first_page') || !qmn_quiz_data[quiz_id].first_page) {
1149
+ if (slide_number == 0 && page_number == 0) {
1150
+ $container.find(".qsm-auto-page-row.quiz_begin").hide();
1151
+ $container.find('.qsm-auto-page-row.qsm-apc-' + (parseInt(page_number) + 1)).show();
1152
+ $container.find('.slide_number_hidden').val(parseInt(slide_number) + 1);
1153
+ $container.find('.current_page_hidden').val(parseInt(page_number) + 2);
1154
+ $container.find(".mlw_previous").hide();
1155
+ }
1156
  }
1157
  //Show the page counts
1158
  if (page_number > 0 && jQuery(quiz_form_id).closest('.qmn_quiz_container').find('.pages_count').length > 0) {
1198
  qsmScrollTo($container);
1199
  }
1200
  if (qmn_quiz_data[quiz_id].disable_first_page == 1) {
1201
+ if (page_number == 3) {
1202
+ $container.find(".qsm-auto-page-row.quiz_begin").hide();
1203
+ $container.find(".mlw_previous").hide();
1204
+ }
1205
  }
1206
  if (page_number > 0 && jQuery(quiz_form_id).closest('.qmn_quiz_container').find('.pages_count').length > 0) {
1207
  var actual_pages = total_pages - 2;
1317
  jQuery(document).trigger('qsm_init_progressbar_after', [quiz_id, qmn_quiz_data]);
1318
  }
1319
 
1320
+ jQuery(document).on("click", ".qsm-quiz-container-" + quiz_id + " .mlw_next", function (event) {
1321
  event.preventDefault();
1322
  var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
1323
  jQuery(document).trigger('qsm_auto_next_button_click_before', [quiz_id]);
1327
  jQuery(document).trigger('qsm_next_button_click_after', [quiz_id]);
1328
  });
1329
 
1330
+ jQuery(document).on("click", ".qsm-quiz-container-" + quiz_id + " .mlw_previous", function (event) {
1331
  event.preventDefault();
1332
  var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
1333
  qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
1340
  qmnNextSlide(qmn_quiz_data[quiz_id].pagination.amount, 0, '#quizForm' + quiz_id);
1341
  }
1342
 
1343
+ jQuery(document).trigger('qsm_init_pagination_after', [quiz_id, qmn_quiz_data]);
1344
  }
1345
 
1346
  function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) {
1362
  return false;
1363
  }
1364
 
1365
+ function maxLengthCheck(object) {
1366
+ if (object.value.length > object.maxLength) {
1367
+ object.value = object.value.slice(0, object.maxLength)
1368
  }
1369
  }
1370
 
1382
  var form = jQuery(this).closest('form')[0];
1383
  var form_id = form.id;
1384
  var recaptcha = jQuery('#' + form_id).find("#qsm_grecaptcha_v3");
1385
+ if (!recaptcha.length) {
1386
  qmnFormSubmit(form_id);
1387
  return false;
1388
  }
1390
  // Proceed reCaptcha v3
1391
  var site_key = jQuery('#' + form_id).find("#qsm_grecaptcha_v3_sitekey").val();
1392
  var submit_action = jQuery('#' + form_id).find("#qsm_grecaptcha_v3_nonce").val();
1393
+ grecaptcha.ready(function () {
1394
+ grecaptcha.execute(site_key, { action: submit_action }).then(function (token) {
1395
  jQuery('#' + form_id).find("#qsm_grecaptcha_v3_response").val(token);
1396
  qmnFormSubmit(form_id);
1397
  });
1415
  //Reload the timer and pagination
1416
  qmnDoInit();
1417
 
1418
+ if (1 != qmn_quiz_data[quiz_id].disable_mathjax) {
1419
+ MathJax.typesetPromise();
1420
+ }
1421
 
1422
  // trigger fired on successfull retake quiz
1423
  jQuery(document).trigger('qsm_retake_quiz', [quiz_id]);
1454
  $this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
1455
  $this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
1456
  }
1457
+ if (1 != qmn_quiz_data[quizID].disable_mathjax) {
1458
+ MathJax.typesetPromise();
1459
+ }
1460
  },
1461
  error: function (errorThrown) {
1462
  alert(errorThrown);
1466
  });
1467
 
1468
  // Autocomplete off
1469
+ jQuery('.qsm-quiz-container').find('.qmn_quiz_id').each(function () {
1470
  var quizID = jQuery(this).val();
1471
  var $quizForm = QSM.getQuizForm(quizID);
1472
  if (qmn_quiz_data[quizID].form_disable_autofill == 1) {
1473
+ jQuery('#quizForm' + quizID).attr('autocomplete', 'off');
1474
  }
1475
  });
1476
 
1505
  $quizForm.closest('.qmn_quiz_container').find('.qsm-submit-btn').trigger('click');
1506
  }, 1000);
1507
  }
1508
+ if (1 != qmn_quiz_data[quizID].disable_mathjax) {
1509
+ MathJax.typesetPromise();
1510
+ }
1511
  },
1512
  error: function (errorThrown) {
1513
  alert(errorThrown);
1638
 
1639
  // captcha question type
1640
  var mlw_code;
1641
+ jQuery(document).ready(function () {
1642
  let captchaElement = jQuery('#mlw_code_captcha');
1643
+ if (captchaElement.length !== 0) {
1644
  mlw_code = '';
1645
  var mlw_chars = '0123456789ABCDEFGHIJKL!@#$%^&*()MNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
1646
  var mlw_code_length = 5;
1647
+ for (var i = 0; i < mlw_code_length; i++) {
1648
  var rnum = Math.floor(Math.random() * mlw_chars.length);
1649
+ mlw_code += mlw_chars.substring(rnum, rnum + 1);
1650
  }
1651
  var mlw_captchaCTX = document.getElementById('mlw_captcha').getContext('2d');
1652
  mlw_captchaCTX.font = 'normal 24px Verdana';
1653
  mlw_captchaCTX.strokeStyle = '#000000';
1654
+ mlw_captchaCTX.clearRect(0, 0, 100, 50);
1655
+ mlw_captchaCTX.strokeText(mlw_code, 10, 30, 70);
1656
  mlw_captchaCTX.textBaseline = 'middle';
1657
  document.getElementById('mlw_code_captcha').value = mlw_code;
1658
  }
lang/quiz-master-next.pot CHANGED
@@ -1,134 +1,463 @@
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
  # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #: php/admin/options-page-questions-tab.php:349
7
- #, fuzzy
8
  msgid ""
9
  msgstr ""
10
- "Project-Id-Version: PACKAGE VERSION\n"
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2021-01-20 10:31+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"
16
  "Language: \n"
17
  "MIME-Version: 1.0\n"
18
  "Content-Type: text/plain; charset=CHARSET\n"
19
  "Content-Transfer-Encoding: 8bit\n"
20
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
21
 
22
- #: mlw_quizmaster2.php:214 php/admin/settings-page.php:170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  msgid "Quizzes & Surveys"
24
  msgstr ""
25
 
26
- #: mlw_quizmaster2.php:239 mlw_quizmaster2.php:240 mlw_quizmaster2.php:241
27
- #: php/classes/class-qsm-install.php:51
 
 
28
  msgid "Quiz"
29
  msgstr ""
30
 
31
- #: mlw_quizmaster2.php:242 php/admin/quizzes-page.php:244
32
  msgid "Add New"
33
  msgstr ""
34
 
35
- #: mlw_quizmaster2.php:243
36
  msgid "Add New Quiz"
37
  msgstr ""
38
 
39
- #: mlw_quizmaster2.php:244
40
  msgid "New Quiz"
41
  msgstr ""
42
 
43
- #: mlw_quizmaster2.php:245
44
  msgid "Edit Quiz"
45
  msgstr ""
46
 
47
- #: mlw_quizmaster2.php:246
48
  msgid "View Quiz"
49
  msgstr ""
50
 
51
- #: mlw_quizmaster2.php:247
52
- msgid "All Quizzes"
53
- msgstr ""
54
-
55
- #: mlw_quizmaster2.php:248
56
  msgid "Search Quizzes"
57
  msgstr ""
58
 
59
- #: mlw_quizmaster2.php:249
60
  msgid "Parent Quiz:"
61
  msgstr ""
62
 
63
- #: mlw_quizmaster2.php:250
64
  msgid "No Quiz Found"
65
  msgstr ""
66
 
67
- #: mlw_quizmaster2.php:251
68
  msgid "No Quiz Found In Trash"
69
  msgstr ""
70
 
71
- #: mlw_quizmaster2.php:284
72
- msgid "QSM"
73
  msgstr ""
74
 
75
- #: mlw_quizmaster2.php:285
76
- msgid "Dashboard"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  msgstr ""
78
 
79
- #: mlw_quizmaster2.php:286 php/admin/quizzes-page.php:243
80
- #: php/classes/class-qsm-install.php:1788
81
- msgid "Quizzes/Surveys"
82
  msgstr ""
83
 
84
- #: mlw_quizmaster2.php:288 mlw_quizmaster2.php:291
85
- #: php/admin/addons-page.php:98
 
 
86
  msgid "Settings"
87
  msgstr ""
88
 
89
- #: mlw_quizmaster2.php:289 php/admin/quizzes-page.php:636
90
  msgid "Results"
91
  msgstr ""
92
 
93
- #: mlw_quizmaster2.php:290
94
  msgid "Result Details"
95
  msgstr ""
96
 
97
- #: mlw_quizmaster2.php:292 php/admin/tools-page.php:37
98
  msgid "Tools"
99
  msgstr ""
100
 
101
- #: mlw_quizmaster2.php:293
102
  msgid "Stats"
103
  msgstr ""
104
 
105
- #: mlw_quizmaster2.php:294
106
  msgid "Addon Settings"
107
  msgstr ""
108
 
109
- #: mlw_quizmaster2.php:295
110
  msgid "Get a Free Addon"
111
  msgstr ""
112
 
113
- #: mlw_quizmaster2.php:295
114
  msgid "Get a Free Addon!"
115
  msgstr ""
116
 
 
 
 
 
 
 
 
117
 
118
- #: mlw_quizmaster2.php:296
119
- msgid "Roadmap"
120
  msgstr ""
121
 
122
- #: mlw_quizmaster2.php:297
123
- msgid "About"
 
124
  msgstr ""
125
 
126
- #: mlw_quizmaster2.php:298
127
- msgid "Help"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  msgstr ""
129
 
130
- #: blocks/block.php:49
131
- msgid "Select the quiz"
 
 
 
 
 
 
 
132
  msgstr ""
133
 
134
  #: php/gdpr.php:29
@@ -194,2587 +523,3328 @@ msgstr ""
194
  msgid "Form Responses"
195
  msgstr ""
196
 
197
- #: php/gdpr.php:134
198
  msgid "Form Name"
199
  msgstr ""
200
 
201
- #: php/gdpr.php:138
202
  msgid "Time Submitted"
203
  msgstr ""
204
 
205
- #: php/gdpr.php:142
206
  msgid "Points Earned"
207
  msgstr ""
208
 
209
- #: php/gdpr.php:146
210
  msgid "Score Earned"
211
  msgstr ""
212
 
213
- #: php/gdpr.php:150
214
  msgid "Questions Answered Correctly"
215
  msgstr ""
216
 
217
- #: php/gdpr.php:154
218
  msgid "Total Questions"
219
  msgstr ""
220
 
221
- #: php/gdpr.php:158
222
  msgid "Name Field"
223
  msgstr ""
224
 
225
- #: php/gdpr.php:162
226
  msgid "Business Field"
227
  msgstr ""
228
 
229
- #: php/gdpr.php:166
230
  msgid "Email Field"
231
  msgstr ""
232
 
233
- #: php/gdpr.php:170
234
  msgid "Phone Field"
235
  msgstr ""
236
 
237
- #: php/gdpr.php:174
238
  msgid "User ID"
239
  msgstr ""
240
 
241
- #: php/gdpr.php:178 php/admin/admin-results-page.php:347
 
242
  msgid "IP Address"
243
  msgstr ""
244
 
245
- #: php/gdpr.php:182
246
  msgid "Time to complete form"
247
  msgstr ""
248
 
249
- #: php/gdpr.php:186
250
  msgid "Form comments"
251
  msgstr ""
252
 
253
- #: php/question-types.php:14
254
- msgid "Vertical Multiple Choice"
255
  msgstr ""
256
 
257
- #: php/question-types.php:26
258
  msgid "File Upload"
259
  msgstr ""
260
 
261
- #: php/question-types.php:213
262
  msgid "Date"
263
  msgstr ""
264
 
265
- #: php/question-types.php:285
266
- msgid "Horizontal Multiple Choice"
267
  msgstr ""
268
 
269
- #: php/question-types.php:401
270
  msgid "Drop Down"
271
  msgstr ""
272
 
273
- #: php/question-types.php:427
274
- msgid "Please select your answer"
275
- msgstr ""
276
-
277
- #: php/question-types.php:500
278
  msgid "Short Answer"
279
  msgstr ""
280
 
281
- #: php/question-types.php:578
282
  msgid "Multiple Response"
283
  msgstr ""
284
 
285
- #: php/question-types.php:678
286
  msgid "Paragraph"
287
  msgstr ""
288
 
289
- #: php/question-types.php:762
290
  msgid "Text/HTML Section"
291
  msgstr ""
292
 
293
- #: php/question-types.php:796
294
  msgid "Number"
295
  msgstr ""
296
 
297
- #: php/question-types.php:881
298
  msgid "Opt-in"
299
  msgstr ""
300
 
301
- #: php/question-types.php:926
302
  msgid "Captcha"
303
  msgstr ""
304
 
305
- #: php/question-types.php:985
306
- msgid "Horizontal Multiple Response"
307
  msgstr ""
308
 
309
- #: php/question-types.php:1097
310
  msgid ""
311
  "For fill in the blank types, use %BLANK% to represent where to put the text "
312
  "box in your text."
313
  msgstr ""
314
 
315
- #: php/question-types.php:1102
316
  msgid "Fill In The Blank"
317
  msgstr ""
318
 
319
- #: php/question-types.php:1193
320
  msgid "Polar"
321
  msgstr ""
322
 
323
- #: php/rest-api.php:162 php/rest-api.php:275 php/rest-api.php:302
324
- #: php/rest-api.php:327 php/rest-api.php:354 php/rest-api.php:393
325
- #: php/rest-api.php:451 php/rest-api.php:508 php/rest-api.php:579
 
326
  msgid "User not logged in"
327
  msgstr ""
328
 
329
- #: php/rest-api.php:183 php/admin/admin-dashboard.php:381
330
- #: php/admin/admin-results-page.php:389
331
  msgid "Not Graded"
332
  msgstr ""
333
 
334
- #: php/shortcodes.php:92
 
 
 
 
 
 
 
 
335
  msgid "No quiz found"
336
  msgstr ""
337
 
338
- #: php/template-variables.php:193
 
 
 
 
 
 
 
 
 
 
 
 
339
  msgid "Poll Result"
340
  msgstr ""
341
 
342
- #: php/template-variables.php:249
343
  msgid "Facebbok Share"
344
  msgstr ""
345
 
346
- #: php/template-variables.php:256
347
  msgid "Twitter Share"
348
  msgstr ""
349
 
350
- #: php/template-variables.php:936 php/template-variables.php:945
351
  msgid "No answer provided"
352
  msgstr ""
353
 
354
- #: php/template-variables.php:1060
355
  msgid "No Answer Provided"
356
  msgstr ""
357
 
358
- #: php/admin/about-page.php:29
359
- msgid "Welcome To Quiz And Survey Master (Formerly Quiz Master Next)"
360
  msgstr ""
361
 
362
- #: php/admin/about-page.php:52
363
- msgid "View "
364
  msgstr ""
365
 
366
- #: php/admin/addons-page.php:18 php/admin/addons-page.php:280
367
- msgid "Featured Addons"
368
  msgstr ""
369
 
370
- #: php/admin/addons-page.php:24
371
- msgid "QSM Addon Settings"
372
  msgstr ""
373
 
374
- #: php/admin/addons-page.php:27
375
- msgid "Back to list"
376
  msgstr ""
377
 
378
- #: php/admin/addons-page.php:70 php/admin/addons-page.php:85
379
- msgid "Installed Addons"
380
  msgstr ""
381
 
382
- #: php/admin/addons-page.php:71
383
- msgid "Add Addons"
384
  msgstr ""
385
 
386
- #: php/admin/addons-page.php:74
387
- msgid "Popular Addons"
388
  msgstr ""
389
 
390
- #: php/admin/addons-page.php:75
391
- msgid "On Sale Addons"
392
  msgstr ""
393
 
394
- #: php/admin/addons-page.php:76
395
- msgid "Recently Updated Addons"
396
  msgstr ""
397
 
398
- #: php/admin/addons-page.php:80
399
- msgid "40+ addons available"
400
  msgstr ""
401
 
402
- #: php/admin/addons-page.php:81
403
- msgid "Browse All Addons"
404
  msgstr ""
405
 
406
- #: php/admin/addons-page.php:107
407
- msgid ""
408
- "You have currently not installed any addons. Explore our addons repository "
409
- "with 40+ addons to make your quiz even better."
410
  msgstr ""
411
 
412
- #: php/admin/addons-page.php:139 php/admin/addons-page.php:178
413
- #: php/admin/addons-page.php:220
414
- msgid "Show more"
415
  msgstr ""
416
 
417
- #: php/admin/addons-page.php:144 php/admin/addons-page.php:183
418
- #: php/admin/addons-page.php:225
419
- msgid "Price: "
420
  msgstr ""
421
 
422
- #: php/admin/addons-page.php:145 php/admin/addons-page.php:184
423
- #: php/admin/addons-page.php:226
424
- msgid "Get This Addon"
425
  msgstr ""
426
 
427
- #: php/admin/addons-page.php:247
428
- msgid "SAVE WITH OUR BUNDLES"
429
  msgstr ""
430
 
431
- #: php/admin/addons-page.php:259
432
- msgid "Get now"
433
  msgstr ""
434
 
435
- #: php/admin/addons-page.php:296
436
- msgid "Get Your Free Addon!"
437
  msgstr ""
438
 
439
- #: php/admin/addons-page.php:298
440
- msgid ""
441
- "Wanna get more out of Quiz and Survey Master, but not yet ready to spend the "
442
- "cash? Get one free addon today!"
443
  msgstr ""
444
 
445
- #: php/admin/addons-page.php:310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  msgid ""
447
  "Getting your addon is dead simple: just subscribe to our newsletter and then "
448
  "you will get the free addon by e-mail. We will not spam you. We usually send "
449
  "out newsletters to talk about new features in "
450
  msgstr ""
451
 
452
- #: php/admin/addons-page.php:310
453
  msgid "Quiz and Survey Master"
454
  msgstr ""
455
 
456
- #: php/admin/addons-page.php:310
457
  msgid ""
458
  " let you know when new or updated addons are being released and provide "
459
  "informative articles that show you how to use "
460
  msgstr ""
461
 
462
- #: php/admin/addons-page.php:310
463
  msgid "Quiz and Survey Master "
464
  msgstr ""
465
 
466
- #: php/admin/addons-page.php:310
467
  msgid "to its full potential. "
468
  msgstr ""
469
 
470
- #: php/admin/addons-page.php:310
471
  msgid "View our privacy policy"
472
  msgstr ""
473
 
474
- #: php/admin/addons-page.php:367
475
  msgid "Your subscription could not be saved. Please try again."
476
  msgstr ""
477
 
478
- #: php/admin/addons-page.php:379
479
  msgid "Your subscription has been successful."
480
  msgstr ""
481
 
482
- #: php/admin/addons-page.php:392
483
  msgid "Enter your email address to subscribe"
484
  msgstr ""
485
 
486
- #: php/admin/addons-page.php:403
487
  msgid "Provide your email address to subscribe. For e.g abc@xyz.com"
488
  msgstr ""
489
 
490
- #: php/admin/addons-page.php:416
491
  msgid "SUBSCRIBE"
492
  msgstr ""
493
 
494
- #: php/admin/addons-page.php:424
495
  msgid "Terms & Privacy policy"
496
  msgstr ""
497
 
498
- #: php/admin/admin-dashboard.php:66
499
  msgid "Welcome"
500
  msgstr ""
501
 
502
- #: php/admin/admin-dashboard.php:110
503
  msgid "QSM Dashboard"
504
  msgstr ""
505
 
506
- #: php/admin/admin-dashboard.php:116
507
  msgid "Dismiss"
508
  msgstr ""
509
 
510
- #: php/admin/admin-dashboard.php:118
511
  msgid "Welcome to Quiz And Survey Master!"
512
  msgstr ""
513
 
514
- #: php/admin/admin-dashboard.php:119
515
  msgid "Formerly Quiz Master Next"
516
  msgstr ""
517
 
518
- #: php/admin/admin-dashboard.php:122
519
  msgid "Get Started"
520
  msgstr ""
521
 
522
- #: php/admin/admin-dashboard.php:123 php/admin/quizzes-page.php:606
523
  msgid "Create New Quiz/Survey"
524
  msgstr ""
525
 
526
- #: php/admin/admin-dashboard.php:125
527
  msgid "Edit previously created quizzes"
528
  msgstr ""
529
 
530
- #: php/admin/admin-dashboard.php:129
531
  msgid "Next Steps"
532
  msgstr ""
533
 
534
- #: php/admin/admin-dashboard.php:131 php/admin/quizzes-page.php:607
535
  msgid "Read Documentation"
536
  msgstr ""
537
 
538
- #: php/admin/admin-dashboard.php:132
539
  msgid "See demos"
540
  msgstr ""
541
 
542
- #: php/admin/admin-dashboard.php:133
543
  msgid "Extend QSM with PRO Addons"
544
  msgstr ""
545
 
546
- #: php/admin/admin-dashboard.php:137
 
 
 
 
547
  msgid "Useful Links"
548
  msgstr ""
549
 
550
- #: php/admin/admin-dashboard.php:139
551
  msgid "Contact Support"
552
  msgstr ""
553
 
554
- #: php/admin/admin-dashboard.php:140
555
  msgid "Github Repository"
556
  msgstr ""
557
 
558
- #: php/admin/admin-dashboard.php:261
 
 
 
 
 
 
 
 
559
  msgid "No settings are found!"
560
  msgstr ""
561
 
562
- #: php/admin/admin-dashboard.php:283
563
  msgid "No addons are found!"
564
  msgstr ""
565
 
566
- #: php/admin/admin-dashboard.php:300 php/admin/admin-dashboard.php:303
567
  msgid "Most Popular Addon this Week"
568
  msgstr ""
569
 
570
- #: php/admin/admin-dashboard.php:322
571
  msgid "SEE ALL ADDONS"
572
  msgstr ""
573
 
574
- #: php/admin/admin-dashboard.php:341 php/admin/admin-dashboard.php:344
575
  msgid "Recently Taken Quizzes"
576
  msgstr ""
577
 
578
- #: php/admin/admin-dashboard.php:370
579
  msgid "Guest"
580
  msgstr ""
581
 
582
- #: php/admin/admin-dashboard.php:372
583
  msgid " took quiz "
584
  msgstr ""
585
 
586
- #: php/admin/admin-dashboard.php:412
587
  msgid " Time to complete "
588
  msgstr ""
589
 
590
- #: php/admin/admin-dashboard.php:431
591
  msgid "See All Results "
592
  msgstr ""
593
 
594
- #: php/admin/admin-dashboard.php:453
595
- msgid "'what's New"
596
- msgstr ""
597
-
598
- #: php/admin/admin-dashboard.php:456
599
- msgid "What's New"
600
  msgstr ""
601
 
602
- #: php/admin/admin-dashboard.php:495
603
  msgid "Changelog"
604
  msgstr ""
605
 
606
- #: php/admin/admin-dashboard.php:498
607
- msgid "Changelog ( "
608
  msgstr ""
609
 
610
- #: php/admin/admin-dashboard.php:525
611
- msgid "View Complete Changelog"
612
  msgstr ""
613
 
614
- #: php/admin/admin-results-details-page.php:26
615
- #: php/admin/admin-results-page.php:21 php/admin/admin-results-page.php:26
616
- #: php/admin/admin-results-page.php:69
617
  msgid "Quiz Results"
618
  msgstr ""
619
 
620
- #: php/admin/admin-results-details-page.php:93
621
  msgid "Back to Results"
622
  msgstr ""
623
 
624
- #: php/admin/admin-results-details-page.php:127
625
  msgid "Name:"
626
  msgstr ""
627
 
628
- #: php/admin/admin-results-details-page.php:128
629
  msgid "Business:"
630
  msgstr ""
631
 
632
- #: php/admin/admin-results-details-page.php:129
633
  msgid "Phone:"
634
  msgstr ""
635
 
636
- #: php/admin/admin-results-details-page.php:130
637
  msgid "Email:"
638
  msgstr ""
639
 
640
- #: php/admin/admin-results-details-page.php:140
641
  msgid "Correct Answers:"
642
  msgstr ""
643
 
644
- #: php/admin/admin-results-details-page.php:141
645
  msgid "Points:"
646
  msgstr ""
647
 
648
- #: php/admin/admin-results-details-page.php:142
649
  msgid "Percentage:"
650
  msgstr ""
651
 
652
- #: php/admin/admin-results-details-page.php:158
653
  msgid "hour"
654
  msgstr ""
655
 
656
- #: php/admin/admin-results-details-page.php:158
657
  msgid "hours"
658
  msgstr ""
659
 
660
- #: php/admin/admin-results-details-page.php:171
661
  msgid "minute"
662
  msgstr ""
663
 
664
- #: php/admin/admin-results-details-page.php:171
665
  msgid "minutes"
666
  msgstr ""
667
 
668
- #: php/admin/admin-results-details-page.php:183
669
  msgid "second"
670
  msgstr ""
671
 
672
- #: php/admin/admin-results-details-page.php:183
673
  msgid "seconds"
674
  msgstr ""
675
 
676
- #: php/admin/admin-results-page.php:108
677
- #: php/classes/class-qmn-quiz-creator.php:305
 
 
 
 
678
  msgid "Unknown error"
679
  msgstr ""
680
 
681
- #: php/admin/admin-results-page.php:110
682
  #, php-format
683
  msgid "There was an error when deleting this result. Error from WordPress: %s"
684
  msgstr ""
685
 
686
- #: php/admin/admin-results-page.php:113
687
  msgid "Your results has been deleted successfully."
688
  msgstr ""
689
 
690
- #: php/admin/admin-results-page.php:248
691
  #, php-format
692
- msgid "One result"
693
  msgid_plural "%s results"
694
  msgstr[0] ""
695
  msgstr[1] ""
696
 
697
- #: php/admin/admin-results-page.php:313 php/admin/admin-results-page.php:323
698
  msgid "Search Results"
699
  msgstr ""
700
 
701
- #: php/admin/admin-results-page.php:315
702
  msgid "Order By"
703
  msgstr ""
704
 
705
- #: php/admin/admin-results-page.php:317 php/admin/admin-results-page.php:336
706
- msgid "Quiz Name"
707
  msgstr ""
708
 
709
- #: php/admin/admin-results-page.php:318
710
- msgid "User Name"
 
711
  msgstr ""
712
 
713
- #: php/admin/admin-results-page.php:319 php/classes/class-qsm-install.php:78
714
- msgid "Points"
715
  msgstr ""
716
 
717
- #: php/admin/admin-results-page.php:320
718
  msgid "Correct Percent"
719
  msgstr ""
720
 
721
- #: php/admin/admin-results-page.php:321
722
- msgid "Default (Time)"
723
- msgstr ""
724
-
725
- #: php/admin/admin-results-page.php:339
726
  msgid "Score"
727
  msgstr ""
728
 
729
- #: php/admin/admin-results-page.php:340
730
  msgid "Time To Complete"
731
  msgstr ""
732
 
733
- #: php/admin/admin-results-page.php:341 php/admin/quiz-options-page.php:177
 
734
  msgid "Name"
735
  msgstr ""
736
 
737
- #: php/admin/admin-results-page.php:342
 
738
  msgid "Business"
739
  msgstr ""
740
 
741
- #: php/admin/admin-results-page.php:343
 
 
742
  msgid "Email"
743
  msgstr ""
744
 
745
- #: php/admin/admin-results-page.php:344
746
  msgid "Phone"
747
  msgstr ""
748
 
749
- #: php/admin/admin-results-page.php:345 php/admin/tools-page.php:185
750
  msgid "User"
751
  msgstr ""
752
 
753
- #: php/admin/admin-results-page.php:346
754
  msgid "Time Taken"
755
  msgstr ""
756
 
757
- #: php/admin/admin-results-page.php:420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  msgid "No record found."
759
  msgstr ""
760
 
761
- #: php/admin/admin-results-page.php:429
762
  msgid "Are you sure you want to delete these results?"
763
  msgstr ""
764
 
765
- #: php/admin/admin-results-page.php:435
766
  msgid "Delete Results"
767
  msgstr ""
768
 
 
 
 
 
 
 
 
 
 
 
 
769
  #: php/admin/dashboard-widgets.php:16
770
  msgid "Quiz And Survey Master Snapshot"
771
  msgstr ""
772
 
773
- #: php/admin/dashboard-widgets.php:180
774
  msgid "quizzes taken today"
775
  msgstr ""
776
 
777
- #: php/admin/dashboard-widgets.php:199
778
  msgid "quizzes taken last 7 days"
779
  msgstr ""
780
 
781
- #: php/admin/dashboard-widgets.php:218
782
  msgid "quizzes taken last 30 days"
783
  msgstr ""
784
 
785
- #: php/admin/dashboard-widgets.php:237
786
  msgid "quizzes taken last 120 days"
787
  msgstr ""
788
 
789
- #: php/admin/dashboard-widgets.php:256
790
  msgid "total active quizzes"
791
  msgstr ""
792
 
793
- #: php/admin/dashboard-widgets.php:262
794
  msgid "total active questions"
795
  msgstr ""
796
 
797
- #: php/admin/dashboard-widgets.php:268
798
  msgid "most popular quiz"
799
  msgstr ""
800
 
801
- #: php/admin/dashboard-widgets.php:274
802
  msgid "least popular quiz"
803
  msgstr ""
804
 
805
- #: php/admin/functions.php:8
806
  msgid "Something went wrong"
807
  msgstr ""
808
 
809
- #: php/admin/functions.php:185 php/admin/options-page-contact-tab.php:52
810
- #: php/admin/options-page-email-tab.php:51
811
- #: php/admin/options-page-option-tab.php:28
812
- #: php/admin/options-page-questions-tab.php:278
813
- #: php/admin/options-page-text-tab.php:30
814
- #: php/classes/class-qsm-install.php:1801
815
  msgid "View Documentation"
816
  msgstr ""
817
 
818
- #: php/admin/functions.php:277
819
  msgid "+ Add New Category"
820
  msgstr ""
821
 
822
- #: php/admin/functions.php:350
 
 
 
 
 
 
 
 
823
  msgid "Create New Quiz Or Survey"
824
  msgstr ""
825
 
826
- #: php/admin/functions.php:357
827
- msgid "Start from scratch"
828
  msgstr ""
829
 
830
- #: php/admin/functions.php:389
831
- msgid "Simple Quiz"
 
 
832
  msgstr ""
833
 
834
- #: php/admin/functions.php:426
835
- msgid "Time Based Quiz"
836
  msgstr ""
837
 
838
- #: php/admin/functions.php:459 php/classes/class-qsm-install.php:55
839
- msgid "Survey"
840
  msgstr ""
841
 
842
- #: php/admin/functions.php:505
843
- msgid "Enter quiz name here"
844
  msgstr ""
845
 
846
- #: php/admin/functions.php:507
847
- msgid "Select Template"
848
  msgstr ""
849
 
850
- #: php/admin/functions.php:542
851
- msgid "Quiz Settings"
852
  msgstr ""
853
 
854
- #: php/admin/functions.php:544
855
- msgid "Recommended Addons"
856
  msgstr ""
857
 
858
- #: php/admin/functions.php:551
859
- msgid "Create Quiz"
860
  msgstr ""
861
 
862
- #: php/admin/functions.php:552 php/admin/quizzes-page.php:496
863
- #: php/admin/quizzes-page.php:524 php/admin/quizzes-page.php:551
864
- #: php/admin/quizzes-page.php:570
865
- #: php/shortcodes.php:252,269
866
- msgid "Cancel"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
  msgstr ""
868
 
869
- #: php/admin/functions.php:566
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
870
  msgid "Score for the quiz when using points"
871
  msgstr ""
872
 
873
- #: php/admin/functions.php:567
874
  msgid "Maximum possible points one can score"
875
  msgstr ""
876
 
877
- #: php/admin/functions.php:568
 
 
 
 
878
  msgid "The average amount of points user had per question"
879
  msgstr ""
880
 
881
- #: php/admin/functions.php:569
882
  msgid "The number of correct answers the user had"
883
  msgstr ""
884
 
885
- #: php/admin/functions.php:570
886
  msgid "The number of incorrect answers the user had"
887
  msgstr ""
888
 
889
- #: php/admin/functions.php:571
890
  msgid "The number of questions are attempted"
891
  msgstr ""
892
 
893
- #: php/admin/functions.php:572
894
  msgid "The total number of questions in the quiz"
895
  msgstr ""
896
 
897
- #: php/admin/functions.php:573
898
  msgid "Score for the quiz when using correct answers"
899
  msgstr ""
900
 
901
- #: php/admin/functions.php:574
902
  msgid "The name the user entered before the quiz"
903
  msgstr ""
904
 
905
- #: php/admin/functions.php:575
906
  msgid "The full name of user with first name and last name"
907
  msgstr ""
908
 
909
- #: php/admin/functions.php:576
910
  msgid "The business the user entered before the quiz"
911
  msgstr ""
912
 
913
- #: php/admin/functions.php:577
914
  msgid "The phone number the user entered before the quiz"
915
  msgstr ""
916
 
917
- #: php/admin/functions.php:578
918
  msgid "The email the user entered before the quiz"
919
  msgstr ""
920
 
921
- #: php/admin/functions.php:579
922
  msgid "The name of the quiz"
923
  msgstr ""
924
 
925
- #: php/admin/functions.php:580
926
  msgid "The link of the quiz"
927
  msgstr ""
928
 
929
- #: php/admin/functions.php:581
930
  msgid ""
931
  "Shows the question, the answer the user provided, and the correct answer"
932
  msgstr ""
933
 
934
- #: php/admin/functions.php:582
935
  msgid "The comments the user entered into comment box if enabled"
936
  msgstr ""
937
 
938
- #: php/admin/functions.php:583
939
  msgid "The amount of time user spent on quiz in seconds"
940
  msgstr ""
941
 
942
- #: php/admin/functions.php:584
943
- msgid "The amount of time user spent on quiz in minutes"
 
 
 
 
 
 
 
 
944
  msgstr ""
945
 
946
- #: php/admin/functions.php:585
947
  msgid "X: Category name - The amount of points a specific category earned."
948
  msgstr ""
949
 
950
- #: php/admin/functions.php:586
951
  msgid "X: Category name - The score a specific category earned."
952
  msgstr ""
953
 
954
- #: php/admin/functions.php:587
955
  msgid "The average points from all categories."
956
  msgstr ""
957
 
958
- #: php/admin/functions.php:588
959
  msgid "The average score from all categories."
960
  msgstr ""
961
 
962
- #: php/admin/functions.php:589
963
- msgid "The question that the user answered"
964
  msgstr ""
965
 
966
- #: php/admin/functions.php:590
967
- msgid "The answer the user gave for the question"
968
  msgstr ""
969
 
970
- #: php/admin/functions.php:591
971
- msgid "The answer the user gave for the question with default design"
972
  msgstr ""
973
 
974
- #: php/admin/functions.php:592
975
- msgid "The correct answer for the question"
976
  msgstr ""
977
 
978
- #: php/admin/functions.php:593
979
- msgid "The comments the user provided in the comment field for the question"
 
 
980
  msgstr ""
981
 
982
- #: php/admin/functions.php:594
983
- msgid "Reason why the correct answer is the correct answer"
 
984
  msgstr ""
985
 
986
- #: php/admin/functions.php:595
987
- msgid "The Current Date"
988
  msgstr ""
989
 
990
- #: php/admin/functions.php:596
991
- msgid "Point Score of the question"
992
  msgstr ""
993
 
994
- #: php/admin/functions.php:597
995
- msgid "Maximum points of the question"
996
  msgstr ""
997
 
998
- #: php/admin/functions.php:598
999
- msgid "Displays button to share on Facebook."
1000
  msgstr ""
1001
 
1002
- #: php/admin/functions.php:599
1003
- msgid "Displays button to share on Twitter."
1004
  msgstr ""
1005
 
1006
- #: php/admin/functions.php:600
1007
- msgid "The link of the result page."
 
1008
  msgstr ""
1009
 
1010
- #: php/admin/help-page.php:26
1011
- msgid "Need Help?"
1012
  msgstr ""
1013
 
1014
- #: php/admin/help-page.php:27
1015
- msgid "System Info"
1016
  msgstr ""
1017
 
1018
- #: php/admin/help-page.php:30
1019
- msgid "Help Page"
1020
  msgstr ""
1021
 
1022
- #: php/admin/help-page.php:54
1023
- msgid "Need help with the plugin? Try any of the following:"
 
1024
  msgstr ""
1025
 
1026
- #: php/admin/help-page.php:92
1027
- msgid "Site Information"
1028
  msgstr ""
1029
 
1030
- #: php/admin/help-page.php:93
1031
- msgid "Site URL:"
1032
  msgstr ""
1033
 
1034
- #: php/admin/help-page.php:94
1035
- msgid "Home URL:"
1036
  msgstr ""
1037
 
1038
- #: php/admin/help-page.php:95
1039
- msgid "Multisite: "
1040
  msgstr ""
1041
 
1042
- #: php/admin/help-page.php:97
1043
- msgid "WordPress Information"
1044
  msgstr ""
1045
 
1046
- #: php/admin/help-page.php:98
1047
- msgid "Version: "
1048
  msgstr ""
1049
 
1050
- #: php/admin/help-page.php:99
1051
- msgid "Language: "
1052
  msgstr ""
1053
 
1054
- #: php/admin/help-page.php:100
1055
- msgid "Permalink Structure: "
1056
  msgstr ""
1057
 
1058
- #: php/admin/help-page.php:101
1059
- msgid "Active Theme: "
 
1060
  msgstr ""
1061
 
1062
- #: php/admin/help-page.php:102
1063
- msgid "Parent Theme: "
1064
  msgstr ""
1065
 
1066
- #: php/admin/help-page.php:103
1067
- msgid "Debug Mode: "
1068
  msgstr ""
1069
 
1070
- #: php/admin/help-page.php:104
1071
- msgid "Memory Limit: "
1072
  msgstr ""
1073
 
1074
- #: php/admin/help-page.php:106
1075
- msgid "Plugins Information"
1076
  msgstr ""
1077
 
1078
- #: php/admin/help-page.php:109
1079
- msgid "Must Use"
1080
  msgstr ""
1081
 
1082
- #: php/admin/help-page.php:114
1083
- msgid "Active"
1084
  msgstr ""
1085
 
1086
- #: php/admin/help-page.php:123
1087
- msgid "Inactive"
 
1088
  msgstr ""
1089
 
1090
- #: php/admin/help-page.php:131
1091
- msgid "Server Information"
1092
  msgstr ""
1093
 
1094
- #: php/admin/help-page.php:132
1095
- msgid "PHP : "
1096
  msgstr ""
1097
 
1098
- #: php/admin/help-page.php:133
1099
- msgid "MySQL : "
1100
  msgstr ""
1101
 
1102
- #: php/admin/help-page.php:134
1103
- msgid "Webserver : "
 
1104
  msgstr ""
1105
 
1106
- #: php/admin/help-page.php:143
1107
- msgid "QSM Information"
1108
  msgstr ""
1109
 
1110
- #: php/admin/help-page.php:144
1111
- msgid "Initial Version : "
 
1112
  msgstr ""
1113
 
1114
- #: php/admin/help-page.php:145
1115
- msgid "Current Version : "
1116
  msgstr ""
1117
 
1118
- #: php/admin/help-page.php:146
1119
- msgid "Total Quizzes : "
1120
  msgstr ""
1121
 
1122
- #: php/admin/help-page.php:147
1123
- msgid "Total Active Quizzes : "
1124
  msgstr ""
1125
 
1126
- #: php/admin/help-page.php:148
1127
- msgid "Total Questions : "
1128
  msgstr ""
1129
 
1130
- #: php/admin/help-page.php:149
1131
- msgid "Total Active Questions : "
1132
  msgstr ""
1133
 
1134
- #: php/admin/help-page.php:150
1135
- msgid "Total Results : "
1136
  msgstr ""
1137
 
1138
- #: php/admin/help-page.php:151
1139
- msgid "Total Active Results : "
1140
  msgstr ""
1141
 
1142
- #: php/admin/help-page.php:153
1143
- msgid "QSM Recent Logs"
1144
  msgstr ""
1145
 
1146
- #: php/admin/help-page.php:160
1147
- msgid "No recent logs"
1148
  msgstr ""
1149
 
1150
- #: php/admin/options-page-contact-tab.php:14
1151
- #: php/admin/options-page-contact-tab.php:51
1152
- msgid "Contact"
1153
  msgstr ""
1154
 
1155
- #: php/admin/options-page-contact-tab.php:54
1156
- msgid "Save Contact Fields"
 
1157
  msgstr ""
1158
 
1159
- #: php/admin/options-page-contact-tab.php:56
1160
- msgid "Add New Field"
 
1161
  msgstr ""
1162
 
1163
- #: php/admin/options-page-email-tab.php:20
1164
- msgid "Emails"
 
1165
  msgstr ""
1166
 
1167
- #: php/admin/options-page-email-tab.php:48
1168
- #: php/admin/options-page-email-tab.php:53
1169
- msgid "Save Emails"
 
 
 
1170
  msgstr ""
1171
 
1172
- #: php/admin/options-page-email-tab.php:49
1173
- #: php/admin/options-page-email-tab.php:54
1174
- msgid "Add New Email"
 
1175
  msgstr ""
1176
 
1177
- #: php/admin/options-page-email-tab.php:50
1178
- #: php/admin/options-page-results-page-tab.php:46
1179
- msgid "Insert Template Variables"
1180
  msgstr ""
1181
 
1182
- #: php/admin/options-page-email-tab.php:71
1183
- #: php/admin/options-page-results-page-tab.php:67
 
 
 
 
 
 
 
 
 
 
1184
  msgid "When..."
1185
  msgstr ""
1186
 
1187
- #: php/admin/options-page-email-tab.php:72
1188
  msgid ""
1189
  "Set conditions for when this email should be sent. Leave empty to set this "
1190
  "as an email that is always sent."
1191
  msgstr ""
1192
 
1193
- #: php/admin/options-page-email-tab.php:77
1194
- #: php/admin/options-page-results-page-tab.php:73
1195
  msgid "Add additional condition"
1196
  msgstr ""
1197
 
1198
- #: php/admin/options-page-email-tab.php:81
1199
  msgid "...Send"
1200
  msgstr ""
1201
 
1202
- #: php/admin/options-page-email-tab.php:82
1203
  msgid "Create the email that should be sent when the conditions are met."
1204
  msgstr ""
1205
 
1206
- #: php/admin/options-page-email-tab.php:84
1207
  msgid "Who to send the email to? Put %USER_EMAIL% to send to user"
1208
  msgstr ""
1209
 
1210
- #: php/admin/options-page-email-tab.php:86
1211
  msgid "Email Subject"
1212
  msgstr ""
1213
 
1214
- #: php/admin/options-page-email-tab.php:88
1215
  msgid "Email Content"
1216
  msgstr ""
1217
 
1218
- #: php/admin/options-page-email-tab.php:100
1219
- #: php/admin/options-page-results-page-tab.php:92
 
 
 
 
 
 
 
 
 
 
1220
  msgid "Total points earned"
1221
  msgstr ""
1222
 
1223
- #: php/admin/options-page-email-tab.php:101
1224
- #: php/admin/options-page-results-page-tab.php:93
1225
  msgid "Correct score percentage"
1226
  msgstr ""
1227
 
1228
- #: php/admin/options-page-email-tab.php:105
1229
- #: php/admin/options-page-results-page-tab.php:97
1230
  msgid "is equal to"
1231
  msgstr ""
1232
 
1233
- #: php/admin/options-page-email-tab.php:106
1234
- #: php/admin/options-page-results-page-tab.php:98
1235
  msgid "is not equal to"
1236
  msgstr ""
1237
 
1238
- #: php/admin/options-page-email-tab.php:107
1239
- #: php/admin/options-page-results-page-tab.php:99
1240
  msgid "is greater than or equal to"
1241
  msgstr ""
1242
 
1243
- #: php/admin/options-page-email-tab.php:108
1244
- #: php/admin/options-page-results-page-tab.php:100
1245
  msgid "is greater than"
1246
  msgstr ""
1247
 
1248
- #: php/admin/options-page-email-tab.php:109
1249
- #: php/admin/options-page-results-page-tab.php:101
1250
  msgid "is less than or equal to"
1251
  msgstr ""
1252
 
1253
- #: php/admin/options-page-email-tab.php:110
1254
- #: php/admin/options-page-results-page-tab.php:102
1255
  msgid "is less than"
1256
  msgstr ""
1257
 
1258
- #: php/admin/options-page-email-tab.php:123
1259
- #: php/admin/options-page-results-page-tab.php:113
1260
- #: php/admin/options-page-text-tab.php:120
1261
- msgid "Template Variables"
1262
- msgstr ""
1263
-
1264
- #: php/admin/options-page-email-tab.php:125
1265
- #: php/admin/options-page-results-page-tab.php:115
1266
- msgid ""
1267
- "Use these dynamic variables to customize your quiz or survey. Just copy and "
1268
- "paste one or more variables into the content templates and these will be "
1269
- "replaced by actual values when user takes a quiz."
1270
- msgstr ""
1271
-
1272
- #: php/admin/options-page-email-tab.php:126
1273
- #: php/admin/options-page-results-page-tab.php:116
1274
- msgid "Note: "
1275
- msgstr ""
1276
-
1277
- #: php/admin/options-page-email-tab.php:127
1278
- #: php/admin/options-page-results-page-tab.php:117
1279
- msgid "Always use uppercase while using these variables."
1280
- msgstr ""
1281
-
1282
- #: php/admin/options-page-email-tab.php:134
1283
- #: php/admin/options-page-email-tab.php:135
1284
- #: php/admin/options-page-results-page-tab.php:124
1285
- #: php/admin/options-page-results-page-tab.php:125
1286
- msgid ""
1287
- "Value user entered into contact field. X is # of contact field. For example, "
1288
- "first contact field would be %CONTACT_1%"
1289
- msgstr ""
1290
-
1291
- #: php/admin/options-page-email-tab.php:136
1292
- #: php/admin/options-page-results-page-tab.php:131
1293
- msgid "X = Question ID. It will show result of particular question."
1294
- msgstr ""
1295
-
1296
- #: php/admin/options-page-email-tab.php:137
1297
- msgid "Shows the question, the answer provided by user, and the correct answer"
1298
- msgstr ""
1299
-
1300
- #: php/admin/options-page-email-tab.php:140
1301
- #: php/admin/options-page-results-page-tab.php:128
1302
- msgid ""
1303
- "X: Category name - The average amount of points a specific category earned."
1304
- msgstr ""
1305
-
1306
- #: php/admin/options-page-email-tab.php:167
1307
- #: php/admin/options-page-results-page-tab.php:156
1308
- msgid "Close [Esc]"
1309
- msgstr ""
1310
-
1311
  #: php/admin/options-page-option-tab.php:14
1312
  msgid "Options"
1313
  msgstr ""
1314
 
1315
- #: php/admin/options-page-questions-tab.php:19
1316
- #: php/admin/quiz-options-page.php:41
1317
  msgid "Questions"
1318
  msgstr ""
1319
 
1320
- #: php/admin/options-page-questions-tab.php:59
1321
  msgid "Answer"
1322
  msgstr ""
1323
 
1324
- #: php/admin/options-page-questions-tab.php:68
1325
- msgid "Less Description"
1326
- msgstr ""
1327
-
1328
- #: php/admin/options-page-questions-tab.php:69
1329
- #: php/admin/options-page-questions-tab.php:165
1330
- msgid "Add Description"
1331
- msgstr ""
1332
-
1333
- #: php/admin/options-page-questions-tab.php:90
1334
  msgid ""
1335
  "This quiz has the \"How many questions per page would you like?\" option "
1336
  "enabled. The pages below will not be used while that option is enabled. To "
1337
  "turn off, go to the \"Options\" tab and set that option to 0."
1338
  msgstr ""
1339
 
1340
- #: php/admin/options-page-questions-tab.php:98
1341
  msgid ""
1342
  "This quiz has the \"How many questions should be loaded for quiz?\" option "
1343
  "enabled. The pages below will not be used while that option is enabled. To "
1344
  "turn off, go to the \"Options\" tab and set that option to 0."
1345
  msgstr ""
1346
 
1347
- #: php/admin/options-page-questions-tab.php:106
1348
  msgid ""
1349
  "This quiz has the \"Are the questions random?\" option enabled. The pages "
1350
  "below will not be used while that option is enabled. To turn off, go to the "
1351
  "\"Options\" tab and set that option to \"No\"."
1352
  msgstr ""
1353
 
1354
- #: php/admin/options-page-questions-tab.php:114
1355
  msgid "Total Questions:"
1356
  msgstr ""
1357
 
1358
- #: php/admin/options-page-questions-tab.php:118
1359
  msgid "Search Questions"
1360
  msgstr ""
1361
 
1362
- #: php/admin/options-page-questions-tab.php:124
1363
  msgid "Create New Page"
1364
  msgstr ""
1365
 
1366
- #: php/admin/options-page-questions-tab.php:125
1367
  msgid "Save Questions and Pages"
1368
  msgstr ""
1369
 
1370
- #: php/admin/options-page-questions-tab.php:134
1371
- #: php/admin/options-page-questions-tab.php:508
1372
- msgid "Add Question From Question Bank"
1373
  msgstr ""
1374
 
1375
- #: php/admin/options-page-questions-tab.php:154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1376
  msgid "Edit Question"
1377
  msgstr ""
1378
 
1379
- #: php/admin/options-page-questions-tab.php:163
1380
  msgid "Type your question here"
1381
  msgstr ""
1382
 
1383
- #: php/admin/options-page-questions-tab.php:167
 
 
 
 
 
 
 
 
1384
  msgid "Add your description here"
1385
  msgstr ""
1386
 
1387
- #: php/admin/options-page-questions-tab.php:174
1388
  msgid ""
1389
  "For this question type, users will see a file upload field on front end."
1390
  msgstr ""
1391
 
1392
- #: php/admin/options-page-questions-tab.php:178
1393
  msgid "Use %BLANK% variable in the description field to display input boxes."
1394
  msgstr ""
1395
 
1396
- #: php/admin/options-page-questions-tab.php:182
1397
  msgid "For this question type, users will see a date input field on front end."
1398
  msgstr ""
1399
 
1400
- #: php/admin/options-page-questions-tab.php:186
1401
  msgid ""
1402
  "For this question type, users will see a standard input box on front end."
1403
  msgstr ""
1404
 
1405
- #: php/admin/options-page-questions-tab.php:190
1406
  msgid ""
1407
  "For this question type, users will see a standard textarea input box on "
1408
  "front end."
1409
  msgstr ""
1410
 
1411
- #: php/admin/options-page-questions-tab.php:194
1412
- msgid "Displays a simple section on front end."
1413
  msgstr ""
1414
 
1415
- #: php/admin/options-page-questions-tab.php:198
1416
  msgid ""
1417
  "For this question type, users will see an input box which accepts only "
1418
  "number values on front end."
1419
  msgstr ""
1420
 
1421
- #: php/admin/options-page-questions-tab.php:202
1422
  msgid ""
1423
  "For this question type, users will see a checkbox on front end. The text in "
1424
  "description field will act like it's label."
1425
  msgstr ""
1426
 
1427
- #: php/admin/options-page-questions-tab.php:206
1428
  msgid "For this question type, users will see a Captcha field on front end."
1429
  msgstr ""
1430
 
1431
- #: php/admin/options-page-questions-tab.php:210
1432
  msgid "Use points based grading system for Polar questions."
1433
  msgstr ""
1434
 
1435
- #: php/admin/options-page-questions-tab.php:233
1436
- msgid "Answers"
1437
- msgstr ""
1438
-
1439
- #: php/admin/options-page-questions-tab.php:238
1440
- #: php/admin/options-page-questions-tab.php:563
1441
  msgid "Correct"
1442
  msgstr ""
1443
 
1444
- #: php/admin/options-page-questions-tab.php:243
1445
  msgid "Add New Answer!"
1446
  msgstr ""
1447
 
1448
- #: php/admin/options-page-questions-tab.php:249
1449
  msgid "Correct Answer Info"
1450
  msgstr ""
1451
 
1452
- #: php/admin/options-page-questions-tab.php:267
1453
- msgid "Publish"
1454
  msgstr ""
1455
 
1456
- #: php/admin/options-page-questions-tab.php:275
1457
- msgid "Question Type"
1458
  msgstr ""
1459
 
1460
- #: php/admin/options-page-questions-tab.php:291
1461
- msgid "How to use this option?"
1462
  msgstr ""
1463
 
1464
- #: php/admin/options-page-questions-tab.php:297
1465
- msgid "Answers Type"
1466
  msgstr ""
1467
 
1468
- #: php/admin/options-page-questions-tab.php:301
1469
- msgid "Text Answers"
1470
  msgstr ""
1471
 
1472
- #: php/admin/options-page-questions-tab.php:302
1473
- msgid "Rich Answers"
1474
  msgstr ""
1475
 
1476
- #: php/admin/options-page-questions-tab.php:310
1477
- msgid "Required?"
1478
  msgstr ""
1479
 
1480
- #: php/admin/options-page-questions-tab.php:315
1481
- #: php/admin/options-page-questions-tab.php:396
1482
- #: php/admin/options-page-questions-tab.php:484
1483
- #: php/admin/settings-page.php:264 php/classes/class-qsm-install.php:115
1484
- #: php/classes/class-qsm-install.php:134 php/classes/class-qsm-install.php:180
1485
- #: php/classes/class-qsm-install.php:198 php/classes/class-qsm-install.php:348
1486
- #: php/classes/class-qsm-install.php:369 php/classes/class-qsm-install.php:389
1487
- #: php/classes/class-qsm-install.php:408 php/classes/class-qsm-install.php:428
1488
- #: php/classes/class-qsm-install.php:449 php/classes/class-qsm-install.php:470
1489
- #: php/classes/class-qsm-install.php:489 php/classes/class-qsm-install.php:508
1490
- #: php/classes/class-qsm-install.php:552 php/classes/class-qsm-install.php:572
1491
- #: php/classes/class-qsm-install.php:591 php/classes/class-qsm-install.php:611
1492
- #: php/classes/class-qsm-install.php:630 php/classes/class-qsm-install.php:726
1493
- #: php/classes/class-qsm-install.php:750 php/classes/class-qsm-install.php:774
1494
- #: php/classes/class-qsm-install.php:797 php/classes/class-qsm-install.php:820
1495
- msgid "Yes"
1496
  msgstr ""
1497
 
1498
- #: php/admin/options-page-questions-tab.php:342
1499
- msgid "Select Category"
 
1500
  msgstr ""
1501
 
1502
- #: php/admin/options-page-questions-tab.php:366
1503
- msgid "Advanced Option"
 
1504
  msgstr ""
1505
 
1506
- #: php/admin/options-page-questions-tab.php:372
1507
- msgid "Comment Field"
1508
  msgstr ""
1509
 
1510
- #: php/admin/options-page-questions-tab.php:376
1511
- msgid "Small Text Field"
1512
  msgstr ""
1513
 
1514
- #: php/admin/options-page-questions-tab.php:377
1515
- msgid "Large Text Field"
1516
  msgstr ""
1517
 
1518
- #: php/admin/options-page-questions-tab.php:378
1519
- msgid "None"
1520
  msgstr ""
1521
 
1522
- #: php/admin/options-page-questions-tab.php:384
1523
- msgid "Hint"
1524
  msgstr ""
1525
 
1526
- #: php/admin/options-page-questions-tab.php:391
1527
- msgid "Hide Autofill?"
1528
  msgstr ""
1529
 
1530
- #: php/admin/options-page-questions-tab.php:395
1531
- #: php/admin/options-page-questions-tab.php:483
1532
- #: php/admin/settings-page.php:269 php/classes/class-qsm-install.php:119
1533
- #: php/classes/class-qsm-install.php:138 php/classes/class-qsm-install.php:184
1534
- #: php/classes/class-qsm-install.php:202 php/classes/class-qsm-install.php:352
1535
- #: php/classes/class-qsm-install.php:373 php/classes/class-qsm-install.php:393
1536
- #: php/classes/class-qsm-install.php:412 php/classes/class-qsm-install.php:432
1537
- #: php/classes/class-qsm-install.php:453 php/classes/class-qsm-install.php:474
1538
- #: php/classes/class-qsm-install.php:493 php/classes/class-qsm-install.php:512
1539
- #: php/classes/class-qsm-install.php:536 php/classes/class-qsm-install.php:556
1540
- #: php/classes/class-qsm-install.php:576 php/classes/class-qsm-install.php:595
1541
- #: php/classes/class-qsm-install.php:615 php/classes/class-qsm-install.php:634
1542
- #: php/classes/class-qsm-install.php:730 php/classes/class-qsm-install.php:746
1543
- #: php/classes/class-qsm-install.php:770 php/classes/class-qsm-install.php:793
1544
- #: php/classes/class-qsm-install.php:816
1545
- msgid "No"
1546
  msgstr ""
1547
 
1548
- #: php/admin/options-page-questions-tab.php:403
1549
- msgid "Limit Text"
1550
  msgstr ""
1551
 
1552
- #: php/admin/options-page-questions-tab.php:411
1553
- msgid "Limit Multiple choice"
1554
  msgstr ""
1555
 
1556
- #: php/admin/options-page-questions-tab.php:419
1557
  msgid "Allow File type"
1558
  msgstr ""
1559
 
1560
- #: php/admin/options-page-questions-tab.php:423
1561
  msgid "Text File"
1562
  msgstr ""
1563
 
1564
- #: php/admin/options-page-questions-tab.php:424
1565
  msgid "Image"
1566
  msgstr ""
1567
 
1568
- #: php/admin/options-page-questions-tab.php:425
1569
  msgid "PDF File"
1570
  msgstr ""
1571
 
1572
- #: php/admin/options-page-questions-tab.php:426
1573
  msgid "Doc File"
1574
  msgstr ""
1575
 
1576
- #: php/admin/options-page-questions-tab.php:427
1577
  msgid "Excel File"
1578
  msgstr ""
1579
 
1580
- #: php/admin/options-page-questions-tab.php:428
1581
  msgid "Video"
1582
  msgstr ""
1583
 
1584
- #: php/admin/options-page-questions-tab.php:435
1585
- msgid "File upload limit ( in MB )"
1586
- msgstr ""
1587
-
1588
- #: php/admin/options-page-questions-tab.php:470
1589
- msgid "Edit Page"
1590
  msgstr ""
1591
 
1592
- #: php/admin/options-page-questions-tab.php:477
1593
- msgid "Page Name"
1594
  msgstr ""
1595
 
1596
- #: php/admin/options-page-questions-tab.php:481
1597
- msgid "Hide Previous Button?"
1598
  msgstr ""
1599
 
1600
- #: php/admin/options-page-questions-tab.php:507
1601
- msgid "Create New Question"
1602
  msgstr ""
1603
 
1604
- #: php/admin/options-page-questions-tab.php:523
1605
- msgid "Category:"
1606
  msgstr ""
1607
 
1608
- #: php/admin/options-page-questions-tab.php:536
1609
- msgid "Add Question"
1610
  msgstr ""
1611
 
1612
- #: php/admin/options-page-questions-tab.php:704
1613
- msgid "Nonce verification failed."
1614
  msgstr ""
1615
 
1616
- #: php/admin/options-page-questions-tab.php:725
1617
- msgid "Selected Questions are removed from question bank."
1618
  msgstr ""
1619
 
1620
- #: php/admin/options-page-results-page-tab.php:19
1621
- msgid "Results Pages"
1622
  msgstr ""
1623
 
1624
- #: php/admin/options-page-results-page-tab.php:44
1625
- #: php/admin/options-page-results-page-tab.php:49
1626
- msgid "Save Results Pages"
1627
  msgstr ""
1628
 
1629
- #: php/admin/options-page-results-page-tab.php:45
1630
- #: php/admin/options-page-results-page-tab.php:50
1631
- msgid "Add New Results Page"
1632
  msgstr ""
1633
 
1634
- #: php/admin/options-page-results-page-tab.php:68
1635
- msgid ""
1636
- "Set conditions for when this page should be shown. Leave empty to set this "
1637
- "as the default page."
1638
  msgstr ""
1639
 
1640
- #: php/admin/options-page-results-page-tab.php:77
1641
- msgid "...Show"
1642
  msgstr ""
1643
 
1644
- #: php/admin/options-page-results-page-tab.php:78
1645
- msgid ""
1646
- "Create the results page that should be shown when the conditions are met."
1647
  msgstr ""
1648
 
1649
- #: php/admin/options-page-results-page-tab.php:81
1650
- msgid "Or, redirect the user by entering the URL below:"
1651
  msgstr ""
1652
 
1653
- #: php/admin/options-page-results-page-tab.php:129
1654
- msgid "X = Question ID Note: only supported for multiple choice answers"
1655
  msgstr ""
1656
 
1657
- #: php/admin/options-page-results-page-tab.php:130
1658
- msgid "Show result id"
1659
  msgstr ""
1660
 
1661
- #: php/admin/options-page-style-tab.php:18
1662
- msgid "Style"
1663
  msgstr ""
1664
 
1665
- #: php/admin/options-page-style-tab.php:44
1666
- msgid "The style has been saved successfully."
 
1667
  msgstr ""
1668
 
1669
- #: php/admin/options-page-style-tab.php:47
1670
- msgid "Error occured when trying to save the styles. Please try again."
1671
  msgstr ""
1672
 
1673
- #: php/admin/options-page-style-tab.php:71
1674
- msgid "Quiz Styles"
 
 
1675
  msgstr ""
1676
 
1677
- #: php/admin/options-page-style-tab.php:72
1678
- msgid "Choose your style:"
1679
  msgstr ""
1680
 
1681
- #: php/admin/options-page-style-tab.php:86
1682
- msgid "Custom"
1683
  msgstr ""
1684
 
1685
- #: php/admin/options-page-style-tab.php:91
1686
- #: php/admin/options-page-style-tab.php:102
1687
- msgid "Save Quiz Style"
1688
  msgstr ""
1689
 
1690
- #: php/admin/options-page-style-tab.php:93
1691
- msgid "Custom Style CSS"
1692
  msgstr ""
1693
 
1694
- #: php/admin/options-page-style-tab.php:94
1695
- msgid ""
1696
- "For help and guidance along with a list of different classes used in this "
1697
- "plugin, please visit the following link:"
1698
  msgstr ""
1699
 
1700
- #: php/admin/options-page-text-tab.php:12
1701
- msgid "Text"
1702
  msgstr ""
1703
 
1704
- #: php/admin/options-page-text-tab.php:50
1705
- msgid "Select Message"
1706
  msgstr ""
1707
 
1708
- #: php/admin/options-page-text-tab.php:64
1709
- msgid "Save Text Message"
1710
  msgstr ""
1711
 
1712
- #: php/admin/options-page-text-tab.php:77
1713
- msgid "Allowed Variables"
1714
  msgstr ""
1715
 
1716
- #: php/admin/options-page-text-tab.php:78
1717
- msgid "click to insert the variable"
1718
  msgstr ""
1719
 
1720
- #: php/admin/options-page-text-tab.php:102
1721
- msgid "Show all Variables"
 
1722
  msgstr ""
1723
 
1724
- #: php/admin/options-page-text-tab.php:108
1725
- #: php/admin/options-page-text-tab.php:111
1726
- msgid "Customize Labels"
1727
  msgstr ""
1728
 
1729
- #: php/admin/options-page-text-tab.php:141
1730
- msgid "Close"
1731
  msgstr ""
1732
 
1733
- #: php/admin/options-page-text-tab.php:158
1734
- msgid "Text id is missing."
1735
  msgstr ""
1736
 
1737
- #: php/admin/options-page-text-tab.php:208
1738
  msgid ""
1739
- "There has been an error in this action. Please share this with the developer"
 
1740
  msgstr ""
1741
 
1742
- #: php/admin/quiz-options-page.php:109 php/admin/quizzes-page.php:620
1743
- msgid "Post Settings"
1744
  msgstr ""
1745
 
1746
- #: php/admin/quiz-options-page.php:149
1747
- #: php/classes/class-qmn-alert-manager.php:41
1748
- msgid "Error!"
1749
  msgstr ""
1750
 
1751
- #: php/admin/quiz-options-page.php:149
1752
- msgid ""
1753
- "Please go to the quizzes page and click on the Edit link from the quiz you "
1754
- "wish to edit."
1755
  msgstr ""
1756
 
1757
- #: php/admin/quizzes-page.php:63
1758
- msgid "The stats has been reset successfully."
1759
  msgstr ""
1760
 
1761
- #: php/admin/quizzes-page.php:66
1762
- msgid "Error trying to reset stats. Please try again."
1763
  msgstr ""
1764
 
1765
- #: php/admin/quizzes-page.php:251
1766
- msgid "Your site is using PHP version"
1767
  msgstr ""
1768
 
1769
- #: php/admin/quizzes-page.php:251
1770
- msgid "Starting in QSM 6.0, your version of PHP will no longer be supported."
1771
  msgstr ""
1772
 
1773
- #: php/admin/quizzes-page.php:251
1774
- msgid "Click here to learn more about QSM's minimum PHP version change."
 
1775
  msgstr ""
1776
 
1777
- #: php/admin/quizzes-page.php:267
1778
- msgid "Search"
1779
  msgstr ""
1780
 
1781
- #: php/admin/quizzes-page.php:272 php/admin/quizzes-page.php:274
1782
- msgid "Import & Export"
1783
  msgstr ""
1784
 
1785
- #: php/admin/quizzes-page.php:280 php/admin/quizzes-page.php:442
1786
- msgid "Bulk Actions"
1787
  msgstr ""
1788
 
1789
- #: php/admin/quizzes-page.php:281 php/admin/quizzes-page.php:443
1790
- msgid "Delete Permanently"
1791
  msgstr ""
1792
 
1793
- #: php/admin/quizzes-page.php:283 php/admin/quizzes-page.php:445
1794
- msgid "Apply"
1795
  msgstr ""
1796
 
1797
- #: php/admin/quizzes-page.php:286 php/admin/quizzes-page.php:447
1798
- msgid "item"
1799
- msgid_plural "items"
1800
- msgstr[0] ""
1801
- msgstr[1] ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1802
 
1803
- #: php/admin/quizzes-page.php:296 php/admin/quizzes-page.php:457
1804
- msgid "Go to the first page"
1805
  msgstr ""
1806
 
1807
- #: php/admin/quizzes-page.php:297 php/admin/quizzes-page.php:458
1808
- msgid "Go to the previous page"
 
1809
  msgstr ""
1810
 
1811
- #: php/admin/quizzes-page.php:301 php/admin/quizzes-page.php:462
1812
- msgid "of"
1813
  msgstr ""
1814
 
1815
- #: php/admin/quizzes-page.php:308 php/admin/quizzes-page.php:469
1816
- msgid "Go to the next page"
 
 
 
 
 
 
 
 
 
 
1817
  msgstr ""
1818
 
1819
- #: php/admin/quizzes-page.php:309 php/admin/quizzes-page.php:470
1820
- msgid "Go to the last page"
1821
  msgstr ""
1822
 
1823
- #: php/admin/quizzes-page.php:348 php/admin/quizzes-page.php:424
1824
- msgid "Title"
1825
  msgstr ""
1826
 
1827
- #: php/admin/quizzes-page.php:352 php/admin/quizzes-page.php:428
1828
- #: php/admin/quizzes-page.php:581
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1829
  msgid "Shortcode"
1830
  msgstr ""
1831
 
1832
- #: php/admin/quizzes-page.php:353 php/admin/quizzes-page.php:429
 
 
 
 
1833
  msgid "Views"
1834
  msgstr ""
1835
 
1836
- #: php/admin/quizzes-page.php:354 php/admin/quizzes-page.php:399
1837
- #: php/admin/quizzes-page.php:430
1838
  msgid "Participants"
1839
  msgstr ""
1840
 
1841
- #: php/admin/quizzes-page.php:357 php/admin/quizzes-page.php:433
1842
  msgid "Last Modified"
1843
  msgstr ""
1844
 
1845
- #: php/admin/quizzes-page.php:376 php/admin/quizzes-page.php:619
1846
- msgid "Edit"
1847
  msgstr ""
1848
 
1849
- #: php/admin/quizzes-page.php:377 php/admin/quizzes-page.php:510
1850
- #: php/admin/quizzes-page.php:523 php/admin/quizzes-page.php:621
1851
- msgid "Duplicate"
1852
  msgstr ""
1853
 
1854
- #: php/admin/quizzes-page.php:378 php/admin/quizzes-page.php:535
1855
- #: php/admin/quizzes-page.php:550 php/admin/quizzes-page.php:622
1856
- msgid "Delete"
1857
  msgstr ""
1858
 
1859
- #: php/admin/quizzes-page.php:379
1860
  msgid "View Results"
1861
  msgstr ""
1862
 
1863
- #: php/admin/quizzes-page.php:380 php/admin/quizzes-page.php:623
1864
  msgid "Preview"
1865
  msgstr ""
1866
 
1867
- #: php/admin/quizzes-page.php:388 php/admin/quizzes-page.php:630
1868
- msgid "Click here"
1869
  msgstr ""
1870
 
1871
- #: php/admin/quizzes-page.php:393 php/admin/quizzes-page.php:635
1872
- msgid "Reset"
1873
  msgstr ""
1874
 
1875
- #: php/admin/quizzes-page.php:412
1876
- msgid "No Quiz found!"
1877
  msgstr ""
1878
 
1879
- #: php/admin/quizzes-page.php:484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1880
  msgid "Reset stats for this quiz?"
1881
  msgstr ""
1882
 
1883
- #: php/admin/quizzes-page.php:488
1884
  msgid ""
1885
  "Are you sure you want to reset the stats to 0? All views and taken stats for "
1886
  "this quiz will be reset. This is permanent and cannot be undone."
1887
  msgstr ""
1888
 
1889
- #: php/admin/quizzes-page.php:495
1890
  msgid "Reset All Stats For Quiz"
1891
  msgstr ""
1892
 
1893
- #: php/admin/quizzes-page.php:515
1894
  msgid "Duplicate questions also?"
1895
  msgstr ""
1896
 
1897
- #: php/admin/quizzes-page.php:517
1898
  msgid "Name Of New Quiz Or Survey:"
1899
  msgstr ""
1900
 
1901
- #: php/admin/quizzes-page.php:540
1902
  msgid "Are you sure you want to delete this quiz or survey?"
1903
  msgstr ""
1904
 
1905
- #: php/admin/quizzes-page.php:542
1906
  msgid "Delete question from question bank?"
1907
  msgstr ""
1908
 
1909
- #: php/admin/quizzes-page.php:562
1910
- msgid "Extend QSM"
1911
  msgstr ""
1912
 
1913
- #: php/admin/quizzes-page.php:566
1914
- msgid "Export functionality is provided as Premium addon."
1915
  msgstr ""
1916
 
1917
- #: php/admin/quizzes-page.php:569
1918
- msgid "Buy Now"
1919
  msgstr ""
1920
 
1921
- #: php/admin/quizzes-page.php:586
 
 
 
 
 
 
 
 
1922
  msgid "Embed Shortcode"
1923
  msgstr ""
1924
 
1925
- #: php/admin/quizzes-page.php:591
1926
  msgid "Link Shortcode"
1927
  msgstr ""
1928
 
1929
- #: php/admin/quizzes-page.php:604
1930
  msgid "You do not have any quizzes or surveys yet"
1931
  msgstr ""
1932
 
1933
- #: php/admin/quizzes-page.php:609
1934
  msgid "or watch the below video to get started"
1935
  msgstr ""
1936
 
1937
- #: php/admin/quizzes-page.php:660
1938
- msgid "Number of items per page:"
1939
- msgstr ""
1940
-
1941
- #: php/admin/settings-page.php:45
1942
  msgid "Main Settings"
1943
  msgstr ""
1944
 
1945
- #: php/admin/settings-page.php:46
1946
  msgid "Allow Usage Tracking?"
1947
  msgstr ""
1948
 
1949
- #: php/admin/settings-page.php:47
1950
  msgid "Disable collecting and storing IP addresses?"
1951
  msgstr ""
1952
 
1953
- #: php/admin/settings-page.php:48
1954
  msgid "Disable Quiz Posts From Being Searched?"
1955
  msgstr ""
1956
 
1957
- #: php/admin/settings-page.php:49
1958
  msgid "Disable Quiz Archive?"
1959
  msgstr ""
1960
 
1961
- #: php/admin/settings-page.php:50
1962
  msgid "Delete all the data related to QSM on deletion?"
1963
  msgstr ""
1964
 
1965
- #: php/admin/settings-page.php:51
1966
  msgid "Process emails in background?"
1967
  msgstr ""
1968
 
1969
- #: php/admin/settings-page.php:52
1970
  msgid "Quiz Url Slug"
1971
  msgstr ""
1972
 
1973
- #: php/admin/settings-page.php:53
1974
  msgid ""
1975
  "Post Type Plural Name (Shown in various places such as on archive pages)"
1976
  msgstr ""
1977
 
1978
- #: php/admin/settings-page.php:54
1979
  msgid "Facebook App Id"
1980
  msgstr ""
1981
 
1982
- #: php/admin/settings-page.php:55
1983
  msgid "From Name (The name emails come from)"
1984
  msgstr ""
1985
 
1986
- #: php/admin/settings-page.php:56
1987
  msgid "From Email (The email address that emails come from)"
1988
  msgstr ""
1989
 
1990
- #: php/admin/settings-page.php:57
1991
  msgid "Items per page in question bank pagination"
1992
  msgstr ""
1993
 
1994
- #: php/admin/settings-page.php:58
1995
  msgid "New Template For Admin Results Details"
1996
  msgstr ""
1997
 
1998
- #: php/admin/settings-page.php:59
1999
  msgid "Template For Admin Results Details"
2000
  msgstr ""
2001
 
2002
- #: php/admin/settings-page.php:71
2003
- msgid "These settings are applied to the entire plugin and all quizzes."
2004
  msgstr ""
2005
 
2006
- #: php/admin/settings-page.php:75
2007
- msgid " Settings have been updated!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2008
  msgstr ""
2009
 
2010
- #: php/admin/settings-page.php:326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2011
  msgid ""
2012
  "Allow Quiz And Survey Master to anonymously track this plugin's usage and "
2013
  "help us make this plugin better."
2014
  msgstr ""
2015
 
2016
- #: php/admin/settings-page.php:349
2017
  msgid ""
2018
  "You must not restrict number of quiz attempts when this option is enabled."
2019
  msgstr ""
2020
 
2021
- #: php/admin/settings-page.php:364
2022
  msgid "Global Settings"
2023
  msgstr ""
2024
 
2025
- #: php/admin/settings-page.php:389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2026
  msgid "New Template"
2027
  msgstr ""
2028
 
2029
- #: php/admin/settings-page.php:394
2030
  msgid "Old Template"
2031
  msgstr ""
2032
 
2033
- #: php/admin/stats-page.php:29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2034
  msgid "Quiz/Survey Statistics"
2035
  msgstr ""
2036
 
2037
- #: php/admin/stats-page.php:68
2038
  msgid "Quiz And Survey Submissions"
2039
  msgstr ""
2040
 
2041
- #: php/admin/stats-page.php:111
2042
  msgid "Daily"
2043
  msgstr ""
2044
 
2045
- #: php/admin/stats-page.php:112
2046
  msgid "Weekly"
2047
  msgstr ""
2048
 
2049
- #: php/admin/stats-page.php:113
2050
  msgid "Monthly"
2051
  msgstr ""
2052
 
2053
- #: php/admin/stats-page.php:116
2054
  msgid "Filter"
2055
  msgstr ""
2056
 
2057
- #: php/admin/tools-page.php:79
2058
  msgid "There has been an error! Please try again."
2059
  msgstr ""
2060
 
2061
- #: php/admin/tools-page.php:100
2062
  msgid "Quiz Has Been Restored!"
2063
  msgstr ""
2064
 
2065
- #: php/admin/tools-page.php:106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2066
  msgid ""
2067
- "Choose a quiz in the drop down and then click the button to restore a "
2068
- "deleted quiz."
2069
  msgstr ""
2070
 
2071
- #: php/admin/tools-page.php:117
2072
- msgid "Restore Quiz"
2073
  msgstr ""
2074
 
2075
- #: php/admin/tools-page.php:146
2076
- msgid "Total actions since QSM installed:"
2077
  msgstr ""
2078
 
2079
- #: php/admin/tools-page.php:154 php/admin/tools-page.php:176
2080
- #, php-format
2081
- msgid "Previous %s Audits"
2082
  msgstr ""
2083
 
2084
- #: php/admin/tools-page.php:160 php/admin/tools-page.php:168
2085
- #, php-format
2086
- msgid "Next %s Audits"
2087
  msgstr ""
2088
 
2089
- #: php/admin/tools-page.php:186
2090
- msgid "Action"
2091
  msgstr ""
2092
 
2093
- #: php/admin/tools-page.php:187
2094
- msgid "Time"
2095
  msgstr ""
2096
 
2097
- #: php/classes/class-qmn-alert-manager.php:37
2098
- msgid "Success!"
 
 
 
 
 
 
2099
  msgstr ""
2100
 
2101
- #: php/classes/class-qmn-quiz-creator.php:199
2102
  msgid ""
2103
  "Your new quiz or survey has been created successfully. To begin editing, "
2104
  "click the Edit link."
2105
  msgstr ""
2106
 
2107
- #: php/classes/class-qmn-quiz-creator.php:205
2108
- #: php/classes/class-qmn-quiz-creator.php:268
2109
- #: php/classes/class-qmn-quiz-creator.php:479
2110
- #: php/classes/class-qmn-quiz-creator.php:564
2111
- #, php-format
2112
  msgid ""
2113
  "There has been an error in this action. Please share this with the "
2114
- "developer. Error Code: %s"
 
 
 
 
2115
  msgstr ""
2116
 
2117
- #: php/classes/class-qmn-quiz-creator.php:263
2118
  msgid "Your quiz or survey has been deleted successfully."
2119
  msgstr ""
2120
 
2121
- #: php/classes/class-qmn-quiz-creator.php:300
 
 
 
 
 
 
2122
  msgid "The name of your quiz or survey has been updated successfully."
2123
  msgstr ""
2124
 
2125
- #: php/classes/class-qmn-quiz-creator.php:307
2126
  msgid ""
2127
  "An error occurred while trying to update the name of your quiz or survey. "
2128
  "Please try again."
2129
  msgstr ""
2130
 
2131
- #: php/classes/class-qmn-quiz-creator.php:473
 
 
 
 
2132
  msgid "Your quiz or survey has been duplicated successfully."
2133
  msgstr ""
2134
 
2135
- #: php/classes/class-qmn-quiz-manager.php:96
2136
- msgid "File is too large. File must be less than "
 
 
 
 
 
 
 
 
 
 
 
 
2137
  msgstr ""
2138
 
2139
- #: php/classes/class-qmn-quiz-manager.php:121
2140
- msgid "File not uploaded"
2141
  msgstr ""
2142
 
2143
- #: php/classes/class-qmn-quiz-manager.php:140
2144
  msgid "File uploaded successfully"
2145
  msgstr ""
2146
 
2147
- #: php/classes/class-qmn-quiz-manager.php:147
2148
- msgid "File type is not supported"
 
 
 
 
2149
  msgstr ""
2150
 
2151
- #: php/classes/class-qmn-quiz-manager.php:167
2152
  msgid "File removed successfully"
2153
  msgstr ""
2154
 
2155
- #: php/classes/class-qmn-quiz-manager.php:172
2156
  msgid "File not removed"
2157
  msgstr ""
2158
 
2159
- #: php/classes/class-qmn-quiz-manager.php:207
2160
  msgid "Correct Info: "
2161
  msgstr ""
2162
 
2163
- #: php/classes/class-qmn-quiz-manager.php:258
2164
- #: php/classes/class-qmn-quiz-manager.php:271
2165
  msgid "It appears that this quiz is not set up correctly"
2166
  msgstr ""
2167
 
2168
- #: php/classes/class-qmn-quiz-manager.php:568
 
 
 
 
 
2169
  msgid "Limit of choice is reached."
2170
  msgstr ""
2171
 
2172
- #: php/classes/class-qmn-quiz-manager.php:568
2173
- #: php/classes/class-qmn-quiz-manager.php:792
2174
- #: php/classes/class-qmn-quiz-manager.php:960
2175
  msgid " out of "
2176
  msgstr ""
2177
 
2178
- #: php/classes/class-qmn-quiz-manager.php:1277
2179
- #: php/classes/class-qsm-install.php:548
2180
- msgid "Retake Quiz"
2181
  msgstr ""
2182
 
2183
- #: php/classes/class-qmn-quiz-manager.php:1328
2184
- msgid "Captcha verification failed."
2185
  msgstr ""
2186
 
2187
- #: php/classes/class-qmn-quiz-manager.php:1444
2188
- msgid "Click here to view"
2189
  msgstr ""
2190
 
2191
- #: php/classes/class-qmn-quiz-manager.php:1909
2192
  msgid "Not collected"
2193
  msgstr ""
2194
 
2195
- #: php/classes/class-qmn-quiz-manager.php:1919
2196
  msgid "Unknown"
2197
  msgstr ""
2198
 
2199
- #: php/classes/class-qmn-review-message.php:91
 
 
 
 
2200
  #, php-format
2201
  msgid ""
2202
- "Greetings! I just noticed that you now have more than %d quiz results. That "
2203
- "is\n"
2204
- "\t\tawesome! Could you please help me out by giving this plugin a 5-star "
2205
- "rating on WordPress? This\n"
2206
- "\t\twill help us by helping other users discover this plugin. %s"
2207
  msgstr ""
2208
 
2209
- #: php/classes/class-qmn-review-message.php:97
2210
- msgid "Yeah, you deserve it!"
2211
  msgstr ""
2212
 
2213
- #: php/classes/class-qmn-review-message.php:98
2214
- msgid "I already did!"
2215
  msgstr ""
2216
 
2217
- #: php/classes/class-qmn-review-message.php:99
2218
  msgid "No, this plugin is not good enough"
2219
  msgstr ""
2220
 
2221
- #: php/classes/class-qsm-fields.php:63
2222
  msgid "The settings has been updated successfully."
2223
  msgstr ""
2224
 
2225
- #: php/classes/class-qsm-fields.php:66
2226
  msgid "There was an error when updating the settings. Please try again."
2227
  msgstr ""
2228
 
2229
- #: php/classes/class-qsm-fields.php:81 php/classes/class-qsm-fields.php:109
2230
- msgid "Save Changes"
 
2231
  msgstr ""
2232
 
2233
- #: php/classes/class-qsm-fields.php:225
2234
- msgid "Allowed Variables:"
2235
  msgstr ""
2236
 
2237
- #: php/classes/class-qsm-install.php:47
2238
- msgid "Quiz Type"
2239
  msgstr ""
2240
 
2241
- #: php/classes/class-qsm-install.php:59
2242
- msgid "Simple Form"
2243
  msgstr ""
2244
 
2245
- #: php/classes/class-qsm-install.php:70
2246
- msgid "Grading System"
 
 
 
 
2247
  msgstr ""
2248
 
2249
- #: php/classes/class-qsm-install.php:74
 
 
 
 
 
 
 
 
2250
  msgid "Correct/Incorrect"
2251
  msgstr ""
2252
 
2253
- #: php/classes/class-qsm-install.php:82
2254
  msgid "Both"
2255
  msgstr ""
2256
 
2257
- #: php/classes/class-qsm-install.php:87
2258
  msgid "Select the system for grading the quiz."
2259
  msgstr ""
2260
 
2261
- #: php/classes/class-qsm-install.php:88
2262
  msgid "To know more about our grading systems please "
2263
  msgstr ""
2264
 
2265
- #: php/classes/class-qsm-install.php:88
2266
  msgid "read the documentation."
2267
  msgstr ""
2268
 
2269
- #: php/classes/class-qsm-install.php:96
2270
- msgid "Allow Score Round-off"
2271
  msgstr ""
2272
 
2273
- #: php/classes/class-qsm-install.php:111
2274
- msgid "Show progress bar"
2275
  msgstr ""
2276
 
2277
- #: php/classes/class-qsm-install.php:130
2278
- msgid "Require User Login"
2279
  msgstr ""
2280
 
2281
- #: php/classes/class-qsm-install.php:143
2282
  msgid "Enabling this allows only logged in users to take the quiz"
2283
  msgstr ""
2284
 
2285
- #: php/classes/class-qsm-install.php:150
2286
- msgid "Questions Per Page"
2287
- msgstr ""
2288
-
2289
- #: php/classes/class-qsm-install.php:156
2290
  msgid "Override the default pagination created on questions tab"
2291
  msgstr ""
2292
 
2293
- #: php/classes/class-qsm-install.php:163
2294
- msgid "Time Limit (in minutes)"
2295
- msgstr ""
2296
-
2297
- #: php/classes/class-qsm-install.php:169
2298
  msgid "Leave 0 for no time limit"
2299
  msgstr ""
2300
 
2301
- #: php/classes/class-qsm-install.php:176
2302
- msgid "Force submit after timer expiry"
2303
- msgstr ""
2304
-
2305
- #: php/classes/class-qsm-install.php:194
2306
- msgid "Skip validations when time expire"
2307
- msgstr ""
2308
-
2309
- #: php/classes/class-qsm-install.php:213
2310
- msgid "Limit Attempts"
2311
- msgstr ""
2312
-
2313
- #: php/classes/class-qsm-install.php:219
2314
  msgid "Leave 0 for unlimited attempts"
2315
  msgstr ""
2316
 
2317
- #: php/classes/class-qsm-install.php:220
2318
  msgid "Limits how many times a user can take the quiz"
2319
  msgstr ""
2320
 
2321
- #: php/classes/class-qsm-install.php:227
2322
- msgid "Limit Entries"
2323
- msgstr ""
2324
-
2325
- #: php/classes/class-qsm-install.php:233
2326
  msgid "Leave 0 for unlimited entries"
2327
  msgstr ""
2328
 
2329
- #: php/classes/class-qsm-install.php:234
2330
  msgid "Limits how many users can take the quiz."
2331
  msgstr ""
2332
 
2333
- #: php/classes/class-qsm-install.php:241
2334
- msgid "Limit number of Questions"
2335
- msgstr ""
2336
-
2337
- #: php/classes/class-qsm-install.php:247
2338
  msgid "Leave 0 to load all questions"
2339
  msgstr ""
2340
 
2341
- #: php/classes/class-qsm-install.php:248
2342
  msgid "Show only limited number of questions from your quiz."
2343
  msgstr ""
2344
 
2345
- #: php/classes/class-qsm-install.php:255
2346
- msgid "Quiz Dates"
2347
- msgstr ""
2348
-
2349
- #: php/classes/class-qsm-install.php:262
2350
- msgid "Start Date"
2351
- msgstr ""
2352
-
2353
- #: php/classes/class-qsm-install.php:263
2354
- msgid "If set, Quiz will be accessible only after this date"
2355
- msgstr ""
2356
-
2357
- #: php/classes/class-qsm-install.php:264
2358
- msgid "Leave blank for no date limit"
2359
  msgstr ""
2360
 
2361
- #: php/classes/class-qsm-install.php:277
2362
- msgid " If set, Quiz will not be accessible after this date"
 
 
2363
  msgstr ""
2364
 
2365
- #: php/classes/class-qsm-install.php:278
2366
- msgid "End Date"
 
 
2367
  msgstr ""
2368
 
2369
- #: php/classes/class-qsm-install.php:285 php/classes/class-qsm-install.php:289
2370
- msgid "Random Questions"
2371
  msgstr ""
2372
 
2373
- #: php/classes/class-qsm-install.php:293
2374
- msgid "Random Questions And Answers"
2375
  msgstr ""
2376
 
2377
- #: php/classes/class-qsm-install.php:297
2378
- msgid "Random Answers"
2379
  msgstr ""
2380
 
2381
- #: php/classes/class-qsm-install.php:301
2382
- msgid "Disabled"
2383
  msgstr ""
2384
 
2385
- #: php/classes/class-qsm-install.php:306
2386
- msgid "Randomize the order of questions or answers every time a quiz loads"
2387
  msgstr ""
2388
 
2389
- #: php/classes/class-qsm-install.php:313
2390
- msgid "Random Questions Categories"
2391
  msgstr ""
2392
 
2393
- #: php/classes/class-qsm-install.php:316
2394
- msgid "Questions will load only from selected categories"
2395
  msgstr ""
2396
 
2397
- #: php/classes/class-qsm-install.php:323
2398
- msgid "Contact form position"
2399
  msgstr ""
2400
 
2401
- #: php/classes/class-qsm-install.php:327
2402
  msgid "Show before quiz begins"
2403
  msgstr ""
2404
 
2405
- #: php/classes/class-qsm-install.php:331
2406
  msgid "Show after the quiz ends"
2407
  msgstr ""
2408
 
2409
- #: php/classes/class-qsm-install.php:336
2410
  msgid "Select when to display the contact form"
2411
  msgstr ""
2412
 
2413
- #: php/classes/class-qsm-install.php:337
2414
  msgid "The form can be configured in Contact tab"
2415
  msgstr ""
2416
 
2417
- #: php/classes/class-qsm-install.php:344
2418
- msgid "Show contact form to logged in users"
2419
- msgstr ""
2420
-
2421
- #: php/classes/class-qsm-install.php:357
2422
  msgid "Logged in users can edit their contact information"
2423
  msgstr ""
2424
 
2425
- #: php/classes/class-qsm-install.php:358
2426
  msgid "The information will still get saved if this option is disabled"
2427
  msgstr ""
2428
 
2429
- #: php/classes/class-qsm-install.php:365
2430
- msgid "Enable comments"
2431
- msgstr ""
2432
-
2433
- #: php/classes/class-qsm-install.php:378
2434
  msgid "Allow users to enter their comments after the quiz"
2435
  msgstr ""
2436
 
2437
- #: php/classes/class-qsm-install.php:385
2438
- msgid "Show question numbers"
2439
- msgstr ""
2440
-
2441
- #: php/classes/class-qsm-install.php:404
2442
- msgid "Save Responses"
2443
- msgstr ""
2444
-
2445
- #: php/classes/class-qsm-install.php:417
2446
- msgid "The results will be permanently stored in a database"
2447
- msgstr ""
2448
-
2449
- #: php/classes/class-qsm-install.php:424
2450
- msgid "Disable change of answers"
2451
  msgstr ""
2452
 
2453
- #: php/classes/class-qsm-install.php:437 php/classes/class-qsm-install.php:458
2454
  msgid "Works with multiple choice questions only"
2455
  msgstr ""
2456
 
2457
- #: php/classes/class-qsm-install.php:438
2458
  msgid "The question will be disabled once an answer is selected"
2459
  msgstr ""
2460
 
2461
- #: php/classes/class-qsm-install.php:445
2462
- msgid "Add class for correct/incorrect answers"
2463
- msgstr ""
2464
-
2465
- #: php/classes/class-qsm-install.php:459
2466
  msgid ""
2467
  "Dynamically add class for incorrect/correct answer after user selects answer."
2468
  msgstr ""
2469
 
2470
- #: php/classes/class-qsm-install.php:466
2471
- msgid "Disable auto fill for contact input"
2472
- msgstr ""
2473
-
2474
- #: php/classes/class-qsm-install.php:485
2475
- msgid "Display category name on front end"
2476
- msgstr ""
2477
-
2478
- #: php/classes/class-qsm-install.php:504
2479
- msgid "Show results inline"
2480
- msgstr ""
2481
-
2482
- #: php/classes/class-qsm-install.php:517
2483
  msgid "Instantly displays the result for each question"
2484
  msgstr ""
2485
 
2486
- #: php/classes/class-qsm-install.php:524
2487
- msgid "Show correct answer inline"
 
 
 
2488
  msgstr ""
2489
 
2490
- #: php/classes/class-qsm-install.php:528
2491
  msgid "Yes When answer is correct"
2492
  msgstr ""
2493
 
2494
- #: php/classes/class-qsm-install.php:532
2495
  msgid "Yes Independent of correct/incorrect"
2496
  msgstr ""
2497
 
2498
- #: php/classes/class-qsm-install.php:541
2499
  msgid "Show correct user info when inline result is enabled."
2500
  msgstr ""
2501
 
2502
- #: php/classes/class-qsm-install.php:561
2503
  msgid "Show a button on result page to retake the quiz"
2504
  msgstr ""
2505
 
2506
- #: php/classes/class-qsm-install.php:568
2507
- msgid "Show current page number"
2508
- msgstr ""
2509
-
2510
- #: php/classes/class-qsm-install.php:587
2511
- msgid "Deselect Answer"
2512
- msgstr ""
2513
-
2514
- #: php/classes/class-qsm-install.php:600
2515
  msgid ""
2516
  "Users are able deselect an answer and leave it blank. Works with Multiple "
2517
  "Choice and Horizintal Multiple Choice questions only"
2518
  msgstr ""
2519
 
2520
- #: php/classes/class-qsm-install.php:607
2521
- msgid "Disable description on quiz result page?"
2522
- msgstr ""
2523
-
2524
- #: php/classes/class-qsm-install.php:626
2525
- msgid "Disable scroll on next and previous button click?"
2526
- msgstr ""
2527
-
2528
- #: php/classes/class-qsm-install.php:645
2529
- msgid "Quiz Animation"
2530
- msgstr ""
2531
-
2532
- #: php/classes/class-qsm-install.php:649
2533
- msgid "bounce"
2534
- msgstr ""
2535
-
2536
- #: php/classes/class-qsm-install.php:653
2537
- msgid "flash"
2538
- msgstr ""
2539
-
2540
- #: php/classes/class-qsm-install.php:657
2541
- msgid "pulse"
2542
- msgstr ""
2543
-
2544
- #: php/classes/class-qsm-install.php:661
2545
- msgid "rubberBand"
2546
- msgstr ""
2547
-
2548
- #: php/classes/class-qsm-install.php:665
2549
- msgid "shake"
2550
- msgstr ""
2551
-
2552
- #: php/classes/class-qsm-install.php:669
2553
- msgid "swing"
2554
- msgstr ""
2555
-
2556
- #: php/classes/class-qsm-install.php:673
2557
- msgid "tada"
2558
- msgstr ""
2559
-
2560
- #: php/classes/class-qsm-install.php:677
2561
- msgid "wobble"
2562
- msgstr ""
2563
-
2564
- #: php/classes/class-qsm-install.php:681
2565
- msgid "jello"
2566
- msgstr ""
2567
-
2568
- #: php/classes/class-qsm-install.php:685
2569
- msgid "heartBeat"
2570
- msgstr ""
2571
-
2572
- #: php/classes/class-qsm-install.php:689
2573
- msgid "No animation"
2574
  msgstr ""
2575
 
2576
- #: php/classes/class-qsm-install.php:700
2577
- msgid "Logo URL"
2578
  msgstr ""
2579
 
2580
- #: php/classes/class-qsm-install.php:703
2581
  msgid ""
2582
  "Enter the url of an image which will be used as logo while sharing on "
2583
  "facebook."
2584
  msgstr ""
2585
 
2586
- #: php/classes/class-qsm-install.php:704
2587
  msgid "If left blank, this will default to QSM logo"
2588
  msgstr ""
2589
 
2590
- #: php/classes/class-qsm-install.php:711
2591
- #: php/classes/class-qsm-install.php:1139
2592
- msgid "Show Legacy Options"
2593
- msgstr ""
2594
-
2595
- #: php/classes/class-qsm-install.php:714
2596
- #: php/classes/class-qsm-install.php:1142
2597
- msgid ""
2598
- "All the legacy options are deprecated and will be removed in upcoming version"
2599
  msgstr ""
2600
 
2601
- #: php/classes/class-qsm-install.php:722
2602
  msgid "Social Sharing Buttons"
2603
  msgstr ""
2604
 
2605
- #: php/classes/class-qsm-install.php:735
2606
  msgid ""
2607
  "Please use the new template variables instead.%FACEBOOK_SHARE% %TWITTER_SHARE"
2608
  "%"
2609
  msgstr ""
2610
 
2611
- #: php/classes/class-qsm-install.php:742
2612
  msgid "Ask user's name"
2613
  msgstr ""
2614
 
2615
- #: php/classes/class-qsm-install.php:754 php/classes/class-qsm-install.php:778
2616
- #: php/classes/class-qsm-install.php:801 php/classes/class-qsm-install.php:824
2617
  msgid "Require"
2618
  msgstr ""
2619
 
2620
- #: php/classes/class-qsm-install.php:766
2621
  msgid "Ask user's business"
2622
  msgstr ""
2623
 
2624
- #: php/classes/class-qsm-install.php:789
2625
  msgid "Ask user's email"
2626
  msgstr ""
2627
 
2628
- #: php/classes/class-qsm-install.php:812
2629
  msgid "Ask user's phone"
2630
  msgstr ""
2631
 
2632
- #: php/classes/class-qsm-install.php:835
2633
  msgid "Message Displayed Before Quiz"
2634
  msgstr ""
2635
 
2636
- #: php/classes/class-qsm-install.php:849
2637
  msgid "Message Displayed Before Comments Box If Enabled"
2638
  msgstr ""
2639
 
2640
- #: php/classes/class-qsm-install.php:863
2641
  msgid "Message Displayed At End Of Quiz (Leave Blank To Omit Text Section)"
2642
  msgstr ""
2643
 
2644
- #: php/classes/class-qsm-install.php:877
2645
  msgid "Message Displayed If User Has Tried Quiz Too Many Times"
2646
  msgstr ""
2647
 
2648
- #: php/classes/class-qsm-install.php:891
2649
  msgid ""
2650
  "Message Displayed If User Is Not Logged In And Quiz Requires Users To Be "
2651
  "Logged In"
2652
  msgstr ""
2653
 
2654
- #: php/classes/class-qsm-install.php:905
2655
  msgid "Message Displayed If Date Is Outside Scheduled Timeframe"
2656
  msgstr ""
2657
 
2658
- #: php/classes/class-qsm-install.php:919
2659
  msgid "Message Displayed If The Limit Of Total Entries Has Been Reached"
2660
  msgstr ""
2661
 
2662
- #: php/classes/class-qsm-install.php:933
2663
  msgid "Results Page %QUESTIONS_ANSWERS% Text"
2664
  msgstr ""
2665
 
2666
- #: php/classes/class-qsm-install.php:952
2667
  msgid "%QUESTIONS_ANSWERS_EMAIL% Text"
2668
  msgstr ""
2669
 
2670
- #: php/classes/class-qsm-install.php:970
2671
  msgid "Twitter Sharing Text"
2672
  msgstr ""
2673
 
2674
- #: php/classes/class-qsm-install.php:991
2675
  msgid "Facebook Sharing Text"
2676
  msgstr ""
2677
 
2678
- #: php/classes/class-qsm-install.php:1012
2679
- msgid "Buttons"
2680
  msgstr ""
2681
 
2682
- #: php/classes/class-qsm-install.php:1020
2683
- msgid "Submit Button"
2684
  msgstr ""
2685
 
2686
- #: php/classes/class-qsm-install.php:1029
2687
  msgid "Previous button"
2688
  msgstr ""
2689
 
2690
- #: php/classes/class-qsm-install.php:1038
2691
  msgid "Next button"
2692
  msgstr ""
2693
 
2694
- #: php/classes/class-qsm-install.php:1047
2695
- msgid "Validation Messages"
2696
  msgstr ""
2697
 
2698
- #: php/classes/class-qsm-install.php:1056
2699
- msgid "All required fields"
2700
  msgstr ""
2701
 
2702
- #: php/classes/class-qsm-install.php:1065
2703
  msgid "Invalid email"
2704
  msgstr ""
2705
 
2706
- #: php/classes/class-qsm-install.php:1074
 
 
 
 
2707
  msgid "Invalid number"
2708
  msgstr ""
2709
 
2710
- #: php/classes/class-qsm-install.php:1083
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2711
  msgid "Invalid Captcha"
2712
  msgstr ""
2713
 
2714
- #: php/classes/class-qsm-install.php:1092
2715
- msgid "Other"
2716
  msgstr ""
2717
 
2718
- #: php/classes/class-qsm-install.php:1101
2719
  msgid "Comments field"
2720
  msgstr ""
2721
 
2722
- #: php/classes/class-qsm-install.php:1110
2723
- msgid "Hint Text"
2724
  msgstr ""
2725
 
2726
- #: php/classes/class-qsm-install.php:1119
2727
- msgid "Correct answer message"
2728
  msgstr ""
2729
 
2730
- #: php/classes/class-qsm-install.php:1122
2731
  msgid "Text to show when the selected option is correct answer."
2732
  msgstr ""
2733
 
2734
- #: php/classes/class-qsm-install.php:1129
2735
  msgid "Incorrect answer message"
2736
  msgstr ""
2737
 
2738
- #: php/classes/class-qsm-install.php:1132
 
 
 
 
2739
  msgid "Text to show when the selected option is wrong answer."
2740
  msgstr ""
2741
 
2742
- #: php/classes/class-qsm-install.php:1150
 
 
 
 
 
 
 
 
2743
  msgid "Name field"
2744
  msgstr ""
2745
 
2746
- #: php/classes/class-qsm-install.php:1159
2747
  msgid "Business field"
2748
  msgstr ""
2749
 
2750
- #: php/classes/class-qsm-install.php:1168
2751
  msgid "Email field"
2752
  msgstr ""
2753
 
2754
- #: php/classes/class-qsm-install.php:1177
2755
  msgid "Phone number field"
2756
  msgstr ""
2757
 
2758
- #: php/classes/class-qsm-install.php:1801
2759
  msgid "Documentation"
2760
  msgstr ""
2761
 
2762
- #: php/classes/class-qsm-install.php:1802
2763
  msgid "Create Support Ticket"
2764
  msgstr ""
2765
 
2766
- #: php/classes/class-qsm-install.php:1802
2767
  msgid "Support"
2768
  msgstr ""
2769
 
2770
- #: php/classes/class-qsm-settings.php:323
2771
  msgid "Previous"
2772
  msgstr ""
2773
 
2774
- #: php/classes/class-qsm-settings.php:324
2775
- msgid "Next"
2776
- msgstr ""
2777
-
2778
  #: php/classes/class-qsm-tracking.php:195
2779
  msgid ""
2780
  "Allow Quiz And Survey Master to track this plugin's usage and help us make "
@@ -2801,21 +3871,15 @@ msgstr ""
2801
  msgid "Do not allow"
2802
  msgstr ""
2803
 
2804
- #: php/classes/lib/wp-background-process.php:423
2805
  #, php-format
2806
  msgid "Every %d Minutes"
2807
  msgstr ""
2808
 
2809
- #: php/shortcodes.php:250
2810
- msgid "Time is Up!"
2811
- msgstr ""
2812
-
2813
- #: php/shortcodes.php:250
2814
- #, php-format
2815
- msgid "Time's up"
2816
  msgstr ""
2817
 
2818
- #: php/shortcodes.php:252
2819
- #, php-format
2820
- msgid "Submit Quiz"
2821
  msgstr ""
1
  # SOME DESCRIPTIVE TITLE.
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
  # This file is distributed under the same license as the PACKAGE package.
4
+
 
 
 
5
  msgid ""
6
  msgstr ""
7
+ "Project-Id-Version: QSM 8.0.3\n"
8
  "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2022-07-20 17:38+0530\n"
10
+ "PO-Revision-Date: 2022-07-20 17:47+0500\n"
11
+ "Last-Translator: \n"
12
+ "Language-Team: \n"
13
  "Language: \n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=CHARSET\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
18
 
19
+ #: mlw_quizmaster2.php:360
20
+ msgid "Error"
21
+ msgstr ""
22
+
23
+ #: mlw_quizmaster2.php:361
24
+ msgid "Success"
25
+ msgstr ""
26
+
27
+ #: mlw_quizmaster2.php:362 mlw_quizmaster2.php:512
28
+ msgid "Category"
29
+ msgstr ""
30
+
31
+ #: mlw_quizmaster2.php:363
32
+ msgid "Please try again"
33
+ msgstr ""
34
+
35
+ #: mlw_quizmaster2.php:364
36
+ msgid "already exists in database"
37
+ msgstr ""
38
+
39
+ #: mlw_quizmaster2.php:365 php/admin/quiz-options-page.php:251
40
+ msgid "Are you sure?"
41
+ msgstr ""
42
+
43
+ #: mlw_quizmaster2.php:366
44
+ msgid "Error to delete the result!"
45
+ msgstr ""
46
+
47
+ #: mlw_quizmaster2.php:367
48
+ msgid "Copied!"
49
+ msgstr ""
50
+
51
+ #: mlw_quizmaster2.php:368 php/admin/functions.php:695
52
+ #: php/admin/options-page-style-tab.php:177
53
+ msgid "Set Featured Image"
54
+ msgstr ""
55
+
56
+ #: mlw_quizmaster2.php:369
57
+ msgid "Set Background Image"
58
+ msgstr ""
59
+
60
+ #: mlw_quizmaster2.php:370
61
+ msgid "Insert Image"
62
+ msgstr ""
63
+
64
+ #: mlw_quizmaster2.php:371 php/admin/options-page-questions-tab.php:611
65
+ msgid "Upload Image"
66
+ msgstr ""
67
+
68
+ #: mlw_quizmaster2.php:372
69
+ msgid "Use this image"
70
+ msgstr ""
71
+
72
+ #: mlw_quizmaster2.php:373
73
+ msgid "Updating database"
74
+ msgstr ""
75
+
76
+ #: mlw_quizmaster2.php:374
77
+ msgid "Database updated successfully."
78
+ msgstr ""
79
+
80
+ #: mlw_quizmaster2.php:375
81
+ msgid "Quiz Submissions"
82
+ msgstr ""
83
+
84
+ #: mlw_quizmaster2.php:376
85
+ msgid "Saving contact fields..."
86
+ msgstr ""
87
+
88
+ #: mlw_quizmaster2.php:377
89
+ msgid "Your contact fields have been saved!"
90
+ msgstr ""
91
+
92
+ #: mlw_quizmaster2.php:378
93
+ msgid "There was an error encountered when saving your contact fields."
94
+ msgstr ""
95
+
96
+ #: mlw_quizmaster2.php:379 mlw_quizmaster2.php:382
97
+ msgid "Saving emails..."
98
+ msgstr ""
99
+
100
+ #: mlw_quizmaster2.php:380
101
+ msgid "Emails were saved!"
102
+ msgstr ""
103
+
104
+ #: mlw_quizmaster2.php:381
105
+ msgid "There was an error when saving the emails."
106
+ msgstr ""
107
+
108
+ #: mlw_quizmaster2.php:383
109
+ msgid "Saving results pages..."
110
+ msgstr ""
111
+
112
+ #: mlw_quizmaster2.php:384
113
+ msgid "Results pages were saved!"
114
+ msgstr ""
115
+
116
+ #: mlw_quizmaster2.php:385
117
+ msgid "There was an error when saving the results pages."
118
+ msgstr ""
119
+
120
+ #: mlw_quizmaster2.php:386 mlw_quizmaster2.php:513
121
+ #: php/admin/options-page-questions-tab.php:175
122
+ msgid "All Categories"
123
+ msgstr ""
124
+
125
+ #: mlw_quizmaster2.php:387 php/admin/options-page-questions-tab.php:1076
126
+ msgid "Add Question"
127
+ msgstr ""
128
+
129
+ #: mlw_quizmaster2.php:388
130
+ msgid "Question created!"
131
+ msgstr ""
132
+
133
+ #: mlw_quizmaster2.php:389
134
+ msgid "Your new question!"
135
+ msgstr ""
136
+
137
+ #: mlw_quizmaster2.php:390
138
+ msgid "Adding question..."
139
+ msgstr ""
140
+
141
+ #: mlw_quizmaster2.php:391
142
+ msgid "Creating question..."
143
+ msgstr ""
144
+
145
+ #: mlw_quizmaster2.php:392
146
+ msgid "Duplicating question..."
147
+ msgstr ""
148
+
149
+ #: mlw_quizmaster2.php:393
150
+ msgid "Saving question..."
151
+ msgstr ""
152
+
153
+ #: mlw_quizmaster2.php:394
154
+ msgid "Question was saved!"
155
+ msgstr ""
156
+
157
+ #: mlw_quizmaster2.php:395
158
+ msgid "Loading questions..."
159
+ msgstr ""
160
+
161
+ #: mlw_quizmaster2.php:396
162
+ msgid "No question is selected."
163
+ msgstr ""
164
+
165
+ #: mlw_quizmaster2.php:397
166
+ msgid "All answer will be reset, Do you want to still continue?"
167
+ msgstr ""
168
+
169
+ #: mlw_quizmaster2.php:398 php/admin/options-page-questions-tab.php:1099
170
+ msgid "Your answer"
171
+ msgstr ""
172
+
173
+ #: mlw_quizmaster2.php:399 php/admin/options-page-questions-tab.php:1095
174
+ msgid "Insert image URL"
175
+ msgstr ""
176
+
177
+ #: mlw_quizmaster2.php:400
178
+ msgid "Saving page info"
179
+ msgstr ""
180
+
181
+ #: mlw_quizmaster2.php:401
182
+ msgid "Saving pages and questions..."
183
+ msgstr ""
184
+
185
+ #: mlw_quizmaster2.php:402
186
+ msgid "Questions and pages were saved!"
187
+ msgstr ""
188
+
189
+ #: mlw_quizmaster2.php:403
190
+ msgid "you want to import this question again?"
191
+ msgstr ""
192
+
193
+ #: mlw_quizmaster2.php:404
194
+ msgid "Enter Question title or description"
195
+ msgstr ""
196
+
197
+ #: mlw_quizmaster2.php:405
198
+ msgid "Page Name is required!"
199
+ msgstr ""
200
+
201
+ #: mlw_quizmaster2.php:406
202
+ msgid "Please use only Alphanumeric characters."
203
+ msgstr ""
204
+
205
+ #: mlw_quizmaster2.php:407
206
+ msgid "Left range and right range should be different"
207
+ msgstr ""
208
+
209
+ #: mlw_quizmaster2.php:408
210
+ msgid "Range fields are required!"
211
+ msgstr ""
212
+
213
+ #: mlw_quizmaster2.php:409 php/admin/admin-results-page.php:302
214
+ #: php/admin/admin-results-page.php:406 php/admin/admin-results-page.php:408
215
+ #: php/classes/class-qsm-install.php:80
216
+ msgid "Points"
217
+ msgstr ""
218
+
219
+ #: mlw_quizmaster2.php:410
220
+ msgid "Left Label"
221
+ msgstr ""
222
+
223
+ #: mlw_quizmaster2.php:411
224
+ msgid "Right Label"
225
+ msgstr ""
226
+
227
+ #: mlw_quizmaster2.php:412
228
+ msgid "Left Range"
229
+ msgstr ""
230
+
231
+ #: mlw_quizmaster2.php:413
232
+ msgid "Right Range"
233
+ msgstr ""
234
+
235
+ #: mlw_quizmaster2.php:414
236
+ msgid "Text/HTML Section cannot be empty"
237
+ msgstr ""
238
+
239
+ #: mlw_quizmaster2.php:415
240
+ msgid ""
241
+ "Number of <strong>%BLANK%</strong> should be equal to options for sequential "
242
+ "matching"
243
+ msgstr ""
244
+
245
+ #: mlw_quizmaster2.php:416
246
+ msgid "Atleast one <strong>%BLANK%</strong> and one option is required."
247
+ msgstr ""
248
+
249
+ #: mlw_quizmaster2.php:417
250
+ msgid "You can not add more than 2 answer for Polar Question type"
251
+ msgstr ""
252
+
253
+ #: mlw_quizmaster2.php:418
254
+ msgid "Hide advance options «"
255
+ msgstr ""
256
+
257
+ #: mlw_quizmaster2.php:419
258
+ msgid "Show advance options »"
259
+ msgstr ""
260
+
261
+ #: mlw_quizmaster2.php:420
262
+ msgid "Category cannot be empty"
263
+ msgstr ""
264
+
265
+ #: mlw_quizmaster2.php:422
266
+ msgid "Please fill in your name and email."
267
+ msgstr ""
268
+
269
+ #: mlw_quizmaster2.php:423
270
+ msgid "Your email address is invalid."
271
+ msgstr ""
272
+
273
+ #: mlw_quizmaster2.php:424
274
+ msgid "Your list ID is invalid."
275
+ msgstr ""
276
+
277
+ #: mlw_quizmaster2.php:425
278
+ msgid "You're already subscribed!"
279
+ msgstr ""
280
+
281
+ #: mlw_quizmaster2.php:426
282
+ msgid "Thanks, you are now subscribed to our mailing list!"
283
+ msgstr ""
284
+
285
+ #: mlw_quizmaster2.php:427
286
+ msgid "Sorry, unable to subscribe. Please try again later!"
287
+ msgstr ""
288
+
289
+ #: mlw_quizmaster2.php:447 mlw_quizmaster2.php:480
290
+ #: php/admin/quizzes-page.php:279 php/admin/settings-page.php:336
291
+ #: php/classes/class-qsm-install.php:2060
292
  msgid "Quizzes & Surveys"
293
  msgstr ""
294
 
295
+ #: mlw_quizmaster2.php:472 mlw_quizmaster2.php:473 mlw_quizmaster2.php:474
296
+ #: php/admin/options-page-email-tab.php:185
297
+ #: php/admin/options-page-results-page-tab.php:166
298
+ #: php/classes/class-qsm-install.php:52
299
  msgid "Quiz"
300
  msgstr ""
301
 
302
+ #: mlw_quizmaster2.php:475 php/admin/quizzes-page.php:280
303
  msgid "Add New"
304
  msgstr ""
305
 
306
+ #: mlw_quizmaster2.php:476
307
  msgid "Add New Quiz"
308
  msgstr ""
309
 
310
+ #: mlw_quizmaster2.php:477
311
  msgid "New Quiz"
312
  msgstr ""
313
 
314
+ #: mlw_quizmaster2.php:478 mlw_quizmaster2.php:688
315
  msgid "Edit Quiz"
316
  msgstr ""
317
 
318
+ #: mlw_quizmaster2.php:479 php/admin/quiz-options-page.php:122
319
  msgid "View Quiz"
320
  msgstr ""
321
 
322
+ #: mlw_quizmaster2.php:481
 
 
 
 
323
  msgid "Search Quizzes"
324
  msgstr ""
325
 
326
+ #: mlw_quizmaster2.php:482
327
  msgid "Parent Quiz:"
328
  msgstr ""
329
 
330
+ #: mlw_quizmaster2.php:483
331
  msgid "No Quiz Found"
332
  msgstr ""
333
 
334
+ #: mlw_quizmaster2.php:484
335
  msgid "No Quiz Found In Trash"
336
  msgstr ""
337
 
338
+ #: mlw_quizmaster2.php:510 mlw_quizmaster2.php:578
339
+ msgid "Question Categories"
340
  msgstr ""
341
 
342
+ #: mlw_quizmaster2.php:511
343
+ msgid "Categories"
344
+ msgstr ""
345
+
346
+ #: mlw_quizmaster2.php:514 php/admin/options-page-questions-tab.php:733
347
+ msgid "Parent Category"
348
+ msgstr ""
349
+
350
+ #: mlw_quizmaster2.php:515
351
+ msgid "Parent Category:"
352
+ msgstr ""
353
+
354
+ #: mlw_quizmaster2.php:516
355
+ msgid "New Category Name"
356
+ msgstr ""
357
+
358
+ #: mlw_quizmaster2.php:517 php/admin/options-page-questions-tab.php:722
359
+ msgid "Add New Category"
360
+ msgstr ""
361
+
362
+ #: mlw_quizmaster2.php:518
363
+ msgid "Edit Category"
364
+ msgstr ""
365
+
366
+ #: mlw_quizmaster2.php:519
367
+ msgid "Update Category"
368
+ msgstr ""
369
+
370
+ #: mlw_quizmaster2.php:520
371
+ msgid "View Category"
372
+ msgstr ""
373
+
374
+ #: mlw_quizmaster2.php:575
375
+ msgid "QSM"
376
  msgstr ""
377
 
378
+ #: mlw_quizmaster2.php:576
379
+ msgid "Dashboard"
 
380
  msgstr ""
381
 
382
+ #: mlw_quizmaster2.php:580 mlw_quizmaster2.php:583
383
+ #: php/admin/addons-page.php:113 php/admin/options-page-contact-tab.php:160
384
+ #: php/admin/options-page-contact-tab.php:169
385
+ #: php/admin/quiz-options-page.php:125 php/admin/tools-page.php:245
386
  msgid "Settings"
387
  msgstr ""
388
 
389
+ #: mlw_quizmaster2.php:581
390
  msgid "Results"
391
  msgstr ""
392
 
393
+ #: mlw_quizmaster2.php:582
394
  msgid "Result Details"
395
  msgstr ""
396
 
397
+ #: mlw_quizmaster2.php:584 php/admin/tools-page.php:25
398
  msgid "Tools"
399
  msgstr ""
400
 
401
+ #: mlw_quizmaster2.php:585
402
  msgid "Stats"
403
  msgstr ""
404
 
405
+ #: mlw_quizmaster2.php:586
406
  msgid "Addon Settings"
407
  msgstr ""
408
 
409
+ #: mlw_quizmaster2.php:587
410
  msgid "Get a Free Addon"
411
  msgstr ""
412
 
413
+ #: mlw_quizmaster2.php:587
414
  msgid "Get a Free Addon!"
415
  msgstr ""
416
 
417
+ #: mlw_quizmaster2.php:588
418
+ msgid "About"
419
+ msgstr ""
420
+
421
+ #: mlw_quizmaster2.php:637 php/admin/settings-page.php:226
422
+ msgid "Database update required"
423
+ msgstr ""
424
 
425
+ #: mlw_quizmaster2.php:639 php/admin/settings-page.php:229
426
+ msgid "QSM has been updated!"
427
  msgstr ""
428
 
429
+ #: mlw_quizmaster2.php:640 php/admin/settings-page.php:230
430
+ msgid ""
431
+ "We need to upgrade your database so that you can enjoy the latest features."
432
  msgstr ""
433
 
434
+ #: mlw_quizmaster2.php:643 php/admin/settings-page.php:233
435
+ #, php-format
436
+ msgid ""
437
+ "Please note that this action %1$s can not be %2$s rolled back. We recommend "
438
+ "you to take a backup of your current site before proceeding."
439
+ msgstr ""
440
+
441
+ #: mlw_quizmaster2.php:647 php/shortcodes.php:254 php/shortcodes.php:270
442
+ #: php/admin/admin-results-page.php:555 php/admin/functions.php:843
443
+ #: php/admin/options-page-questions-tab.php:712
444
+ #: php/admin/options-page-style-tab.php:317
445
+ #: php/admin/quiz-options-page.php:241 php/admin/quiz-options-page.php:261
446
+ #: php/admin/quizzes-page.php:336 php/admin/quizzes-page.php:366
447
+ #: php/admin/quizzes-page.php:400 php/admin/quizzes-page.php:431
448
+ #: php/admin/quizzes-page.php:451
449
+ msgid "Cancel"
450
  msgstr ""
451
 
452
+ #: mlw_quizmaster2.php:648 php/admin/settings-page.php:237
453
+ msgid "Update Database"
454
+ msgstr ""
455
+
456
+ #: mlw_quizmaster2.php:659
457
+ msgid ""
458
+ "\"Process emails in background\" option is enabled. WPML string translation "
459
+ "may not work as expected for email templates. Please disable this option to "
460
+ "send translated strings in emails."
461
  msgstr ""
462
 
463
  #: php/gdpr.php:29
523
  msgid "Form Responses"
524
  msgstr ""
525
 
526
+ #: php/gdpr.php:142
527
  msgid "Form Name"
528
  msgstr ""
529
 
530
+ #: php/gdpr.php:146
531
  msgid "Time Submitted"
532
  msgstr ""
533
 
534
+ #: php/gdpr.php:150
535
  msgid "Points Earned"
536
  msgstr ""
537
 
538
+ #: php/gdpr.php:154
539
  msgid "Score Earned"
540
  msgstr ""
541
 
542
+ #: php/gdpr.php:158
543
  msgid "Questions Answered Correctly"
544
  msgstr ""
545
 
546
+ #: php/gdpr.php:162
547
  msgid "Total Questions"
548
  msgstr ""
549
 
550
+ #: php/gdpr.php:166
551
  msgid "Name Field"
552
  msgstr ""
553
 
554
+ #: php/gdpr.php:170
555
  msgid "Business Field"
556
  msgstr ""
557
 
558
+ #: php/gdpr.php:174
559
  msgid "Email Field"
560
  msgstr ""
561
 
562
+ #: php/gdpr.php:178
563
  msgid "Phone Field"
564
  msgstr ""
565
 
566
+ #: php/gdpr.php:182
567
  msgid "User ID"
568
  msgstr ""
569
 
570
+ #: php/gdpr.php:186 php/admin/admin-results-page.php:349
571
+ #: php/admin/admin-results-page.php:546
572
  msgid "IP Address"
573
  msgstr ""
574
 
575
+ #: php/gdpr.php:190
576
  msgid "Time to complete form"
577
  msgstr ""
578
 
579
+ #: php/gdpr.php:194
580
  msgid "Form comments"
581
  msgstr ""
582
 
583
+ #: php/question-types.php:70
584
+ msgid "Multiple Choice"
585
  msgstr ""
586
 
587
+ #: php/question-types.php:82
588
  msgid "File Upload"
589
  msgstr ""
590
 
591
+ #: php/question-types.php:94 php/admin/options-page-contact-tab.php:148
592
  msgid "Date"
593
  msgstr ""
594
 
595
+ #: php/question-types.php:106
596
+ msgid "Multiple Choice (Horizontal)"
597
  msgstr ""
598
 
599
+ #: php/question-types.php:118
600
  msgid "Drop Down"
601
  msgstr ""
602
 
603
+ #: php/question-types.php:130
 
 
 
 
604
  msgid "Short Answer"
605
  msgstr ""
606
 
607
+ #: php/question-types.php:142
608
  msgid "Multiple Response"
609
  msgstr ""
610
 
611
+ #: php/question-types.php:153
612
  msgid "Paragraph"
613
  msgstr ""
614
 
615
+ #: php/question-types.php:173
616
  msgid "Text/HTML Section"
617
  msgstr ""
618
 
619
+ #: php/question-types.php:188 php/admin/options-page-contact-tab.php:147
620
  msgid "Number"
621
  msgstr ""
622
 
623
+ #: php/question-types.php:209
624
  msgid "Opt-in"
625
  msgstr ""
626
 
627
+ #: php/question-types.php:229
628
  msgid "Captcha"
629
  msgstr ""
630
 
631
+ #: php/question-types.php:241
632
+ msgid "Multiple Response (Horizontal)"
633
  msgstr ""
634
 
635
+ #: php/question-types.php:263
636
  msgid ""
637
  "For fill in the blank types, use %BLANK% to represent where to put the text "
638
  "box in your text."
639
  msgstr ""
640
 
641
+ #: php/question-types.php:267
642
  msgid "Fill In The Blank"
643
  msgstr ""
644
 
645
+ #: php/question-types.php:279
646
  msgid "Polar"
647
  msgstr ""
648
 
649
+ #: php/rest-api.php:280 php/rest-api.php:393 php/rest-api.php:421
650
+ #: php/rest-api.php:446 php/rest-api.php:474 php/rest-api.php:515
651
+ #: php/rest-api.php:580 php/rest-api.php:638 php/rest-api.php:710
652
+ #: php/rest-api.php:735
653
  msgid "User not logged in"
654
  msgstr ""
655
 
656
+ #: php/rest-api.php:301 php/admin/admin-dashboard.php:411
657
+ #: php/admin/admin-results-page.php:401 php/admin/admin-results-page.php:410
658
  msgid "Not Graded"
659
  msgstr ""
660
 
661
+ #: php/rest-api.php:748
662
+ msgid "Unauthorized!"
663
+ msgstr ""
664
+
665
+ #: php/rest-api.php:764
666
+ msgid "Select the quiz"
667
+ msgstr ""
668
+
669
+ #: php/shortcodes.php:105
670
  msgid "No quiz found"
671
  msgstr ""
672
 
673
+ #: php/shortcodes.php:252
674
+ msgid "Time is Up!"
675
+ msgstr ""
676
+
677
+ #: php/shortcodes.php:254
678
+ msgid "Submit Quiz"
679
+ msgstr ""
680
+
681
+ #: php/shortcodes.php:268
682
+ msgid "Time's up"
683
+ msgstr ""
684
+
685
+ #: php/template-variables.php:223
686
  msgid "Poll Result"
687
  msgstr ""
688
 
689
+ #: php/template-variables.php:295
690
  msgid "Facebbok Share"
691
  msgstr ""
692
 
693
+ #: php/template-variables.php:303
694
  msgid "Twitter Share"
695
  msgstr ""
696
 
697
+ #: php/template-variables.php:1060 php/template-variables.php:1069
698
  msgid "No answer provided"
699
  msgstr ""
700
 
701
+ #: php/template-variables.php:1242
702
  msgid "No Answer Provided"
703
  msgstr ""
704
 
705
+ #: php/admin/about-page.php:37
706
+ msgid "Need Help?"
707
  msgstr ""
708
 
709
+ #: php/admin/about-page.php:38
710
+ msgid "System Info"
711
  msgstr ""
712
 
713
+ #: php/admin/about-page.php:43
714
+ msgid "Help Page"
715
  msgstr ""
716
 
717
+ #: php/admin/about-page.php:52
718
+ msgid "Welcome To Quiz And Survey Master (Formerly Quiz Master Next)"
719
  msgstr ""
720
 
721
+ #: php/admin/about-page.php:105
722
+ msgid "View "
723
  msgstr ""
724
 
725
+ #: php/admin/about-page.php:136
726
+ msgid "Need help with the plugin? Try any of the following:"
727
  msgstr ""
728
 
729
+ #: php/admin/about-page.php:174
730
+ msgid "Site Information"
731
  msgstr ""
732
 
733
+ #: php/admin/about-page.php:175
734
+ msgid "Site URL:"
735
  msgstr ""
736
 
737
+ #: php/admin/about-page.php:176
738
+ msgid "Home URL:"
739
  msgstr ""
740
 
741
+ #: php/admin/about-page.php:177
742
+ msgid "Multisite: "
743
  msgstr ""
744
 
745
+ #: php/admin/about-page.php:179
746
+ msgid "WordPress Information"
747
  msgstr ""
748
 
749
+ #: php/admin/about-page.php:180
750
+ msgid "Version: "
751
  msgstr ""
752
 
753
+ #: php/admin/about-page.php:181
754
+ msgid "Language: "
 
 
755
  msgstr ""
756
 
757
+ #: php/admin/about-page.php:182
758
+ msgid "Permalink Structure: "
 
759
  msgstr ""
760
 
761
+ #: php/admin/about-page.php:183
762
+ msgid "Active Theme: "
 
763
  msgstr ""
764
 
765
+ #: php/admin/about-page.php:184
766
+ msgid "Parent Theme: "
 
767
  msgstr ""
768
 
769
+ #: php/admin/about-page.php:185
770
+ msgid "Debug Mode: "
771
  msgstr ""
772
 
773
+ #: php/admin/about-page.php:186
774
+ msgid "Memory Limit: "
775
  msgstr ""
776
 
777
+ #: php/admin/about-page.php:188
778
+ msgid "Plugins Information"
779
  msgstr ""
780
 
781
+ #: php/admin/about-page.php:191
782
+ msgid "Must Use"
 
 
783
  msgstr ""
784
 
785
+ #: php/admin/about-page.php:196
786
+ msgid "Active"
787
+ msgstr ""
788
+
789
+ #: php/admin/about-page.php:205
790
+ msgid "Inactive"
791
+ msgstr ""
792
+
793
+ #: php/admin/about-page.php:214
794
+ msgid "Server Information"
795
+ msgstr ""
796
+
797
+ #: php/admin/about-page.php:215
798
+ msgid "PHP : "
799
+ msgstr ""
800
+
801
+ #: php/admin/about-page.php:216
802
+ msgid "MySQL : "
803
+ msgstr ""
804
+
805
+ #: php/admin/about-page.php:217
806
+ msgid "Webserver : "
807
+ msgstr ""
808
+
809
+ #: php/admin/about-page.php:226
810
+ msgid "QSM Information"
811
+ msgstr ""
812
+
813
+ #: php/admin/about-page.php:227
814
+ msgid "Initial Version : "
815
+ msgstr ""
816
+
817
+ #: php/admin/about-page.php:228
818
+ msgid "Current Version : "
819
+ msgstr ""
820
+
821
+ #: php/admin/about-page.php:229
822
+ msgid "Total Quizzes : "
823
+ msgstr ""
824
+
825
+ #: php/admin/about-page.php:230
826
+ msgid "Total Active Quizzes : "
827
+ msgstr ""
828
+
829
+ #: php/admin/about-page.php:231
830
+ msgid "Total Questions : "
831
+ msgstr ""
832
+
833
+ #: php/admin/about-page.php:232
834
+ msgid "Total Active Questions : "
835
+ msgstr ""
836
+
837
+ #: php/admin/about-page.php:233
838
+ msgid "Total Results : "
839
+ msgstr ""
840
+
841
+ #: php/admin/about-page.php:234
842
+ msgid "Total Active Results : "
843
+ msgstr ""
844
+
845
+ #: php/admin/about-page.php:236
846
+ msgid "QSM Recent Logs"
847
+ msgstr ""
848
+
849
+ #: php/admin/about-page.php:243
850
+ msgid "No recent logs"
851
+ msgstr ""
852
+
853
+ #: php/admin/addons-page.php:18 php/admin/addons-page.php:311
854
+ msgid "Featured Addons"
855
+ msgstr ""
856
+
857
+ #: php/admin/addons-page.php:29
858
+ msgid "Back to list"
859
+ msgstr ""
860
+
861
+ #: php/admin/addons-page.php:33
862
+ msgid "QSM Addon Settings"
863
+ msgstr ""
864
+
865
+ #: php/admin/addons-page.php:69
866
+ msgid "Price: "
867
+ msgstr ""
868
+
869
+ #: php/admin/addons-page.php:70
870
+ msgid "Get This Addon"
871
+ msgstr ""
872
+
873
+ #: php/admin/addons-page.php:71
874
+ msgid "Show more"
875
+ msgstr ""
876
+
877
+ #: php/admin/addons-page.php:76 php/admin/addons-page.php:97
878
+ msgid "Installed Addons"
879
+ msgstr ""
880
+
881
+ #: php/admin/addons-page.php:77
882
+ msgid "Add Addons"
883
+ msgstr ""
884
+
885
+ #: php/admin/addons-page.php:86
886
+ msgid "Popular"
887
+ msgstr ""
888
+
889
+ #: php/admin/addons-page.php:87
890
+ msgid "On Sale"
891
+ msgstr ""
892
+
893
+ #: php/admin/addons-page.php:88
894
+ msgid "Recently Updated"
895
+ msgstr ""
896
+
897
+ #: php/admin/addons-page.php:92 php/admin/functions.php:830
898
+ msgid "40+ addons available"
899
+ msgstr ""
900
+
901
+ #: php/admin/addons-page.php:93 php/admin/functions.php:831
902
+ msgid "Browse All Addons"
903
+ msgstr ""
904
+
905
+ #: php/admin/addons-page.php:124
906
+ msgid ""
907
+ "You have currently not installed any addons. Explore our addons repository "
908
+ "with 40+ addons to make your quiz even better."
909
+ msgstr ""
910
+
911
+ #: php/admin/addons-page.php:128
912
+ msgid "Explore Addons"
913
+ msgstr ""
914
+
915
+ #: php/admin/addons-page.php:273
916
+ msgid "SAVE WITH OUR BUNDLES"
917
+ msgstr ""
918
+
919
+ #: php/admin/addons-page.php:289
920
+ msgid "Get now"
921
+ msgstr ""
922
+
923
+ #: php/admin/addons-page.php:325
924
+ msgid "Get Your Free Addon!"
925
+ msgstr ""
926
+
927
+ #: php/admin/addons-page.php:328
928
+ msgid ""
929
+ "Wanna get more out of Quiz and Survey Master, but not yet ready to spend the "
930
+ "cash? Get one free addon today!"
931
+ msgstr ""
932
+
933
+ #: php/admin/addons-page.php:341
934
  msgid ""
935
  "Getting your addon is dead simple: just subscribe to our newsletter and then "
936
  "you will get the free addon by e-mail. We will not spam you. We usually send "
937
  "out newsletters to talk about new features in "
938
  msgstr ""
939
 
940
+ #: php/admin/addons-page.php:341
941
  msgid "Quiz and Survey Master"
942
  msgstr ""
943
 
944
+ #: php/admin/addons-page.php:341
945
  msgid ""
946
  " let you know when new or updated addons are being released and provide "
947
  "informative articles that show you how to use "
948
  msgstr ""
949
 
950
+ #: php/admin/addons-page.php:341
951
  msgid "Quiz and Survey Master "
952
  msgstr ""
953
 
954
+ #: php/admin/addons-page.php:341
955
  msgid "to its full potential. "
956
  msgstr ""
957
 
958
+ #: php/admin/addons-page.php:341
959
  msgid "View our privacy policy"
960
  msgstr ""
961
 
962
+ #: php/admin/addons-page.php:359
963
  msgid "Your subscription could not be saved. Please try again."
964
  msgstr ""
965
 
966
+ #: php/admin/addons-page.php:372
967
  msgid "Your subscription has been successful."
968
  msgstr ""
969
 
970
+ #: php/admin/addons-page.php:389
971
  msgid "Enter your email address to subscribe"
972
  msgstr ""
973
 
974
+ #: php/admin/addons-page.php:404
975
  msgid "Provide your email address to subscribe. For e.g abc@xyz.com"
976
  msgstr ""
977
 
978
+ #: php/admin/addons-page.php:419
979
  msgid "SUBSCRIBE"
980
  msgstr ""
981
 
982
+ #: php/admin/addons-page.php:429
983
  msgid "Terms & Privacy policy"
984
  msgstr ""
985
 
986
+ #: php/admin/admin-dashboard.php:77
987
  msgid "Welcome"
988
  msgstr ""
989
 
990
+ #: php/admin/admin-dashboard.php:111
991
  msgid "QSM Dashboard"
992
  msgstr ""
993
 
994
+ #: php/admin/admin-dashboard.php:118
995
  msgid "Dismiss"
996
  msgstr ""
997
 
998
+ #: php/admin/admin-dashboard.php:120
999
  msgid "Welcome to Quiz And Survey Master!"
1000
  msgstr ""
1001
 
1002
+ #: php/admin/admin-dashboard.php:121
1003
  msgid "Formerly Quiz Master Next"
1004
  msgstr ""
1005
 
1006
+ #: php/admin/admin-dashboard.php:124
1007
  msgid "Get Started"
1008
  msgstr ""
1009
 
1010
+ #: php/admin/admin-dashboard.php:126 php/admin/quizzes-page.php:488
1011
  msgid "Create New Quiz/Survey"
1012
  msgstr ""
1013
 
1014
+ #: php/admin/admin-dashboard.php:128
1015
  msgid "Edit previously created quizzes"
1016
  msgstr ""
1017
 
1018
+ #: php/admin/admin-dashboard.php:132
1019
  msgid "Next Steps"
1020
  msgstr ""
1021
 
1022
+ #: php/admin/admin-dashboard.php:135 php/admin/quizzes-page.php:489
1023
  msgid "Read Documentation"
1024
  msgstr ""
1025
 
1026
+ #: php/admin/admin-dashboard.php:139
1027
  msgid "See demos"
1028
  msgstr ""
1029
 
1030
+ #: php/admin/admin-dashboard.php:143
1031
  msgid "Extend QSM with PRO Addons"
1032
  msgstr ""
1033
 
1034
+ #: php/admin/admin-dashboard.php:147
1035
+ msgid "Explore QSM Themes"
1036
+ msgstr ""
1037
+
1038
+ #: php/admin/admin-dashboard.php:153
1039
  msgid "Useful Links"
1040
  msgstr ""
1041
 
1042
+ #: php/admin/admin-dashboard.php:155
1043
  msgid "Contact Support"
1044
  msgstr ""
1045
 
1046
+ #: php/admin/admin-dashboard.php:156
1047
  msgid "Github Repository"
1048
  msgstr ""
1049
 
1050
+ #: php/admin/admin-dashboard.php:157
1051
+ msgid "Connect on Facebook"
1052
+ msgstr ""
1053
+
1054
+ #: php/admin/admin-dashboard.php:158
1055
+ msgid "Roadmap"
1056
+ msgstr ""
1057
+
1058
+ #: php/admin/admin-dashboard.php:287
1059
  msgid "No settings are found!"
1060
  msgstr ""
1061
 
1062
+ #: php/admin/admin-dashboard.php:309
1063
  msgid "No addons are found!"
1064
  msgstr ""
1065
 
1066
+ #: php/admin/admin-dashboard.php:327 php/admin/admin-dashboard.php:330
1067
  msgid "Most Popular Addon this Week"
1068
  msgstr ""
1069
 
1070
+ #: php/admin/admin-dashboard.php:351
1071
  msgid "SEE ALL ADDONS"
1072
  msgstr ""
1073
 
1074
+ #: php/admin/admin-dashboard.php:371 php/admin/admin-dashboard.php:374
1075
  msgid "Recently Taken Quizzes"
1076
  msgstr ""
1077
 
1078
+ #: php/admin/admin-dashboard.php:400
1079
  msgid "Guest"
1080
  msgstr ""
1081
 
1082
+ #: php/admin/admin-dashboard.php:402
1083
  msgid " took quiz "
1084
  msgstr ""
1085
 
1086
+ #: php/admin/admin-dashboard.php:442
1087
  msgid " Time to complete "
1088
  msgstr ""
1089
 
1090
+ #: php/admin/admin-dashboard.php:464
1091
  msgid "See All Results "
1092
  msgstr ""
1093
 
1094
+ #: php/admin/admin-dashboard.php:486 php/admin/admin-dashboard.php:489
1095
+ msgid "Latest from our blog"
 
 
 
 
1096
  msgstr ""
1097
 
1098
+ #: php/admin/admin-dashboard.php:540 php/admin/admin-dashboard.php:544
1099
  msgid "Changelog"
1100
  msgstr ""
1101
 
1102
+ #: php/admin/admin-dashboard.php:577
1103
+ msgid "View Complete Changelog"
1104
  msgstr ""
1105
 
1106
+ #: php/admin/admin-dashboard.php:672 php/admin/admin-dashboard.php:675
1107
+ msgid "What's Next"
1108
  msgstr ""
1109
 
1110
+ #: php/admin/admin-results-details-page.php:25
1111
+ #: php/admin/admin-results-page.php:21 php/admin/admin-results-page.php:28
1112
+ #: php/admin/admin-results-page.php:74
1113
  msgid "Quiz Results"
1114
  msgstr ""
1115
 
1116
+ #: php/admin/admin-results-details-page.php:87
1117
  msgid "Back to Results"
1118
  msgstr ""
1119
 
1120
+ #: php/admin/admin-results-details-page.php:167
1121
  msgid "Name:"
1122
  msgstr ""
1123
 
1124
+ #: php/admin/admin-results-details-page.php:168
1125
  msgid "Business:"
1126
  msgstr ""
1127
 
1128
+ #: php/admin/admin-results-details-page.php:169
1129
  msgid "Phone:"
1130
  msgstr ""
1131
 
1132
+ #: php/admin/admin-results-details-page.php:170
1133
  msgid "Email:"
1134
  msgstr ""
1135
 
1136
+ #: php/admin/admin-results-details-page.php:181
1137
  msgid "Correct Answers:"
1138
  msgstr ""
1139
 
1140
+ #: php/admin/admin-results-details-page.php:182
1141
  msgid "Points:"
1142
  msgstr ""
1143
 
1144
+ #: php/admin/admin-results-details-page.php:183
1145
  msgid "Percentage:"
1146
  msgstr ""
1147
 
1148
+ #: php/admin/admin-results-details-page.php:199
1149
  msgid "hour"
1150
  msgstr ""
1151
 
1152
+ #: php/admin/admin-results-details-page.php:199
1153
  msgid "hours"
1154
  msgstr ""
1155
 
1156
+ #: php/admin/admin-results-details-page.php:212
1157
  msgid "minute"
1158
  msgstr ""
1159
 
1160
+ #: php/admin/admin-results-details-page.php:212
1161
  msgid "minutes"
1162
  msgstr ""
1163
 
1164
+ #: php/admin/admin-results-details-page.php:225
1165
  msgid "second"
1166
  msgstr ""
1167
 
1168
+ #: php/admin/admin-results-details-page.php:225
1169
  msgid "seconds"
1170
  msgstr ""
1171
 
1172
+ #: php/admin/admin-results-details-page.php:254
1173
+ msgid "Data is missing."
1174
+ msgstr ""
1175
+
1176
+ #: php/admin/admin-results-page.php:112
1177
+ #: php/classes/class-qmn-quiz-creator.php:331
1178
  msgid "Unknown error"
1179
  msgstr ""
1180
 
1181
+ #: php/admin/admin-results-page.php:115
1182
  #, php-format
1183
  msgid "There was an error when deleting this result. Error from WordPress: %s"
1184
  msgstr ""
1185
 
1186
+ #: php/admin/admin-results-page.php:118
1187
  msgid "Your results has been deleted successfully."
1188
  msgstr ""
1189
 
1190
+ #: php/admin/admin-results-page.php:232
1191
  #, php-format
1192
+ msgid "%s result"
1193
  msgid_plural "%s results"
1194
  msgstr[0] ""
1195
  msgstr[1] ""
1196
 
1197
+ #: php/admin/admin-results-page.php:295 php/admin/admin-results-page.php:305
1198
  msgid "Search Results"
1199
  msgstr ""
1200
 
1201
+ #: php/admin/admin-results-page.php:297
1202
  msgid "Order By"
1203
  msgstr ""
1204
 
1205
+ #: php/admin/admin-results-page.php:299
1206
+ msgid "Default (Time)"
1207
  msgstr ""
1208
 
1209
+ #: php/admin/admin-results-page.php:300 php/admin/admin-results-page.php:474
1210
+ #: php/admin/functions.php:678 php/admin/tools-page.php:193
1211
+ msgid "Quiz Name"
1212
  msgstr ""
1213
 
1214
+ #: php/admin/admin-results-page.php:301
1215
+ msgid "User Name"
1216
  msgstr ""
1217
 
1218
+ #: php/admin/admin-results-page.php:303
1219
  msgid "Correct Percent"
1220
  msgstr ""
1221
 
1222
+ #: php/admin/admin-results-page.php:341
 
 
 
 
1223
  msgid "Score"
1224
  msgstr ""
1225
 
1226
+ #: php/admin/admin-results-page.php:342
1227
  msgid "Time To Complete"
1228
  msgstr ""
1229
 
1230
+ #: php/admin/admin-results-page.php:343 php/admin/quiz-options-page.php:232
1231
+ #: php/classes/class-qmn-quiz-creator.php:87
1232
  msgid "Name"
1233
  msgstr ""
1234
 
1235
+ #: php/admin/admin-results-page.php:344 php/admin/admin-results-page.php:538
1236
+ #: php/classes/class-qmn-quiz-creator.php:88
1237
  msgid "Business"
1238
  msgstr ""
1239
 
1240
+ #: php/admin/admin-results-page.php:345
1241
+ #: php/admin/options-page-contact-tab.php:145
1242
+ #: php/classes/class-qmn-quiz-creator.php:89
1243
  msgid "Email"
1244
  msgstr ""
1245
 
1246
+ #: php/admin/admin-results-page.php:346 php/admin/admin-results-page.php:542
1247
  msgid "Phone"
1248
  msgstr ""
1249
 
1250
+ #: php/admin/admin-results-page.php:347 php/admin/tools-page.php:191
1251
  msgid "User"
1252
  msgstr ""
1253
 
1254
+ #: php/admin/admin-results-page.php:348
1255
  msgid "Time Taken"
1256
  msgstr ""
1257
 
1258
+ #: php/admin/admin-results-page.php:350 php/admin/admin-results-page.php:534
1259
+ #: php/admin/options-page-questions-tab.php:643
1260
+ msgid "Page Name"
1261
+ msgstr ""
1262
+
1263
+ #: php/admin/admin-results-page.php:351 php/admin/admin-results-page.php:530
1264
+ msgid "Page URL"
1265
+ msgstr ""
1266
+
1267
+ #: php/admin/admin-results-page.php:404 php/admin/admin-results-page.php:408
1268
+ msgid "out of"
1269
+ msgstr ""
1270
+
1271
+ #: php/admin/admin-results-page.php:404 php/admin/admin-results-page.php:408
1272
+ msgid "or"
1273
+ msgstr ""
1274
+
1275
+ #: php/admin/admin-results-page.php:437
1276
+ msgid "Visitor"
1277
+ msgstr ""
1278
+
1279
+ #: php/admin/admin-results-page.php:470
1280
+ msgid "Results Table"
1281
+ msgstr ""
1282
+
1283
+ #: php/admin/admin-results-page.php:489
1284
+ msgid "View"
1285
+ msgstr ""
1286
+
1287
+ #: php/admin/admin-results-page.php:489
1288
+ #: php/admin/options-page-contact-tab.php:162
1289
+ #: php/admin/options-page-questions-tab.php:681
1290
+ #: php/admin/options-page-questions-tab.php:690 php/admin/quizzes-page.php:160
1291
+ #: php/admin/quizzes-page.php:376 php/admin/quizzes-page.php:398
1292
+ #: php/admin/quizzes-page.php:429
1293
+ msgid "Delete"
1294
+ msgstr ""
1295
+
1296
+ #: php/admin/admin-results-page.php:500
1297
  msgid "No record found."
1298
  msgstr ""
1299
 
1300
+ #: php/admin/admin-results-page.php:508
1301
  msgid "Are you sure you want to delete these results?"
1302
  msgstr ""
1303
 
1304
+ #: php/admin/admin-results-page.php:514
1305
  msgid "Delete Results"
1306
  msgstr ""
1307
 
1308
+ #: php/admin/admin-results-page.php:523
1309
+ msgid "Choose Columns to hide/show"
1310
+ msgstr ""
1311
+
1312
+ #: php/admin/admin-results-page.php:553
1313
+ #: php/admin/options-page-questions-tab.php:757
1314
+ #: php/admin/options-page-style-tab.php:180
1315
+ #: php/admin/quiz-options-page.php:240
1316
+ msgid "Save"
1317
+ msgstr ""
1318
+
1319
  #: php/admin/dashboard-widgets.php:16
1320
  msgid "Quiz And Survey Master Snapshot"
1321
  msgstr ""
1322
 
1323
+ #: php/admin/dashboard-widgets.php:168
1324
  msgid "quizzes taken today"
1325
  msgstr ""
1326
 
1327
+ #: php/admin/dashboard-widgets.php:184
1328
  msgid "quizzes taken last 7 days"
1329
  msgstr ""
1330
 
1331
+ #: php/admin/dashboard-widgets.php:200
1332
  msgid "quizzes taken last 30 days"
1333
  msgstr ""
1334
 
1335
+ #: php/admin/dashboard-widgets.php:216
1336
  msgid "quizzes taken last 120 days"
1337
  msgstr ""
1338
 
1339
+ #: php/admin/dashboard-widgets.php:232
1340
  msgid "total active quizzes"
1341
  msgstr ""
1342
 
1343
+ #: php/admin/dashboard-widgets.php:238
1344
  msgid "total active questions"
1345
  msgstr ""
1346
 
1347
+ #: php/admin/dashboard-widgets.php:250
1348
  msgid "most popular quiz"
1349
  msgstr ""
1350
 
1351
+ #: php/admin/dashboard-widgets.php:262
1352
  msgid "least popular quiz"
1353
  msgstr ""
1354
 
1355
+ #: php/admin/functions.php:15
1356
  msgid "Something went wrong"
1357
  msgstr ""
1358
 
1359
+ #: php/admin/functions.php:294 php/admin/options-page-questions-tab.php:473
1360
+ #: php/classes/class-qsm-install.php:2073
 
 
 
 
1361
  msgid "View Documentation"
1362
  msgstr ""
1363
 
1364
+ #: php/admin/functions.php:372
1365
  msgid "+ Add New Category"
1366
  msgstr ""
1367
 
1368
+ #: php/admin/functions.php:392
1369
+ msgid " Search"
1370
+ msgstr ""
1371
+
1372
+ #: php/admin/functions.php:408
1373
+ msgid "+ Add New Category "
1374
+ msgstr ""
1375
+
1376
+ #: php/admin/functions.php:617
1377
  msgid "Create New Quiz Or Survey"
1378
  msgstr ""
1379
 
1380
+ #: php/admin/functions.php:628
1381
+ msgid "Select theme"
1382
  msgstr ""
1383
 
1384
+ #: php/admin/functions.php:632 php/admin/settings-page.php:153
1385
+ #: php/admin/settings-page.php:154 php/admin/settings-page.php:155
1386
+ #: php/admin/settings-page.php:156
1387
+ msgid "Quiz Settings"
1388
  msgstr ""
1389
 
1390
+ #: php/admin/functions.php:635 php/admin/functions.php:669
1391
+ msgid "Addons"
1392
  msgstr ""
1393
 
1394
+ #: php/admin/functions.php:638
1395
+ msgid "(Optional)"
1396
  msgstr ""
1397
 
1398
+ #: php/admin/functions.php:647
1399
+ msgid "Quiz Setting"
1400
  msgstr ""
1401
 
1402
+ #: php/admin/functions.php:648
1403
+ msgid "Fill quiz settings as per preferences"
1404
  msgstr ""
1405
 
1406
+ #: php/admin/functions.php:658
1407
+ msgid "Select Themes"
1408
  msgstr ""
1409
 
1410
+ #: php/admin/functions.php:659
1411
+ msgid "Use pre-made theme to speed up the things."
1412
  msgstr ""
1413
 
1414
+ #: php/admin/functions.php:670
1415
+ msgid "Use 40+ addons to customize the quiz."
1416
  msgstr ""
1417
 
1418
+ #: php/admin/functions.php:681
1419
+ msgid "Enter a name for this Quiz."
1420
+ msgstr ""
1421
+
1422
+ #: php/admin/functions.php:686
1423
+ msgid "Quiz Featured Image"
1424
+ msgstr ""
1425
+
1426
+ #: php/admin/functions.php:688
1427
+ msgid "Enter an external URL or Choose from Media Library."
1428
+ msgstr ""
1429
+
1430
+ #: php/admin/functions.php:689
1431
+ msgid "Can be changed further from style tab"
1432
+ msgstr ""
1433
+
1434
+ #: php/admin/functions.php:703
1435
+ msgid "Form Type"
1436
+ msgstr ""
1437
+
1438
+ #: php/admin/functions.php:707 php/admin/settings-page.php:158
1439
+ #: php/classes/class-qsm-install.php:72
1440
+ msgid "Grading System"
1441
+ msgstr ""
1442
+
1443
+ #: php/admin/functions.php:711
1444
+ msgid "Enable Contact Form"
1445
+ msgstr ""
1446
+
1447
+ #: php/admin/functions.php:715 php/admin/options-page-questions-tab.php:387
1448
+ #: php/admin/options-page-questions-tab.php:399
1449
+ #: php/admin/options-page-questions-tab.php:544
1450
+ #: php/admin/options-page-questions-tab.php:650
1451
+ #: php/admin/settings-page.php:424 php/classes/class-qsm-install.php:152
1452
+ #: php/classes/class-qsm-install.php:172 php/classes/class-qsm-install.php:218
1453
+ #: php/classes/class-qsm-install.php:237 php/classes/class-qsm-install.php:414
1454
+ #: php/classes/class-qsm-install.php:436 php/classes/class-qsm-install.php:457
1455
+ #: php/classes/class-qsm-install.php:477 php/classes/class-qsm-install.php:531
1456
+ #: php/classes/class-qsm-install.php:553 php/classes/class-qsm-install.php:575
1457
+ #: php/classes/class-qsm-install.php:594 php/classes/class-qsm-install.php:614
1458
+ #: php/classes/class-qsm-install.php:634 php/classes/class-qsm-install.php:654
1459
+ #: php/classes/class-qsm-install.php:700 php/classes/class-qsm-install.php:721
1460
+ #: php/classes/class-qsm-install.php:741 php/classes/class-qsm-install.php:762
1461
+ #: php/classes/class-qsm-install.php:781 php/classes/class-qsm-install.php:802
1462
+ #: php/classes/class-qsm-install.php:822 php/classes/class-qsm-install.php:878
1463
+ #: php/classes/class-qsm-install.php:904 php/classes/class-qsm-install.php:929
1464
+ #: php/classes/class-qsm-install.php:953 php/classes/class-qsm-install.php:977
1465
+ msgid "Yes"
1466
+ msgstr ""
1467
+
1468
+ #: php/admin/functions.php:719 php/admin/options-page-questions-tab.php:649
1469
+ #: php/admin/settings-page.php:429 php/classes/class-qsm-install.php:156
1470
+ #: php/classes/class-qsm-install.php:176 php/classes/class-qsm-install.php:222
1471
+ #: php/classes/class-qsm-install.php:241 php/classes/class-qsm-install.php:418
1472
+ #: php/classes/class-qsm-install.php:440 php/classes/class-qsm-install.php:461
1473
+ #: php/classes/class-qsm-install.php:481 php/classes/class-qsm-install.php:535
1474
+ #: php/classes/class-qsm-install.php:557 php/classes/class-qsm-install.php:579
1475
+ #: php/classes/class-qsm-install.php:598 php/classes/class-qsm-install.php:618
1476
+ #: php/classes/class-qsm-install.php:638 php/classes/class-qsm-install.php:658
1477
+ #: php/classes/class-qsm-install.php:683 php/classes/class-qsm-install.php:704
1478
+ #: php/classes/class-qsm-install.php:725 php/classes/class-qsm-install.php:745
1479
+ #: php/classes/class-qsm-install.php:766 php/classes/class-qsm-install.php:785
1480
+ #: php/classes/class-qsm-install.php:806 php/classes/class-qsm-install.php:826
1481
+ #: php/classes/class-qsm-install.php:882 php/classes/class-qsm-install.php:900
1482
+ #: php/classes/class-qsm-install.php:925 php/classes/class-qsm-install.php:949
1483
+ #: php/classes/class-qsm-install.php:973
1484
+ msgid "No"
1485
  msgstr ""
1486
 
1487
+ #: php/admin/functions.php:725
1488
+ msgid "Time Limit (in Minute)"
1489
+ msgstr ""
1490
+
1491
+ #: php/admin/functions.php:729 php/admin/settings-page.php:163
1492
+ #: php/classes/class-qsm-install.php:168
1493
+ msgid "Require User Login"
1494
+ msgstr ""
1495
+
1496
+ #: php/admin/functions.php:733 php/admin/settings-page.php:195
1497
+ #: php/classes/class-qsm-install.php:818
1498
+ msgid "Disable first page on quiz"
1499
+ msgstr ""
1500
+
1501
+ #: php/admin/functions.php:737
1502
+ msgid "Enable Comment box"
1503
+ msgstr ""
1504
+
1505
+ #: php/admin/functions.php:756
1506
+ msgid "Display a contact form before quiz"
1507
+ msgstr ""
1508
+
1509
+ #: php/admin/functions.php:764
1510
+ msgid "No settings found!"
1511
+ msgstr ""
1512
+
1513
+ #: php/admin/functions.php:773 php/admin/options-page-style-tab.php:66
1514
+ #: php/admin/options-page-style-tab.php:149
1515
+ msgid "Themes"
1516
+ msgstr ""
1517
+
1518
+ #: php/admin/functions.php:776
1519
+ msgid "Explore Marketplace"
1520
+ msgstr ""
1521
+
1522
+ #: php/admin/functions.php:815
1523
+ msgid "Buy now"
1524
+ msgstr ""
1525
+
1526
+ #: php/admin/functions.php:839 php/admin/functions.php:841
1527
+ msgid "Back"
1528
+ msgstr ""
1529
+
1530
+ #: php/admin/functions.php:845 php/admin/functions.php:847
1531
+ #: php/classes/class-qmn-quiz-creator.php:115
1532
+ #: php/classes/class-qsm-settings.php:349
1533
+ msgid "Next"
1534
+ msgstr ""
1535
+
1536
+ #: php/admin/functions.php:849
1537
+ msgid "Create Quiz"
1538
+ msgstr ""
1539
+
1540
+ #: php/admin/functions.php:864
1541
  msgid "Score for the quiz when using points"
1542
  msgstr ""
1543
 
1544
+ #: php/admin/functions.php:865
1545
  msgid "Maximum possible points one can score"
1546
  msgstr ""
1547
 
1548
+ #: php/admin/functions.php:866
1549
+ msgid "Minimum possible points one can score"
1550
+ msgstr ""
1551
+
1552
+ #: php/admin/functions.php:867
1553
  msgid "The average amount of points user had per question"
1554
  msgstr ""
1555
 
1556
+ #: php/admin/functions.php:868
1557
  msgid "The number of correct answers the user had"
1558
  msgstr ""
1559
 
1560
+ #: php/admin/functions.php:869
1561
  msgid "The number of incorrect answers the user had"
1562
  msgstr ""
1563
 
1564
+ #: php/admin/functions.php:870
1565
  msgid "The number of questions are attempted"
1566
  msgstr ""
1567
 
1568
+ #: php/admin/functions.php:871
1569
  msgid "The total number of questions in the quiz"
1570
  msgstr ""
1571
 
1572
+ #: php/admin/functions.php:872
1573
  msgid "Score for the quiz when using correct answers"
1574
  msgstr ""
1575
 
1576
+ #: php/admin/functions.php:873
1577
  msgid "The name the user entered before the quiz"
1578
  msgstr ""
1579
 
1580
+ #: php/admin/functions.php:874
1581
  msgid "The full name of user with first name and last name"
1582
  msgstr ""
1583
 
1584
+ #: php/admin/functions.php:875
1585
  msgid "The business the user entered before the quiz"
1586
  msgstr ""
1587
 
1588
+ #: php/admin/functions.php:876
1589
  msgid "The phone number the user entered before the quiz"
1590
  msgstr ""
1591
 
1592
+ #: php/admin/functions.php:877
1593
  msgid "The email the user entered before the quiz"
1594
  msgstr ""
1595
 
1596
+ #: php/admin/functions.php:878
1597
  msgid "The name of the quiz"
1598
  msgstr ""
1599
 
1600
+ #: php/admin/functions.php:879
1601
  msgid "The link of the quiz"
1602
  msgstr ""
1603
 
1604
+ #: php/admin/functions.php:880
1605
  msgid ""
1606
  "Shows the question, the answer the user provided, and the correct answer"
1607
  msgstr ""
1608
 
1609
+ #: php/admin/functions.php:881
1610
  msgid "The comments the user entered into comment box if enabled"
1611
  msgstr ""
1612
 
1613
+ #: php/admin/functions.php:882
1614
  msgid "The amount of time user spent on quiz in seconds"
1615
  msgstr ""
1616
 
1617
+ #: php/admin/functions.php:883
1618
+ msgid ""
1619
+ "The amount of time user spent on quiz in minutes i.e. If total time is 3 "
1620
+ "minutes 38 seconds. This will output 3"
1621
+ msgstr ""
1622
+
1623
+ #: php/admin/functions.php:884
1624
+ msgid ""
1625
+ "The left over seconds user spent on quiz. i.e. If total time is 3 minutes 38 "
1626
+ "seconds. This will output 38"
1627
  msgstr ""
1628
 
1629
+ #: php/admin/functions.php:885
1630
  msgid "X: Category name - The amount of points a specific category earned."
1631
  msgstr ""
1632
 
1633
+ #: php/admin/functions.php:886
1634
  msgid "X: Category name - The score a specific category earned."
1635
  msgstr ""
1636
 
1637
+ #: php/admin/functions.php:887
1638
  msgid "The average points from all categories."
1639
  msgstr ""
1640
 
1641
+ #: php/admin/functions.php:888
1642
  msgid "The average score from all categories."
1643
  msgstr ""
1644
 
1645
+ #: php/admin/functions.php:889
1646
+ msgid "Maximum points of the question"
1647
  msgstr ""
1648
 
1649
+ #: php/admin/functions.php:890
1650
+ msgid "Displays button to share on Facebook."
1651
  msgstr ""
1652
 
1653
+ #: php/admin/functions.php:891
1654
+ msgid "Displays button to share on Twitter."
1655
  msgstr ""
1656
 
1657
+ #: php/admin/functions.php:892
1658
+ msgid "The link of the result page."
1659
  msgstr ""
1660
 
1661
+ #: php/admin/functions.php:893 php/admin/functions.php:894
1662
+ msgid ""
1663
+ "Value user entered into contact field. X is # of contact field. For example, "
1664
+ "first contact field would be %CONTACT_1%"
1665
  msgstr ""
1666
 
1667
+ #: php/admin/functions.php:895
1668
+ msgid ""
1669
+ "X: Category name - The average amount of points a specific category earned."
1670
  msgstr ""
1671
 
1672
+ #: php/admin/functions.php:896 php/admin/functions.php:897
1673
+ msgid "X = Question ID. It will show result of particular question."
1674
  msgstr ""
1675
 
1676
+ #: php/admin/functions.php:898
1677
+ msgid "Display time after quiz submission."
1678
  msgstr ""
1679
 
1680
+ #: php/admin/functions.php:1003 php/admin/functions.php:1031
1681
+ msgid "Select"
1682
  msgstr ""
1683
 
1684
+ #: php/admin/functions.php:1007
1685
+ msgid "Default Theme"
1686
  msgstr ""
1687
 
1688
+ #: php/admin/functions.php:1010 php/admin/functions.php:1045
1689
+ msgid "Activate"
1690
  msgstr ""
1691
 
1692
+ #: php/admin/functions.php:1027 php/admin/functions.php:1110
1693
+ #: php/admin/functions.php:1144
1694
+ msgid "Pro"
1695
  msgstr ""
1696
 
1697
+ #: php/admin/functions.php:1034
1698
+ msgid "Templates"
1699
  msgstr ""
1700
 
1701
+ #: php/admin/functions.php:1051
1702
+ msgid "Customize"
1703
  msgstr ""
1704
 
1705
+ #: php/admin/functions.php:1115 php/admin/functions.php:1148
1706
+ msgid "Live Preview"
1707
  msgstr ""
1708
 
1709
+ #: php/admin/functions.php:1118 php/admin/functions.php:1150
1710
+ #: php/admin/quizzes-page.php:450
1711
+ msgid "Buy Now"
1712
  msgstr ""
1713
 
1714
+ #: php/admin/functions.php:1118 php/admin/functions.php:1150
1715
+ msgid "Download"
1716
  msgstr ""
1717
 
1718
+ #: php/admin/functions.php:1164
1719
+ msgid "No more themes found."
1720
  msgstr ""
1721
 
1722
+ #: php/admin/options-page-contact-tab.php:15
1723
+ msgid "Contact"
1724
  msgstr ""
1725
 
1726
+ #: php/admin/options-page-contact-tab.php:41
1727
+ msgid "Setup Contact Form"
1728
  msgstr ""
1729
 
1730
+ #: php/admin/options-page-contact-tab.php:46
1731
+ msgid "Show Disabled Fields"
1732
  msgstr ""
1733
 
1734
+ #: php/admin/options-page-contact-tab.php:49
1735
+ msgid "Add New Field"
1736
  msgstr ""
1737
 
1738
+ #: php/admin/options-page-contact-tab.php:54
1739
+ msgid "Form Options"
1740
  msgstr ""
1741
 
1742
+ #: php/admin/options-page-contact-tab.php:58
1743
+ msgid "Show contact form after the quiz"
1744
  msgstr ""
1745
 
1746
+ #: php/admin/options-page-contact-tab.php:61 php/admin/settings-page.php:176
1747
+ #: php/classes/class-qsm-install.php:410
1748
+ msgid "Show contact form to logged in users"
1749
  msgstr ""
1750
 
1751
+ #: php/admin/options-page-contact-tab.php:64
1752
+ msgid "Disable first page of quiz"
1753
  msgstr ""
1754
 
1755
+ #: php/admin/options-page-contact-tab.php:67
1756
+ msgid "Disable autofill entries"
1757
  msgstr ""
1758
 
1759
+ #: php/admin/options-page-contact-tab.php:71
1760
+ msgid "Save Form"
1761
  msgstr ""
1762
 
1763
+ #: php/admin/options-page-contact-tab.php:138
1764
+ msgid "Move"
1765
  msgstr ""
1766
 
1767
+ #: php/admin/options-page-contact-tab.php:141
1768
+ msgid "Type"
1769
  msgstr ""
1770
 
1771
+ #: php/admin/options-page-contact-tab.php:143
1772
+ msgid "Select a type..."
1773
  msgstr ""
1774
 
1775
+ #: php/admin/options-page-contact-tab.php:144
1776
+ #: php/admin/options-page-text-tab.php:12
1777
+ msgid "Text"
1778
  msgstr ""
1779
 
1780
+ #: php/admin/options-page-contact-tab.php:146
1781
+ msgid "URL"
1782
  msgstr ""
1783
 
1784
+ #: php/admin/options-page-contact-tab.php:149
1785
+ msgid "Checkbox"
1786
  msgstr ""
1787
 
1788
+ #: php/admin/options-page-contact-tab.php:154
1789
+ msgid "Label"
1790
  msgstr ""
1791
 
1792
+ #: php/admin/options-page-contact-tab.php:161 php/admin/quizzes-page.php:159
1793
+ #: php/admin/quizzes-page.php:348 php/admin/quizzes-page.php:364
1794
+ msgid "Duplicate"
1795
  msgstr ""
1796
 
1797
+ #: php/admin/options-page-contact-tab.php:166
1798
+ msgid "Enable / Disable Field"
1799
  msgstr ""
1800
 
1801
+ #: php/admin/options-page-contact-tab.php:171
1802
+ #: php/admin/options-page-questions-tab.php:540
1803
+ msgid "Required?"
1804
  msgstr ""
1805
 
1806
+ #: php/admin/options-page-contact-tab.php:174
1807
+ msgid "Min Length"
1808
  msgstr ""
1809
 
1810
+ #: php/admin/options-page-contact-tab.php:178
1811
+ msgid "Max Length"
1812
  msgstr ""
1813
 
1814
+ #: php/admin/options-page-contact-tab.php:182
1815
+ msgid "Allow Domains"
1816
  msgstr ""
1817
 
1818
+ #: php/admin/options-page-contact-tab.php:184
1819
+ msgid "Leave blank to allow all domains. "
1820
  msgstr ""
1821
 
1822
+ #: php/admin/options-page-contact-tab.php:185
1823
+ msgid "Comma separated list of domains. (i.e. example.com,abc.com)"
1824
  msgstr ""
1825
 
1826
+ #: php/admin/options-page-email-tab.php:20
1827
+ msgid "Emails"
1828
  msgstr ""
1829
 
1830
+ #: php/admin/options-page-email-tab.php:46
1831
+ msgid "Emails are turned off. Please update "
1832
  msgstr ""
1833
 
1834
+ #: php/admin/options-page-email-tab.php:46
1835
+ msgid "this setting"
1836
  msgstr ""
1837
 
1838
+ #: php/admin/options-page-email-tab.php:46
1839
+ msgid " for the emails to work properly."
1840
  msgstr ""
1841
 
1842
+ #: php/admin/options-page-email-tab.php:54
1843
+ #: php/admin/options-page-email-tab.php:60
1844
+ msgid "Save Emails"
1845
  msgstr ""
1846
 
1847
+ #: php/admin/options-page-email-tab.php:55
1848
+ #: php/admin/options-page-email-tab.php:61
1849
+ msgid "Add New Email"
1850
  msgstr ""
1851
 
1852
+ #: php/admin/options-page-email-tab.php:56
1853
+ #: php/admin/options-page-results-page-tab.php:45
1854
+ msgid "Insert Template Variables"
1855
  msgstr ""
1856
 
1857
+ #: php/admin/options-page-email-tab.php:71
1858
+ #: php/admin/options-page-results-page-tab.php:60
1859
+ msgid "Template Variables"
1860
  msgstr ""
1861
 
1862
+ #: php/admin/options-page-email-tab.php:73
1863
+ #: php/admin/options-page-results-page-tab.php:62
1864
+ msgid ""
1865
+ "Use these dynamic variables to customize your quiz or survey. Just copy and "
1866
+ "paste one or more variables into the content templates and these will be "
1867
+ "replaced by actual values when user takes a quiz."
1868
  msgstr ""
1869
 
1870
+ #: php/admin/options-page-email-tab.php:74
1871
+ #: php/admin/options-page-results-page-tab.php:63
1872
+ #: php/admin/options-page-style-tab.php:190
1873
+ msgid "Note: "
1874
  msgstr ""
1875
 
1876
+ #: php/admin/options-page-email-tab.php:75
1877
+ #: php/admin/options-page-results-page-tab.php:64
1878
+ msgid "Always use uppercase while using these variables."
1879
  msgstr ""
1880
 
1881
+ #: php/admin/options-page-email-tab.php:81
1882
+ msgid ""
1883
+ "Shows the question, the answer provided by user, and the correct answer."
1884
+ msgstr ""
1885
+
1886
+ #: php/admin/options-page-email-tab.php:122
1887
+ #: php/admin/options-page-results-page-tab.php:109
1888
+ msgid "Close [Esc]"
1889
+ msgstr ""
1890
+
1891
+ #: php/admin/options-page-email-tab.php:155
1892
+ #: php/admin/options-page-results-page-tab.php:141
1893
  msgid "When..."
1894
  msgstr ""
1895
 
1896
+ #: php/admin/options-page-email-tab.php:156
1897
  msgid ""
1898
  "Set conditions for when this email should be sent. Leave empty to set this "
1899
  "as an email that is always sent."
1900
  msgstr ""
1901
 
1902
+ #: php/admin/options-page-email-tab.php:161
1903
+ #: php/admin/options-page-results-page-tab.php:147
1904
  msgid "Add additional condition"
1905
  msgstr ""
1906
 
1907
+ #: php/admin/options-page-email-tab.php:165
1908
  msgid "...Send"
1909
  msgstr ""
1910
 
1911
+ #: php/admin/options-page-email-tab.php:166
1912
  msgid "Create the email that should be sent when the conditions are met."
1913
  msgstr ""
1914
 
1915
+ #: php/admin/options-page-email-tab.php:168
1916
  msgid "Who to send the email to? Put %USER_EMAIL% to send to user"
1917
  msgstr ""
1918
 
1919
+ #: php/admin/options-page-email-tab.php:171
1920
  msgid "Email Subject"
1921
  msgstr ""
1922
 
1923
+ #: php/admin/options-page-email-tab.php:173
1924
  msgid "Email Content"
1925
  msgstr ""
1926
 
1927
+ #: php/admin/options-page-email-tab.php:186
1928
+ #: php/admin/options-page-results-page-tab.php:167
1929
+ msgid "---Select Category---"
1930
+ msgstr ""
1931
+
1932
+ #: php/admin/options-page-email-tab.php:192
1933
+ #: php/admin/options-page-results-page-tab.php:173
1934
+ msgid "No Categories Available"
1935
+ msgstr ""
1936
+
1937
+ #: php/admin/options-page-email-tab.php:196
1938
+ #: php/admin/options-page-results-page-tab.php:178
1939
  msgid "Total points earned"
1940
  msgstr ""
1941
 
1942
+ #: php/admin/options-page-email-tab.php:197
1943
+ #: php/admin/options-page-results-page-tab.php:179
1944
  msgid "Correct score percentage"
1945
  msgstr ""
1946
 
1947
+ #: php/admin/options-page-email-tab.php:202
1948
+ #: php/admin/options-page-results-page-tab.php:184
1949
  msgid "is equal to"
1950
  msgstr ""
1951
 
1952
+ #: php/admin/options-page-email-tab.php:203
1953
+ #: php/admin/options-page-results-page-tab.php:185
1954
  msgid "is not equal to"
1955
  msgstr ""
1956
 
1957
+ #: php/admin/options-page-email-tab.php:204
1958
+ #: php/admin/options-page-results-page-tab.php:186
1959
  msgid "is greater than or equal to"
1960
  msgstr ""
1961
 
1962
+ #: php/admin/options-page-email-tab.php:205
1963
+ #: php/admin/options-page-results-page-tab.php:187
1964
  msgid "is greater than"
1965
  msgstr ""
1966
 
1967
+ #: php/admin/options-page-email-tab.php:206
1968
+ #: php/admin/options-page-results-page-tab.php:188
1969
  msgid "is less than or equal to"
1970
  msgstr ""
1971
 
1972
+ #: php/admin/options-page-email-tab.php:207
1973
+ #: php/admin/options-page-results-page-tab.php:189
1974
  msgid "is less than"
1975
  msgstr ""
1976
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1977
  #: php/admin/options-page-option-tab.php:14
1978
  msgid "Options"
1979
  msgstr ""
1980
 
1981
+ #: php/admin/options-page-questions-tab.php:21
 
1982
  msgid "Questions"
1983
  msgstr ""
1984
 
1985
+ #: php/admin/options-page-questions-tab.php:91
1986
  msgid "Answer"
1987
  msgstr ""
1988
 
1989
+ #: php/admin/options-page-questions-tab.php:116
 
 
 
 
 
 
 
 
 
1990
  msgid ""
1991
  "This quiz has the \"How many questions per page would you like?\" option "
1992
  "enabled. The pages below will not be used while that option is enabled. To "
1993
  "turn off, go to the \"Options\" tab and set that option to 0."
1994
  msgstr ""
1995
 
1996
+ #: php/admin/options-page-questions-tab.php:124
1997
  msgid ""
1998
  "This quiz has the \"How many questions should be loaded for quiz?\" option "
1999
  "enabled. The pages below will not be used while that option is enabled. To "
2000
  "turn off, go to the \"Options\" tab and set that option to 0."
2001
  msgstr ""
2002
 
2003
+ #: php/admin/options-page-questions-tab.php:132
2004
  msgid ""
2005
  "This quiz has the \"Are the questions random?\" option enabled. The pages "
2006
  "below will not be used while that option is enabled. To turn off, go to the "
2007
  "\"Options\" tab and set that option to \"No\"."
2008
  msgstr ""
2009
 
2010
+ #: php/admin/options-page-questions-tab.php:138
2011
  msgid "Total Questions:"
2012
  msgstr ""
2013
 
2014
+ #: php/admin/options-page-questions-tab.php:141
2015
  msgid "Search Questions"
2016
  msgstr ""
2017
 
2018
+ #: php/admin/options-page-questions-tab.php:152
2019
  msgid "Create New Page"
2020
  msgstr ""
2021
 
2022
+ #: php/admin/options-page-questions-tab.php:154
2023
  msgid "Save Questions and Pages"
2024
  msgstr ""
2025
 
2026
+ #: php/admin/options-page-questions-tab.php:163
2027
+ msgid "Question Bank"
 
2028
  msgstr ""
2029
 
2030
+ #: php/admin/options-page-questions-tab.php:170
2031
+ msgid "Select All Question"
2032
+ msgstr ""
2033
+
2034
+ #: php/admin/options-page-questions-tab.php:173
2035
+ msgid "Search questions"
2036
+ msgstr ""
2037
+
2038
+ #: php/admin/options-page-questions-tab.php:182
2039
+ msgid "Delete from Question Bank"
2040
+ msgstr ""
2041
+
2042
+ #: php/admin/options-page-questions-tab.php:183
2043
+ msgid "Add Questions"
2044
+ msgstr ""
2045
+
2046
+ #: php/admin/options-page-questions-tab.php:195
2047
  msgid "Edit Question"
2048
  msgstr ""
2049
 
2050
+ #: php/admin/options-page-questions-tab.php:209
2051
  msgid "Type your question here"
2052
  msgstr ""
2053
 
2054
+ #: php/admin/options-page-questions-tab.php:211
2055
+ msgid "Edit description"
2056
+ msgstr ""
2057
+
2058
+ #: php/admin/options-page-questions-tab.php:213
2059
+ msgid "Hide description"
2060
+ msgstr ""
2061
+
2062
+ #: php/admin/options-page-questions-tab.php:214
2063
  msgid "Add your description here"
2064
  msgstr ""
2065
 
2066
+ #: php/admin/options-page-questions-tab.php:221
2067
  msgid ""
2068
  "For this question type, users will see a file upload field on front end."
2069
  msgstr ""
2070
 
2071
+ #: php/admin/options-page-questions-tab.php:225
2072
  msgid "Use %BLANK% variable in the description field to display input boxes."
2073
  msgstr ""
2074
 
2075
+ #: php/admin/options-page-questions-tab.php:229
2076
  msgid "For this question type, users will see a date input field on front end."
2077
  msgstr ""
2078
 
2079
+ #: php/admin/options-page-questions-tab.php:233
2080
  msgid ""
2081
  "For this question type, users will see a standard input box on front end."
2082
  msgstr ""
2083
 
2084
+ #: php/admin/options-page-questions-tab.php:237
2085
  msgid ""
2086
  "For this question type, users will see a standard textarea input box on "
2087
  "front end."
2088
  msgstr ""
2089
 
2090
+ #: php/admin/options-page-questions-tab.php:241
2091
+ msgid "Displays a simple section on front end. Description is mandatory. "
2092
  msgstr ""
2093
 
2094
+ #: php/admin/options-page-questions-tab.php:245
2095
  msgid ""
2096
  "For this question type, users will see an input box which accepts only "
2097
  "number values on front end."
2098
  msgstr ""
2099
 
2100
+ #: php/admin/options-page-questions-tab.php:249
2101
  msgid ""
2102
  "For this question type, users will see a checkbox on front end. The text in "
2103
  "description field will act like it's label."
2104
  msgstr ""
2105
 
2106
+ #: php/admin/options-page-questions-tab.php:253
2107
  msgid "For this question type, users will see a Captcha field on front end."
2108
  msgstr ""
2109
 
2110
+ #: php/admin/options-page-questions-tab.php:274
2111
  msgid "Use points based grading system for Polar questions."
2112
  msgstr ""
2113
 
2114
+ #: php/admin/options-page-questions-tab.php:298
2115
+ #: php/admin/options-page-questions-tab.php:1107
 
 
 
 
2116
  msgid "Correct"
2117
  msgstr ""
2118
 
2119
+ #: php/admin/options-page-questions-tab.php:303
2120
  msgid "Add New Answer!"
2121
  msgstr ""
2122
 
2123
+ #: php/admin/options-page-questions-tab.php:341
2124
  msgid "Correct Answer Info"
2125
  msgstr ""
2126
 
2127
+ #: php/admin/options-page-questions-tab.php:349
2128
+ msgid "Set custom image size"
2129
  msgstr ""
2130
 
2131
+ #: php/admin/options-page-questions-tab.php:353
2132
+ msgid "Width "
2133
  msgstr ""
2134
 
2135
+ #: php/admin/options-page-questions-tab.php:354
2136
+ msgid "Height"
2137
  msgstr ""
2138
 
2139
+ #: php/admin/options-page-questions-tab.php:361
2140
+ msgid "Comment Box"
2141
  msgstr ""
2142
 
2143
+ #: php/admin/options-page-questions-tab.php:362
2144
+ msgid "Field Type"
2145
  msgstr ""
2146
 
2147
+ #: php/admin/options-page-questions-tab.php:366
2148
+ msgid "Small Text Field"
2149
  msgstr ""
2150
 
2151
+ #: php/admin/options-page-questions-tab.php:367
2152
+ msgid "Large Text Field"
2153
  msgstr ""
2154
 
2155
+ #: php/admin/options-page-questions-tab.php:368
2156
+ msgid "None"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2157
  msgstr ""
2158
 
2159
+ #: php/admin/options-page-questions-tab.php:374
2160
+ #: php/classes/class-qsm-install.php:1301
2161
+ msgid "Hint"
2162
  msgstr ""
2163
 
2164
+ #: php/admin/options-page-questions-tab.php:375
2165
+ #: php/classes/class-qsm-install.php:1299
2166
+ msgid "Hint Text"
2167
  msgstr ""
2168
 
2169
+ #: php/admin/options-page-questions-tab.php:382
2170
+ msgid "Autofill"
2171
  msgstr ""
2172
 
2173
+ #: php/admin/options-page-questions-tab.php:383
2174
+ msgid "Hide Autofill?"
2175
  msgstr ""
2176
 
2177
+ #: php/admin/options-page-questions-tab.php:394
2178
+ msgid "Allow Case Sensitive"
2179
  msgstr ""
2180
 
2181
+ #: php/admin/options-page-questions-tab.php:395
2182
+ msgid "Case Sensitive Answer"
2183
  msgstr ""
2184
 
2185
+ #: php/admin/options-page-questions-tab.php:406
2186
+ msgid "Limit Text"
2187
  msgstr ""
2188
 
2189
+ #: php/admin/options-page-questions-tab.php:407
2190
+ msgid "Maximum number of characters allowed"
2191
  msgstr ""
2192
 
2193
+ #: php/admin/options-page-questions-tab.php:415
2194
+ msgid "Limit Multiple choice"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2195
  msgstr ""
2196
 
2197
+ #: php/admin/options-page-questions-tab.php:416
2198
+ msgid "Maximum number of choice selection allowed"
2199
  msgstr ""
2200
 
2201
+ #: php/admin/options-page-questions-tab.php:424
2202
+ msgid "File upload limit ( in MB )"
2203
  msgstr ""
2204
 
2205
+ #: php/admin/options-page-questions-tab.php:432
2206
  msgid "Allow File type"
2207
  msgstr ""
2208
 
2209
+ #: php/admin/options-page-questions-tab.php:436
2210
  msgid "Text File"
2211
  msgstr ""
2212
 
2213
+ #: php/admin/options-page-questions-tab.php:437
2214
  msgid "Image"
2215
  msgstr ""
2216
 
2217
+ #: php/admin/options-page-questions-tab.php:438
2218
  msgid "PDF File"
2219
  msgstr ""
2220
 
2221
+ #: php/admin/options-page-questions-tab.php:439
2222
  msgid "Doc File"
2223
  msgstr ""
2224
 
2225
+ #: php/admin/options-page-questions-tab.php:440
2226
  msgid "Excel File"
2227
  msgstr ""
2228
 
2229
+ #: php/admin/options-page-questions-tab.php:441
2230
  msgid "Video"
2231
  msgstr ""
2232
 
2233
+ #: php/admin/options-page-questions-tab.php:463
2234
+ msgid "Publish"
 
 
 
 
2235
  msgstr ""
2236
 
2237
+ #: php/admin/options-page-questions-tab.php:471
2238
+ msgid "Question Type"
2239
  msgstr ""
2240
 
2241
+ #: php/admin/options-page-questions-tab.php:497
2242
+ msgid "How to use this option?"
2243
  msgstr ""
2244
 
2245
+ #: php/admin/options-page-questions-tab.php:515
2246
+ msgid "Answers Type"
2247
  msgstr ""
2248
 
2249
+ #: php/admin/options-page-questions-tab.php:519
2250
+ msgid "Text Answers"
2251
  msgstr ""
2252
 
2253
+ #: php/admin/options-page-questions-tab.php:520
2254
+ msgid "Rich Answers"
2255
  msgstr ""
2256
 
2257
+ #: php/admin/options-page-questions-tab.php:521
2258
+ msgid "Image Answers"
2259
  msgstr ""
2260
 
2261
+ #: php/admin/options-page-questions-tab.php:529
2262
+ msgid "Match Answer"
2263
  msgstr ""
2264
 
2265
+ #: php/admin/options-page-questions-tab.php:533
2266
+ msgid "Randomly"
2267
  msgstr ""
2268
 
2269
+ #: php/admin/options-page-questions-tab.php:534
2270
+ msgid "Sequentially"
 
2271
  msgstr ""
2272
 
2273
+ #: php/admin/options-page-questions-tab.php:570
2274
+ msgid "Select Category"
 
2275
  msgstr ""
2276
 
2277
+ #: php/admin/options-page-questions-tab.php:607
2278
+ msgid "Featured image"
 
 
2279
  msgstr ""
2280
 
2281
+ #: php/admin/options-page-questions-tab.php:612
2282
+ msgid "Remove Image"
2283
  msgstr ""
2284
 
2285
+ #: php/admin/options-page-questions-tab.php:635
2286
+ msgid "Edit Page"
 
2287
  msgstr ""
2288
 
2289
+ #: php/admin/options-page-questions-tab.php:647
2290
+ msgid "Hide Previous Button?"
2291
  msgstr ""
2292
 
2293
+ #: php/admin/options-page-questions-tab.php:657
2294
+ msgid "Delete Page"
2295
  msgstr ""
2296
 
2297
+ #: php/admin/options-page-questions-tab.php:658
2298
+ msgid "Save Page"
2299
  msgstr ""
2300
 
2301
+ #: php/admin/options-page-questions-tab.php:670
2302
+ msgid "Delete Options"
2303
  msgstr ""
2304
 
2305
+ #: php/admin/options-page-questions-tab.php:677
2306
+ #: php/admin/options-page-questions-tab.php:689
2307
+ msgid "Unlink"
2308
  msgstr ""
2309
 
2310
+ #: php/admin/options-page-questions-tab.php:678
2311
+ msgid "Removes the question only from this quiz."
2312
  msgstr ""
2313
 
2314
+ #: php/admin/options-page-questions-tab.php:682
2315
+ msgid ""
2316
+ "Removes this question from database and everywhere. This action cannot be "
2317
+ "reversed."
2318
  msgstr ""
2319
 
2320
+ #: php/admin/options-page-questions-tab.php:700
2321
+ msgid "Alert"
2322
  msgstr ""
2323
 
2324
+ #: php/admin/options-page-questions-tab.php:728
2325
+ msgid "Category Name"
2326
  msgstr ""
2327
 
2328
+ #: php/admin/options-page-questions-tab.php:935
2329
+ #: php/admin/options-page-questions-tab.php:984
2330
+ msgid "Nonce verification failed."
2331
  msgstr ""
2332
 
2333
+ #: php/admin/options-page-questions-tab.php:964
2334
+ msgid "Selected Questions are removed from question bank."
2335
  msgstr ""
2336
 
2337
+ #: php/admin/options-page-questions-tab.php:999
2338
+ msgid "Question removed Successfully."
 
 
2339
  msgstr ""
2340
 
2341
+ #: php/admin/options-page-questions-tab.php:1042
2342
+ msgid "Add Question From Question Bank"
2343
  msgstr ""
2344
 
2345
+ #: php/admin/options-page-questions-tab.php:1043
2346
+ msgid "Create New Question"
2347
  msgstr ""
2348
 
2349
+ #: php/admin/options-page-questions-tab.php:1056
2350
+ msgid "Category:"
2351
  msgstr ""
2352
 
2353
+ #: php/admin/options-page-questions-tab.php:1097
2354
+ msgid "Image Caption"
2355
  msgstr ""
2356
 
2357
+ #: php/admin/options-page-results-page-tab.php:19
2358
+ msgid "Results Pages"
2359
  msgstr ""
2360
 
2361
+ #: php/admin/options-page-results-page-tab.php:43
2362
+ #: php/admin/options-page-results-page-tab.php:49
2363
+ msgid "Save Results Pages"
2364
  msgstr ""
2365
 
2366
+ #: php/admin/options-page-results-page-tab.php:44
2367
+ #: php/admin/options-page-results-page-tab.php:50
2368
+ msgid "Add New Results Page"
2369
  msgstr ""
2370
 
2371
+ #: php/admin/options-page-results-page-tab.php:70
2372
+ msgid "X = Question ID Note: only supported for multiple choice answers"
2373
  msgstr ""
2374
 
2375
+ #: php/admin/options-page-results-page-tab.php:71
2376
+ msgid "Show result id"
2377
  msgstr ""
2378
 
2379
+ #: php/admin/options-page-results-page-tab.php:142
2380
  msgid ""
2381
+ "Set conditions for when this page should be shown. Leave empty to set this "
2382
+ "as the default page."
2383
  msgstr ""
2384
 
2385
+ #: php/admin/options-page-results-page-tab.php:151
2386
+ msgid "...Show"
2387
  msgstr ""
2388
 
2389
+ #: php/admin/options-page-results-page-tab.php:152
2390
+ msgid ""
2391
+ "Create the results page that should be shown when the conditions are met."
2392
  msgstr ""
2393
 
2394
+ #: php/admin/options-page-results-page-tab.php:155
2395
+ msgid "Or, redirect the user by entering the URL below:"
 
 
2396
  msgstr ""
2397
 
2398
+ #: php/admin/options-page-style-tab.php:24
2399
+ msgid "Style"
2400
  msgstr ""
2401
 
2402
+ #: php/admin/options-page-style-tab.php:47
2403
+ msgid "The style has been saved successfully."
2404
  msgstr ""
2405
 
2406
+ #: php/admin/options-page-style-tab.php:50
2407
+ msgid "Error occured when trying to save the styles. Please try again."
2408
  msgstr ""
2409
 
2410
+ #: php/admin/options-page-style-tab.php:70
2411
+ msgid "Custom CSS"
2412
  msgstr ""
2413
 
2414
+ #: php/admin/options-page-style-tab.php:75
2415
+ #: php/classes/class-qsm-fields.php:122 php/classes/class-qsm-fields.php:213
2416
+ msgid "Legacy"
2417
  msgstr ""
2418
 
2419
+ #: php/admin/options-page-style-tab.php:88
2420
+ msgid "Featured image updated successfully."
2421
  msgstr ""
2422
 
2423
+ #: php/admin/options-page-style-tab.php:90
2424
+ msgid "The theme is applied successfully."
2425
  msgstr ""
2426
 
2427
+ #: php/admin/options-page-style-tab.php:114
2428
+ msgid "The theme settings saved successfully."
2429
  msgstr ""
2430
 
2431
+ #: php/admin/options-page-style-tab.php:153
2432
+ msgid "Featured Image"
2433
  msgstr ""
2434
 
2435
+ #: php/admin/options-page-style-tab.php:191
2436
+ msgid "This option will be removed in future."
2437
  msgstr ""
2438
 
2439
+ #: php/admin/options-page-style-tab.php:196
2440
+ msgid "Quiz Styles"
2441
+ msgstr ""
2442
+
2443
+ #: php/admin/options-page-style-tab.php:197
2444
+ msgid "Choose your style:"
2445
+ msgstr ""
2446
+
2447
+ #: php/admin/options-page-style-tab.php:217
2448
+ msgid "Custom"
2449
+ msgstr ""
2450
+
2451
+ #: php/admin/options-page-style-tab.php:223
2452
+ #: php/admin/options-page-style-tab.php:240
2453
+ msgid "Save Quiz Style"
2454
+ msgstr ""
2455
+
2456
+ #: php/admin/options-page-style-tab.php:227
2457
+ msgid "Custom Style CSS"
2458
+ msgstr ""
2459
+
2460
+ #: php/admin/options-page-style-tab.php:228
2461
+ msgid ""
2462
+ "For help and guidance along with a list of different classes used in this "
2463
+ "plugin, please visit the following link:"
2464
+ msgstr ""
2465
+
2466
+ #: php/admin/options-page-style-tab.php:249
2467
+ msgid "Customize Quiz Theme"
2468
+ msgstr ""
2469
+
2470
+ #: php/admin/options-page-style-tab.php:283
2471
+ msgid "Select Image"
2472
+ msgstr ""
2473
+
2474
+ #: php/admin/options-page-style-tab.php:305
2475
+ #: php/admin/options-page-style-tab.php:384
2476
+ msgid "No settings found"
2477
+ msgstr ""
2478
+
2479
+ #: php/admin/options-page-style-tab.php:315
2480
+ msgid "Save Settings"
2481
+ msgstr ""
2482
+
2483
+ #: php/admin/options-page-style-tab.php:329
2484
+ msgid "Theme Settings"
2485
+ msgstr ""
2486
+
2487
+ #: php/admin/options-page-style-tab.php:344
2488
+ msgid "Theme settings are saved!"
2489
+ msgstr ""
2490
+
2491
+ #: php/admin/options-page-style-tab.php:357
2492
+ msgid "Back to themes"
2493
+ msgstr ""
2494
+
2495
+ #: php/admin/options-page-style-tab.php:391
2496
+ #: php/classes/class-qsm-fields.php:277
2497
+ msgid "Save Changes"
2498
+ msgstr ""
2499
+
2500
+ #: php/admin/options-page-text-tab.php:49
2501
+ msgid "Select Message"
2502
+ msgstr ""
2503
+
2504
+ #: php/admin/options-page-text-tab.php:63
2505
+ msgid "Save Text Message"
2506
+ msgstr ""
2507
+
2508
+ #: php/admin/options-page-text-tab.php:77
2509
+ msgid "Allowed Variables"
2510
+ msgstr ""
2511
+
2512
+ #: php/admin/options-page-text-tab.php:78
2513
+ msgid "click to insert the variable"
2514
+ msgstr ""
2515
+
2516
+ #: php/admin/options-page-text-tab.php:106
2517
+ #: php/admin/options-page-text-tab.php:109
2518
+ msgid "Customize Labels"
2519
+ msgstr ""
2520
 
2521
+ #: php/admin/options-page-text-tab.php:129
2522
+ msgid "Text id is missing."
2523
  msgstr ""
2524
 
2525
+ #: php/admin/options-page-text-tab.php:186
2526
+ msgid ""
2527
+ "There has been an error in this action. Please share this with the developer"
2528
  msgstr ""
2529
 
2530
+ #: php/admin/quiz-options-page.php:66
2531
+ msgid "Quiz status has been updated successfully to publish."
2532
  msgstr ""
2533
 
2534
+ #: php/admin/quiz-options-page.php:69
2535
+ msgid ""
2536
+ "An error occurred while trying to update the status of your quiz or survey. "
2537
+ "Please try again."
2538
+ msgstr ""
2539
+
2540
+ #: php/admin/quiz-options-page.php:116
2541
+ msgid "Publish Quiz"
2542
+ msgstr ""
2543
+
2544
+ #: php/admin/quiz-options-page.php:128
2545
+ msgid "Help"
2546
  msgstr ""
2547
 
2548
+ #: php/admin/quiz-options-page.php:131
2549
+ msgid "Useful Resources"
2550
  msgstr ""
2551
 
2552
+ #: php/admin/quiz-options-page.php:132
2553
+ msgid "Get support"
2554
  msgstr ""
2555
 
2556
+ #: php/admin/quiz-options-page.php:133
2557
+ msgid "Overview"
2558
+ msgstr ""
2559
+
2560
+ #: php/admin/quiz-options-page.php:134
2561
+ msgid "Creating Quizzes"
2562
+ msgstr ""
2563
+
2564
+ #: php/admin/quiz-options-page.php:135
2565
+ msgid "Question Types"
2566
+ msgstr ""
2567
+
2568
+ #: php/admin/quiz-options-page.php:136
2569
+ msgid "Advanced Topics"
2570
+ msgstr ""
2571
+
2572
+ #: php/admin/quiz-options-page.php:137
2573
+ msgid "QSM Themes"
2574
+ msgstr ""
2575
+
2576
+ #: php/admin/quiz-options-page.php:138 php/admin/quiz-options-page.php:175
2577
+ msgid "Add-ons"
2578
+ msgstr ""
2579
+
2580
+ #: php/admin/quiz-options-page.php:139
2581
+ msgid "All Docs"
2582
+ msgstr ""
2583
+
2584
+ #: php/admin/quiz-options-page.php:213
2585
+ #: php/classes/class-qmn-alert-manager.php:39
2586
+ msgid "Error!"
2587
+ msgstr ""
2588
+
2589
+ #: php/admin/quiz-options-page.php:214
2590
+ msgid ""
2591
+ "Please go to the quizzes page and click on the Edit link from the quiz you "
2592
+ "wish to edit."
2593
+ msgstr ""
2594
+
2595
+ #: php/admin/quiz-options-page.php:227
2596
+ msgid "Edit Name"
2597
+ msgstr ""
2598
+
2599
+ #: php/admin/quiz-options-page.php:256
2600
+ msgid "Do you want to continue and reset all the settings as per"
2601
+ msgstr ""
2602
+
2603
+ #: php/admin/quiz-options-page.php:257
2604
+ msgid "global defaults"
2605
+ msgstr ""
2606
+
2607
+ #: php/admin/quiz-options-page.php:264
2608
+ msgid "Continue"
2609
+ msgstr ""
2610
+
2611
+ #: php/admin/quizzes-page.php:78 php/admin/quizzes-page.php:461
2612
  msgid "Shortcode"
2613
  msgstr ""
2614
 
2615
+ #: php/admin/quizzes-page.php:79
2616
+ msgid "No. of Questions"
2617
+ msgstr ""
2618
+
2619
+ #: php/admin/quizzes-page.php:80
2620
  msgid "Views"
2621
  msgstr ""
2622
 
2623
+ #: php/admin/quizzes-page.php:81 php/admin/quizzes-page.php:121
 
2624
  msgid "Participants"
2625
  msgstr ""
2626
 
2627
+ #: php/admin/quizzes-page.php:82
2628
  msgid "Last Modified"
2629
  msgstr ""
2630
 
2631
+ #: php/admin/quizzes-page.php:98
2632
+ msgid "Click here"
2633
  msgstr ""
2634
 
2635
+ #: php/admin/quizzes-page.php:111
2636
+ msgid "Reset"
 
2637
  msgstr ""
2638
 
2639
+ #: php/admin/quizzes-page.php:158
2640
+ msgid "Edit"
 
2641
  msgstr ""
2642
 
2643
+ #: php/admin/quizzes-page.php:161
2644
  msgid "View Results"
2645
  msgstr ""
2646
 
2647
+ #: php/admin/quizzes-page.php:162
2648
  msgid "Preview"
2649
  msgstr ""
2650
 
2651
+ #: php/admin/quizzes-page.php:172
2652
+ msgid "Delete Permanently"
2653
  msgstr ""
2654
 
2655
+ #: php/admin/quizzes-page.php:231
2656
+ msgid "Sorry, you are not allowed to reset this quiz."
2657
  msgstr ""
2658
 
2659
+ #: php/admin/quizzes-page.php:240
2660
+ msgid "The stats has been reset successfully."
2661
  msgstr ""
2662
 
2663
+ #: php/admin/quizzes-page.php:243
2664
+ msgid "Error trying to reset stats. Please try again."
2665
+ msgstr ""
2666
+
2667
+ #: php/admin/quizzes-page.php:260 php/admin/quizzes-page.php:262
2668
+ msgid "Import & Export"
2669
+ msgstr ""
2670
+
2671
+ #: php/admin/quizzes-page.php:286
2672
+ msgid "Your site is using PHP version"
2673
+ msgstr ""
2674
+
2675
+ #: php/admin/quizzes-page.php:288
2676
+ msgid "Starting in QSM 6.0, your version of PHP will no longer be supported."
2677
+ msgstr ""
2678
+
2679
+ #: php/admin/quizzes-page.php:289
2680
+ msgid "Click here to learn more about QSM's minimum PHP version change."
2681
+ msgstr ""
2682
+
2683
+ #: php/admin/quizzes-page.php:321
2684
  msgid "Reset stats for this quiz?"
2685
  msgstr ""
2686
 
2687
+ #: php/admin/quizzes-page.php:325
2688
  msgid ""
2689
  "Are you sure you want to reset the stats to 0? All views and taken stats for "
2690
  "this quiz will be reset. This is permanent and cannot be undone."
2691
  msgstr ""
2692
 
2693
+ #: php/admin/quizzes-page.php:334
2694
  msgid "Reset All Stats For Quiz"
2695
  msgstr ""
2696
 
2697
+ #: php/admin/quizzes-page.php:353
2698
  msgid "Duplicate questions also?"
2699
  msgstr ""
2700
 
2701
+ #: php/admin/quizzes-page.php:356
2702
  msgid "Name Of New Quiz Or Survey:"
2703
  msgstr ""
2704
 
2705
+ #: php/admin/quizzes-page.php:381
2706
  msgid "Are you sure you want to delete this quiz or survey?"
2707
  msgstr ""
2708
 
2709
+ #: php/admin/quizzes-page.php:385 php/admin/quizzes-page.php:419
2710
  msgid "Delete question from question bank?"
2711
  msgstr ""
2712
 
2713
+ #: php/admin/quizzes-page.php:389 php/admin/quizzes-page.php:423
2714
+ msgid "Delete items from database?"
2715
  msgstr ""
2716
 
2717
+ #: php/admin/quizzes-page.php:410
2718
+ msgid "Bulk Delete"
2719
  msgstr ""
2720
 
2721
+ #: php/admin/quizzes-page.php:415
2722
+ msgid "Are you sure you want to delete selected quiz or survey?"
2723
  msgstr ""
2724
 
2725
+ #: php/admin/quizzes-page.php:441
2726
+ msgid "Extend QSM"
2727
+ msgstr ""
2728
+
2729
+ #: php/admin/quizzes-page.php:446
2730
+ msgid "Export functionality is provided as Premium addon."
2731
+ msgstr ""
2732
+
2733
+ #: php/admin/quizzes-page.php:466
2734
  msgid "Embed Shortcode"
2735
  msgstr ""
2736
 
2737
+ #: php/admin/quizzes-page.php:472
2738
  msgid "Link Shortcode"
2739
  msgstr ""
2740
 
2741
+ #: php/admin/quizzes-page.php:486
2742
  msgid "You do not have any quizzes or surveys yet"
2743
  msgstr ""
2744
 
2745
+ #: php/admin/quizzes-page.php:491
2746
  msgid "or watch the below video to get started"
2747
  msgstr ""
2748
 
2749
+ #: php/admin/settings-page.php:73 php/admin/settings-page.php:533
 
 
 
 
2750
  msgid "Main Settings"
2751
  msgstr ""
2752
 
2753
+ #: php/admin/settings-page.php:74
2754
  msgid "Allow Usage Tracking?"
2755
  msgstr ""
2756
 
2757
+ #: php/admin/settings-page.php:75
2758
  msgid "Disable collecting and storing IP addresses?"
2759
  msgstr ""
2760
 
2761
+ #: php/admin/settings-page.php:76
2762
  msgid "Disable Quiz Posts From Being Searched?"
2763
  msgstr ""
2764
 
2765
+ #: php/admin/settings-page.php:77
2766
  msgid "Disable Quiz Archive?"
2767
  msgstr ""
2768
 
2769
+ #: php/admin/settings-page.php:78
2770
  msgid "Delete all the data related to QSM on deletion?"
2771
  msgstr ""
2772
 
2773
+ #: php/admin/settings-page.php:79
2774
  msgid "Process emails in background?"
2775
  msgstr ""
2776
 
2777
+ #: php/admin/settings-page.php:80
2778
  msgid "Quiz Url Slug"
2779
  msgstr ""
2780
 
2781
+ #: php/admin/settings-page.php:81
2782
  msgid ""
2783
  "Post Type Plural Name (Shown in various places such as on archive pages)"
2784
  msgstr ""
2785
 
2786
+ #: php/admin/settings-page.php:82
2787
  msgid "Facebook App Id"
2788
  msgstr ""
2789
 
2790
+ #: php/admin/settings-page.php:83
2791
  msgid "From Name (The name emails come from)"
2792
  msgstr ""
2793
 
2794
+ #: php/admin/settings-page.php:84
2795
  msgid "From Email (The email address that emails come from)"
2796
  msgstr ""
2797
 
2798
+ #: php/admin/settings-page.php:85
2799
  msgid "Items per page in question bank pagination"
2800
  msgstr ""
2801
 
2802
+ #: php/admin/settings-page.php:86
2803
  msgid "New Template For Admin Results Details"
2804
  msgstr ""
2805
 
2806
+ #: php/admin/settings-page.php:87
2807
  msgid "Template For Admin Results Details"
2808
  msgstr ""
2809
 
2810
+ #: php/admin/settings-page.php:157 php/classes/class-qsm-install.php:48
2811
+ msgid "Quiz Type"
2812
  msgstr ""
2813
 
2814
+ #: php/admin/settings-page.php:159 php/classes/class-qsm-install.php:99
2815
+ msgid "Correct Answer Logic"
2816
+ msgstr ""
2817
+
2818
+ #: php/admin/settings-page.php:160 php/classes/class-qsm-install.php:120
2819
+ msgid "Default Number of Answers"
2820
+ msgstr ""
2821
+
2822
+ #: php/admin/settings-page.php:161 php/classes/class-qsm-install.php:132
2823
+ msgid "Allow Score Round-off"
2824
+ msgstr ""
2825
+
2826
+ #: php/admin/settings-page.php:162 php/classes/class-qsm-install.php:148
2827
+ msgid "Show progress bar"
2828
+ msgstr ""
2829
+
2830
+ #: php/admin/settings-page.php:164 php/classes/class-qsm-install.php:189
2831
+ msgid "Questions Per Page"
2832
+ msgstr ""
2833
+
2834
+ #: php/admin/settings-page.php:165 php/classes/class-qsm-install.php:202
2835
+ msgid "Time Limit (in minutes)"
2836
+ msgstr ""
2837
+
2838
+ #: php/admin/settings-page.php:166 php/classes/class-qsm-install.php:214
2839
+ msgid "Force submit after timer expiry"
2840
+ msgstr ""
2841
+
2842
+ #: php/admin/settings-page.php:167 php/classes/class-qsm-install.php:233
2843
+ msgid "Skip validations when time expire"
2844
+ msgstr ""
2845
+
2846
+ #: php/admin/settings-page.php:168 php/classes/class-qsm-install.php:253
2847
+ msgid "Limit Attempts"
2848
+ msgstr ""
2849
+
2850
+ #: php/admin/settings-page.php:169 php/classes/class-qsm-install.php:266
2851
+ msgid "Limit Entries"
2852
+ msgstr ""
2853
+
2854
+ #: php/admin/settings-page.php:170 php/classes/class-qsm-install.php:279
2855
+ msgid "Limit number of Questions"
2856
+ msgstr ""
2857
+
2858
+ #: php/admin/settings-page.php:171
2859
+ msgid "Limit number of Questions Per Category"
2860
+ msgstr ""
2861
+
2862
+ #: php/admin/settings-page.php:172 php/classes/class-qsm-install.php:346
2863
+ msgid "Quiz Dates"
2864
+ msgstr ""
2865
+
2866
+ #: php/admin/settings-page.php:173 php/classes/class-qsm-install.php:372
2867
+ msgid "Do not allow quiz submission after the end date/time"
2868
+ msgstr ""
2869
+
2870
+ #: php/admin/settings-page.php:174 php/admin/settings-page.php:1218
2871
+ #: php/classes/class-qsm-install.php:317 php/classes/class-qsm-install.php:321
2872
+ msgid "Random Questions"
2873
+ msgstr ""
2874
+
2875
+ #: php/admin/settings-page.php:175 php/classes/class-qsm-install.php:388
2876
+ msgid "Contact form position"
2877
+ msgstr ""
2878
+
2879
+ #: php/admin/settings-page.php:177 php/classes/class-qsm-install.php:432
2880
+ msgid "Enable comments"
2881
+ msgstr ""
2882
+
2883
+ #: php/admin/settings-page.php:178 php/classes/class-qsm-install.php:453
2884
+ msgid "Show question numbers"
2885
+ msgstr ""
2886
+
2887
+ #: php/admin/settings-page.php:179
2888
+ msgid "Show Opt-in type Answers to user"
2889
+ msgstr ""
2890
+
2891
+ #: php/admin/settings-page.php:180 php/classes/class-qsm-install.php:493
2892
+ msgid "Submit Actions"
2893
+ msgstr ""
2894
+
2895
+ #: php/admin/settings-page.php:181 php/classes/class-qsm-install.php:527
2896
+ msgid "Disable change of answers"
2897
+ msgstr ""
2898
+
2899
+ #: php/admin/settings-page.php:182 php/classes/class-qsm-install.php:549
2900
+ msgid "Add class for correct/incorrect answers"
2901
+ msgstr ""
2902
+
2903
+ #: php/admin/settings-page.php:183 php/classes/class-qsm-install.php:571
2904
+ msgid "Disable auto fill for contact input"
2905
+ msgstr ""
2906
+
2907
+ #: php/admin/settings-page.php:184 php/classes/class-qsm-install.php:590
2908
+ msgid "Disable auto fill for Quiz input"
2909
+ msgstr ""
2910
+
2911
+ #: php/admin/settings-page.php:185 php/classes/class-qsm-install.php:610
2912
+ msgid "Display category name on front end"
2913
+ msgstr ""
2914
+
2915
+ #: php/admin/settings-page.php:186 php/classes/class-qsm-install.php:630
2916
+ msgid "Show results inline"
2917
+ msgstr ""
2918
+
2919
+ #: php/admin/settings-page.php:187 php/classes/class-qsm-install.php:650
2920
+ msgid "End quiz if there is wrong answer"
2921
+ msgstr ""
2922
+
2923
+ #: php/admin/settings-page.php:188 php/classes/class-qsm-install.php:671
2924
+ msgid "Show correct answer inline"
2925
+ msgstr ""
2926
+
2927
+ #: php/admin/settings-page.php:189 php/classes/class-qsm-install.php:696
2928
+ #: php/classes/class-qsm-install.php:1189
2929
+ msgid "Retake Quiz"
2930
+ msgstr ""
2931
+
2932
+ #: php/admin/settings-page.php:190 php/classes/class-qsm-install.php:717
2933
+ msgid "Show current page number"
2934
+ msgstr ""
2935
+
2936
+ #: php/admin/settings-page.php:191 php/classes/class-qsm-install.php:737
2937
+ #: php/question-types/qsm-question-title.php:18
2938
+ msgid "Deselect Answer"
2939
+ msgstr ""
2940
+
2941
+ #: php/admin/settings-page.php:192 php/classes/class-qsm-install.php:758
2942
+ msgid "Disable description on quiz result page?"
2943
+ msgstr ""
2944
+
2945
+ #: php/admin/settings-page.php:193
2946
+ msgid "Disable MathJax?"
2947
+ msgstr ""
2948
+
2949
+ #: php/admin/settings-page.php:194 php/classes/class-qsm-install.php:798
2950
+ msgid "Disable scroll on next and previous button click?"
2951
  msgstr ""
2952
 
2953
+ #: php/admin/settings-page.php:196 php/classes/class-qsm-install.php:838
2954
+ msgid "Quiz Animation"
2955
+ msgstr ""
2956
+
2957
+ #: php/admin/settings-page.php:197 php/classes/class-qsm-install.php:849
2958
+ msgid "Logo URL"
2959
+ msgstr ""
2960
+
2961
+ #: php/admin/settings-page.php:198 php/classes/class-qsm-install.php:861
2962
+ msgid "Preferred Date Format"
2963
+ msgstr ""
2964
+
2965
+ #: php/admin/settings-page.php:220
2966
+ msgid "These settings are applied to the entire plugin and all quizzes."
2967
+ msgstr ""
2968
+
2969
+ #: php/admin/settings-page.php:480
2970
  msgid ""
2971
  "Allow Quiz And Survey Master to anonymously track this plugin's usage and "
2972
  "help us make this plugin better."
2973
  msgstr ""
2974
 
2975
+ #: php/admin/settings-page.php:502
2976
  msgid ""
2977
  "You must not restrict number of quiz attempts when this option is enabled."
2978
  msgstr ""
2979
 
2980
+ #: php/admin/settings-page.php:530
2981
  msgid "Global Settings"
2982
  msgstr ""
2983
 
2984
+ #: php/admin/settings-page.php:534
2985
+ msgid "Quiz Default Options"
2986
+ msgstr ""
2987
+
2988
+ #: php/admin/settings-page.php:541
2989
+ msgid " Settings have been updated!"
2990
+ msgstr ""
2991
+
2992
+ #: php/admin/settings-page.php:555 php/classes/class-qsm-fields.php:103
2993
+ msgid "General"
2994
+ msgstr ""
2995
+
2996
+ #: php/admin/settings-page.php:559 php/classes/class-qsm-fields.php:107
2997
+ msgid "Quiz submission"
2998
+ msgstr ""
2999
+
3000
+ #: php/admin/settings-page.php:564 php/classes/class-qsm-fields.php:112
3001
+ msgid "Display"
3002
+ msgstr ""
3003
+
3004
+ #: php/admin/settings-page.php:569 php/classes/class-qsm-fields.php:117
3005
+ msgid "Contact form"
3006
+ msgstr ""
3007
+
3008
+ #: php/admin/settings-page.php:610
3009
  msgid "New Template"
3010
  msgstr ""
3011
 
3012
+ #: php/admin/settings-page.php:615
3013
  msgid "Old Template"
3014
  msgstr ""
3015
 
3016
+ #: php/admin/settings-page.php:905 php/classes/class-qsm-install.php:497
3017
+ msgid "Store results permanently in database"
3018
+ msgstr ""
3019
+
3020
+ #: php/admin/settings-page.php:908 php/classes/class-qsm-install.php:514
3021
+ msgid "Send email notifications"
3022
+ msgstr ""
3023
+
3024
+ #: php/admin/settings-page.php:1222 php/classes/class-qsm-install.php:325
3025
+ msgid "Random Questions And Answers"
3026
+ msgstr ""
3027
+
3028
+ #: php/admin/settings-page.php:1226 php/classes/class-qsm-install.php:329
3029
+ msgid "Random Answers"
3030
+ msgstr ""
3031
+
3032
+ #: php/admin/settings-page.php:1230 php/classes/class-qsm-install.php:333
3033
+ msgid "Disabled"
3034
+ msgstr ""
3035
+
3036
+ #: php/admin/stats-page.php:27
3037
  msgid "Quiz/Survey Statistics"
3038
  msgstr ""
3039
 
3040
+ #: php/admin/stats-page.php:61
3041
  msgid "Quiz And Survey Submissions"
3042
  msgstr ""
3043
 
3044
+ #: php/admin/stats-page.php:108
3045
  msgid "Daily"
3046
  msgstr ""
3047
 
3048
+ #: php/admin/stats-page.php:109
3049
  msgid "Weekly"
3050
  msgstr ""
3051
 
3052
+ #: php/admin/stats-page.php:110
3053
  msgid "Monthly"
3054
  msgstr ""
3055
 
3056
+ #: php/admin/stats-page.php:113
3057
  msgid "Filter"
3058
  msgstr ""
3059
 
3060
+ #: php/admin/tools-page.php:67
3061
  msgid "There has been an error! Please try again."
3062
  msgstr ""
3063
 
3064
+ #: php/admin/tools-page.php:91
3065
  msgid "Quiz Has Been Restored!"
3066
  msgstr ""
3067
 
3068
+ #: php/admin/tools-page.php:97
3069
+ msgid ""
3070
+ "Choose a quiz in the drop down and then click the button to restore a "
3071
+ "deleted quiz."
3072
+ msgstr ""
3073
+
3074
+ #: php/admin/tools-page.php:108
3075
+ msgid "Restore Quiz"
3076
+ msgstr ""
3077
+
3078
+ #: php/admin/tools-page.php:137
3079
+ msgid "Total actions since QSM installed:"
3080
+ msgstr ""
3081
+
3082
+ #: php/admin/tools-page.php:138
3083
+ msgid "Export"
3084
+ msgstr ""
3085
+
3086
+ #: php/admin/tools-page.php:139
3087
+ msgid "Clear Audit"
3088
+ msgstr ""
3089
+
3090
+ #: php/admin/tools-page.php:150 php/admin/tools-page.php:181
3091
+ #, php-format
3092
+ msgid "Previous %s Audits"
3093
+ msgstr ""
3094
+
3095
+ #: php/admin/tools-page.php:159 php/admin/tools-page.php:170
3096
+ #, php-format
3097
+ msgid "Next %s Audits"
3098
+ msgstr ""
3099
+
3100
+ #: php/admin/tools-page.php:190
3101
+ msgid "ID"
3102
+ msgstr ""
3103
+
3104
+ #: php/admin/tools-page.php:192
3105
+ msgid "Action"
3106
+ msgstr ""
3107
+
3108
+ #: php/admin/tools-page.php:194
3109
+ msgid "Time"
3110
+ msgstr ""
3111
+
3112
+ #: php/admin/tools-page.php:200
3113
+ msgid ""
3114
+ "Are you sure you want to delete this record? You will not be able to recover "
3115
+ "this data!"
3116
+ msgstr ""
3117
+
3118
+ #: php/classes/class-qmn-alert-manager.php:36
3119
+ msgid "Success!"
3120
+ msgstr ""
3121
+
3122
+ #: php/classes/class-qmn-alert-manager.php:49
3123
+ msgid "Warning!"
3124
+ msgstr ""
3125
+
3126
+ #: php/classes/class-qmn-plugin-helper.php:893
3127
+ msgid "bounce"
3128
+ msgstr ""
3129
+
3130
+ #: php/classes/class-qmn-plugin-helper.php:897
3131
+ msgid "flash"
3132
+ msgstr ""
3133
+
3134
+ #: php/classes/class-qmn-plugin-helper.php:901
3135
+ msgid "pulse"
3136
+ msgstr ""
3137
+
3138
+ #: php/classes/class-qmn-plugin-helper.php:905
3139
+ msgid "rubberBand"
3140
+ msgstr ""
3141
+
3142
+ #: php/classes/class-qmn-plugin-helper.php:909
3143
+ msgid "shake"
3144
+ msgstr ""
3145
+
3146
+ #: php/classes/class-qmn-plugin-helper.php:913
3147
+ msgid "swing"
3148
+ msgstr ""
3149
+
3150
+ #: php/classes/class-qmn-plugin-helper.php:917
3151
+ msgid "tada"
3152
+ msgstr ""
3153
+
3154
+ #: php/classes/class-qmn-plugin-helper.php:921
3155
+ msgid "wobble"
3156
+ msgstr ""
3157
+
3158
+ #: php/classes/class-qmn-plugin-helper.php:925
3159
+ msgid "jello"
3160
+ msgstr ""
3161
+
3162
+ #: php/classes/class-qmn-plugin-helper.php:929
3163
+ msgid "heartBeat"
3164
+ msgstr ""
3165
+
3166
+ #: php/classes/class-qmn-plugin-helper.php:933
3167
+ msgid "No animation"
3168
+ msgstr ""
3169
+
3170
+ #: php/classes/class-qmn-quiz-creator.php:80
3171
+ msgid "Welcome to your %QUIZ_NAME%"
3172
+ msgstr ""
3173
+
3174
+ #: php/classes/class-qmn-quiz-creator.php:81
3175
  msgid ""
3176
+ "Thanks for submitting your response! You can edit this message on the "
3177
+ "\"Results Pages\" tab. <br>%CONTACT_ALL% <br>%QUESTIONS_ANSWERS%"
3178
  msgstr ""
3179
 
3180
+ #: php/classes/class-qmn-quiz-creator.php:82
3181
+ msgid "Please fill in the comment box below."
3182
  msgstr ""
3183
 
3184
+ #: php/classes/class-qmn-quiz-creator.php:86
3185
+ msgid "Submit"
3186
  msgstr ""
3187
 
3188
+ #: php/classes/class-qmn-quiz-creator.php:90
3189
+ msgid "Phone Number"
 
3190
  msgstr ""
3191
 
3192
+ #: php/classes/class-qmn-quiz-creator.php:91
3193
+ msgid "Comments"
 
3194
  msgstr ""
3195
 
3196
+ #: php/classes/class-qmn-quiz-creator.php:110
3197
+ msgid "You have utilized all of your attempts to pass this quiz."
3198
  msgstr ""
3199
 
3200
+ #: php/classes/class-qmn-quiz-creator.php:113
3201
+ msgid "I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!"
3202
  msgstr ""
3203
 
3204
+ #: php/classes/class-qmn-quiz-creator.php:123
3205
+ msgid "This quiz is for logged in users only."
3206
+ msgstr ""
3207
+
3208
+ #: php/classes/class-qmn-quiz-creator.php:125
3209
+ msgid ""
3210
+ "Unfortunately, this quiz has a limited amount of entries it can recieve and "
3211
+ "has already reached that limit."
3212
  msgstr ""
3213
 
3214
+ #: php/classes/class-qmn-quiz-creator.php:204
3215
  msgid ""
3216
  "Your new quiz or survey has been created successfully. To begin editing, "
3217
  "click the Edit link."
3218
  msgstr ""
3219
 
3220
+ #: php/classes/class-qmn-quiz-creator.php:215
 
 
 
 
3221
  msgid ""
3222
  "There has been an error in this action. Please share this with the "
3223
+ "developer. Error Code: 0001"
3224
+ msgstr ""
3225
+
3226
+ #: php/classes/class-qmn-quiz-creator.php:236
3227
+ msgid "Sorry, you are not allowed to delete this quiz."
3228
  msgstr ""
3229
 
3230
+ #: php/classes/class-qmn-quiz-creator.php:286
3231
  msgid "Your quiz or survey has been deleted successfully."
3232
  msgstr ""
3233
 
3234
+ #: php/classes/class-qmn-quiz-creator.php:289
3235
+ msgid ""
3236
+ "There has been an error in this action. Please share this with the "
3237
+ "developer. Error Code: 0002"
3238
+ msgstr ""
3239
+
3240
+ #: php/classes/class-qmn-quiz-creator.php:326
3241
  msgid "The name of your quiz or survey has been updated successfully."
3242
  msgstr ""
3243
 
3244
+ #: php/classes/class-qmn-quiz-creator.php:333
3245
  msgid ""
3246
  "An error occurred while trying to update the name of your quiz or survey. "
3247
  "Please try again."
3248
  msgstr ""
3249
 
3250
+ #: php/classes/class-qmn-quiz-creator.php:357
3251
+ msgid "Sorry, you are not allowed to duplicate this quiz."
3252
+ msgstr ""
3253
+
3254
+ #: php/classes/class-qmn-quiz-creator.php:521
3255
  msgid "Your quiz or survey has been duplicated successfully."
3256
  msgstr ""
3257
 
3258
+ #: php/classes/class-qmn-quiz-creator.php:530
3259
+ msgid ""
3260
+ "There has been an error in this action. Please share this with the "
3261
+ "developer. Error Code: 0011"
3262
+ msgstr ""
3263
+
3264
+ #: php/classes/class-qmn-quiz-creator.php:648
3265
+ msgid ""
3266
+ "There has been an error in this action. Please share this with the "
3267
+ "developer. Error Code: 0020"
3268
+ msgstr ""
3269
+
3270
+ #: php/classes/class-qmn-quiz-manager.php:130
3271
+ msgid "File is not uploaded!"
3272
  msgstr ""
3273
 
3274
+ #: php/classes/class-qmn-quiz-manager.php:141
3275
+ msgid "File is too large. File must be less than "
3276
  msgstr ""
3277
 
3278
+ #: php/classes/class-qmn-quiz-manager.php:168
3279
  msgid "File uploaded successfully"
3280
  msgstr ""
3281
 
3282
+ #: php/classes/class-qmn-quiz-manager.php:174
3283
+ msgid "Upload failed!"
3284
+ msgstr ""
3285
+
3286
+ #: php/classes/class-qmn-quiz-manager.php:184
3287
+ msgid "File type is not supported!"
3288
  msgstr ""
3289
 
3290
+ #: php/classes/class-qmn-quiz-manager.php:201
3291
  msgid "File removed successfully"
3292
  msgstr ""
3293
 
3294
+ #: php/classes/class-qmn-quiz-manager.php:208
3295
  msgid "File not removed"
3296
  msgstr ""
3297
 
3298
+ #: php/classes/class-qmn-quiz-manager.php:245
3299
  msgid "Correct Info: "
3300
  msgstr ""
3301
 
3302
+ #: php/classes/class-qmn-quiz-manager.php:364
3303
+ #: php/classes/class-qmn-quiz-manager.php:381
3304
  msgid "It appears that this quiz is not set up correctly"
3305
  msgstr ""
3306
 
3307
+ #: php/classes/class-qmn-quiz-manager.php:541
3308
+ #: php/classes/class-qmn-quiz-manager.php:544
3309
+ msgid "Invalid result id!"
3310
+ msgstr ""
3311
+
3312
+ #: php/classes/class-qmn-quiz-manager.php:817
3313
  msgid "Limit of choice is reached."
3314
  msgstr ""
3315
 
3316
+ #: php/classes/class-qmn-quiz-manager.php:818
3317
+ #: php/classes/class-qmn-quiz-manager.php:1090
 
3318
  msgid " out of "
3319
  msgstr ""
3320
 
3321
+ #: php/classes/class-qmn-quiz-manager.php:819
3322
+ msgid "Quiz time is over."
 
3323
  msgstr ""
3324
 
3325
+ #: php/classes/class-qmn-quiz-manager.php:1287
3326
+ msgid "1 out of "
3327
  msgstr ""
3328
 
3329
+ #: php/classes/class-qmn-quiz-manager.php:1728
3330
+ msgid "Captcha verification failed."
3331
  msgstr ""
3332
 
3333
+ #: php/classes/class-qmn-quiz-manager.php:2414
3334
  msgid "Not collected"
3335
  msgstr ""
3336
 
3337
+ #: php/classes/class-qmn-quiz-manager.php:2436
3338
  msgid "Unknown"
3339
  msgstr ""
3340
 
3341
+ #: php/classes/class-qmn-quiz-manager.php:2443
3342
+ msgid "Invalid IP Address"
3343
+ msgstr ""
3344
+
3345
+ #: php/classes/class-qmn-review-message.php:92
3346
  #, php-format
3347
  msgid ""
3348
+ "Greetings! I just noticed that you now have more than %s quiz results. That "
3349
+ "is awesome! Could you please help me out by giving this plugin a 5-star "
3350
+ "rating on WordPress? This will help us by helping other users discover this "
3351
+ "plugin."
 
3352
  msgstr ""
3353
 
3354
+ #: php/classes/class-qmn-review-message.php:93
3355
+ msgid "QSM Team"
3356
  msgstr ""
3357
 
3358
+ #: php/classes/class-qmn-review-message.php:94
3359
+ msgid "I already did ! "
3360
  msgstr ""
3361
 
3362
+ #: php/classes/class-qmn-review-message.php:95
3363
  msgid "No, this plugin is not good enough"
3364
  msgstr ""
3365
 
3366
+ #: php/classes/class-qsm-fields.php:72
3367
  msgid "The settings has been updated successfully."
3368
  msgstr ""
3369
 
3370
+ #: php/classes/class-qsm-fields.php:82
3371
  msgid "There was an error when updating the settings. Please try again."
3372
  msgstr ""
3373
 
3374
+ #: php/classes/class-qsm-fields.php:180 php/classes/class-qsm-fields.php:258
3375
+ msgid ""
3376
+ "All the legacy options are deprecated and will be removed in upcoming version"
3377
  msgstr ""
3378
 
3379
+ #: php/classes/class-qsm-fields.php:199 php/classes/class-qsm-install.php:1170
3380
+ msgid "Buttons"
3381
  msgstr ""
3382
 
3383
+ #: php/classes/class-qsm-fields.php:203
3384
+ msgid "Validation Messages"
3385
  msgstr ""
3386
 
3387
+ #: php/classes/class-qsm-fields.php:208
3388
+ msgid "Other"
3389
  msgstr ""
3390
 
3391
+ #: php/classes/class-qsm-fields.php:279
3392
+ msgid "Reset to Defaults"
3393
+ msgstr ""
3394
+
3395
+ #: php/classes/class-qsm-fields.php:426
3396
+ msgid "Allowed Variables:"
3397
  msgstr ""
3398
 
3399
+ #: php/classes/class-qsm-install.php:56
3400
+ msgid "Survey"
3401
+ msgstr ""
3402
+
3403
+ #: php/classes/class-qsm-install.php:60
3404
+ msgid "Simple Form"
3405
+ msgstr ""
3406
+
3407
+ #: php/classes/class-qsm-install.php:76
3408
  msgid "Correct/Incorrect"
3409
  msgstr ""
3410
 
3411
+ #: php/classes/class-qsm-install.php:84
3412
  msgid "Both"
3413
  msgstr ""
3414
 
3415
+ #: php/classes/class-qsm-install.php:89
3416
  msgid "Select the system for grading the quiz."
3417
  msgstr ""
3418
 
3419
+ #: php/classes/class-qsm-install.php:90
3420
  msgid "To know more about our grading systems please "
3421
  msgstr ""
3422
 
3423
+ #: php/classes/class-qsm-install.php:90
3424
  msgid "read the documentation."
3425
  msgstr ""
3426
 
3427
+ #: php/classes/class-qsm-install.php:103
3428
+ msgid "All correct answers"
3429
  msgstr ""
3430
 
3431
+ #: php/classes/class-qsm-install.php:107
3432
+ msgid "Any correct answer"
3433
  msgstr ""
3434
 
3435
+ #: php/classes/class-qsm-install.php:124
3436
+ msgid "Adds number of answer fields"
3437
  msgstr ""
3438
 
3439
+ #: php/classes/class-qsm-install.php:181
3440
  msgid "Enabling this allows only logged in users to take the quiz"
3441
  msgstr ""
3442
 
3443
+ #: php/classes/class-qsm-install.php:193
 
 
 
 
3444
  msgid "Override the default pagination created on questions tab"
3445
  msgstr ""
3446
 
3447
+ #: php/classes/class-qsm-install.php:206
 
 
 
 
3448
  msgid "Leave 0 for no time limit"
3449
  msgstr ""
3450
 
3451
+ #: php/classes/class-qsm-install.php:257
 
 
 
 
 
 
 
 
 
 
 
 
3452
  msgid "Leave 0 for unlimited attempts"
3453
  msgstr ""
3454
 
3455
+ #: php/classes/class-qsm-install.php:258
3456
  msgid "Limits how many times a user can take the quiz"
3457
  msgstr ""
3458
 
3459
+ #: php/classes/class-qsm-install.php:270
 
 
 
 
3460
  msgid "Leave 0 for unlimited entries"
3461
  msgstr ""
3462
 
3463
+ #: php/classes/class-qsm-install.php:271
3464
  msgid "Limits how many users can take the quiz."
3465
  msgstr ""
3466
 
3467
+ #: php/classes/class-qsm-install.php:283
 
 
 
 
3468
  msgid "Leave 0 to load all questions"
3469
  msgstr ""
3470
 
3471
+ #: php/classes/class-qsm-install.php:284
3472
  msgid "Show only limited number of questions from your quiz."
3473
  msgstr ""
3474
 
3475
+ #: php/classes/class-qsm-install.php:293
3476
+ msgid "Limit number of Questions Per Category "
 
 
 
 
 
 
 
 
 
 
 
 
3477
  msgstr ""
3478
 
3479
+ #: php/classes/class-qsm-install.php:297
3480
+ msgid ""
3481
+ "Leave 0 to load all questions. You also need to set Limit Number of "
3482
+ "questions, as well as select Question Categories"
3483
  msgstr ""
3484
 
3485
+ #: php/classes/class-qsm-install.php:298
3486
+ msgid ""
3487
+ "Show only limited number of category questions from your quiz.You also need "
3488
+ "to set Limit Number of questions."
3489
  msgstr ""
3490
 
3491
+ #: php/classes/class-qsm-install.php:306
3492
+ msgid "Questions Categories"
3493
  msgstr ""
3494
 
3495
+ #: php/classes/class-qsm-install.php:309
3496
+ msgid "Questions will load only from selected categories."
3497
  msgstr ""
3498
 
3499
+ #: php/classes/class-qsm-install.php:338
3500
+ msgid "Randomize the order of questions or answers every time a quiz loads"
3501
  msgstr ""
3502
 
3503
+ #: php/classes/class-qsm-install.php:351
3504
+ msgid "Start Date"
3505
  msgstr ""
3506
 
3507
+ #: php/classes/class-qsm-install.php:352
3508
+ msgid "If set, Quiz will be accessible only after this date"
3509
  msgstr ""
3510
 
3511
+ #: php/classes/class-qsm-install.php:353
3512
+ msgid "Leave blank for no date limit"
3513
  msgstr ""
3514
 
3515
+ #: php/classes/class-qsm-install.php:365
3516
+ msgid " If set, Quiz will not be accessible after this date"
3517
  msgstr ""
3518
 
3519
+ #: php/classes/class-qsm-install.php:366
3520
+ msgid "End Date"
3521
  msgstr ""
3522
 
3523
+ #: php/classes/class-qsm-install.php:392
3524
  msgid "Show before quiz begins"
3525
  msgstr ""
3526
 
3527
+ #: php/classes/class-qsm-install.php:396
3528
  msgid "Show after the quiz ends"
3529
  msgstr ""
3530
 
3531
+ #: php/classes/class-qsm-install.php:401
3532
  msgid "Select when to display the contact form"
3533
  msgstr ""
3534
 
3535
+ #: php/classes/class-qsm-install.php:402
3536
  msgid "The form can be configured in Contact tab"
3537
  msgstr ""
3538
 
3539
+ #: php/classes/class-qsm-install.php:423
 
 
 
 
3540
  msgid "Logged in users can edit their contact information"
3541
  msgstr ""
3542
 
3543
+ #: php/classes/class-qsm-install.php:424
3544
  msgid "The information will still get saved if this option is disabled"
3545
  msgstr ""
3546
 
3547
+ #: php/classes/class-qsm-install.php:445
 
 
 
 
3548
  msgid "Allow users to enter their comments after the quiz"
3549
  msgstr ""
3550
 
3551
+ #: php/classes/class-qsm-install.php:473
3552
+ msgid "Show Opt-in type Answers to User"
 
 
 
 
 
 
 
 
 
 
 
 
3553
  msgstr ""
3554
 
3555
+ #: php/classes/class-qsm-install.php:540 php/classes/class-qsm-install.php:562
3556
  msgid "Works with multiple choice questions only"
3557
  msgstr ""
3558
 
3559
+ #: php/classes/class-qsm-install.php:541
3560
  msgid "The question will be disabled once an answer is selected"
3561
  msgstr ""
3562
 
3563
+ #: php/classes/class-qsm-install.php:563
 
 
 
 
3564
  msgid ""
3565
  "Dynamically add class for incorrect/correct answer after user selects answer."
3566
  msgstr ""
3567
 
3568
+ #: php/classes/class-qsm-install.php:643
 
 
 
 
 
 
 
 
 
 
 
 
3569
  msgid "Instantly displays the result for each question"
3570
  msgstr ""
3571
 
3572
+ #: php/classes/class-qsm-install.php:663
3573
+ msgid ""
3574
+ "This option works with vertical Multiple Choice , horizontal Multiple "
3575
+ "Choice , drop down , multiple response and horizontal multiple response "
3576
+ "question types"
3577
  msgstr ""
3578
 
3579
+ #: php/classes/class-qsm-install.php:675
3580
  msgid "Yes When answer is correct"
3581
  msgstr ""
3582
 
3583
+ #: php/classes/class-qsm-install.php:679
3584
  msgid "Yes Independent of correct/incorrect"
3585
  msgstr ""
3586
 
3587
+ #: php/classes/class-qsm-install.php:688
3588
  msgid "Show correct user info when inline result is enabled."
3589
  msgstr ""
3590
 
3591
+ #: php/classes/class-qsm-install.php:709
3592
  msgid "Show a button on result page to retake the quiz"
3593
  msgstr ""
3594
 
3595
+ #: php/classes/class-qsm-install.php:750
 
 
 
 
 
 
 
 
3596
  msgid ""
3597
  "Users are able deselect an answer and leave it blank. Works with Multiple "
3598
  "Choice and Horizintal Multiple Choice questions only"
3599
  msgstr ""
3600
 
3601
+ #: php/classes/class-qsm-install.php:777
3602
+ msgid "Disable MathJax"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3603
  msgstr ""
3604
 
3605
+ #: php/classes/class-qsm-install.php:790
3606
+ msgid "Allows you to write math formulas using TeX and LaTeX notation."
3607
  msgstr ""
3608
 
3609
+ #: php/classes/class-qsm-install.php:852
3610
  msgid ""
3611
  "Enter the url of an image which will be used as logo while sharing on "
3612
  "facebook."
3613
  msgstr ""
3614
 
3615
+ #: php/classes/class-qsm-install.php:853
3616
  msgid "If left blank, this will default to QSM logo"
3617
  msgstr ""
3618
 
3619
+ #: php/classes/class-qsm-install.php:864
3620
+ msgid "Overrides global settings for preferred date format"
 
 
 
 
 
 
 
3621
  msgstr ""
3622
 
3623
+ #: php/classes/class-qsm-install.php:874
3624
  msgid "Social Sharing Buttons"
3625
  msgstr ""
3626
 
3627
+ #: php/classes/class-qsm-install.php:888
3628
  msgid ""
3629
  "Please use the new template variables instead.%FACEBOOK_SHARE% %TWITTER_SHARE"
3630
  "%"
3631
  msgstr ""
3632
 
3633
+ #: php/classes/class-qsm-install.php:896
3634
  msgid "Ask user's name"
3635
  msgstr ""
3636
 
3637
+ #: php/classes/class-qsm-install.php:908 php/classes/class-qsm-install.php:933
3638
+ #: php/classes/class-qsm-install.php:957 php/classes/class-qsm-install.php:981
3639
  msgid "Require"
3640
  msgstr ""
3641
 
3642
+ #: php/classes/class-qsm-install.php:921
3643
  msgid "Ask user's business"
3644
  msgstr ""
3645
 
3646
+ #: php/classes/class-qsm-install.php:945
3647
  msgid "Ask user's email"
3648
  msgstr ""
3649
 
3650
+ #: php/classes/class-qsm-install.php:969
3651
  msgid "Ask user's phone"
3652
  msgstr ""
3653
 
3654
+ #: php/classes/class-qsm-install.php:993
3655
  msgid "Message Displayed Before Quiz"
3656
  msgstr ""
3657
 
3658
+ #: php/classes/class-qsm-install.php:1007
3659
  msgid "Message Displayed Before Comments Box If Enabled"
3660
  msgstr ""
3661
 
3662
+ #: php/classes/class-qsm-install.php:1021
3663
  msgid "Message Displayed At End Of Quiz (Leave Blank To Omit Text Section)"
3664
  msgstr ""
3665
 
3666
+ #: php/classes/class-qsm-install.php:1035
3667
  msgid "Message Displayed If User Has Tried Quiz Too Many Times"
3668
  msgstr ""
3669
 
3670
+ #: php/classes/class-qsm-install.php:1049
3671
  msgid ""
3672
  "Message Displayed If User Is Not Logged In And Quiz Requires Users To Be "
3673
  "Logged In"
3674
  msgstr ""
3675
 
3676
+ #: php/classes/class-qsm-install.php:1063
3677
  msgid "Message Displayed If Date Is Outside Scheduled Timeframe"
3678
  msgstr ""
3679
 
3680
+ #: php/classes/class-qsm-install.php:1077
3681
  msgid "Message Displayed If The Limit Of Total Entries Has Been Reached"
3682
  msgstr ""
3683
 
3684
+ #: php/classes/class-qsm-install.php:1091
3685
  msgid "Results Page %QUESTIONS_ANSWERS% Text"
3686
  msgstr ""
3687
 
3688
+ #: php/classes/class-qsm-install.php:1110
3689
  msgid "%QUESTIONS_ANSWERS_EMAIL% Text"
3690
  msgstr ""
3691
 
3692
+ #: php/classes/class-qsm-install.php:1128
3693
  msgid "Twitter Sharing Text"
3694
  msgstr ""
3695
 
3696
+ #: php/classes/class-qsm-install.php:1149
3697
  msgid "Facebook Sharing Text"
3698
  msgstr ""
3699
 
3700
+ #: php/classes/class-qsm-install.php:1178
3701
+ msgid "Submit Button"
3702
  msgstr ""
3703
 
3704
+ #: php/classes/class-qsm-install.php:1187
3705
+ msgid "Retake Quiz Button"
3706
  msgstr ""
3707
 
3708
+ #: php/classes/class-qsm-install.php:1197
3709
  msgid "Previous button"
3710
  msgstr ""
3711
 
3712
+ #: php/classes/class-qsm-install.php:1207
3713
  msgid "Next button"
3714
  msgstr ""
3715
 
3716
+ #: php/classes/class-qsm-install.php:1217
3717
+ msgid "All required fields"
3718
  msgstr ""
3719
 
3720
+ #: php/classes/class-qsm-install.php:1219
3721
+ msgid "Please complete all required fields!"
3722
  msgstr ""
3723
 
3724
+ #: php/classes/class-qsm-install.php:1227
3725
  msgid "Invalid email"
3726
  msgstr ""
3727
 
3728
+ #: php/classes/class-qsm-install.php:1229
3729
+ msgid "Not a valid e-mail address!"
3730
+ msgstr ""
3731
+
3732
+ #: php/classes/class-qsm-install.php:1237
3733
  msgid "Invalid number"
3734
  msgstr ""
3735
 
3736
+ #: php/classes/class-qsm-install.php:1239
3737
+ msgid "This field must be a number!"
3738
+ msgstr ""
3739
+
3740
+ #: php/classes/class-qsm-install.php:1247
3741
+ msgid "Invalid URL"
3742
+ msgstr ""
3743
+
3744
+ #: php/classes/class-qsm-install.php:1249
3745
+ msgid "The entered URL is not valid!"
3746
+ msgstr ""
3747
+
3748
+ #: php/classes/class-qsm-install.php:1257
3749
+ msgid "Minimum Length"
3750
+ msgstr ""
3751
+
3752
+ #: php/classes/class-qsm-install.php:1259
3753
+ msgid "Required atleast %minlength% characters."
3754
+ msgstr ""
3755
+
3756
+ #: php/classes/class-qsm-install.php:1260
3757
+ msgid "Use %minlength% to display number of characters required."
3758
+ msgstr ""
3759
+
3760
+ #: php/classes/class-qsm-install.php:1268
3761
+ msgid "Maximum Length"
3762
+ msgstr ""
3763
+
3764
+ #: php/classes/class-qsm-install.php:1270
3765
+ msgid "Maximum %maxlength% characters allowed."
3766
+ msgstr ""
3767
+
3768
+ #: php/classes/class-qsm-install.php:1271
3769
+ msgid "Use %maxlength% to display number of characters allowed."
3770
+ msgstr ""
3771
+
3772
+ #: php/classes/class-qsm-install.php:1279
3773
  msgid "Invalid Captcha"
3774
  msgstr ""
3775
 
3776
+ #: php/classes/class-qsm-install.php:1281
3777
+ msgid "The entered text is not correct!"
3778
  msgstr ""
3779
 
3780
+ #: php/classes/class-qsm-install.php:1289
3781
  msgid "Comments field"
3782
  msgstr ""
3783
 
3784
+ #: php/classes/class-qsm-install.php:1309
3785
+ msgid "Correct answer message"
3786
  msgstr ""
3787
 
3788
+ #: php/classes/class-qsm-install.php:1311
3789
+ msgid "Correct! You have selected correct answer."
3790
  msgstr ""
3791
 
3792
+ #: php/classes/class-qsm-install.php:1312
3793
  msgid "Text to show when the selected option is correct answer."
3794
  msgstr ""
3795
 
3796
+ #: php/classes/class-qsm-install.php:1320
3797
  msgid "Incorrect answer message"
3798
  msgstr ""
3799
 
3800
+ #: php/classes/class-qsm-install.php:1322
3801
+ msgid "Wrong! You have selected wrong answer."
3802
+ msgstr ""
3803
+
3804
+ #: php/classes/class-qsm-install.php:1323
3805
  msgid "Text to show when the selected option is wrong answer."
3806
  msgstr ""
3807
 
3808
+ #: php/classes/class-qsm-install.php:1331
3809
+ msgid "Quiz Submit/Processing Message"
3810
+ msgstr ""
3811
+
3812
+ #: php/classes/class-qsm-install.php:1334
3813
+ msgid "Text to show while submitting the quiz."
3814
+ msgstr ""
3815
+
3816
+ #: php/classes/class-qsm-install.php:1342
3817
  msgid "Name field"
3818
  msgstr ""
3819
 
3820
+ #: php/classes/class-qsm-install.php:1352
3821
  msgid "Business field"
3822
  msgstr ""
3823
 
3824
+ #: php/classes/class-qsm-install.php:1362
3825
  msgid "Email field"
3826
  msgstr ""
3827
 
3828
+ #: php/classes/class-qsm-install.php:1372
3829
  msgid "Phone number field"
3830
  msgstr ""
3831
 
3832
+ #: php/classes/class-qsm-install.php:2073
3833
  msgid "Documentation"
3834
  msgstr ""
3835
 
3836
+ #: php/classes/class-qsm-install.php:2074
3837
  msgid "Create Support Ticket"
3838
  msgstr ""
3839
 
3840
+ #: php/classes/class-qsm-install.php:2074
3841
  msgid "Support"
3842
  msgstr ""
3843
 
3844
+ #: php/classes/class-qsm-settings.php:348
3845
  msgid "Previous"
3846
  msgstr ""
3847
 
 
 
 
 
3848
  #: php/classes/class-qsm-tracking.php:195
3849
  msgid ""
3850
  "Allow Quiz And Survey Master to track this plugin's usage and help us make "
3871
  msgid "Do not allow"
3872
  msgstr ""
3873
 
3874
+ #: php/classes/lib/wp-background-process.php:424
3875
  #, php-format
3876
  msgid "Every %d Minutes"
3877
  msgstr ""
3878
 
3879
+ #: php/question-types/qsm-question-type-dropdown.php:27
3880
+ msgid "Please select your answer"
 
 
 
 
 
3881
  msgstr ""
3882
 
3883
+ #: php/question-types/qsm-question-type-file-upload.php:48
3884
+ msgid "Click here to view"
 
3885
  msgstr ""
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.2
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.2';
47
 
48
  /**
49
  * QSM Alert Manager Object
@@ -295,8 +295,6 @@ class MLWQuizMasterNext {
295
  if ( 'admin_page_qsm_quiz_result_details' === $hook ) {
296
  wp_enqueue_style( 'qsm_common_style', QSM_PLUGIN_CSS_URL . '/common.css', array(), $this->version );
297
  wp_style_add_data( 'qsm_common_style', 'rtl', 'replace' );
298
- wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
299
- wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
300
  wp_enqueue_script( 'jquery-ui-slider' );
301
  wp_enqueue_script( 'jquery-ui-slider-rtl-js', QSM_PLUGIN_JS_URL . '/jquery.ui.slider-rtl.js', array( 'jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-slider' ), $this->version, true );
302
  wp_enqueue_style( 'jquery-ui-slider-rtl-css', QSM_PLUGIN_CSS_URL . '/jquery.ui.slider-rtl.css', array(), $this->version );
@@ -348,12 +346,8 @@ class MLWQuizMasterNext {
348
  wp_enqueue_script( 'jquery-ui-tabs' );
349
  wp_enqueue_script( 'jquery-effects-blind' );
350
  wp_enqueue_script( 'jquery-effects-explode' );
351
- wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
352
- wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
353
  break;
354
  default:
355
- wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
356
- wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
357
  wp_enqueue_editor();
358
  wp_enqueue_media();
359
  break;
@@ -362,6 +356,78 @@ class MLWQuizMasterNext {
362
  // load admin JS after all dependencies are loaded
363
  wp_enqueue_script( 'qsm_admin_js', plugins_url( 'js/qsm-admin.js', __FILE__ ), array( 'jquery', 'backbone', 'underscore', 'wp-util', 'jquery-ui-sortable', 'jquery-touch-punch' ), $this->version, true );
364
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
 
366
  }
367
 
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 8.0.3
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.3';
47
 
48
  /**
49
  * QSM Alert Manager Object
295
  if ( 'admin_page_qsm_quiz_result_details' === $hook ) {
296
  wp_enqueue_style( 'qsm_common_style', QSM_PLUGIN_CSS_URL . '/common.css', array(), $this->version );
297
  wp_style_add_data( 'qsm_common_style', 'rtl', 'replace' );
 
 
298
  wp_enqueue_script( 'jquery-ui-slider' );
299
  wp_enqueue_script( 'jquery-ui-slider-rtl-js', QSM_PLUGIN_JS_URL . '/jquery.ui.slider-rtl.js', array( 'jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-slider' ), $this->version, true );
300
  wp_enqueue_style( 'jquery-ui-slider-rtl-css', QSM_PLUGIN_CSS_URL . '/jquery.ui.slider-rtl.css', array(), $this->version );
346
  wp_enqueue_script( 'jquery-ui-tabs' );
347
  wp_enqueue_script( 'jquery-effects-blind' );
348
  wp_enqueue_script( 'jquery-effects-explode' );
 
 
349
  break;
350
  default:
 
 
351
  wp_enqueue_editor();
352
  wp_enqueue_media();
353
  break;
356
  // load admin JS after all dependencies are loaded
357
  wp_enqueue_script( 'qsm_admin_js', plugins_url( 'js/qsm-admin.js', __FILE__ ), array( 'jquery', 'backbone', 'underscore', 'wp-util', 'jquery-ui-sortable', 'jquery-touch-punch' ), $this->version, true );
358
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
359
+ $qsm_admin_messages = array(
360
+ 'error' => __('Error', 'quiz-master-next'),
361
+ 'success' => __('Success', 'quiz-master-next'),
362
+ 'category' => __('Category', 'quiz-master-next'),
363
+ 'try_again' => __('Please try again', 'quiz-master-next'),
364
+ 'already_exists_in_database' => __('already exists in database', 'quiz-master-next'),
365
+ 'confirm_message' => __('Are you sure?', 'quiz-master-next'),
366
+ 'error_delete_result' => __('Error to delete the result!', 'quiz-master-next'),
367
+ 'copied' => __('Copied!', 'quiz-master-next'),
368
+ 'set_feature_img' => __('Set Featured Image', 'quiz-master-next'),
369
+ 'set_bg_img' => __('Set Background Image', 'quiz-master-next'),
370
+ 'insert_img' => __('Insert Image', 'quiz-master-next'),
371
+ 'upload_img' => __('Upload Image', 'quiz-master-next'),
372
+ 'use_img' => __('Use this image', 'quiz-master-next'),
373
+ 'updating_db' => __('Updating database', 'quiz-master-next'),
374
+ 'update_db_success' => __('Database updated successfully.', 'quiz-master-next'),
375
+ 'quiz_submissions' => __('Quiz Submissions', 'quiz-master-next'),
376
+ 'saving_contact_fields' => __('Saving contact fields...', 'quiz-master-next'),
377
+ 'contact_fields_saved' => __('Your contact fields have been saved!', 'quiz-master-next'),
378
+ 'contact_fields_save_error' => __('There was an error encountered when saving your contact fields.', 'quiz-master-next'),
379
+ 'saving_emails' => __('Saving emails...', 'quiz-master-next'),
380
+ 'emails_saved' => __('Emails were saved!', 'quiz-master-next'),
381
+ 'emails_save_error' => __('There was an error when saving the emails.', 'quiz-master-next'),
382
+ 'saving_emails' => __('Saving emails...', 'quiz-master-next'),
383
+ 'saving_results_page' => __('Saving results pages...', 'quiz-master-next'),
384
+ 'results_page_saved' => __('Results pages were saved!', 'quiz-master-next'),
385
+ 'results_page_save_error' => __('There was an error when saving the results pages.', 'quiz-master-next'),
386
+ 'all_categories' => __('All Categories', 'quiz-master-next'),
387
+ 'add_question' => __('Add Question', 'quiz-master-next'),
388
+ 'question_created' => __('Question created!', 'quiz-master-next'),
389
+ 'new_question' => __('Your new question!', 'quiz-master-next'),
390
+ 'adding_question' => __('Adding question...', 'quiz-master-next'),
391
+ 'creating_question' => __('Creating question...', 'quiz-master-next'),
392
+ 'duplicating_question' => __('Duplicating question...', 'quiz-master-next'),
393
+ 'saving_question' => __('Saving question...', 'quiz-master-next'),
394
+ 'question_saved' => __('Question was saved!', 'quiz-master-next'),
395
+ 'loading_question' => __('Loading questions...', 'quiz-master-next'),
396
+ 'no_question_selected' => __('No question is selected.', 'quiz-master-next'),
397
+ 'question_reset_message' => __('All answer will be reset, Do you want to still continue?', 'quiz-master-next'),
398
+ 'your_answer' => __('Your answer', 'quiz-master-next'),
399
+ 'insert_image_url' => __('Insert image URL', 'quiz-master-next'),
400
+ 'saving_page_info' => __('Saving page info', 'quiz-master-next'),
401
+ 'saving_page_questions' => __('Saving pages and questions...', 'quiz-master-next'),
402
+ 'saved_page_questions' => __('Questions and pages were saved!', 'quiz-master-next'),
403
+ 'import_question_again' => __('you want to import this question again?', 'quiz-master-next'),
404
+ 'enter_question_title' => __('Enter Question title or description', 'quiz-master-next'),
405
+ 'page_name_required' => __('Page Name is required!', 'quiz-master-next'),
406
+ 'page_name_validation' => __('Please use only Alphanumeric characters.', 'quiz-master-next'),
407
+ 'polar_q_range_error' => __('Left range and right range should be different', 'quiz-master-next'),
408
+ 'range_fields_required' => __('Range fields are required!', 'quiz-master-next'),
409
+ 'points' => __('Points', 'quiz-master-next'),
410
+ 'left_label' => __('Left Label', 'quiz-master-next'),
411
+ 'right_label' => __('Right Label', 'quiz-master-next'),
412
+ 'left_range' => __('Left Range', 'quiz-master-next'),
413
+ 'right_range' => __('Right Range', 'quiz-master-next'),
414
+ 'html_section_empty' => __('Text/HTML Section cannot be empty', 'quiz-master-next'),
415
+ 'blank_number_validation' => __('Number of <strong>%BLANK%</strong> should be equal to options for sequential matching', 'quiz-master-next'),
416
+ 'blank_required_validation' => __('Atleast one <strong>%BLANK%</strong> and one option is required.', 'quiz-master-next'),
417
+ 'polar_options_validation' => __('You can not add more than 2 answer for Polar Question type', 'quiz-master-next'),
418
+ 'hide_advance_options' => __('Hide advance options «', 'quiz-master-next'),
419
+ 'show_advance_options' => __('Show advance options »', 'quiz-master-next'),
420
+ 'category_not_empty' => __('Category cannot be empty', 'quiz-master-next'),
421
+ 'sendy_signup_validation' => array(
422
+ 'required_message' => __('Please fill in your name and email.', 'quiz-master-next'),
423
+ 'email_validation' => __('Your email address is invalid.', 'quiz-master-next'),
424
+ 'list_validation' => __('Your list ID is invalid.', 'quiz-master-next'),
425
+ 'already_subscribed' => __("You're already subscribed!", 'quiz-master-next'),
426
+ 'success_message' => __("Thanks, you are now subscribed to our mailing list!", 'quiz-master-next'),
427
+ 'error_message' => __("Sorry, unable to subscribe. Please try again later!", 'quiz-master-next'),
428
+ ),
429
+ );
430
+ wp_localize_script( 'qsm_admin_js', 'qsm_admin_messages', $qsm_admin_messages );
431
 
432
  }
433
 
php/admin/about-page.php CHANGED
@@ -135,11 +135,8 @@ function qsm_documentation_meta_box_content() {
135
  ?>
136
  <p><?php esc_html_e( 'Need help with the plugin? Try any of the following:', 'quiz-master-next' ); ?></p>
137
  <ul>
138
- <li>For assistance in using the plugin, read our <a href="https://quizandsurveymaster.com/docs/" rel="noopener"
139
- target="_blank">documentation</a></li>
140
- <li>For support, fill out the form on our <a
141
- href="https://quizandsurveymaster.com/contact-support/?utm_source=qsm-help-page&utm_medium=plugin&utm_campaign=qsm_plugin&utm_content=contact_us"
142
- rel="noopener" target="_blank">Contact Us Page</a></li>
143
  </ul>
144
  <?php
145
  }
135
  ?>
136
  <p><?php esc_html_e( 'Need help with the plugin? Try any of the following:', 'quiz-master-next' ); ?></p>
137
  <ul>
138
+ <li>For assistance in using the plugin, read our <a href="<?php echo esc_url( qsm_get_plugin_link('docs', 'qsm-help-page', 'documentation') );?>" rel="noopener" target="_blank">documentation</a></li>
139
+ <li>For support, fill out the form on our <a href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'qsm-help-page', 'contact_us') );?>" rel="noopener" target="_blank">Contact Us Page</a></li>
 
 
 
140
  </ul>
141
  <?php
142
  }
php/admin/addons-page.php CHANGED
@@ -90,9 +90,7 @@ function qsm_generate_featured_addons() {
90
  </div>
91
  <div class="qsm-addon-list-right">
92
  <span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
93
- <a rel="noopener" style="text-decoration: none; font-size: 15px;"
94
- href="http://quizandsurveymaster.com/addons/?utm_source=qsm-addons-page&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin"
95
- target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
96
  </div>
97
  </div>
98
  <div id="qsm_installed_addons" class="qsm-active-addons qsm-primary-acnhor">
@@ -340,7 +338,7 @@ function qsm_display_optin_page() {
340
  </div> -->
341
  </div>
342
 
343
- <p><?php esc_html_e( 'Getting your addon is dead simple: just subscribe to our newsletter and then you will get the free addon by e-mail. We will not spam you. We usually send out newsletters to talk about new features in ', 'quiz-master-next' ) . '<b>' . __( 'Quiz and Survey Master', 'quiz-master-next' ) . '</b>,' . __( ' let you know when new or updated addons are being released and provide informative articles that show you how to use ', 'quiz-master-next' ) . '<b>' . __( 'Quiz and Survey Master ', 'quiz-master-next' ) . '</b>' . __( 'to its full potential. ', 'quiz-master-next' ) . '<a href="https://quizandsurveymaster.com/privacy-policy/" target="_blank">' . __( 'View our privacy policy', 'quiz-master-next' ) . '</a>'; ?>
344
  </p>
345
 
346
  <div id="wpas-mailchimp-signup-form-wrapper">
90
  </div>
91
  <div class="qsm-addon-list-right">
92
  <span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
93
+ <a rel="noopener" style="text-decoration: none; font-size: 15px;" href="<?php echo esc_url( qsm_get_plugin_link('addons', 'qsm-addons-page', 'all-addons-top') );?>" target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
 
 
94
  </div>
95
  </div>
96
  <div id="qsm_installed_addons" class="qsm-active-addons qsm-primary-acnhor">
338
  </div> -->
339
  </div>
340
 
341
+ <p><?php esc_html_e( 'Getting your addon is dead simple: just subscribe to our newsletter and then you will get the free addon by e-mail. We will not spam you. We usually send out newsletters to talk about new features in ', 'quiz-master-next' ) . '<b>' . __( 'Quiz and Survey Master', 'quiz-master-next' ) . '</b>,' . __( ' let you know when new or updated addons are being released and provide informative articles that show you how to use ', 'quiz-master-next' ) . '<b>' . __( 'Quiz and Survey Master ', 'quiz-master-next' ) . '</b>' . __( 'to its full potential. ', 'quiz-master-next' ) . '<a href="' . qsm_get_plugin_link( 'privacy-policy', 'qsm-addons-page' ) . '" target="_blank">' . __( 'View our privacy policy', 'quiz-master-next' ) . '</a>'; ?>
342
  </p>
343
 
344
  <div id="wpas-mailchimp-signup-form-wrapper">
php/admin/admin-dashboard.php CHANGED
@@ -131,45 +131,31 @@ function qsm_generate_dashboard_page() {
131
  <div class="welcome-panel-column">
132
  <h3><?php esc_html_e( 'Next Steps', 'quiz-master-next' ); ?></h3>
133
  <ul>
134
- <li><a target="_blank" rel="noopener"
135
- href="https://quizandsurveymaster.com/docs/?utm_source=plugin&utm_medium=dashboard"
136
- class="welcome-icon"><span
137
- class="dashicons dashicons-media-document"></span>&nbsp;&nbsp;<?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?></a>
138
  </li>
139
- <li><a target="_blank" rel="noopener"
140
- href="https://demo.quizandsurveymaster.com/?utm_source=plugin&utm_medium=dashboard"
141
- class="welcome-icon"><span
142
- class="dashicons dashicons-format-video"></span>&nbsp;&nbsp;<?php esc_html_e( 'See demos', 'quiz-master-next' ); ?></a>
143
  </li>
144
- <li><a target="_blank" rel="noopener"
145
- href="https://quizandsurveymaster.com/pricing/?utm_source=plugin&utm_medium=dashboard"
146
- class="welcome-icon"><span
147
- class="dashicons dashicons-plugins-checked"></span>&nbsp;&nbsp;<?php esc_html_e( 'Extend QSM with PRO Addons', 'quiz-master-next' ); ?></a>
148
  </li>
149
- <li><a target="_blank" rel="noopener"
150
- href="https://themes.quizandsurveymaster.com/?utm_source=plugin&utm_medium=dashboard"
151
- class="welcome-icon"><span
152
- class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;<?php esc_html_e( 'Explore QSM Themes', 'quiz-master-next' ); ?></a>
153
  </li>
154
  </ul>
155
  </div>
156
  <div class="welcome-panel-column welcome-panel-last">
157
  <h3><?php esc_html_e( 'Useful Links', 'quiz-master-next' ); ?></h3>
158
  <ul>
159
- <li><a target="_blank" rel="noopener"
160
- href="https://quizandsurveymaster.com/contact-support/?utm_source=plugin&utm_medium=dashboard"
161
- class="welcome-icon"><span
162
- class="dashicons dashicons-admin-users"></span>&nbsp;&nbsp;<?php esc_html_e( 'Contact Support', 'quiz-master-next' ); ?></a>
163
- </li>
164
- <li><a target="_blank" rel="noopener"
165
- href="https://github.com/QuizandSurveyMaster/quiz_master_next"
166
- class="welcome-icon"><span
167
- class="dashicons dashicons-editor-code"></span>&nbsp;&nbsp;<?php esc_html_e( 'Github Repository', 'quiz-master-next' ); ?></a>
168
- </li>
169
- <li><a target="_blank" rel="noopener" href="https://www.facebook.com/groups/516958552587745"
170
- class="welcome-icon"><span
171
- class="dashicons dashicons-facebook"></span>&nbsp;&nbsp;<?php esc_html_e( 'Connect on Facebook', 'quiz-master-next' ); ?></a>
172
- </li>
173
  </ul>
174
  </div>
175
  </div>
@@ -188,21 +174,22 @@ function qsm_generate_dashboard_page() {
188
  'callback' => 'qsm_dashboard_recent_taken_quiz',
189
  'title' => 'Recent Taken Quiz',
190
  ),
191
- 'dashboard_roadmap' => array(
192
  'sidebar' => 'side',
193
- 'callback' => 'qsm_dashboard_roadmap',
194
- 'title' => 'roadmap',
195
  ),
196
  'dashboard_latest_blogs' => array(
197
  'sidebar' => 'normal',
198
  'callback' => 'qsm_dashboard_latest_blogs',
199
  'title' => 'Latest Blogs',
200
  ),
201
- 'dashboard_chagelog' => array(
202
  'sidebar' => 'side',
203
- 'callback' => 'qsm_dashboard_chagelog',
204
- 'title' => 'Changelog',
205
  ),
 
206
  );
207
  $qsm_dashboard_widget = apply_filters( 'qsm_dashboard_widget', $qsm_dashboard_widget );
208
  update_option( 'qsm_dashboard_widget_arr', $qsm_dashboard_widget );
@@ -361,8 +348,7 @@ function qsm_dashboard_popular_addon( $widget_id ) {
361
  ?>
362
  </ul>
363
  <div class="pa-all-addon">
364
- <a href="https://quizandsurveymaster.com/pricing/?utm_source=plugin&utm_medium=dashboard" rel="noopener"
365
- target="_blank"><?php esc_html_e( 'SEE ALL ADDONS', 'quiz-master-next' ); ?></a>
366
  </div>
367
  </div>
368
  </div>
@@ -615,17 +601,14 @@ function qsm_create_new_quiz_from_wizard() {
615
  * Prepare Quiz Options.
616
  */
617
  $quiz_options = array(
618
- 'quiz_name' => $quiz_name,
619
- 'quiz_featured_image' => isset( $_POST['quiz_featured_image'] ) ? esc_url_raw( wp_unslash( $_POST['quiz_featured_image'] ) ) : '',
620
- 'form_type' => isset( $_POST['form_type'] ) ? sanitize_text_field( wp_unslash( $_POST['form_type'] ) ) : '',
621
- 'system' => isset( $_POST['system'] ) ? sanitize_text_field( wp_unslash( $_POST['system'] ) ) : '',
622
- 'pagination' => isset( $_POST['pagination'] ) ? sanitize_text_field( wp_unslash( $_POST['pagination'] ) ) : '',
623
- 'progress_bar' => isset( $_POST['progress_bar'] ) ? sanitize_text_field( wp_unslash( $_POST['progress_bar'] ) ) : '',
624
- 'timer_limit' => isset( $_POST['timer_limit'] ) ? sanitize_text_field( wp_unslash( $_POST['timer_limit'] ) ) : '',
625
- 'enable_pagination_quiz' => isset( $_POST['enable_pagination_quiz'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_pagination_quiz'] ) ) : '',
626
- 'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
627
- 'disable_scroll_next_previous_click' => isset( $_POST['disable_scroll_next_previous_click'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_scroll_next_previous_click'] ) ) : '',
628
- 'disable_first_page' => isset( $_POST['disable_first_page'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_first_page'] ) ) : '',
629
  );
630
  $get_saved_value = QMNGlobalSettingsPage::get_global_quiz_settings();
631
  if ( ! empty( $get_saved_value ) && is_array( $get_saved_value ) ) {
@@ -635,14 +618,16 @@ function qsm_create_new_quiz_from_wizard() {
635
  * Prepare Contact Fields
636
  */
637
  $contact_form = array();
638
- $cf_fields = QSM_Contact_Manager::default_fields();
639
- if ( isset( $cf_fields['name'] ) ) {
640
- $cf_fields['name']['enable'] = 'true';
641
- $contact_form[] = $cf_fields['name'];
642
- }
643
- if ( isset( $cf_fields['email'] ) ) {
644
- $cf_fields['email']['enable'] = 'true';
645
- $contact_form[] = $cf_fields['email'];
 
 
646
  }
647
  /**
648
  * Prepare Quiz Options
131
  <div class="welcome-panel-column">
132
  <h3><?php esc_html_e( 'Next Steps', 'quiz-master-next' ); ?></h3>
133
  <ul>
134
+ <li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs', 'dashboard') )?>" class="welcome-icon">
135
+ <span class="dashicons dashicons-media-document"></span>&nbsp;&nbsp;<?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?>
136
+ </a>
 
137
  </li>
138
+ <li><a target="_blank" rel="noopener" href="https://demo.quizandsurveymaster.com/?utm_source=plugin&utm_medium=dashboard" class="welcome-icon">
139
+ <span class="dashicons dashicons-format-video"></span>&nbsp;&nbsp;<?php esc_html_e( 'See demos', 'quiz-master-next' ); ?>
140
+ </a>
 
141
  </li>
142
+ <li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard') )?>" class="welcome-icon">
143
+ <span class="dashicons dashicons-plugins-checked"></span>&nbsp;&nbsp;<?php esc_html_e( 'Extend QSM with PRO Addons', 'quiz-master-next' ); ?>
144
+ </a>
 
145
  </li>
146
+ <li><a target="_blank" rel="noopener" href="https://themes.quizandsurveymaster.com/?utm_source=plugin&utm_medium=dashboard" class="welcome-icon">
147
+ <span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;<?php esc_html_e( 'Explore QSM Themes', 'quiz-master-next' ); ?>
148
+ </a>
 
149
  </li>
150
  </ul>
151
  </div>
152
  <div class="welcome-panel-column welcome-panel-last">
153
  <h3><?php esc_html_e( 'Useful Links', 'quiz-master-next' ); ?></h3>
154
  <ul>
155
+ <li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'dashboard') )?>" class="welcome-icon"><span class="dashicons dashicons-admin-users"></span>&nbsp;&nbsp;<?php esc_html_e( 'Contact Support', 'quiz-master-next' ); ?></a></li>
156
+ <li><a target="_blank" rel="noopener" href="https://github.com/QuizandSurveyMaster/quiz_master_next" class="welcome-icon"><span class="dashicons dashicons-editor-code"></span>&nbsp;&nbsp;<?php esc_html_e( 'Github Repository', 'quiz-master-next' ); ?></a></li>
157
+ <li><a target="_blank" rel="noopener" href="https://www.facebook.com/groups/516958552587745" class="welcome-icon"><span class="dashicons dashicons-facebook"></span>&nbsp;&nbsp;<?php esc_html_e( 'Connect on Facebook', 'quiz-master-next' ); ?></a></li>
158
+ <li><a target="_blank" rel="noopener" href="https://next.expresstech.io/qsm" class="welcome-icon"><span class="dashicons dashicons-feedback"></span>&nbsp;&nbsp;<?php esc_html_e( 'Roadmap', 'quiz-master-next' ); ?></a></li>
 
 
 
 
 
 
 
 
 
 
159
  </ul>
160
  </div>
161
  </div>
174
  'callback' => 'qsm_dashboard_recent_taken_quiz',
175
  'title' => 'Recent Taken Quiz',
176
  ),
177
+ 'dashboard_chagelog' => array(
178
  'sidebar' => 'side',
179
+ 'callback' => 'qsm_dashboard_chagelog',
180
+ 'title' => 'Changelog',
181
  ),
182
  'dashboard_latest_blogs' => array(
183
  'sidebar' => 'normal',
184
  'callback' => 'qsm_dashboard_latest_blogs',
185
  'title' => 'Latest Blogs',
186
  ),
187
+ 'dashboard_roadmap' => array(
188
  'sidebar' => 'side',
189
+ 'callback' => 'qsm_dashboard_roadmap',
190
+ 'title' => 'roadmap',
191
  ),
192
+
193
  );
194
  $qsm_dashboard_widget = apply_filters( 'qsm_dashboard_widget', $qsm_dashboard_widget );
195
  update_option( 'qsm_dashboard_widget_arr', $qsm_dashboard_widget );
348
  ?>
349
  </ul>
350
  <div class="pa-all-addon">
351
+ <a href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard') )?>" rel="noopener" target="_blank"><?php esc_html_e( 'SEE ALL ADDONS', 'quiz-master-next' ); ?></a>
 
352
  </div>
353
  </div>
354
  </div>
601
  * Prepare Quiz Options.
602
  */
603
  $quiz_options = array(
604
+ 'quiz_name' => $quiz_name,
605
+ 'quiz_featured_image' => isset( $_POST['quiz_featured_image'] ) ? esc_url_raw( wp_unslash( $_POST['quiz_featured_image'] ) ) : '',
606
+ 'form_type' => isset( $_POST['form_type'] ) ? sanitize_text_field( wp_unslash( $_POST['form_type'] ) ) : '',
607
+ 'system' => isset( $_POST['system'] ) ? sanitize_text_field( wp_unslash( $_POST['system'] ) ) : '',
608
+ 'timer_limit' => isset( $_POST['timer_limit'] ) ? sanitize_text_field( wp_unslash( $_POST['timer_limit'] ) ) : '',
609
+ 'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
610
+ 'disable_first_page' => isset( $_POST['disable_first_page'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_first_page'] ) ) : '',
611
+ 'comment_section' => isset( $_POST['comment_section'] ) ? sanitize_text_field( wp_unslash( $_POST['comment_section'] ) ) : 1,
 
 
 
612
  );
613
  $get_saved_value = QMNGlobalSettingsPage::get_global_quiz_settings();
614
  if ( ! empty( $get_saved_value ) && is_array( $get_saved_value ) ) {
618
  * Prepare Contact Fields
619
  */
620
  $contact_form = array();
621
+ if ( isset( $_POST['enable_contact_form'] ) && 1 == sanitize_text_field( wp_unslash( $_POST['enable_contact_form'] ) ) ) {
622
+ $cf_fields = QSM_Contact_Manager::default_fields();
623
+ if ( isset( $cf_fields['name'] ) ) {
624
+ $cf_fields['name']['enable'] = 'true';
625
+ $contact_form[] = $cf_fields['name'];
626
+ }
627
+ if ( isset( $cf_fields['email'] ) ) {
628
+ $cf_fields['email']['enable'] = 'true';
629
+ $contact_form[] = $cf_fields['email'];
630
+ }
631
  }
632
  /**
633
  * Prepare Quiz Options
php/admin/admin-results-details-page.php CHANGED
@@ -77,6 +77,11 @@ function qsm_generate_results_details_tab() {
77
  $next_results = $wpdb->get_var( $wpdb->prepare("SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MIN(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id > %d)", $result_id));
78
 
79
  // If there is previous or next results, show buttons.
 
 
 
 
 
80
  echo '<div style="text-align:right; margin-top: 20px; margin-bottom: 20px;">';
81
  echo '<h3 class="result-page-title">Quiz Result - '. esc_html( $results_data->quiz_name ) .'</h3>';
82
  echo '<a style="margin-right: 15px;" href="?page=mlw_quiz_results" class="button button-primary" title="Return to results">'. esc_html__( 'Back to Results', 'quiz-master-next' ) .'</a>';
77
  $next_results = $wpdb->get_var( $wpdb->prepare("SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MIN(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id > %d)", $result_id));
78
 
79
  // If there is previous or next results, show buttons.
80
+ $disable_mathjax = isset( $quiz_options['disable_mathjax'] ) ? $quiz_options['disable_mathjax'] : '';
81
+ if ( 1 != $disable_mathjax ) {
82
+ wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
83
+ wp_add_inline_script( 'math_jax', $mlwQuizMasterNext::$default_MathJax_script, 'before' );
84
+ }
85
  echo '<div style="text-align:right; margin-top: 20px; margin-bottom: 20px;">';
86
  echo '<h3 class="result-page-title">Quiz Result - '. esc_html( $results_data->quiz_name ) .'</h3>';
87
  echo '<a style="margin-right: 15px;" href="?page=mlw_quiz_results" class="button button-primary" title="Return to results">'. esc_html__( 'Back to Results', 'quiz-master-next' ) .'</a>';
php/admin/functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  $themes_data = array();
3
  global $pro_themes;
4
- $pro_themes = array( 'qsm-theme-pool', 'qsm-theme-breeze', 'qsm-theme-fragrance', 'qsm-theme-ivory', 'qsm-theme-sigma', 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Sigma' );
5
 
6
  /**
7
  * @since 6.4.5
@@ -505,7 +505,19 @@ function qsm_generate_question_option( $key, $single_option ) {
505
  <input type="text" name="<?php echo esc_attr( $key ); ?>" value="<?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?>" id="<?php echo esc_attr( $key ); ?>" />
506
  <?php
507
  break;
508
-
 
 
 
 
 
 
 
 
 
 
 
 
509
  case 'number':
510
  if ( isset( $single_option['label'] ) ) {
511
  ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
@@ -664,6 +676,7 @@ function qsm_create_new_quiz_wizard() {
664
  <div id="quiz_settings" class="qsm-new-menu-elements" style="display: none;">
665
  <div class="input-group">
666
  <label for="quiz_name"><?php esc_html_e( 'Quiz Name', 'quiz-master-next' ); ?>
 
667
  <span
668
  class="qsm-opt-desc"><?php esc_html_e( 'Enter a name for this Quiz.', 'quiz-master-next' ); ?></span>
669
  </label>
@@ -686,50 +699,63 @@ function qsm_create_new_quiz_wizard() {
686
  $all_settings = $mlwQuizMasterNext->quiz_settings->load_setting_fields( 'quiz_options' );
687
  global $globalQuizsetting;
688
  $quiz_setting_option = array(
689
- 'form_type' => array(
690
  'option_name' => __( 'Form Type', 'quiz-master-next' ),
691
  'value' => $globalQuizsetting['form_type'],
692
  ),
693
- 'system' => array(
694
  'option_name' => __( 'Grading System', 'quiz-master-next' ),
695
  'value' => $globalQuizsetting['system'],
696
  ),
697
- 'pagination' => array(
698
- 'option_name' => __( 'Questions Per Page', 'quiz-master-next' ),
699
- 'value' => $globalQuizsetting['pagination'],
700
- ),
701
- 'progress_bar' => array(
702
- 'option_name' => __( 'Show Progress Bar', 'quiz-master-next' ),
703
- 'value' => $globalQuizsetting['progress_bar'],
 
 
 
 
 
 
704
  ),
705
- 'timer_limit' => array(
706
  'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ),
707
  'value' => $globalQuizsetting['timer_limit'],
708
  ),
709
- 'enable_pagination_quiz' => array(
710
- 'option_name' => __( 'Show current page number', 'quiz-master-next' ),
711
- 'value' => $globalQuizsetting['enable_pagination_quiz'],
712
- ),
713
- 'require_log_in' => array(
714
  'option_name' => __( 'Require User Login', 'quiz-master-next' ),
715
  'value' => $globalQuizsetting['require_log_in'],
716
  ),
717
- 'disable_scroll_next_previous_click' => array(
718
- 'option_name' => __( 'Disable scroll on next and previous button click?', 'quiz-master-next' ),
719
- 'value' => $globalQuizsetting['disable_scroll_next_previous_click'],
720
- ),
721
- 'disable_first_page' => array(
722
  'option_name' => __( 'Disable first page on quiz', 'quiz-master-next' ),
723
  'value' => $globalQuizsetting['disable_first_page'],
724
  ),
 
 
 
 
725
  );
726
  $quiz_setting_option = apply_filters( 'qsm_quiz_wizard_settings_option', $quiz_setting_option );
727
  if ( $quiz_setting_option ) {
728
  foreach ( $quiz_setting_option as $key => $single_setting ) {
729
- $key = array_search( $key, array_column( $all_settings, 'id' ), true );
730
- $field = $all_settings[ $key ];
731
- $field['label'] = $single_setting['option_name'];
732
- $field['default'] = $single_setting['value'];
 
 
 
 
 
 
 
 
 
 
 
733
  echo '<div class="input-group">';
734
  QSM_Fields::generate_field( $field, $single_setting['value'] );
735
  echo '</div>';
@@ -802,9 +828,7 @@ function qsm_create_new_quiz_wizard() {
802
  </div>
803
  <div class="qsm-addon-list-right">
804
  <span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
805
- <a style="text-decoration: none; font-size: 15px;" rel="noopener"
806
- href="http://quizandsurveymaster.com/addons/?utm_source=wizard&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin"
807
- target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
808
  </div>
809
  </div>
810
  </div>
@@ -870,6 +894,7 @@ function qsm_text_template_variable_list() {
870
  '%CONTACT_ALL%' => __( 'Value user entered into contact field. X is # of contact field. For example, first contact field would be %CONTACT_1%', 'quiz-master-next' ),
871
  '%AVERAGE_CATEGORY_POINTS_X%' => __( 'X: Category name - The average amount of points a specific category earned.', 'quiz-master-next' ),
872
  '%QUESTION_ANSWER_X%' => __( 'X = Question ID. It will show result of particular question.', 'quiz-master-next' ),
 
873
  '%TIME_FINISHED%' => __( 'Display time after quiz submission.', 'quiz-master-next' ),
874
  ),
875
  );
@@ -959,12 +984,10 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
959
  global $mlwQuizMasterNext;
960
  global $pro_themes;
961
  $active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
962
- $folder_name = QSM_THEME_PATH;
963
- $folder_slug = QSM_THEME_SLUG;
964
  $theme_folders = array();
965
  if ( ! empty( $active_themes ) ) {
966
  foreach ( $active_themes as $dir ) {
967
- $theme_dir = $folder_name . $dir['theme'];
968
  if ( is_dir( $theme_dir ) ) {
969
  $theme_folders[] = $dir;
970
  }
@@ -1003,7 +1026,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
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">
1008
  <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
1009
  </div>
@@ -1041,7 +1064,7 @@ function qsm_get_default_wizard_themes() {
1041
  global $themes_data;
1042
  global $pro_themes;
1043
  $installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
1044
- $default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Companion', 'Serene', 'Sigma' );
1045
  $default_themes_data = array();
1046
  $keys_to_unset = array();
1047
  if ( ! empty( $themes_data ) ) {
1
  <?php
2
  $themes_data = array();
3
  global $pro_themes;
4
+ $pro_themes = array( 'qsm-theme-pool', 'qsm-theme-breeze', 'qsm-theme-fragrance', 'qsm-theme-ivory', 'qsm-theme-sigma', 'qsm-theme-fortune', 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Sigma', 'Fortune' );
5
 
6
  /**
7
  * @since 6.4.5
505
  <input type="text" name="<?php echo esc_attr( $key ); ?>" value="<?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?>" id="<?php echo esc_attr( $key ); ?>" />
506
  <?php
507
  break;
508
+ case 'multi_text':
509
+ $parent_key = $key;
510
+ if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
511
+ foreach ( $single_option['options'] as $key => $value ) {
512
+ ?>
513
+ <label><?php echo wp_kses_post( $value ); ?>
514
+ <input name="<?php echo esc_attr( $parent_key ); ?>[<?php echo esc_attr( $key ); ?>]" type="text" id="<?php echo esc_attr( $parent_key.'-'.$key ); ?>" />
515
+ </label>
516
+ <br />
517
+ <?php
518
+ }
519
+ }
520
+ break;
521
  case 'number':
522
  if ( isset( $single_option['label'] ) ) {
523
  ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
676
  <div id="quiz_settings" class="qsm-new-menu-elements" style="display: none;">
677
  <div class="input-group">
678
  <label for="quiz_name"><?php esc_html_e( 'Quiz Name', 'quiz-master-next' ); ?>
679
+ <span style="color:red">*</span>
680
  <span
681
  class="qsm-opt-desc"><?php esc_html_e( 'Enter a name for this Quiz.', 'quiz-master-next' ); ?></span>
682
  </label>
699
  $all_settings = $mlwQuizMasterNext->quiz_settings->load_setting_fields( 'quiz_options' );
700
  global $globalQuizsetting;
701
  $quiz_setting_option = array(
702
+ 'form_type' => array(
703
  'option_name' => __( 'Form Type', 'quiz-master-next' ),
704
  'value' => $globalQuizsetting['form_type'],
705
  ),
706
+ 'system' => array(
707
  'option_name' => __( 'Grading System', 'quiz-master-next' ),
708
  'value' => $globalQuizsetting['system'],
709
  ),
710
+ 'enable_contact_form' => array(
711
+ 'option_name' => __( 'Enable Contact Form', 'quiz-master-next' ),
712
+ 'value' => 0,
713
+ 'options' => array(
714
+ array(
715
+ 'label' => __( 'Yes', 'quiz-master-next' ),
716
+ 'value' => 1,
717
+ ),
718
+ array(
719
+ 'label' => __( 'No', 'quiz-master-next' ),
720
+ 'value' => 0,
721
+ ),
722
+ ),
723
  ),
724
+ 'timer_limit' => array(
725
  'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ),
726
  'value' => $globalQuizsetting['timer_limit'],
727
  ),
728
+ 'require_log_in' => array(
 
 
 
 
729
  'option_name' => __( 'Require User Login', 'quiz-master-next' ),
730
  'value' => $globalQuizsetting['require_log_in'],
731
  ),
732
+ 'disable_first_page' => array(
 
 
 
 
733
  'option_name' => __( 'Disable first page on quiz', 'quiz-master-next' ),
734
  'value' => $globalQuizsetting['disable_first_page'],
735
  ),
736
+ 'comment_section' => array(
737
+ 'option_name' => __( 'Enable Comment box', 'quiz-master-next' ),
738
+ 'value' => $globalQuizsetting['comment_section'],
739
+ ),
740
  );
741
  $quiz_setting_option = apply_filters( 'qsm_quiz_wizard_settings_option', $quiz_setting_option );
742
  if ( $quiz_setting_option ) {
743
  foreach ( $quiz_setting_option as $key => $single_setting ) {
744
+ $index = array_search( $key, array_column( $all_settings, 'id' ), true );
745
+ if ( is_int( $index ) && isset( $all_settings[ $index ] ) ) {
746
+ $field = $all_settings[ $index ];
747
+ $field['label'] = $single_setting['option_name'];
748
+ $field['default'] = $single_setting['value'];
749
+ } else {
750
+ $field = array(
751
+ 'id' => $key,
752
+ 'label' => $single_setting['option_name'],
753
+ 'type' => isset( $single_setting['type'] ) ? $single_setting['type'] : 'radio',
754
+ 'options' => isset( $single_setting['options'] ) ? $single_setting['options'] : array(),
755
+ 'default' => $single_setting['value'],
756
+ 'help' => __( 'Display a contact form before quiz', 'quiz-master-next' ),
757
+ );
758
+ }
759
  echo '<div class="input-group">';
760
  QSM_Fields::generate_field( $field, $single_setting['value'] );
761
  echo '</div>';
828
  </div>
829
  <div class="qsm-addon-list-right">
830
  <span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
831
+ <a style="text-decoration: none; font-size: 15px;" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('addons', 'qsm-addons-page', 'all-addons-top') )?>" target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
 
 
832
  </div>
833
  </div>
834
  </div>
894
  '%CONTACT_ALL%' => __( 'Value user entered into contact field. X is # of contact field. For example, first contact field would be %CONTACT_1%', 'quiz-master-next' ),
895
  '%AVERAGE_CATEGORY_POINTS_X%' => __( 'X: Category name - The average amount of points a specific category earned.', 'quiz-master-next' ),
896
  '%QUESTION_ANSWER_X%' => __( 'X = Question ID. It will show result of particular question.', 'quiz-master-next' ),
897
+ '%ANSWER_X%' => __( 'X = Question ID. It will show result of particular question.', 'quiz-master-next' ),
898
  '%TIME_FINISHED%' => __( 'Display time after quiz submission.', 'quiz-master-next' ),
899
  ),
900
  );
984
  global $mlwQuizMasterNext;
985
  global $pro_themes;
986
  $active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
 
 
987
  $theme_folders = array();
988
  if ( ! empty( $active_themes ) ) {
989
  foreach ( $active_themes as $dir ) {
990
+ $theme_dir = WP_PLUGIN_DIR . '/' . $dir['theme'];
991
  if ( is_dir( $theme_dir ) ) {
992
  $theme_folders[] = $dir;
993
  }
1026
  <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1027
  <span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
1028
  <?php } ?>
1029
+ <img alt="" src="<?php echo esc_url( WP_PLUGIN_URL.'/' . $theme_name . '/screenshot.png' ); ?>" />
1030
  <div class="downloaded-theme-button">
1031
  <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
1032
  </div>
1064
  global $themes_data;
1065
  global $pro_themes;
1066
  $installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
1067
+ $default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Companion', 'Serene', 'Sigma', 'Fortune' );
1068
  $default_themes_data = array();
1069
  $keys_to_unset = array();
1070
  if ( ! empty( $themes_data ) ) {
php/admin/options-page-contact-tab.php CHANGED
@@ -147,6 +147,7 @@ function qsm_options_contact_tab_template() {
147
  <option value="number" <# if (data.type == 'number') { #>selected<# } #> ><?php esc_html_e('Number', 'quiz-master-next');?></option>
148
  <option value="date" <# if (data.type == 'date') { #>selected<# } #> ><?php esc_html_e('Date', 'quiz-master-next');?></option>
149
  <option value="checkbox" <# if (data.type == 'checkbox') { #>selected<# } #> ><?php esc_html_e('Checkbox', 'quiz-master-next');?></option>
 
150
  </select>
151
  </div>
152
  <div class="contact-form-group contact-form-inputs">
147
  <option value="number" <# if (data.type == 'number') { #>selected<# } #> ><?php esc_html_e('Number', 'quiz-master-next');?></option>
148
  <option value="date" <# if (data.type == 'date') { #>selected<# } #> ><?php esc_html_e('Date', 'quiz-master-next');?></option>
149
  <option value="checkbox" <# if (data.type == 'checkbox') { #>selected<# } #> ><?php esc_html_e('Checkbox', 'quiz-master-next');?></option>
150
+ <?php do_action('qsm_extra_contact_form_field_type'); ?>
151
  </select>
152
  </div>
153
  <div class="contact-form-group contact-form-inputs">
php/admin/options-page-email-tab.php CHANGED
@@ -39,7 +39,14 @@ function qsm_options_emails_tab_content() {
39
  'rest_user_nonce' => wp_create_nonce( 'wp_rest_nonce_' . $quiz_id . '_' . $user_id ),
40
  );
41
  wp_localize_script( 'qsm_admin_js', 'qsmEmailsObject', $js_data );
42
-
 
 
 
 
 
 
 
43
  ?>
44
 
45
  <!-- Emails Section -->
39
  'rest_user_nonce' => wp_create_nonce( 'wp_rest_nonce_' . $quiz_id . '_' . $user_id ),
40
  );
41
  wp_localize_script( 'qsm_admin_js', 'qsmEmailsObject', $js_data );
42
+ $quiz_options = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_options' );
43
+ if ( isset( $quiz_options['send_email'] ) && 1 != $quiz_options['send_email'] ) {
44
+ ?>
45
+ <div class="error notice-large notice-error">
46
+ <p><?php esc_html_e( 'Emails are turned off. Please update ', 'quiz-master-next');?> <a href="<?php echo esc_url( admin_url('admin.php?page=mlw_quiz_options&quiz_id='.$quiz_id.'&tab=options') );?>"> <?php esc_html_e('this setting', 'quiz-master-next');?></a><?php esc_html_e( ' for the emails to work properly.', 'quiz-master-next' ); ?></p>
47
+ </div>
48
+ <?php
49
+ }
50
  ?>
51
 
52
  <!-- Emails Section -->
php/admin/options-page-questions-tab.php CHANGED
@@ -308,6 +308,7 @@ function qsm_options_questions_tab_content() {
308
  <?php
309
  $show_correct_answer_info = '';
310
  $show_autofill = '';
 
311
  $show_limit_text = '';
312
  $show_limit_multiple_response = '';
313
  $show_file_upload_type = '';
@@ -319,6 +320,9 @@ function qsm_options_questions_tab_content() {
319
  if ( isset( $type['options']['show_autofill'] ) && $type['options']['show_autofill'] ) {
320
  $show_autofill .= ',' . $type['slug'];
321
  }
 
 
 
322
  if ( isset( $type['options']['show_limit_text'] ) && $type['options']['show_limit_text'] ) {
323
  $show_limit_text .= ',' . $type['slug'];
324
  }
@@ -337,9 +341,21 @@ function qsm_options_questions_tab_content() {
337
  'heading' => __( 'Correct Answer Info', 'quiz-master-next' ),
338
  'type' => 'textarea',
339
  'default' => '',
340
- 'priority' => '1',
341
  'show' => '0,1,2,3,4,5,7,10,12,14' . $polar_question_use . $show_correct_answer_info,
342
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Correct-Answer-Info',
 
 
 
 
 
 
 
 
 
 
 
 
343
  ),
344
  'comments' => array(
345
  'heading' => __( 'Comment Box', 'quiz-master-next' ),
@@ -352,7 +368,7 @@ function qsm_options_questions_tab_content() {
352
  '1' => __( 'None', 'quiz-master-next' ),
353
  ),
354
  'default' => '1',
355
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Comment-Field',
356
  ),
357
  'hint' => array(
358
  'heading' => __( 'Hint', 'quiz-master-next' ),
@@ -360,7 +376,7 @@ function qsm_options_questions_tab_content() {
360
  'type' => 'text',
361
  'default' => '',
362
  'priority' => '4',
363
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Hints',
364
  ),
365
  'autofill' => array(
366
  'heading' => __( 'Autofill', 'quiz-master-next' ),
@@ -372,7 +388,19 @@ function qsm_options_questions_tab_content() {
372
  ),
373
  'default' => '0',
374
  'show' => '3, 14' . $show_autofill,
375
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Hide-Autofill',
 
 
 
 
 
 
 
 
 
 
 
 
376
  ),
377
  'limit_text' => array(
378
  'heading' => __( 'Limit Text', 'quiz-master-next' ),
@@ -381,7 +409,7 @@ function qsm_options_questions_tab_content() {
381
  'priority' => '7',
382
  'default' => '',
383
  'show' => '3, 5, 7, 14' . $show_limit_text,
384
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Limit-Text',
385
  ),
386
  'limit_multiple_response' => array(
387
  'heading' => __( 'Limit Multiple choice', 'quiz-master-next' ),
@@ -390,7 +418,7 @@ function qsm_options_questions_tab_content() {
390
  'priority' => '8',
391
  'default' => '',
392
  'show' => '4,10' . $show_limit_multiple_response,
393
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Limit-Multiple-Choice',
394
  ),
395
  'file_upload_limit' => array(
396
  'heading' => __( 'File upload limit ( in MB )', 'quiz-master-next' ),
@@ -398,7 +426,7 @@ function qsm_options_questions_tab_content() {
398
  'priority' => '9',
399
  'default' => '',
400
  'show' => '11' . $show_file_upload_limit,
401
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#File-Upload-Limit',
402
  ),
403
  'file_upload_type' => array(
404
  'heading' => __( 'Allow File type', 'quiz-master-next' ),
@@ -414,7 +442,7 @@ function qsm_options_questions_tab_content() {
414
  ),
415
  'default' => 'image',
416
  'show' => '11' . $show_file_upload_type,
417
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Allow-File-Type',
418
  ),
419
  );
420
  $advanced_question_option = apply_filters( 'qsm_question_advanced_option', $advanced_question_option );
@@ -442,7 +470,7 @@ function qsm_options_questions_tab_content() {
442
  <label>
443
  <?php esc_html_e( 'Question Type', 'quiz-master-next' ); ?>
444
  <?php
445
- echo '<a class="qsm-question-doc" href="https://quizandsurveymaster.com/docs/v7/questions-tab/#Question-Type" target="_blank" title="' . esc_html__( 'View Documentation', 'quiz-master-next' ) . '">';
446
  echo '<span class="dashicons dashicons-editor-help"></span>';
447
  echo '</a>';
448
  ?>
@@ -466,7 +494,7 @@ function qsm_options_questions_tab_content() {
466
  ?>
467
  </select>
468
  <a class="question_info_tag hidden" target="_blank" rel="noopener"
469
- href="https://quizandsurveymaster.com/docs/about-quiz-survey-master/question-types/"><?php esc_html_e( 'How to use this option?', 'quiz-master-next' ); ?></a>
470
  <p class="hidden" id="question_type_info"></p>
471
  </div>
472
  <?php
@@ -495,7 +523,7 @@ function qsm_options_questions_tab_content() {
495
  'default' => 'text',
496
  'show' => '0,1,4,13' . $show_change_answer_editor,
497
  // 'tooltip' => __('You can use text and rich answer for question answers.', 'quiz-master-next'),.
498
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Answer-Type',
499
  ),
500
  'match-answer' => array(
501
  'label' => __( 'Match Answer', 'quiz-master-next' ),
@@ -540,7 +568,7 @@ function qsm_options_questions_tab_content() {
540
  <div id="categorydiv" class="postbox">
541
  <h2 class="hndle ui-sortable-handle">
542
  <span><?php esc_html_e( 'Select Category', 'quiz-master-next' ); ?></span>
543
- <a class="qsm-question-doc" rel="noopener" href="https://quizandsurveymaster.com/docs/v7/questions-tab/#Category" target="_blank" title="View Documentation"><span class="dashicons dashicons-editor-help"></span></a>
544
  </h2>
545
  <div class="inside">
546
  <?php
@@ -561,7 +589,7 @@ function qsm_options_questions_tab_content() {
561
  'type' => 'category',
562
  'priority' => '5',
563
  'default' => '',
564
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Category',
565
  ),
566
  );
567
  }
@@ -1064,11 +1092,11 @@ function qsm_options_questions_tab_template() {
1064
  <# if ( 'rich' == data.answerType ) { #>
1065
  <textarea id="answer-{{data.question_id}}-{{data.count}}"></textarea>
1066
  <# } else if ( 'image' == data.answerType ) { #>
1067
- <input type="text" class="answer-text" id="featured_image_textbox" value="{{data.answer}}" placeholder="Insert image URL"/>
1068
  <a href="javascript:void(0)" id="set_featured_image"><span class="dashicons dashicons-insert"></span></a>
1069
- <input type="text" class="answer-caption" id="featured_image_caption" value="{{data.caption}}" placeholder="Image Caption"/>
1070
  <# } else { #>
1071
- <input type="text" class="answer-text" value="{{data.answer}}" placeholder="Your answer"/>
1072
  <# } #>
1073
  </div>
1074
  <# if ( 0 == data.form_type ) { #>
308
  <?php
309
  $show_correct_answer_info = '';
310
  $show_autofill = '';
311
+ $show_case_sensitive = '';
312
  $show_limit_text = '';
313
  $show_limit_multiple_response = '';
314
  $show_file_upload_type = '';
320
  if ( isset( $type['options']['show_autofill'] ) && $type['options']['show_autofill'] ) {
321
  $show_autofill .= ',' . $type['slug'];
322
  }
323
+ if ( isset( $type['options']['show_case_sensitive'] ) && $type['options']['show_case_sensitive'] ) {
324
+ $show_case_sensitive .= ',' . $type['slug'];
325
+ }
326
  if ( isset( $type['options']['show_limit_text'] ) && $type['options']['show_limit_text'] ) {
327
  $show_limit_text .= ',' . $type['slug'];
328
  }
341
  'heading' => __( 'Correct Answer Info', 'quiz-master-next' ),
342
  'type' => 'textarea',
343
  'default' => '',
344
+ 'priority' => '2',
345
  'show' => '0,1,2,3,4,5,7,10,12,14' . $polar_question_use . $show_correct_answer_info,
346
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'correct_answer_info'),
347
+ ),
348
+ 'image_size' => array(
349
+ 'heading' => __( 'Set custom image size', 'quiz-master-next' ),
350
+ 'type' => 'multi_text',
351
+ 'priority' => '2',
352
+ 'options' => array(
353
+ 'width' => __( 'Width ', 'quiz-master-next' ),
354
+ 'height' => __( 'Height', 'quiz-master-next' ),
355
+ ),
356
+ 'default' => '',
357
+ 'show' => '',
358
+ 'documentation_link' => 'https://quizandsurveymaster.com/docs/creating-quizzes-and-surveys/adding-and-editing-questions/#7-set-custom-image-size',
359
  ),
360
  'comments' => array(
361
  'heading' => __( 'Comment Box', 'quiz-master-next' ),
368
  '1' => __( 'None', 'quiz-master-next' ),
369
  ),
370
  'default' => '1',
371
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'comment-box'),
372
  ),
373
  'hint' => array(
374
  'heading' => __( 'Hint', 'quiz-master-next' ),
376
  'type' => 'text',
377
  'default' => '',
378
  'priority' => '4',
379
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'hints'),
380
  ),
381
  'autofill' => array(
382
  'heading' => __( 'Autofill', 'quiz-master-next' ),
388
  ),
389
  'default' => '0',
390
  'show' => '3, 14' . $show_autofill,
391
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'autofill'),
392
+ ),
393
+ 'case_sensitive' => array(
394
+ 'heading' => __( 'Case Sensitivity', 'quiz-master-next' ),
395
+ 'label' => __( 'Require correct input of uppercase and lowercase letters', 'quiz-master-next' ),
396
+ 'type' => 'single_checkbox',
397
+ 'priority' => '1',
398
+ 'options' => array(
399
+ '1' => __( 'Yes', 'quiz-master-next' ),
400
+ ),
401
+ 'default' => '0',
402
+ 'show' => '14' .$show_case_sensitive,
403
+
404
  ),
405
  'limit_text' => array(
406
  'heading' => __( 'Limit Text', 'quiz-master-next' ),
409
  'priority' => '7',
410
  'default' => '',
411
  'show' => '3, 5, 7, 14' . $show_limit_text,
412
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'limit_text'),
413
  ),
414
  'limit_multiple_response' => array(
415
  'heading' => __( 'Limit Multiple choice', 'quiz-master-next' ),
418
  'priority' => '8',
419
  'default' => '',
420
  'show' => '4,10' . $show_limit_multiple_response,
421
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'limit_multiple_response'),
422
  ),
423
  'file_upload_limit' => array(
424
  'heading' => __( 'File upload limit ( in MB )', 'quiz-master-next' ),
426
  'priority' => '9',
427
  'default' => '',
428
  'show' => '11' . $show_file_upload_limit,
429
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'file_upload_limit'),
430
  ),
431
  'file_upload_type' => array(
432
  'heading' => __( 'Allow File type', 'quiz-master-next' ),
442
  ),
443
  'default' => 'image',
444
  'show' => '11' . $show_file_upload_type,
445
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'file_upload_type'),
446
  ),
447
  );
448
  $advanced_question_option = apply_filters( 'qsm_question_advanced_option', $advanced_question_option );
470
  <label>
471
  <?php esc_html_e( 'Question Type', 'quiz-master-next' ); ?>
472
  <?php
473
+ echo '<a class="qsm-question-doc" href="' . esc_url( qsm_get_plugin_link( 'docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'question_type' ) ) . '" target="_blank" title="' . esc_html__( 'View Documentation', 'quiz-master-next' ) . '">';
474
  echo '<span class="dashicons dashicons-editor-help"></span>';
475
  echo '</a>';
476
  ?>
494
  ?>
495
  </select>
496
  <a class="question_info_tag hidden" target="_blank" rel="noopener"
497
+ href="<?php echo esc_url( qsm_get_plugin_link( 'docs/about-quiz-survey-master/question-types/', 'question-popup', 'question_type' ) );?>"><?php esc_html_e( 'How to use this option?', 'quiz-master-next' ); ?></a>
498
  <p class="hidden" id="question_type_info"></p>
499
  </div>
500
  <?php
523
  'default' => 'text',
524
  'show' => '0,1,4,13' . $show_change_answer_editor,
525
  // 'tooltip' => __('You can use text and rich answer for question answers.', 'quiz-master-next'),.
526
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'answer-type'),
527
  ),
528
  'match-answer' => array(
529
  'label' => __( 'Match Answer', 'quiz-master-next' ),
568
  <div id="categorydiv" class="postbox">
569
  <h2 class="hndle ui-sortable-handle">
570
  <span><?php esc_html_e( 'Select Category', 'quiz-master-next' ); ?></span>
571
+ <a class="qsm-question-doc" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'category') );?>" target="_blank" title="View Documentation"><span class="dashicons dashicons-editor-help"></span></a>
572
  </h2>
573
  <div class="inside">
574
  <?php
589
  'type' => 'category',
590
  'priority' => '5',
591
  'default' => '',
592
+ 'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'question-popup', 'category'),
593
  ),
594
  );
595
  }
1092
  <# if ( 'rich' == data.answerType ) { #>
1093
  <textarea id="answer-{{data.question_id}}-{{data.count}}"></textarea>
1094
  <# } else if ( 'image' == data.answerType ) { #>
1095
+ <input type="text" class="answer-text" id="featured_image_textbox" value="{{data.answer}}" placeholder="<?php esc_attr_e( 'Insert image URL', 'quiz-master-next' ); ?>"/>
1096
  <a href="javascript:void(0)" id="set_featured_image"><span class="dashicons dashicons-insert"></span></a>
1097
+ <input type="text" class="answer-caption" id="featured_image_caption" value="{{data.caption}}" placeholder="<?php esc_attr_e( 'Image Caption', 'quiz-master-next' ); ?>"/>
1098
  <# } else { #>
1099
+ <input type="text" class="answer-text" value="{{data.answer}}" placeholder="<?php esc_attr_e( 'Your answer', 'quiz-master-next' ); ?>"/>
1100
  <# } #>
1101
  </div>
1102
  <# if ( 0 == data.form_type ) { #>
php/admin/options-page-style-tab.php CHANGED
@@ -227,7 +227,7 @@ function qsm_options_styling_tab_content() {
227
  <h3><?php esc_html_e( 'Custom Style CSS', 'quiz-master-next' ); ?></h3>
228
  <p><?php esc_html_e( 'For help and guidance along with a list of different classes used in this plugin, please visit the following link:', 'quiz-master-next' ); ?>
229
  <a target="_blank" rel="noopener"
230
- href="https://quizandsurveymaster.com/docs/advanced-topics/editing-design-styles-css/">CSS in QSM</a>
231
  </p>
232
  <table class="form-table">
233
  <tr>
@@ -272,12 +272,28 @@ function qsm_options_styling_tab_content() {
272
  value="<?php echo esc_attr( $theme_val['label'] ); ?>">
273
  <input type="hidden" name="settings[<?php echo esc_attr( $key ); ?>][id]"
274
  value="<?php echo esc_attr( $theme_val['id'] ); ?>">
275
- <input type="hidden" name="settings[<?php echo esc_attr( $key ); ?>][type]" value="color">
276
  </th>
277
  <td>
278
- <input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text"
279
- value="<?php echo esc_attr( $theme_val['default'] ); ?>"
280
- data-default-color="<?php echo esc_attr( $theme_val['default'] ); ?>" class="my-color-field" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  </td>
282
  </tr>
283
  <?php
227
  <h3><?php esc_html_e( 'Custom Style CSS', 'quiz-master-next' ); ?></h3>
228
  <p><?php esc_html_e( 'For help and guidance along with a list of different classes used in this plugin, please visit the following link:', 'quiz-master-next' ); ?>
229
  <a target="_blank" rel="noopener"
230
+ href="<?php echo esc_url( qsm_get_plugin_link('docs/advanced-topics/editing-design-styles-css/', 'style-tab', 'css') );?>">CSS in QSM</a>
231
  </p>
232
  <table class="form-table">
233
  <tr>
272
  value="<?php echo esc_attr( $theme_val['label'] ); ?>">
273
  <input type="hidden" name="settings[<?php echo esc_attr( $key ); ?>][id]"
274
  value="<?php echo esc_attr( $theme_val['id'] ); ?>">
275
+ <input type="hidden" name="settings[<?php echo esc_attr( $key ); ?>][type]" value="<?php echo esc_attr( $theme_val['type'] ); ?>">
276
  </th>
277
  <td>
278
+ <?php
279
+ switch ( $theme_val['type'] ) {
280
+ case 'image':
281
+ ?>
282
+ <input class="quiz_background_image" name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" >
283
+ <a class="set_background_image button" href="javascript:void(0);"><?php esc_html_e( 'Select Image', 'quiz-master-next' ); ?></a>
284
+ <?php
285
+ break;
286
+ case 'color':
287
+ ?>
288
+ <input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" data-default-color="<?php echo esc_attr( $theme_val['default'] ); ?>" class="my-color-field" />
289
+ <?php
290
+ break;
291
+ default:
292
+ ?>
293
+ <input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>"/>
294
+ <?php
295
+ break;
296
+ } ?>
297
  </td>
298
  </tr>
299
  <?php
php/admin/quiz-options-page.php CHANGED
@@ -39,7 +39,7 @@ function qsm_generate_quiz_options() {
39
 
40
  // Gets registered tabs for the options page and set current tab.
41
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_settings_tabs();
42
- $active_tab = strtolower( str_replace( ' ', '-', isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : __( 'Questions', 'quiz-master-next' ) ) );
43
 
44
  // Prepares quiz.
45
  $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
@@ -129,14 +129,14 @@ function qsm_generate_quiz_options() {
129
  </a>
130
  <div class="qsm-help-tab-dropdown-list">
131
  <h3><?php esc_html_e( 'Useful Resources', 'quiz-master-next' ); ?></h3>
132
- <a href="https://quizandsurveymaster.com/contact-support/?utm_source=qsm-help-page&utm_medium=plugin&utm_campaign=qsm_plugin&utm_content=contact_us" rel="noopener" target="_black" class="qsm-help-tab-item "><img class="qsm-help-tab-icon" alt="" src="<?php echo esc_url( QSM_PLUGIN_URL.'assets/Support.svg' ) ?>"> <?php esc_html_e( 'Get support', 'quiz-master-next' ); ?></a>
133
- <a href="https://quizandsurveymaster.com/docs/about-quiz-survey-master/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Overview', 'quiz-master-next' ); ?></a>
134
- <a href="https://quizandsurveymaster.com/docs/creating-quizzes-and-surveys/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Creating Quizzes', 'quiz-master-next' ); ?></a>
135
- <a href="https://quizandsurveymaster.com/docs/question-types/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Question Types', 'quiz-master-next' ); ?></a>
136
- <a href="https://quizandsurveymaster.com/docs/advanced-topics/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Advanced Topics', 'quiz-master-next' ); ?></a>
137
- <a href="https://quizandsurveymaster.com/docs/qsm-themes/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'QSM Themes', 'quiz-master-next' ); ?></a>
138
- <a href="https://quizandsurveymaster.com/docs/add-ons/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Add-ons', 'quiz-master-next' ); ?></a>
139
- <a href="https://quizandsurveymaster.com/docs/" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'All Docs', 'quiz-master-next' ); ?></a>
140
  </div>
141
  </div>
142
  </div>
39
 
40
  // Gets registered tabs for the options page and set current tab.
41
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_settings_tabs();
42
+ $active_tab = strtolower( str_replace( ' ', '-', isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'questions' ) );
43
 
44
  // Prepares quiz.
45
  $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
129
  </a>
130
  <div class="qsm-help-tab-dropdown-list">
131
  <h3><?php esc_html_e( 'Useful Resources', 'quiz-master-next' ); ?></h3>
132
+ <a href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'quiz-help-box', 'contact_us') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><img class="qsm-help-tab-icon" alt="" src="<?php echo esc_url( QSM_PLUGIN_URL.'assets/Support.svg' ) ?>"> <?php esc_html_e( 'Get support', 'quiz-master-next' ); ?></a>
133
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/about-quiz-survey-master', 'quiz-help-box', 'overview') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Overview', 'quiz-master-next' ); ?></a>
134
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/creating-quizzes-and-surveys', 'quiz-help-box', 'creating-quizzes') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Creating Quizzes', 'quiz-master-next' ); ?></a>
135
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/question-types', 'quiz-help-box', 'question-types') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Question Types', 'quiz-master-next' ); ?></a>
136
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/advanced-topics', 'quiz-help-box', 'advanced-topics') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Advanced Topics', 'quiz-master-next' ); ?></a>
137
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/qsm-themes', 'quiz-help-box', 'qsm-themes') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'QSM Themes', 'quiz-master-next' ); ?></a>
138
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs/add-ons', 'quiz-help-box', 'add-ons') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Add-ons', 'quiz-master-next' ); ?></a>
139
+ <a href="<?php echo esc_url( qsm_get_plugin_link('docs', 'quiz-help-box', 'all-docs') );?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'All Docs', 'quiz-master-next' ); ?></a>
140
  </div>
141
  </div>
142
  </div>
php/admin/quizzes-page.php CHANGED
@@ -89,7 +89,7 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
89
  * @param type $post_id
90
  */
91
  public function qsm_custom_qsm_quiz_columns( $column, $post_id ) {
92
- global $wpdb;
93
  $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
94
  switch ( $column ) {
95
  case 'shortcode':
@@ -100,8 +100,8 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
100
  break;
101
 
102
  case 'total_questions':
103
- $questions = $wpdb->get_var( "SELECT count(question_id) FROM `{$wpdb->prefix}mlw_questions` WHERE `quiz_id`='{$quiz_id}' AND `deleted`='0'" );
104
- echo esc_attr( $questions );
105
  break;
106
 
107
  case 'views':
@@ -286,7 +286,7 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
286
  <p><?php esc_html_e( 'Your site is using PHP version', 'quiz-master-next' ); ?>
287
  <?php echo esc_html( PHP_VERSION ); ?>!
288
  <?php esc_html_e( 'Starting in QSM 6.0, your version of PHP will no longer be supported.', 'quiz-master-next' ); ?>
289
- <a href="https://quizandsurveymaster.com/increased-minimum-php-version-qsm-6-0/?utm_campaign=qsm_plugin&utm_medium=plugin&utm_source=minimum-php-notice" target="_blank" rel="noopener"><?php esc_html_e( "Click here to learn more about QSM's minimum PHP version change.", 'quiz-master-next' ); ?></a>
290
  </p>
291
  </div>
292
  <?php
@@ -447,11 +447,8 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
447
  </h3>
448
  </main>
449
  <footer class="qsm-popup__footer">
450
- <a style="color: white; text-decoration: none;"
451
- href="https://quizandsurveymaster.com/downloads/export-import/" target="_blank"
452
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
453
- <button class="qsm-popup__btn" data-micromodal-close
454
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
455
  </footer>
456
  </div>
457
  </div>
@@ -489,7 +486,7 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
489
  <h2><?php esc_html_e( 'You do not have any quizzes or surveys yet', 'quiz-master-next' ); ?></h2>
490
  <div class="buttons">
491
  <a class="button button-primary button-hero qsm-wizard-noquiz" href="#"><?php esc_html_e( 'Create New Quiz/Survey', 'quiz-master-next' ); ?></a>
492
- <a class="button button-secondary button-hero" href="https://quizandsurveymaster.com/docs/" target="_blank"><span class="dashicons dashicons-admin-page"></span> <?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?></a>
493
  </div>
494
  <h3><?php esc_html_e( 'or watch the below video to get started', 'quiz-master-next' ); ?></h3>
495
  <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/coE5W_WB-48" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
89
  * @param type $post_id
90
  */
91
  public function qsm_custom_qsm_quiz_columns( $column, $post_id ) {
92
+ global $wpdb, $mlwQuizMasterNext;
93
  $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
94
  switch ( $column ) {
95
  case 'shortcode':
100
  break;
101
 
102
  case 'total_questions':
103
+ $total_questions = $mlwQuizMasterNext->pluginHelper->get_questions_count( $quiz_id );
104
+ echo esc_attr( $total_questions );
105
  break;
106
 
107
  case 'views':
286
  <p><?php esc_html_e( 'Your site is using PHP version', 'quiz-master-next' ); ?>
287
  <?php echo esc_html( PHP_VERSION ); ?>!
288
  <?php esc_html_e( 'Starting in QSM 6.0, your version of PHP will no longer be supported.', 'quiz-master-next' ); ?>
289
+ <a href="<?php echo esc_url( qsm_get_plugin_link('increased-minimum-php-version-qsm-6-0', 'quiz-list-page', 'minimum-php-notice') );?>" target="_blank" rel="noopener"><?php esc_html_e( "Click here to learn more about QSM's minimum PHP version change.", 'quiz-master-next' ); ?></a>
290
  </p>
291
  </div>
292
  <?php
447
  </h3>
448
  </main>
449
  <footer class="qsm-popup__footer">
450
+ <a style="color: white;text-decoration: none;" href="<?php echo esc_url( qsm_get_plugin_link('downloads/export-import', 'quiz-list-page') );?>" target="_blank" class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
451
+ <button class="qsm-popup__btn" data-micromodal-close aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
 
 
 
452
  </footer>
453
  </div>
454
  </div>
486
  <h2><?php esc_html_e( 'You do not have any quizzes or surveys yet', 'quiz-master-next' ); ?></h2>
487
  <div class="buttons">
488
  <a class="button button-primary button-hero qsm-wizard-noquiz" href="#"><?php esc_html_e( 'Create New Quiz/Survey', 'quiz-master-next' ); ?></a>
489
+ <a class="button button-secondary button-hero" href="<?php echo esc_url( qsm_get_plugin_link('docs', 'quiz-list-page') );?>" target="_blank"><span class="dashicons dashicons-admin-page"></span> <?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?></a>
490
  </div>
491
  <h3><?php esc_html_e( 'or watch the below video to get started', 'quiz-master-next' ); ?></h3>
492
  <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/coE5W_WB-48" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
php/admin/settings-page.php CHANGED
@@ -110,10 +110,11 @@ class QMNGlobalSettingsPage {
110
  'question_per_category' => 0,
111
  'contact_info_location' => 0,
112
  'loggedin_user_contact' => 0,
113
- 'comment_section' => 0,
114
  'question_numbering' => 0,
115
  'show_optin' => 0,
116
  'store_responses' => 1,
 
117
  'disable_answer_onselect' => 0,
118
  'ajax_show_correct' => 0,
119
  'contact_disable_autofill' => 0,
@@ -128,6 +129,7 @@ class QMNGlobalSettingsPage {
128
  'disable_description_on_result' => 0,
129
  'disable_scroll_next_previous_click' => 0,
130
  'disable_first_page' => 0,
 
131
  'quiz_animation' => '',
132
  'result_page_fb_image' => QSM_PLUGIN_URL . 'assets/icon-200x200.png',
133
  'randomness_order' => 0,
@@ -175,7 +177,7 @@ class QMNGlobalSettingsPage {
175
  add_settings_field( 'enable-comments', __( 'Enable comments', 'quiz-master-next' ), array( $this, 'qsm_global_enable_comments' ), 'qsm_default_global_option_general', 'qmn-global-section' );
176
  add_settings_field( 'show-question-numbers', __( 'Show question numbers', 'quiz-master-next' ), array( $this, 'qsm_global_show_question_numbers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
177
  add_settings_field( 'show-opt-in-answers-default', __( 'Show Opt-in type Answers to user', 'quiz-master-next' ), array( $this, 'qsm_global_show_optin_answers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
178
- add_settings_field( 'save-responses', __( 'Save Responses', 'quiz-master-next' ), array( $this, 'qsm_global_save_responses' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
179
  add_settings_field( 'disable-change-of-answers', __( 'Disable change of answers', 'quiz-master-next' ), array( $this, 'qsm_global_disable_change_of_answers' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
180
  add_settings_field( 'add-class-for-correct-incorrect-answers', __( 'Add class for correct/incorrect answers', 'quiz-master-next' ), array( $this, 'qsm_global_add_class_for_correct_incorrect_answers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
181
  add_settings_field( 'disable-auto-fill-for-contact-input', __( 'Disable auto fill for contact input', 'quiz-master-next' ), array( $this, 'qsm_global_disable_auto_fill_for_contact_input' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
@@ -188,6 +190,7 @@ class QMNGlobalSettingsPage {
188
  add_settings_field( 'show-current-page-number', __( 'Show current page number', 'quiz-master-next' ), array( $this, 'qsm_global_show_current_page_number' ), 'qsm_default_global_option_display', 'qmn-global-section' );
189
  add_settings_field( 'deselect-answer', __( 'Deselect Answer', 'quiz-master-next' ), array( $this, 'qsm_global_deselect_answer' ), 'qsm_default_global_option_general', 'qmn-global-section' );
190
  add_settings_field( 'disable-description-on-quiz-result-page', __( 'Disable description on quiz result page?', 'quiz-master-next' ), array( $this, 'qsm_global_disable_description_on_quiz_result_page' ), 'qsm_default_global_option_general', 'qmn-global-section' );
 
191
  add_settings_field( 'disable-scroll-on-next-and-previous-button-click', __( 'Disable scroll on next and previous button click?', 'quiz-master-next' ), array( $this, 'qsm_global_disable_scroll_on_next_and_previous_button_click' ), 'qsm_default_global_option_display', 'qmn-global-section' );
192
  add_settings_field( 'disable-first-page', __( 'Disable first page on quiz', 'quiz-master-next' ), array( $this, 'qsm_global_disable_first_page' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
193
  add_settings_field( 'quiz-animation', __( 'Quiz Animation', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_animation' ), 'qsm_default_global_option_display', 'qmn-global-section' );
@@ -894,14 +897,16 @@ class QMNGlobalSettingsPage {
894
  */
895
  public function qsm_global_save_responses() {
896
  global $globalQuizsetting;
897
- $qsm_store_responses = ( isset( $globalQuizsetting['store_responses'] ) && '' !== $globalQuizsetting['store_responses'] ? $globalQuizsetting['store_responses'] : '0' );
 
898
  echo '<fieldset class="buttonset buttonset-hide" >
899
- <input type="radio" id="store_responses-1" name="qsm-quiz-settings[store_responses]" value="1" ' . checked( $qsm_store_responses, '1', false ) . '>
900
- <label for="store_responses-1">Yes</label><br>
901
- <input type="radio" id="store_responses-0" name="qsm-quiz-settings[store_responses]" value="0" ' . checked( $qsm_store_responses, '0', false ) . '>
902
- <label for="store_responses-0">No</label><br>
903
- </fieldset>
904
- <span class="qsm-opt-desc">The results will be permanently stored in a database</span>';
 
905
  }
906
 
907
  /**
@@ -1116,6 +1121,22 @@ class QMNGlobalSettingsPage {
1116
  <label for="disable_description_on_result-0">No</label><br>
1117
  </fieldset>';
1118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1119
  /**
1120
  * Generates Quiz Global Field For Disable scroll on next and previous button click?
1121
  *
110
  'question_per_category' => 0,
111
  'contact_info_location' => 0,
112
  'loggedin_user_contact' => 0,
113
+ 'comment_section' => 1,
114
  'question_numbering' => 0,
115
  'show_optin' => 0,
116
  'store_responses' => 1,
117
+ 'send_email' => 1,
118
  'disable_answer_onselect' => 0,
119
  'ajax_show_correct' => 0,
120
  'contact_disable_autofill' => 0,
129
  'disable_description_on_result' => 0,
130
  'disable_scroll_next_previous_click' => 0,
131
  'disable_first_page' => 0,
132
+ 'disable_mathjax' => 0,
133
  'quiz_animation' => '',
134
  'result_page_fb_image' => QSM_PLUGIN_URL . 'assets/icon-200x200.png',
135
  'randomness_order' => 0,
177
  add_settings_field( 'enable-comments', __( 'Enable comments', 'quiz-master-next' ), array( $this, 'qsm_global_enable_comments' ), 'qsm_default_global_option_general', 'qmn-global-section' );
178
  add_settings_field( 'show-question-numbers', __( 'Show question numbers', 'quiz-master-next' ), array( $this, 'qsm_global_show_question_numbers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
179
  add_settings_field( 'show-opt-in-answers-default', __( 'Show Opt-in type Answers to user', 'quiz-master-next' ), array( $this, 'qsm_global_show_optin_answers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
180
+ add_settings_field( 'save-responses', __( 'Submit Actions', 'quiz-master-next' ), array( $this, 'qsm_global_save_responses' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
181
  add_settings_field( 'disable-change-of-answers', __( 'Disable change of answers', 'quiz-master-next' ), array( $this, 'qsm_global_disable_change_of_answers' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
182
  add_settings_field( 'add-class-for-correct-incorrect-answers', __( 'Add class for correct/incorrect answers', 'quiz-master-next' ), array( $this, 'qsm_global_add_class_for_correct_incorrect_answers' ), 'qsm_default_global_option_display', 'qmn-global-section' );
183
  add_settings_field( 'disable-auto-fill-for-contact-input', __( 'Disable auto fill for contact input', 'quiz-master-next' ), array( $this, 'qsm_global_disable_auto_fill_for_contact_input' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
190
  add_settings_field( 'show-current-page-number', __( 'Show current page number', 'quiz-master-next' ), array( $this, 'qsm_global_show_current_page_number' ), 'qsm_default_global_option_display', 'qmn-global-section' );
191
  add_settings_field( 'deselect-answer', __( 'Deselect Answer', 'quiz-master-next' ), array( $this, 'qsm_global_deselect_answer' ), 'qsm_default_global_option_general', 'qmn-global-section' );
192
  add_settings_field( 'disable-description-on-quiz-result-page', __( 'Disable description on quiz result page?', 'quiz-master-next' ), array( $this, 'qsm_global_disable_description_on_quiz_result_page' ), 'qsm_default_global_option_general', 'qmn-global-section' );
193
+ add_settings_field( 'disable_mathjax', __( 'Disable MathJax?', 'quiz-master-next' ), array( $this, 'qsm_global_disable_mathjax' ), 'qsm_default_global_option_general', 'qmn-global-section' );
194
  add_settings_field( 'disable-scroll-on-next-and-previous-button-click', __( 'Disable scroll on next and previous button click?', 'quiz-master-next' ), array( $this, 'qsm_global_disable_scroll_on_next_and_previous_button_click' ), 'qsm_default_global_option_display', 'qmn-global-section' );
195
  add_settings_field( 'disable-first-page', __( 'Disable first page on quiz', 'quiz-master-next' ), array( $this, 'qsm_global_disable_first_page' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
196
  add_settings_field( 'quiz-animation', __( 'Quiz Animation', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_animation' ), 'qsm_default_global_option_display', 'qmn-global-section' );
897
  */
898
  public function qsm_global_save_responses() {
899
  global $globalQuizsetting;
900
+ $qsm_store_responses = ( isset( $globalQuizsetting['store_responses'] ) && '' !== $globalQuizsetting['store_responses'] ? $globalQuizsetting['store_responses'] : '' );
901
+ $qsm_send_email = ( isset( $globalQuizsetting['send_email'] ) && '' !== $globalQuizsetting['send_email'] ? $globalQuizsetting['send_email'] : '' );
902
  echo '<fieldset class="buttonset buttonset-hide" >
903
+ <input type="hidden" name="qsm-quiz-settings[store_responses]" value="0">
904
+ <input type="checkbox" id="store_responses" name="qsm-quiz-settings[store_responses]" value="1" ' . checked( $qsm_store_responses, '1', false ) . '>
905
+ <label for="store_responses">'.esc_html__('Store results permanently in database', 'quiz-master-next').'</label>
906
+ <input type="hidden" name="qsm-quiz-settings[send_email]" value="0">
907
+ <input type="checkbox" id="send_email" name="qsm-quiz-settings[send_email]" value="1" ' . checked( $qsm_send_email, '1', false ) . '>
908
+ <label for="send_email">'.esc_html__('Send email notifications', 'quiz-master-next').'</label>
909
+ </fieldset>';
910
  }
911
 
912
  /**
1121
  <label for="disable_description_on_result-0">No</label><br>
1122
  </fieldset>';
1123
  }
1124
+ /**
1125
+ * Generates Quiz Global Field For Disable MathJax?
1126
+ *
1127
+ * @since 8.0.3
1128
+ * @return void
1129
+ */
1130
+ public function qsm_global_disable_mathjax() {
1131
+ global $globalQuizsetting;
1132
+ $qsm_disable_mathjax = ( isset( $globalQuizsetting['disable_mathjax'] ) && '' !== $globalQuizsetting['disable_mathjax'] ? $globalQuizsetting['disable_mathjax'] : '0' );
1133
+ echo '<fieldset class="buttonset buttonset-hide" >
1134
+ <input type="radio" id="disable_mathjax-1" name="qsm-quiz-settings[disable_mathjax]" value="1" ' . checked( $qsm_disable_mathjax, '1', false ) . ' >
1135
+ <label for="disable_mathjax-1">Yes</label><br>
1136
+ <input type="radio" id="disable_mathjax-0" name="qsm-quiz-settings[disable_mathjax]" value="0" ' . checked( $qsm_disable_mathjax, '0', false ) . '>
1137
+ <label for="disable_mathjax-0">No</label><br>
1138
+ </fieldset>';
1139
+ }
1140
  /**
1141
  * Generates Quiz Global Field For Disable scroll on next and previous button click?
1142
  *
php/classes/class-qmn-background-process.php CHANGED
@@ -34,10 +34,10 @@ class QSM_Background_Request extends WP_Async_Request {
34
  protected function handle() {
35
  $message = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : '';
36
  if ( 'send_emails' === $message ) {
37
- $result_id = isset( $_POST['result_id'] ) ? sanitize_text_field( wp_unslash( $_POST['result_id'] ) ) : 0;
38
  try {
39
  $this->really_long_running_task();
40
- QSM_Emails::send_emails($result_id);
41
  } catch ( Exception $e ) {
42
  if ( defined('WP_DEBUG') && WP_DEBUG ) {
43
  trigger_error('Background email triggered fatal error for callback.', E_USER_WARNING); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
34
  protected function handle() {
35
  $message = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : '';
36
  if ( 'send_emails' === $message ) {
37
+ $transient_id = isset( $_POST['transient_id'] ) ? sanitize_text_field( wp_unslash( $_POST['transient_id'] ) ) : 0;
38
  try {
39
  $this->really_long_running_task();
40
+ QSM_Emails::send_emails( $transient_id );
41
  } catch ( Exception $e ) {
42
  if ( defined('WP_DEBUG') && WP_DEBUG ) {
43
  trigger_error('Background email triggered fatal error for callback.', E_USER_WARNING); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
php/classes/class-qmn-plugin-helper.php CHANGED
@@ -453,6 +453,27 @@ class QMNPluginHelper {
453
  }
454
  }
455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  /**
457
  * Shuffle assoc array
458
  *
@@ -495,7 +516,7 @@ class QMNPluginHelper {
495
  'message_before' => 'Welcome to your %QUIZ_NAME%',
496
  'message_comment' => 'Please fill in the comment box below.',
497
  'message_end_template' => '',
498
- 'question_answer_template' => '%QUESTION%<br />%USER_ANSWERS_DEFAULT%',
499
  'question_answer_email_template' => '%QUESTION%<br />Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%',
500
  'total_user_tries_text' => 'You have utilized all of your attempts to pass this quiz.',
501
  'require_log_in_text' => 'This quiz is for logged in users only.',
@@ -1027,22 +1048,14 @@ class QMNPluginHelper {
1027
 
1028
  public function qsm_results_css_inliner( $html ) {
1029
 
1030
- $incorrect_answer = "<span style='color:red;display:block;margin-bottom:5px;'>&#x2715;";
1031
- $correct_answer = "<span style='color:green;display:block;margin-bottom:5px;'>&#10003;";
1032
- $simple_answer = "<span style='color:#808080;display:block;margin-bottom:5px;'>&#8226;&nbsp;";
1033
- $html = str_replace( '<br/>', '<br>', $html );
1034
- $html = str_replace( '<br />', '<br>', $html );
1035
- $html = str_replace( '<span class="qsm-text-wrong-option qmn_image_option">', "$incorrect_answer ", $html );
1036
- $html = str_replace( '<span class="qsm-text-correct-option qmn_image_option">', "$correct_answer ", $html );
1037
- $html = str_replace( '<span class="qsm-text-correct-option qsm-text-user-correct-answer qmn_image_option">', "$correct_answer ", $html );
1038
- $html = str_replace( '<span class="qsm-text-simple-option qmn_image_option">', "$simple_answer ", $html );
1039
- $html = str_replace( '<span class="qsm-text-correct-option qsm-text-user-correct-answer ">', "$correct_answer ", $html );
1040
- $html = str_replace( '<span class="qsm-text-simple-option ">', "$simple_answer ", $html );
1041
- $html = str_replace( '<span class="qsm-text-wrong-option ">', "$incorrect_answer ", $html );
1042
- $html = str_replace( '<span class="qsm-text-correct-option ">', "$correct_answer ", $html );
1043
- $html = str_replace( '<span class="qmn_user_incorrect_answer">', "$incorrect_answer ", $html );
1044
- $html = str_replace( '<span class="qmn_user_correct_answer qsm-text-correct-option qsm-text-user-correct-answer">', "$correct_answer ", $html );
1045
- $html = str_replace( "class='qmn_question_answer", "style='margin-bottom:30px' class='", $html );
1046
 
1047
  return $html;
1048
  }
453
  }
454
  }
455
 
456
+ public function get_questions_count( $quiz_id = 0 ) {
457
+ global $wpdb;
458
+ $quiz_id = intval( $quiz_id );
459
+ $count = 0;
460
+ if ( empty( $quiz_id ) || 0 == $quiz_id ) {
461
+ return $count;
462
+ }
463
+
464
+ $quiz_settings = $wpdb->get_var( $wpdb->prepare( "SELECT `quiz_settings` FROM `{$wpdb->prefix}mlw_quizzes` WHERE `quiz_id`=%d", $quiz_id ) );
465
+ if ( ! empty( $quiz_settings ) ) {
466
+ $settings = maybe_unserialize( $quiz_settings );
467
+ $pages = isset( $settings['pages'] ) ? maybe_unserialize( $settings['pages'] ) : array();
468
+ if ( ! empty( $pages ) ) {
469
+ foreach ( $pages as $page ) {
470
+ $count += count( $page );
471
+ }
472
+ }
473
+ }
474
+ return $count;
475
+ }
476
+
477
  /**
478
  * Shuffle assoc array
479
  *
516
  'message_before' => 'Welcome to your %QUIZ_NAME%',
517
  'message_comment' => 'Please fill in the comment box below.',
518
  'message_end_template' => '',
519
+ 'question_answer_template' => '%QUESTION%<br />%USER_ANSWERS_DEFAULT%<br/>%CORRECT_ANSWER_INFO%',
520
  'question_answer_email_template' => '%QUESTION%<br />Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%',
521
  'total_user_tries_text' => 'You have utilized all of your attempts to pass this quiz.',
522
  'require_log_in_text' => 'This quiz is for logged in users only.',
1048
 
1049
  public function qsm_results_css_inliner( $html ) {
1050
 
1051
+ $html = str_replace( '<br/>', '<br>', $html );
1052
+ $html = str_replace( '<br />', '<br>', $html );
1053
+ $html = str_replace( "class='qmn_question_answer", "style='margin-bottom:30px' class='", $html );
1054
+ $html = preg_replace( '/<span class="qsm-text-simple-option(.*?)">(.*?)<\/span>/', "<span style='color:#808080;display:block;margin-bottom:5px;'>&#8226;&nbsp;$2</span>", $html );
1055
+ $html = preg_replace( '/<span class="qsm-text-wrong-option(.*?)">(.*?)<\/span>/', "<span style='color:red;display:block;margin-bottom:5px;'>&#x2715;$2</span>", $html );
1056
+ $html = preg_replace( '/<span class="qmn_user_incorrect_answer(.*?)">(.*?)<\/span>/', "<span style='color:red;display:block;margin-bottom:5px;'>&#x2715;$2</span>", $html );
1057
+ $html = preg_replace( '/<span class="qsm-text-correct-option(.*?)">(.*?)<\/span>/', "<span style='color:green;display:block;margin-bottom:5px;'>&#10003;$2</span>", $html );
1058
+ $html = preg_replace( '/<span class="qmn_user_correct_answer(.*?)">(.*?)<\/span>/', "<span style='color:green;display:block;margin-bottom:5px;'>&#10003;$2</span>", $html );
 
 
 
 
 
 
 
 
1059
 
1060
  return $html;
1061
  }
php/classes/class-qmn-quiz-creator.php CHANGED
@@ -104,7 +104,7 @@ class QMNQuizCreator {
104
  'user_email' => 2,
105
  'user_phone' => 2,
106
  'admin_email' => get_option( 'admin_email', 'Enter email' ),
107
- 'comment_section' => 1,
108
  'question_from_total' => 0,
109
  'total_user_tries' => 0,
110
  'total_user_tries_text' => isset( $default_texts['total_user_tries_text'] ) ? $default_texts['total_user_tries_text'] : __( 'You have utilized all of your attempts to pass this quiz.', 'quiz-master-next' ),
@@ -657,15 +657,10 @@ class QMNQuizCreator {
657
  $update_quiz_settings['logic_rules'] = maybe_serialize( $logic_rules );
658
  } else {
659
  foreach ( $logic_rules as $logic_data ) {
660
- $data = array(
661
- $mlw_new_id,
662
- maybe_serialize( $logic_data ),
663
- );
664
- $value_array[] = stripslashes( $wpdb->prepare( '(%d, %s)', $data ) );
665
  }
666
  $values = implode( ',', $value_array );
667
- $query = "INSERT INTO $logic_table (quiz_id, logic) VALUES ";
668
- $query .= $values;
669
  $saved = $wpdb->query( $query );
670
  if ( false !== $saved ) {
671
  update_option( "logic_rules_quiz_$mlw_new_id", gmdate( time() ) );
104
  'user_email' => 2,
105
  'user_phone' => 2,
106
  'admin_email' => get_option( 'admin_email', 'Enter email' ),
107
+ 'comment_section' => isset( $_POST['comment_section'] ) ? sanitize_text_field( wp_unslash( $_POST['comment_section'] ) ) : 1,
108
  'question_from_total' => 0,
109
  'total_user_tries' => 0,
110
  'total_user_tries_text' => isset( $default_texts['total_user_tries_text'] ) ? $default_texts['total_user_tries_text'] : __( 'You have utilized all of your attempts to pass this quiz.', 'quiz-master-next' ),
657
  $update_quiz_settings['logic_rules'] = maybe_serialize( $logic_rules );
658
  } else {
659
  foreach ( $logic_rules as $logic_data ) {
660
+ $value_array[] = stripslashes( $wpdb->prepare( '(%d, %s)', $mlw_new_id, maybe_serialize( $logic_data ) ) );
 
 
 
 
661
  }
662
  $values = implode( ',', $value_array );
663
+ $query = "INSERT INTO `{$logic_table}` (quiz_id, logic) VALUES {$values}";
 
664
  $saved = $wpdb->query( $query );
665
  if ( false !== $saved ) {
666
  update_option( "logic_rules_quiz_$mlw_new_id", gmdate( time() ) );
php/classes/class-qmn-quiz-manager.php CHANGED
@@ -326,22 +326,27 @@ class QMNQuizManager {
326
  $question_amount = intval( $shortcode_args['question_amount'] );
327
 
328
  ob_start();
 
329
  if ( isset( $_GET['result_id'] ) && '' !== $_GET['result_id'] ) {
330
- global $wpdb;
331
- global $mlwQuizMasterNext;
332
- wp_enqueue_style( 'qmn_quiz_common_style', $this->common_css, array(), $mlwQuizMasterNext->version );
333
- wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
334
- wp_enqueue_style( 'dashicons' );
335
- wp_enqueue_script( 'jquery' );
336
- wp_enqueue_script( 'jquery-ui-tooltip' );
337
- wp_enqueue_script( 'qsm_quiz', QSM_PLUGIN_JS_URL . '/qsm-quiz.js', array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip' ), $mlwQuizMasterNext->version, false );
338
- wp_enqueue_script( 'qsm_common', QSM_PLUGIN_JS_URL . '/qsm-common.js', array(), $mlwQuizMasterNext->version, true );
339
- wp_enqueue_script( 'math_jax', $this->mathjax_url, false, $this->mathjax_version, true );
340
- wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
341
  $result_unique_id = sanitize_text_field( wp_unslash( $_GET['result_id'] ) );
342
- $query = $wpdb->prepare( "SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE unique_id = %s", $result_unique_id );
343
- $result = $wpdb->get_row( $query, ARRAY_A );
344
  if ( ! empty( $result ) && isset( $result['result_id'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  $result_id = $result['result_id'];
346
  $return_display = do_shortcode( '[qsm_result id="' . $result_id . '"]' );
347
  $return_display = str_replace( '%FB_RESULT_ID%', $result_unique_id, $return_display );
@@ -350,8 +355,6 @@ class QMNQuizManager {
350
  }
351
  $return_display .= ob_get_clean();
352
  } else {
353
- global $wpdb;
354
- global $mlwQuizMasterNext;
355
  global $qmn_allowed_visit;
356
  global $qmn_json_data;
357
  $qmn_json_data = array();
@@ -452,6 +455,7 @@ class QMNQuizManager {
452
  'enable_quick_result_mc' => isset( $qmn_quiz_options->enable_quick_result_mc ) ? $qmn_quiz_options->enable_quick_result_mc : '',
453
  'end_quiz_if_wrong' => isset( $qmn_quiz_options->end_quiz_if_wrong ) ? $qmn_quiz_options->end_quiz_if_wrong : '',
454
  'form_disable_autofill' => isset( $qmn_quiz_options->form_disable_autofill ) ? $qmn_quiz_options->form_disable_autofill : '',
 
455
  'enable_quick_correct_answer_info' => isset( $qmn_quiz_options->enable_quick_correct_answer_info ) ? $qmn_quiz_options->enable_quick_correct_answer_info : 0,
456
  'quick_result_correct_answer_text' => $correct_answer_text,
457
  'quick_result_wrong_answer_text' => $wrong_answer_text,
@@ -505,6 +509,7 @@ class QMNQuizManager {
505
  wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
506
  wp_enqueue_style( 'dashicons' );
507
  wp_enqueue_style( 'qsm_primary_css', plugins_url( '../../templates/qmn_primary.css', __FILE__ ), array(), $mlwQuizMasterNext->version );
 
508
  wp_enqueue_script( 'math_jax', $this->mathjax_url, false, $this->mathjax_version, true );
509
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
510
  $quiz_result = maybe_unserialize( $result_data['quiz_results'] );
@@ -512,6 +517,7 @@ class QMNQuizManager {
512
  'quiz_id' => $result_data['quiz_id'],
513
  'quiz_name' => $result_data['quiz_name'],
514
  'quiz_system' => $result_data['quiz_system'],
 
515
  'quiz_payment_id' => '',
516
  'user_ip' => $result_data['user_ip'],
517
  'user_name' => $result_data['name'],
@@ -801,8 +807,6 @@ class QMNQuizManager {
801
  wp_enqueue_script( 'jquery-ui-slider-rtl-js', QSM_PLUGIN_JS_URL . '/jquery.ui.slider-rtl.js', array(), $mlwQuizMasterNext->version, true );
802
  wp_enqueue_style( 'jquery-ui-slider-rtl-css', QSM_PLUGIN_CSS_URL . '/jquery.ui.slider-rtl.css', array(), $mlwQuizMasterNext->version );
803
  wp_enqueue_script( 'jquery-touch-punch' );
804
- wp_enqueue_style( 'qsm_model_css', QSM_PLUGIN_CSS_URL . '/qsm-admin.css', array(), $mlwQuizMasterNext->version );
805
- wp_style_add_data( 'qsm_model_css', 'rtl', 'replace' );
806
  wp_enqueue_script( 'qsm_model_js', QSM_PLUGIN_JS_URL . '/micromodal.min.js', array(), $mlwQuizMasterNext->version, false );
807
  wp_enqueue_script( 'qsm_quiz', QSM_PLUGIN_JS_URL . '/qsm-quiz.js', array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip', 'progress-bar' ), $mlwQuizMasterNext->version, false );
808
  wp_enqueue_script( 'qsm_common', QSM_PLUGIN_JS_URL . '/qsm-common.js', array(), $mlwQuizMasterNext->version, true );
@@ -817,8 +821,11 @@ class QMNQuizManager {
817
  'security' => wp_create_nonce( 'qsm_submit_quiz' ),
818
  )
819
  );
820
- wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
821
- wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
 
 
 
822
  global $qmn_total_questions, $qmn_all_questions_count;
823
  $qmn_total_questions = $qmn_all_questions_count = 0;
824
  global $mlw_qmn_section_count;
@@ -921,8 +928,7 @@ class QMNQuizManager {
921
  $contact_fields = QSM_Contact_Manager::load_fields();
922
  $animation_effect = isset( $options->quiz_animation ) && '' !== $options->quiz_animation ? ' animated ' . $options->quiz_animation : '';
923
  $enable_pagination_quiz = isset( $options->enable_pagination_quiz ) && 1 == $options->enable_pagination_quiz ? true : false;
924
-
925
- if ( count( $pages ) > 1 && ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) ) {
926
  $qmn_json_data['first_page'] = true;
927
  $message_before = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ), "quiz_message_before-{$options->quiz_id}" );
928
  $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_before ), $quiz_data );
@@ -998,7 +1004,8 @@ class QMNQuizManager {
998
  }
999
  // Checks if a hint is entered.
1000
  if ( ! empty( $question['hints'] ) ) {
1001
- echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->hint_text, "quiz_hint_text-{$options->quiz_id}" ) ) . '<span class="qsm_tooltiptext">' . wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['hints'], "hint-{$question_id}" ) ) . '</span></div>';
 
1002
  }
1003
  ?>
1004
  </div>
@@ -1070,7 +1077,8 @@ class QMNQuizManager {
1070
  }
1071
  // Checks if a hint is entered.
1072
  if ( ! empty( $question['hints'] ) ) {
1073
- echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->hint_text, "quiz_hint_text-{$options->quiz_id}" ) ) . '<span class="qsm_tooltiptext">' . wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['hints'], "hint-{$question_id}" ) ) . '</span></div>';
 
1074
  }
1075
  ?>
1076
  </div>
@@ -1155,7 +1163,7 @@ class QMNQuizManager {
1155
  public function display_begin_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1156
  global $mlwQuizMasterNext, $qmn_json_data, $wp_embed;
1157
  $contact_fields = QSM_Contact_Manager::load_fields();
1158
- if ( ! empty( $qmn_quiz_options->message_before ) || ( 0 == $qmn_quiz_options->contact_info_location && $contact_fields ) ) {
1159
  $qmn_json_data['first_page'] = true;
1160
  global $mlw_qmn_section_count;
1161
  $mlw_qmn_section_count += 1;
@@ -1255,8 +1263,9 @@ class QMNQuizManager {
1255
  }
1256
  // Checks if a hint is entered.
1257
  if ( ! empty( $mlw_question->hints ) ) {
 
1258
  ?>
1259
- <div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip"><?php echo esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->hint_text, "quiz_hint_text-{$qmn_quiz_options->quiz_id}" ) ); ?><span class="qsm_tooltiptext"><?php echo wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $mlw_question->hints, "hint-{$mlw_question->question_id}" ) ); ?></span></div><br /><br />
1260
  <?php
1261
  }
1262
  ?>
@@ -1567,7 +1576,7 @@ class QMNQuizManager {
1567
  $results_array['total_attempted_questions'] = $qmn_array_for_variables['total_attempted_questions'];
1568
  $results_array['minimum_possible_points'] = $qmn_array_for_variables['minimum_possible_points'];
1569
  // If the store responses in database option is set to Yes.
1570
- if ( 0 != $qmn_quiz_options->store_responses ) {
1571
  // Inserts the responses in the database.
1572
  $table_name = $wpdb->prefix . 'mlw_results';
1573
  if ( isset( $_POST['update_result'] ) && ! empty( $_POST['update_result'] ) ) {
@@ -1684,22 +1693,24 @@ class QMNQuizManager {
1684
 
1685
  $qmn_global_settings = (array) get_option( 'qmn-settings' );
1686
  $background_quiz_email_process = isset( $qmn_global_settings['background_quiz_email_process'] ) ? esc_attr( $qmn_global_settings['background_quiz_email_process'] ) : '1';
1687
- if ( 1 == $background_quiz_email_process ) {
1688
- // Send the emails in background.
1689
  $qmn_array_for_variables['quiz_settings'] = isset( $qmn_quiz_options->quiz_settings ) ? maybe_unserialize( $qmn_quiz_options->quiz_settings ) : array();
1690
  $qmn_array_for_variables['email_processed'] = 'yes';
1691
- $this->qsm_background_email->data(
1692
- array(
1693
- 'name' => 'send_emails',
1694
- 'result_id' => $results_id,
1695
- )
1696
- )->dispatch();
1697
- } else {
1698
- // Sends the emails.
1699
- $qmn_array_for_variables['email_processed'] = 'yes';
1700
- QSM_Emails::send_emails( $results_id );
 
 
 
 
1701
  }
1702
-
1703
  /**
1704
  * Filters for filtering the results text after emails are sent.
1705
  *
@@ -1812,6 +1823,8 @@ class QMNQuizManager {
1812
  foreach ( $question_list as $question_id ) {
1813
  // When the questions are the same...
1814
  if ( $page_question_id == $question_id ) {
 
 
1815
  $question = $questions[ $page_question_id ];
1816
  $question_type_new = $question['question_type_new'];
1817
  // Ignore non points questions from result.
@@ -1889,6 +1902,7 @@ class QMNQuizManager {
1889
  'question_type' => $question['question_type_new'],
1890
  'question_title' => isset( $question['settings']['question_title'] ) ? $question['settings']['question_title'] : '',
1891
  'user_compare_text' => $user_compare_text,
 
1892
  ),
1893
  $options,
1894
  $quiz_data
@@ -1908,6 +1922,8 @@ class QMNQuizManager {
1908
 
1909
  // When the questions are the same...
1910
  if ( $question['question_id'] == $question_id ) {
 
 
1911
  // Reset question-specific variables.
1912
  $user_answer = '';
1913
  $correct_answer = '';
@@ -1973,6 +1989,7 @@ class QMNQuizManager {
1973
  'question_type' => $question['question_type_new'],
1974
  'question_title' => isset( $question['settings']['question_title'] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['settings']['question_title'], "Question-{$question_id}", "QSM Questions") : '',
1975
  'user_compare_text' => $user_compare_text,
 
1976
  ),
1977
  $options,
1978
  $quiz_data
@@ -2641,7 +2658,7 @@ function qmn_timer_check( $display, $qmn_quiz_options, $qmn_array_for_variables
2641
  global $qmn_json_data;
2642
  if ( $qmn_allowed_visit && 0 != $qmn_quiz_options->timer_limit ) {
2643
  $qmn_json_data['timer_limit'] = $qmn_quiz_options->timer_limit;
2644
- $display .= '<div style="display:none;" id="mlw_qmn_timer" class="mlw_qmn_timer"></div>';
2645
  }
2646
  return $display;
2647
  }
326
  $question_amount = intval( $shortcode_args['question_amount'] );
327
 
328
  ob_start();
329
+ global $wpdb, $mlwQuizMasterNext;
330
  if ( isset( $_GET['result_id'] ) && '' !== $_GET['result_id'] ) {
 
 
 
 
 
 
 
 
 
 
 
331
  $result_unique_id = sanitize_text_field( wp_unslash( $_GET['result_id'] ) );
332
+ $result = $wpdb->get_row( $wpdb->prepare( "SELECT `result_id`, `quiz_id` FROM {$wpdb->prefix}mlw_results WHERE unique_id = %s", $result_unique_id ), ARRAY_A );
 
333
  if ( ! empty( $result ) && isset( $result['result_id'] ) ) {
334
+ $mlwQuizMasterNext->pluginHelper->prepare_quiz( $result['quiz_id'] );
335
+ $qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
336
+
337
+ wp_enqueue_style( 'qmn_quiz_common_style', $this->common_css, array(), $mlwQuizMasterNext->version );
338
+ wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
339
+ wp_enqueue_style( 'dashicons' );
340
+ wp_enqueue_script( 'jquery' );
341
+ wp_enqueue_script( 'jquery-ui-tooltip' );
342
+ wp_enqueue_script( 'qsm_quiz', QSM_PLUGIN_JS_URL . '/qsm-quiz.js', array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip' ), $mlwQuizMasterNext->version, false );
343
+ wp_enqueue_script( 'qsm_common', QSM_PLUGIN_JS_URL . '/qsm-common.js', array(), $mlwQuizMasterNext->version, true );
344
+ $disable_mathjax = isset( $qmn_quiz_options->disable_mathjax ) ? $qmn_quiz_options->disable_mathjax : '';
345
+ if ( 1 != $disable_mathjax ) {
346
+ wp_enqueue_script( 'math_jax', $this->mathjax_url, false, $this->mathjax_version, true );
347
+ wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
348
+ }
349
+
350
  $result_id = $result['result_id'];
351
  $return_display = do_shortcode( '[qsm_result id="' . $result_id . '"]' );
352
  $return_display = str_replace( '%FB_RESULT_ID%', $result_unique_id, $return_display );
355
  }
356
  $return_display .= ob_get_clean();
357
  } else {
 
 
358
  global $qmn_allowed_visit;
359
  global $qmn_json_data;
360
  $qmn_json_data = array();
455
  'enable_quick_result_mc' => isset( $qmn_quiz_options->enable_quick_result_mc ) ? $qmn_quiz_options->enable_quick_result_mc : '',
456
  'end_quiz_if_wrong' => isset( $qmn_quiz_options->end_quiz_if_wrong ) ? $qmn_quiz_options->end_quiz_if_wrong : '',
457
  'form_disable_autofill' => isset( $qmn_quiz_options->form_disable_autofill ) ? $qmn_quiz_options->form_disable_autofill : '',
458
+ 'disable_mathjax' => isset( $qmn_quiz_options->disable_mathjax ) ? $qmn_quiz_options->disable_mathjax : '',
459
  'enable_quick_correct_answer_info' => isset( $qmn_quiz_options->enable_quick_correct_answer_info ) ? $qmn_quiz_options->enable_quick_correct_answer_info : 0,
460
  'quick_result_correct_answer_text' => $correct_answer_text,
461
  'quick_result_wrong_answer_text' => $wrong_answer_text,
509
  wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
510
  wp_enqueue_style( 'dashicons' );
511
  wp_enqueue_style( 'qsm_primary_css', plugins_url( '../../templates/qmn_primary.css', __FILE__ ), array(), $mlwQuizMasterNext->version );
512
+
513
  wp_enqueue_script( 'math_jax', $this->mathjax_url, false, $this->mathjax_version, true );
514
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
515
  $quiz_result = maybe_unserialize( $result_data['quiz_results'] );
517
  'quiz_id' => $result_data['quiz_id'],
518
  'quiz_name' => $result_data['quiz_name'],
519
  'quiz_system' => $result_data['quiz_system'],
520
+ 'form_type' => $result_data['form_type'],
521
  'quiz_payment_id' => '',
522
  'user_ip' => $result_data['user_ip'],
523
  'user_name' => $result_data['name'],
807
  wp_enqueue_script( 'jquery-ui-slider-rtl-js', QSM_PLUGIN_JS_URL . '/jquery.ui.slider-rtl.js', array(), $mlwQuizMasterNext->version, true );
808
  wp_enqueue_style( 'jquery-ui-slider-rtl-css', QSM_PLUGIN_CSS_URL . '/jquery.ui.slider-rtl.css', array(), $mlwQuizMasterNext->version );
809
  wp_enqueue_script( 'jquery-touch-punch' );
 
 
810
  wp_enqueue_script( 'qsm_model_js', QSM_PLUGIN_JS_URL . '/micromodal.min.js', array(), $mlwQuizMasterNext->version, false );
811
  wp_enqueue_script( 'qsm_quiz', QSM_PLUGIN_JS_URL . '/qsm-quiz.js', array( 'wp-util', 'underscore', 'jquery', 'jquery-ui-tooltip', 'progress-bar' ), $mlwQuizMasterNext->version, false );
812
  wp_enqueue_script( 'qsm_common', QSM_PLUGIN_JS_URL . '/qsm-common.js', array(), $mlwQuizMasterNext->version, true );
821
  'security' => wp_create_nonce( 'qsm_submit_quiz' ),
822
  )
823
  );
824
+ $disable_mathjax = isset( $options->disable_mathjax ) ? $options->disable_mathjax : '';
825
+ if ( 1 != $disable_mathjax ) {
826
+ wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
827
+ wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
828
+ }
829
  global $qmn_total_questions, $qmn_all_questions_count;
830
  $qmn_total_questions = $qmn_all_questions_count = 0;
831
  global $mlw_qmn_section_count;
928
  $contact_fields = QSM_Contact_Manager::load_fields();
929
  $animation_effect = isset( $options->quiz_animation ) && '' !== $options->quiz_animation ? ' animated ' . $options->quiz_animation : '';
930
  $enable_pagination_quiz = isset( $options->enable_pagination_quiz ) && 1 == $options->enable_pagination_quiz ? true : false;
931
+ if ( 1 < count( $pages ) && 1 !== intval( $options->disable_first_page ) && ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) ) {
 
932
  $qmn_json_data['first_page'] = true;
933
  $message_before = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ), "quiz_message_before-{$options->quiz_id}" );
934
  $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_before ), $quiz_data );
1004
  }
1005
  // Checks if a hint is entered.
1006
  if ( ! empty( $question['hints'] ) ) {
1007
+ $hint_data = wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['hints'], "hint-{$question_id}" ) );
1008
+ echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip" title="' . esc_html( $hint_data ) . '">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->hint_text, "quiz_hint_text-{$options->quiz_id}" ) ) . '</div>';
1009
  }
1010
  ?>
1011
  </div>
1077
  }
1078
  // Checks if a hint is entered.
1079
  if ( ! empty( $question['hints'] ) ) {
1080
+ $hint_data = wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['hints'], "hint-{$question_id}" ) );
1081
+ echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip" title="' . esc_html( $hint_data ) . '">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->hint_text, "quiz_hint_text-{$options->quiz_id}" ) ) . '</div>';
1082
  }
1083
  ?>
1084
  </div>
1163
  public function display_begin_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1164
  global $mlwQuizMasterNext, $qmn_json_data, $wp_embed;
1165
  $contact_fields = QSM_Contact_Manager::load_fields();
1166
+ if ( 1 !== intval( $qmn_quiz_options->disable_first_page ) && ( ! empty( $qmn_quiz_options->message_before ) || ( 0 == $qmn_quiz_options->contact_info_location && $contact_fields ) ) ) {
1167
  $qmn_json_data['first_page'] = true;
1168
  global $mlw_qmn_section_count;
1169
  $mlw_qmn_section_count += 1;
1263
  }
1264
  // Checks if a hint is entered.
1265
  if ( ! empty( $mlw_question->hints ) ) {
1266
+ $hint_data = wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $mlw_question->hints, "hint-{$mlw_question->question_id}" ) );
1267
  ?>
1268
+ <div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip" title="<?php echo esc_html( $hint_data );?>"><?php echo esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->hint_text, "quiz_hint_text-{$qmn_quiz_options->quiz_id}" ) ); ?></div><br /><br />
1269
  <?php
1270
  }
1271
  ?>
1576
  $results_array['total_attempted_questions'] = $qmn_array_for_variables['total_attempted_questions'];
1577
  $results_array['minimum_possible_points'] = $qmn_array_for_variables['minimum_possible_points'];
1578
  // If the store responses in database option is set to Yes.
1579
+ if ( 1 === intval( $qmn_quiz_options->store_responses ) ) {
1580
  // Inserts the responses in the database.
1581
  $table_name = $wpdb->prefix . 'mlw_results';
1582
  if ( isset( $_POST['update_result'] ) && ! empty( $_POST['update_result'] ) ) {
1693
 
1694
  $qmn_global_settings = (array) get_option( 'qmn-settings' );
1695
  $background_quiz_email_process = isset( $qmn_global_settings['background_quiz_email_process'] ) ? esc_attr( $qmn_global_settings['background_quiz_email_process'] ) : '1';
1696
+ if ( 1 === intval( $qmn_quiz_options->send_email ) ) {
 
1697
  $qmn_array_for_variables['quiz_settings'] = isset( $qmn_quiz_options->quiz_settings ) ? maybe_unserialize( $qmn_quiz_options->quiz_settings ) : array();
1698
  $qmn_array_for_variables['email_processed'] = 'yes';
1699
+ $transient_id = 'response_'.wp_rand(10000,99999);
1700
+ set_transient( $transient_id, maybe_serialize( $qmn_array_for_variables ), 6000 );
1701
+ if ( 1 == $background_quiz_email_process ) {
1702
+ // Send the emails in background.
1703
+ $this->qsm_background_email->data(
1704
+ array(
1705
+ 'name' => 'send_emails',
1706
+ 'transient_id' => $transient_id,
1707
+ )
1708
+ )->dispatch();
1709
+ } else {
1710
+ // Sends the emails.
1711
+ QSM_Emails::send_emails( $transient_id );
1712
+ }
1713
  }
 
1714
  /**
1715
  * Filters for filtering the results text after emails are sent.
1716
  *
1823
  foreach ( $question_list as $question_id ) {
1824
  // When the questions are the same...
1825
  if ( $page_question_id == $question_id ) {
1826
+ global $mlwQuizMasterNext;
1827
+ $case_sensitive = $mlwQuizMasterNext->pluginHelper->get_question_setting( $question_id, 'case_sensitive' );
1828
  $question = $questions[ $page_question_id ];
1829
  $question_type_new = $question['question_type_new'];
1830
  // Ignore non points questions from result.
1902
  'question_type' => $question['question_type_new'],
1903
  'question_title' => isset( $question['settings']['question_title'] ) ? $question['settings']['question_title'] : '',
1904
  'user_compare_text' => $user_compare_text,
1905
+ 'case_sensitive' => $case_sensitive,
1906
  ),
1907
  $options,
1908
  $quiz_data
1922
 
1923
  // When the questions are the same...
1924
  if ( $question['question_id'] == $question_id ) {
1925
+ global $mlwQuizMasterNext;
1926
+ $case_sensitive = $mlwQuizMasterNext->pluginHelper->get_question_setting( $question_id, 'case_sensitive' );
1927
  // Reset question-specific variables.
1928
  $user_answer = '';
1929
  $correct_answer = '';
1989
  'question_type' => $question['question_type_new'],
1990
  'question_title' => isset( $question['settings']['question_title'] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['settings']['question_title'], "Question-{$question_id}", "QSM Questions") : '',
1991
  'user_compare_text' => $user_compare_text,
1992
+ 'case_sensitive' => $case_sensitive,
1993
  ),
1994
  $options,
1995
  $quiz_data
2658
  global $qmn_json_data;
2659
  if ( $qmn_allowed_visit && 0 != $qmn_quiz_options->timer_limit ) {
2660
  $qmn_json_data['timer_limit'] = $qmn_quiz_options->timer_limit;
2661
+ $display .= '<div id="mlw_qmn_timer" class="mlw_qmn_timer"></div>';
2662
  }
2663
  return $display;
2664
  }
php/classes/class-qsm-contact-manager.php CHANGED
@@ -359,7 +359,7 @@ class QSM_Contact_Manager {
359
  $mlwQuizMasterNext->pluginHelper->prepare_quiz( intval( $quiz_id ) );
360
  return $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'contact_form', $fields );
361
  }
362
-
363
  /**
364
  * Generate Contact Field HTML
365
  * @param type $field
@@ -378,15 +378,18 @@ class QSM_Contact_Manager {
378
  $class = '';
379
  if ( ( 'true' === $field["required"] || true === $field["required"] ) && ! $fields_hidden ) {
380
  $class .= 'mlwRequiredText qsm_required_text';
 
 
 
381
  }
382
  switch ( $field['type'] ) {
383
  case 'text':
384
  if ( 'phone' === $field['use'] ) {
385
  $class .= 'mlwPhoneNumber';
386
  }
387
- // Filer Value
388
  if ( empty( $contact_disable_autofill ) ) {
389
- $default_value = apply_filters( 'qsm_contact_text_filed_value', $default_value, $field['use'] );
390
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
391
  } else {
392
  $fieldAttr .= " autocomplete='off' ";
@@ -416,14 +419,14 @@ class QSM_Contact_Manager {
416
  $class = apply_filters( 'qsm_contact_text_field_class', $class, $field['use'] );
417
  ?>
418
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
419
- <input type='text' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> />
420
  <?php
421
  break;
422
 
423
  case 'email':
424
- // Filer Value
425
  if ( empty( $contact_disable_autofill ) ) {
426
- $default_value = apply_filters( 'qsm_contact_text_filed_value', $default_value, $field['use'] );
427
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
428
  } else {
429
  $fieldAttr .= " autocomplete='off' ";
@@ -436,22 +439,22 @@ class QSM_Contact_Manager {
436
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
437
  ?>
438
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
439
- <input type='email' class='mlwEmail <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> />
440
  <?php
441
  break;
442
 
443
  case 'checkbox':
444
  $class = apply_filters( 'qsm_contact_checkbox_field_class', $class, $field['use'] );
445
  ?>
446
- <input type='checkbox' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> value='checked' />
447
  <label class='mlw_qmn_question qsm_question' for='contact_field_<?php echo esc_attr( $index ); ?>'><?php echo wp_kses_post( $field_label ); ?></label>
448
  <?php
449
  break;
450
 
451
  case 'date':
452
- // Filer Value
453
  if ( empty( $contact_disable_autofill ) ) {
454
- $default_value = apply_filters( 'qsm_contact_text_filed_value', $default_value, $field['use'] );
455
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
456
  } else {
457
  $fieldAttr .= " autocomplete='off' ";
@@ -459,14 +462,14 @@ class QSM_Contact_Manager {
459
  $class = apply_filters( 'qsm_contact_date_field_class', $class, $field['use'] );
460
  ?>
461
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
462
- <input type='date' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> value='' />
463
  <?php
464
  break;
465
 
466
  case 'url':
467
- // Filer Value
468
  if ( empty( $contact_disable_autofill ) ) {
469
- $default_value = apply_filters( 'qsm_contact_url_filed_value', $default_value, $field['use'] );
470
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
471
  } else {
472
  $fieldAttr .= " autocomplete='off' ";
@@ -475,14 +478,14 @@ class QSM_Contact_Manager {
475
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
476
  ?>
477
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
478
- <input type='url' class='mlwUrl <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> />
479
  <?php
480
  break;
481
 
482
  case 'number':
483
- // Filer Value
484
  if ( empty( $contact_disable_autofill ) ) {
485
- $default_value = apply_filters( 'qsm_contact_number_filed_value', $default_value, $field['use'] );
486
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
487
  } else {
488
  $fieldAttr .= " autocomplete='off' ";
@@ -504,11 +507,11 @@ class QSM_Contact_Manager {
504
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
505
  ?>
506
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
507
- <input type='number' class='mlwRequiredNumber <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; ?> <?php if ( isset( $field['maxlength'] ) && 0 < intval( $field['maxlength'] ) ) : ?>maxlength='<?php echo intval( $field['maxlength'] ); ?>' oninput='maxLengthCheck(this)' <?php endif; ?> />
508
  <?php
509
  break;
510
  default:
511
- do_action( 'qsm_extra_contact_filed', $fields, $quiz_options );
512
  break;
513
  }
514
  }
359
  $mlwQuizMasterNext->pluginHelper->prepare_quiz( intval( $quiz_id ) );
360
  return $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'contact_form', $fields );
361
  }
362
+
363
  /**
364
  * Generate Contact Field HTML
365
  * @param type $field
378
  $class = '';
379
  if ( ( 'true' === $field["required"] || true === $field["required"] ) && ! $fields_hidden ) {
380
  $class .= 'mlwRequiredText qsm_required_text';
381
+ if ( 'checkbox' === $field["type"] ) {
382
+ $class .= ' mlwRequiredAccept';
383
+ }
384
  }
385
  switch ( $field['type'] ) {
386
  case 'text':
387
  if ( 'phone' === $field['use'] ) {
388
  $class .= 'mlwPhoneNumber';
389
  }
390
+ // Filer Value
391
  if ( empty( $contact_disable_autofill ) ) {
392
+ $default_value = apply_filters( 'qsm_contact_text_field_value', $default_value, $field['use'] );
393
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
394
  } else {
395
  $fieldAttr .= " autocomplete='off' ";
419
  $class = apply_filters( 'qsm_contact_text_field_class', $class, $field['use'] );
420
  ?>
421
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
422
+ <input type='text' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
423
  <?php
424
  break;
425
 
426
  case 'email':
427
+ // Filer Value
428
  if ( empty( $contact_disable_autofill ) ) {
429
+ $default_value = apply_filters( 'qsm_contact_text_field_value', $default_value, $field['use'] );
430
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
431
  } else {
432
  $fieldAttr .= " autocomplete='off' ";
439
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
440
  ?>
441
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
442
+ <input type='email' class='mlwEmail <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
443
  <?php
444
  break;
445
 
446
  case 'checkbox':
447
  $class = apply_filters( 'qsm_contact_checkbox_field_class', $class, $field['use'] );
448
  ?>
449
+ <input type='checkbox' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> value='checked' />
450
  <label class='mlw_qmn_question qsm_question' for='contact_field_<?php echo esc_attr( $index ); ?>'><?php echo wp_kses_post( $field_label ); ?></label>
451
  <?php
452
  break;
453
 
454
  case 'date':
455
+ // Filer Value
456
  if ( empty( $contact_disable_autofill ) ) {
457
+ $default_value = apply_filters( 'qsm_contact_text_field_value', $default_value, $field['use'] );
458
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
459
  } else {
460
  $fieldAttr .= " autocomplete='off' ";
462
  $class = apply_filters( 'qsm_contact_date_field_class', $class, $field['use'] );
463
  ?>
464
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
465
+ <input type='date' class='<?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> value='' />
466
  <?php
467
  break;
468
 
469
  case 'url':
470
+ // Filer Value
471
  if ( empty( $contact_disable_autofill ) ) {
472
+ $default_value = apply_filters( 'qsm_contact_url_field_value', $default_value, $field['use'] );
473
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
474
  } else {
475
  $fieldAttr .= " autocomplete='off' ";
478
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
479
  ?>
480
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
481
+ <input type='url' class='mlwUrl <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
482
  <?php
483
  break;
484
 
485
  case 'number':
486
+ // Filer Value
487
  if ( empty( $contact_disable_autofill ) ) {
488
+ $default_value = apply_filters( 'qsm_contact_number_field_value', $default_value, $field['use'] );
489
  $fieldAttr .= " value='" . esc_attr( $default_value ) . "' ";
490
  } else {
491
  $fieldAttr .= " autocomplete='off' ";
507
  $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
508
  ?>
509
  <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $field_label ); ?></span>
510
+ <input type='number' class='mlwRequiredNumber <?php echo esc_attr( $class ); ?>' <?php echo $fieldAttr; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php if ( isset( $field['maxlength'] ) && 0 < intval( $field['maxlength'] ) ) : ?>maxlength='<?php echo intval( $field['maxlength'] ); ?>' oninput='maxLengthCheck(this)' <?php endif; ?> />
511
  <?php
512
  break;
513
  default:
514
+ do_action( 'qsm_extra_contact_form_field_display', $field, $quiz_options, $index,$default_value );
515
  break;
516
  }
517
  }
php/classes/class-qsm-emails.php CHANGED
@@ -20,44 +20,13 @@ class QSM_Emails {
20
  * Sends the emails for the quiz.
21
  *
22
  * @since 6.2.0
23
- * @param array $results_id result ID.
 
24
  */
25
- public static function send_emails( $result_id ) {
26
  global $mlwQuizMasterNext;
27
- global $wpdb;
28
- $result_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE result_id = %d", $result_id ), ARRAY_A );
29
- if ( ! is_array( $result_data ) || empty( $result_data ) ) {
30
- return;
31
- }
32
- $quiz_result = maybe_unserialize( $result_data['quiz_results'] );
33
- $response_data = array(
34
- 'quiz_id' => $result_data['quiz_id'],
35
- 'quiz_name' => $result_data['quiz_name'],
36
- 'quiz_system' => $result_data['quiz_system'],
37
- 'form_type' => $result_data['form_type'],
38
- 'user_ip' => $result_data['user_ip'],
39
- 'user_name' => $result_data['name'],
40
- 'user_business' => $result_data['business'],
41
- 'user_email' => $result_data['email'],
42
- 'user_phone' => $result_data['phone'],
43
- 'user_id' => $result_data['user'],
44
- 'timer' => $quiz_result[0],
45
- 'timer_ms' => $quiz_result['timer_ms'],
46
- 'time_taken' => $result_data['time_taken'],
47
- 'contact' => $quiz_result['contact'],
48
- 'hidden_questions' => $quiz_result['hidden_questions'],
49
- 'total_points' => $result_data['point_score'],
50
- 'total_score' => $result_data['correct_score'],
51
- 'total_correct' => $result_data['correct'],
52
- 'total_questions' => $result_data['total'],
53
- 'question_answers_display' => '', // Kept for backwards compatibility
54
- 'question_answers_array' => $quiz_result[1],
55
- 'total_possible_points' => $quiz_result['total_possible_points'],
56
- 'total_attempted_questions' => $quiz_result['total_attempted_questions'],
57
- 'minimum_possible_points' => isset( $quiz_result['minimum_possible_points'] ) ? $quiz_result['minimum_possible_points'] : 0,
58
- 'comments' => $quiz_result[2],
59
- 'result_id' => $result_id,
60
- );
61
  $emails = self::load_emails( $response_data['quiz_id'] );
62
 
63
  if ( ! is_array( $emails ) || empty( $emails ) ) {
@@ -163,6 +132,9 @@ class QSM_Emails {
163
  * The value may have been set to false when failing a previous condition.
164
  */
165
  $show = apply_filters( 'qsm_email_condition_check', $show, $condition, $response_data );
 
 
 
166
  }
167
 
168
  if ( $show ) {
20
  * Sends the emails for the quiz.
21
  *
22
  * @since 6.2.0
23
+ * @param int $results_id result ID.
24
+ * @param array $quiz_settings Quiz Settings.
25
  */
26
+ public static function send_emails( $transient_id ) {
27
  global $mlwQuizMasterNext;
28
+
29
+ $response_data = maybe_unserialize( get_transient( $transient_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  $emails = self::load_emails( $response_data['quiz_id'] );
31
 
32
  if ( ! is_array( $emails ) || empty( $emails ) ) {
132
  * The value may have been set to false when failing a previous condition.
133
  */
134
  $show = apply_filters( 'qsm_email_condition_check', $show, $condition, $response_data );
135
+ if ( ! $show ) {
136
+ break;
137
+ }
138
  }
139
 
140
  if ( $show ) {
php/classes/class-qsm-fields.php CHANGED
@@ -39,7 +39,9 @@ class QSM_Fields {
39
  $sanitized_value = esc_url_raw( wp_unslash( $_POST[ $field["id"] ] ) );
40
  break;
41
 
42
- case 'radio':
 
 
43
  case 'date':
44
  $sanitized_value = sanitize_text_field( wp_unslash( $_POST[ $field["id"] ] ) );
45
  break;
@@ -189,8 +191,7 @@ class QSM_Fields {
189
  </table>
190
  </div>
191
  <?php
192
- endif;
193
- if ( 'text' === $current_tab ) : ?>
194
  <div class="qsm-sub-tab-menu" style="display: inline-block;width: 100%;">
195
  <ul class="subsubsub">
196
  <li>
@@ -267,7 +268,11 @@ class QSM_Fields {
267
  ?>
268
  </table>
269
  </div>
270
- <?php endif; ?>
 
 
 
 
271
  <div class="qsm-tab-btns">
272
  <button class="button-primary" type="submit"> <?php esc_html_e('Save Changes', 'quiz-master-next'); ?></button>
273
  <?php if ( isset($_GET['tab'], $_GET['page']) && 'options' == sanitize_text_field( wp_unslash( $_GET['tab'] ) ) && sanitize_text_field( wp_unslash( $_GET['page'] ) ) == 'mlw_quiz_options' ) {?>
@@ -714,6 +719,7 @@ class QSM_Fields {
714
  global $mlwQuizMasterNext;
715
  $score_roundoff = $mlwQuizMasterNext->pluginHelper->get_section_setting('quiz_options',$field["id"] );
716
  $class = $show_option ? $show_option . ' hidden qsm_hidden_tr qsm_hidden_tr_gradingsystem' : '';
 
717
  ?>
718
  <tr valign="top" class="<?php echo esc_attr( $class ); ?>">
719
  <th scope="row" class="qsm-opt-tr">
@@ -732,7 +738,7 @@ class QSM_Fields {
732
  <input type="checkbox" id="<?php echo esc_attr( $field["id"] . '-' . $option["value"] ); ?>"
733
  name="<?php echo esc_attr( $field["id"] ); ?>" <?php checked( $option["value"], $score_roundoff ); ?>
734
  value="<?php echo esc_attr( $option["value"] ); ?>" />
735
- <br />
736
  <?php
737
  }
738
  ?>
39
  $sanitized_value = esc_url_raw( wp_unslash( $_POST[ $field["id"] ] ) );
40
  break;
41
 
42
+ case 'checkbox':
43
+ $sanitized_value = isset( $_POST[ $field["id"] ] ) ? sanitize_text_field( wp_unslash( $_POST[ $field["id"] ] ) ) : 0;
44
+ break;
45
  case 'date':
46
  $sanitized_value = sanitize_text_field( wp_unslash( $_POST[ $field["id"] ] ) );
47
  break;
191
  </table>
192
  </div>
193
  <?php
194
+ elseif ( 'text' === $current_tab ) : ?>
 
195
  <div class="qsm-sub-tab-menu" style="display: inline-block;width: 100%;">
196
  <ul class="subsubsub">
197
  <li>
268
  ?>
269
  </table>
270
  </div>
271
+ <?php else :
272
+ foreach ( $fields as $field ) {
273
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
274
+ }
275
+ endif; ?>
276
  <div class="qsm-tab-btns">
277
  <button class="button-primary" type="submit"> <?php esc_html_e('Save Changes', 'quiz-master-next'); ?></button>
278
  <?php if ( isset($_GET['tab'], $_GET['page']) && 'options' == sanitize_text_field( wp_unslash( $_GET['tab'] ) ) && sanitize_text_field( wp_unslash( $_GET['page'] ) ) == 'mlw_quiz_options' ) {?>
719
  global $mlwQuizMasterNext;
720
  $score_roundoff = $mlwQuizMasterNext->pluginHelper->get_section_setting('quiz_options',$field["id"] );
721
  $class = $show_option ? $show_option . ' hidden qsm_hidden_tr qsm_hidden_tr_gradingsystem' : '';
722
+ $class .= isset( $field['id'] ) ? ' '.$field['id'] : '';
723
  ?>
724
  <tr valign="top" class="<?php echo esc_attr( $class ); ?>">
725
  <th scope="row" class="qsm-opt-tr">
738
  <input type="checkbox" id="<?php echo esc_attr( $field["id"] . '-' . $option["value"] ); ?>"
739
  name="<?php echo esc_attr( $field["id"] ); ?>" <?php checked( $option["value"], $score_roundoff ); ?>
740
  value="<?php echo esc_attr( $option["value"] ); ?>" />
741
+ <label for="<?php echo esc_attr( $field["id"] . '-' . $option["value"] ); ?>"><?php echo isset( $option["label"] ) ? wp_kses_post( $option["label"] ) : ""; ?></label>
742
  <?php
743
  }
744
  ?>
php/classes/class-qsm-install.php CHANGED
@@ -87,7 +87,7 @@ class QSM_Install {
87
  ),
88
  'default' => 0,
89
  'help' => __( 'Select the system for grading the quiz.', 'quiz-master-next' ),
90
- 'tooltip' => __( 'To know more about our grading systems please ', 'quiz-master-next' ) . '<a target="_blank" href="https://quizandsurveymaster.com/docs/">' . __( 'read the documentation.', 'quiz-master-next' ) . '</a>',
91
  'show_option' => 'form_type_0',
92
  'option_tab' => 'general',
93
  );
@@ -490,20 +490,33 @@ class QSM_Install {
490
  // Registers store_responses setting
491
  $field_array = array(
492
  'id' => 'store_responses',
493
- 'label' => __( 'Save Responses', 'quiz-master-next' ),
494
- 'type' => 'radio',
495
  'options' => array(
496
  array(
497
- 'label' => __( 'Yes', 'quiz-master-next' ),
498
  'value' => 1,
499
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  array(
501
- 'label' => __( 'No', 'quiz-master-next' ),
502
- 'value' => 0,
503
  ),
504
  ),
505
  'default' => 1,
506
- 'help' => __( 'The results will be permanently stored in a database', 'quiz-master-next' ),
507
  'option_tab' => 'quiz_submission',
508
  );
509
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
@@ -759,6 +772,26 @@ class QSM_Install {
759
  );
760
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
761
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  // Setting for pagination of quiz
763
  $field_array = array(
764
  'id' => 'disable_scroll_next_previous_click',
@@ -2006,12 +2039,15 @@ class QSM_Install {
2006
  update_option( 'qmn-settings', $settings );
2007
  }
2008
 
 
 
 
 
2009
  update_option( 'mlw_quiz_master_version', $data );
2010
  }
2011
  if ( ! get_option( 'mlw_advert_shows' ) ) {
2012
  add_option( 'mlw_advert_shows', 'true' );
2013
  }
2014
-
2015
  }
2016
 
2017
  /**
@@ -2034,13 +2070,41 @@ class QSM_Install {
2034
  public function plugin_row_meta( $links, $file ) {
2035
  if ( QSM_PLUGIN_BASENAME === $file ) {
2036
  $row_meta = array(
2037
- 'docs' => '<a href="' . esc_url( 'https://quizandsurveymaster.com/docs/' ) . '" title="' . esc_attr( __( 'View Documentation', 'quiz-master-next' ) ) . '">' . __( 'Documentation', 'quiz-master-next' ) . '</a>',
2038
  'support' => '<a href="' . admin_url( 'admin.php?page=qsm_quiz_about&tab=help' ) . '" title="' . esc_attr( __( 'Create Support Ticket', 'quiz-master-next' ) ) . '">' . __( 'Support', 'quiz-master-next' ) . '</a>',
2039
  );
2040
  return array_merge( $links, $row_meta );
2041
  }
2042
  return (array) $links;
2043
  }
 
2044
  }
2045
 
2046
  $qsm_install = new QSM_Install();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  ),
88
  'default' => 0,
89
  'help' => __( 'Select the system for grading the quiz.', 'quiz-master-next' ),
90
+ 'tooltip' => __( 'To know more about our grading systems please ', 'quiz-master-next' ) . '<a target="_blank" href="'.qsm_get_plugin_link('docs', 'quiz-settings').'">' . __( 'read the documentation.', 'quiz-master-next' ) . '</a>',
91
  'show_option' => 'form_type_0',
92
  'option_tab' => 'general',
93
  );
490
  // Registers store_responses setting
491
  $field_array = array(
492
  'id' => 'store_responses',
493
+ 'label' => __( 'Submit Actions', 'quiz-master-next' ),
494
+ 'type' => 'checkbox',
495
  'options' => array(
496
  array(
497
+ 'label' => __( 'Store results permanently in database', 'quiz-master-next' ),
498
  'value' => 1,
499
  ),
500
+ ),
501
+ 'default' => 1,
502
+ 'help' => '',
503
+ 'option_tab' => 'quiz_submission',
504
+ );
505
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
506
+
507
+ // Registers send_email setting
508
+ $field_array = array(
509
+ 'id' => 'send_email',
510
+ 'label' => '',
511
+ 'type' => 'checkbox',
512
+ 'options' => array(
513
  array(
514
+ 'label' => __( 'Send email notifications', 'quiz-master-next' ),
515
+ 'value' => 1,
516
  ),
517
  ),
518
  'default' => 1,
519
+ 'help' => '',
520
  'option_tab' => 'quiz_submission',
521
  );
522
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
772
  );
773
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
774
 
775
+ $field_array = array(
776
+ 'id' => 'disable_mathjax',
777
+ 'label' => __( 'Disable MathJax', 'quiz-master-next' ),
778
+ 'type' => 'radio',
779
+ 'options' => array(
780
+ array(
781
+ 'label' => __( 'Yes', 'quiz-master-next' ),
782
+ 'value' => 1,
783
+ ),
784
+ array(
785
+ 'label' => __( 'No', 'quiz-master-next' ),
786
+ 'value' => 0,
787
+ ),
788
+ ),
789
+ 'default' => 0,
790
+ 'tooltip' => __( 'Allows you to write math formulas using TeX and LaTeX notation.', 'quiz-master-next' ),
791
+ 'option_tab' => 'general',
792
+ );
793
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
794
+
795
  // Setting for pagination of quiz
796
  $field_array = array(
797
  'id' => 'disable_scroll_next_previous_click',
2039
  update_option( 'qmn-settings', $settings );
2040
  }
2041
 
2042
+ // Update 8.0.3
2043
+ QSM_Migrate::fix_duplicate_questions();
2044
+ QSM_Migrate::fix_deleted_quiz_posts();
2045
+
2046
  update_option( 'mlw_quiz_master_version', $data );
2047
  }
2048
  if ( ! get_option( 'mlw_advert_shows' ) ) {
2049
  add_option( 'mlw_advert_shows', 'true' );
2050
  }
 
2051
  }
2052
 
2053
  /**
2070
  public function plugin_row_meta( $links, $file ) {
2071
  if ( QSM_PLUGIN_BASENAME === $file ) {
2072
  $row_meta = array(
2073
+ 'docs' => '<a href="' . esc_url( qsm_get_plugin_link('docs', 'plugins') ) . '" title="' . esc_attr( __( 'View Documentation', 'quiz-master-next' ) ) . '">' . __( 'Documentation', 'quiz-master-next' ) . '</a>',
2074
  'support' => '<a href="' . admin_url( 'admin.php?page=qsm_quiz_about&tab=help' ) . '" title="' . esc_attr( __( 'Create Support Ticket', 'quiz-master-next' ) ) . '">' . __( 'Support', 'quiz-master-next' ) . '</a>',
2075
  );
2076
  return array_merge( $links, $row_meta );
2077
  }
2078
  return (array) $links;
2079
  }
2080
+
2081
  }
2082
 
2083
  $qsm_install = new QSM_Install();
2084
+
2085
+ if ( ! function_exists( 'qsm_get_document_link' ) ) {
2086
+
2087
+ /**
2088
+ * Get Document link
2089
+ */
2090
+ function qsm_get_plugin_link( $path = '', $source = '', $content = '' ) {
2091
+ $link = 'https://quizandsurveymaster.com/';
2092
+ if ( ! empty( $path ) ) {
2093
+ $link .= $path;
2094
+ }
2095
+ $link = trailingslashit( $link );
2096
+
2097
+ /**
2098
+ * Prepare UTM parameters
2099
+ */
2100
+ $link .= '?utm_campaign=qsm_plugin&utm_medium=plugin';
2101
+ if ( ! empty( $source ) ) {
2102
+ $link .= '&utm_source=' . $source;
2103
+ }
2104
+ if ( ! empty( $content ) ) {
2105
+ $link .= '&utm_content=' . $content;
2106
+ }
2107
+
2108
+ return $link;
2109
+ }
2110
+ }
php/classes/class-qsm-migrate.php CHANGED
@@ -122,4 +122,67 @@ class QSM_Migrate {
122
 
123
  return $response;
124
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
122
 
123
  return $response;
124
  }
125
+
126
+ public static function fix_duplicate_questions() {
127
+ global $wpdb, $mlwQuizMasterNext;
128
+ $all_quizzes = $wpdb->get_results( "SELECT `quiz_id`, `quiz_settings` FROM `{$wpdb->prefix}mlw_quizzes` ORDER BY `quiz_id` DESC" );
129
+ if ( ! empty( $all_quizzes ) ) {
130
+ foreach ( $all_quizzes as $quiz ) {
131
+ $quiz_id = $quiz->quiz_id;
132
+ $settings = maybe_unserialize( $quiz->quiz_settings );
133
+ $pages = isset( $settings['pages'] ) ? maybe_unserialize( $settings['pages'] ) : array();
134
+ $qpages = isset( $settings['qpages'] ) ? maybe_unserialize( $settings['qpages'] ) : array();
135
+ if ( ! empty( $pages ) ) {
136
+ foreach ( $pages as $key => $page ) {
137
+ $questions = array_unique( $page );
138
+ $pages[ $key ] = $questions;
139
+ if ( ! isset( $qpages[ $key ] ) ) {
140
+ $qpages[ $key ] = array();
141
+ }
142
+ $qpages[ $key ]['questions'] = $questions;
143
+ }
144
+ }
145
+ /**
146
+ * Setup new data
147
+ */
148
+ $settings['pages'] = maybe_serialize( $pages );
149
+ $settings['qpages'] = maybe_serialize( $qpages );
150
+ /**
151
+ * Update quiz settings
152
+ */
153
+ $wpdb->update( $wpdb->prefix . 'mlw_quizzes', array( 'quiz_settings' => maybe_serialize( $settings ) ), array( 'quiz_id' => $quiz_id ), array( '%s' ), array( '%d' ) );
154
+ }
155
+ }
156
+ return;
157
+ }
158
+
159
+ /**
160
+ * This function check qsm post have assigned a quiz
161
+ *
162
+ * @since 8.0.3
163
+ * @return void
164
+ */
165
+ public static function fix_deleted_quiz_posts() {
166
+ global $wpdb;
167
+ $qsm_post_list = get_posts( array(
168
+ 'post_type' => 'qsm_quiz',
169
+ 'posts_per_page' => -1,
170
+ 'fields' => 'ids',
171
+ 'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash' ),
172
+ ) );
173
+ $qmn_quiz_ids = $wpdb->get_results( "SELECT `quiz_id` FROM `{$wpdb->prefix}mlw_quizzes` WHERE `deleted`='0'" );
174
+ if ( ! empty( $qsm_post_list ) ) {
175
+ $quiz_ids = array( 0 );
176
+ if ( ! empty( $qmn_quiz_ids ) ) {
177
+ $quiz_ids = array_column( $qmn_quiz_ids, 'quiz_id' );
178
+ }
179
+ foreach ( $qsm_post_list as $post_id ) {
180
+ $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
181
+ if ( empty( $quiz_id ) || ! in_array( $quiz_id , $quiz_ids, true) ) {
182
+ wp_delete_post( $post_id );
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
  }
php/classes/class-qsm-results-pages.php CHANGED
@@ -37,7 +37,7 @@ class QSM_Results_Pages {
37
 
38
  // Cycles through each possible page.
39
  foreach ( $pages as $index => $page ) {
40
-
41
  $page_content = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $page['page'], "quiz-result-page-{$index}-{$response_data['quiz_id']}" );
42
  // Checks if any conditions are present. Else, set it as the default.
43
  if ( ! empty( $page['conditions'] ) ) {
@@ -65,7 +65,7 @@ class QSM_Results_Pages {
65
  } else {
66
  $test = $response_data['total_score'];
67
  }
68
-
69
  break;
70
 
71
  case 'points':
@@ -113,7 +113,7 @@ class QSM_Results_Pages {
113
  }
114
  break;
115
 
116
- case 'equal':
117
  if ( $test != $value ) {
118
  $show = false;
119
  }
@@ -131,6 +131,9 @@ class QSM_Results_Pages {
131
  * The value may have been set to false when failing a previous condition.
132
  */
133
  $show = apply_filters( 'qsm_results_page_condition_check', $show, $condition, $response_data );
 
 
 
134
  }
135
 
136
  // If we passed all conditions, show this page.
@@ -349,11 +352,11 @@ class QSM_Results_Pages {
349
  $pages[ $i ]['conditions'] = array();
350
  }
351
 
352
- // Sanitize template data
353
  if ( isset( $pages[ $i ]['page'] ) && $is_not_allow_html ) {
354
  // Sanitizes the conditions.
355
  $pages[ $i ]['page'] = wp_kses_post( $pages[ $i ]['page'] );
356
-
357
  }
358
  $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $pages[ $i ]['page'], "quiz-result-page-{$i}-{$quiz_id}" );
359
  }
37
 
38
  // Cycles through each possible page.
39
  foreach ( $pages as $index => $page ) {
40
+
41
  $page_content = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $page['page'], "quiz-result-page-{$index}-{$response_data['quiz_id']}" );
42
  // Checks if any conditions are present. Else, set it as the default.
43
  if ( ! empty( $page['conditions'] ) ) {
65
  } else {
66
  $test = $response_data['total_score'];
67
  }
68
+
69
  break;
70
 
71
  case 'points':
113
  }
114
  break;
115
 
116
+ case 'equal':
117
  if ( $test != $value ) {
118
  $show = false;
119
  }
131
  * The value may have been set to false when failing a previous condition.
132
  */
133
  $show = apply_filters( 'qsm_results_page_condition_check', $show, $condition, $response_data );
134
+ if ( ! $show ) {
135
+ break;
136
+ }
137
  }
138
 
139
  // If we passed all conditions, show this page.
352
  $pages[ $i ]['conditions'] = array();
353
  }
354
 
355
+ // Sanitize template data
356
  if ( isset( $pages[ $i ]['page'] ) && $is_not_allow_html ) {
357
  // Sanitizes the conditions.
358
  $pages[ $i ]['page'] = wp_kses_post( $pages[ $i ]['page'] );
359
+
360
  }
361
  $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $pages[ $i ]['page'], "quiz-result-page-{$i}-{$quiz_id}" );
362
  }
php/classes/class-qsm-settings.php CHANGED
@@ -201,6 +201,7 @@ class QSM_Quiz_Settings {
201
  $setDefaultvalue['question_numbering'] = $globalQuizsetting['question_numbering'];
202
  $setDefaultvalue['show_optin'] = $globalQuizsetting['show_optin'];
203
  $setDefaultvalue['store_responses'] = $globalQuizsetting['store_responses'];
 
204
  $setDefaultvalue['disable_answer_onselect'] = $globalQuizsetting['disable_answer_onselect'];
205
  $setDefaultvalue['ajax_show_correct'] = $globalQuizsetting['ajax_show_correct'];
206
  $setDefaultvalue['contact_disable_autofill'] = $globalQuizsetting['contact_disable_autofill'];
@@ -215,6 +216,7 @@ class QSM_Quiz_Settings {
215
  $setDefaultvalue['disable_description_on_result'] = $globalQuizsetting['disable_description_on_result'];
216
  $setDefaultvalue['disable_scroll_next_previous_click'] = $globalQuizsetting['disable_scroll_next_previous_click'];
217
  $setDefaultvalue['disable_first_page'] = $globalQuizsetting['disable_first_page'];
 
218
  $setDefaultvalue['quiz_animation'] = $globalQuizsetting['quiz_animation'];
219
  $setDefaultvalue['result_page_fb_image'] = $globalQuizsetting['result_page_fb_image'];
220
  $setDefaultvalue['randomness_order'] = $globalQuizsetting['randomness_order'];
@@ -297,10 +299,6 @@ class QSM_Quiz_Settings {
297
  if ( ! isset( $settings_array['quiz_options'] ) || ! isset( $settings_array['quiz_text'] ) || ! isset( $settings_array['quiz_leaderboards'] ) ) {
298
  // Load the old options system
299
  $quiz_options = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d LIMIT 1", $this->quiz_id ) );
300
- // If no leadboard is present
301
- if ( ! isset( $settings_array['quiz_leaderboards'] ) ) {
302
- $settings_array['quiz_leaderboards'] = maybe_serialize( array( 'template' => $quiz_options->leaderboard_template ) );
303
- }
304
  // If no options are present
305
  if ( ! isset( $settings_array['quiz_options'] ) ) {
306
  $scheduled_timeframe = maybe_unserialize( $quiz_options->scheduled_timeframe );
@@ -341,7 +339,6 @@ class QSM_Quiz_Settings {
341
  )
342
  );
343
  }
344
-
345
  // If no text is present
346
  if ( ! isset( $settings_array['quiz_text'] ) ) {
347
  $pagination_text = maybe_unserialize( $quiz_options->pagination_text );
@@ -385,6 +382,10 @@ class QSM_Quiz_Settings {
385
  )
386
  );
387
  }
 
 
 
 
388
  // Update new settings system
389
  $results = $wpdb->update(
390
  $wpdb->prefix . 'mlw_quizzes',
201
  $setDefaultvalue['question_numbering'] = $globalQuizsetting['question_numbering'];
202
  $setDefaultvalue['show_optin'] = $globalQuizsetting['show_optin'];
203
  $setDefaultvalue['store_responses'] = $globalQuizsetting['store_responses'];
204
+ $setDefaultvalue['send_email'] = $globalQuizsetting['send_email'];
205
  $setDefaultvalue['disable_answer_onselect'] = $globalQuizsetting['disable_answer_onselect'];
206
  $setDefaultvalue['ajax_show_correct'] = $globalQuizsetting['ajax_show_correct'];
207
  $setDefaultvalue['contact_disable_autofill'] = $globalQuizsetting['contact_disable_autofill'];
216
  $setDefaultvalue['disable_description_on_result'] = $globalQuizsetting['disable_description_on_result'];
217
  $setDefaultvalue['disable_scroll_next_previous_click'] = $globalQuizsetting['disable_scroll_next_previous_click'];
218
  $setDefaultvalue['disable_first_page'] = $globalQuizsetting['disable_first_page'];
219
+ $setDefaultvalue['disable_mathjax'] = $globalQuizsetting['disable_mathjax'];
220
  $setDefaultvalue['quiz_animation'] = $globalQuizsetting['quiz_animation'];
221
  $setDefaultvalue['result_page_fb_image'] = $globalQuizsetting['result_page_fb_image'];
222
  $setDefaultvalue['randomness_order'] = $globalQuizsetting['randomness_order'];
299
  if ( ! isset( $settings_array['quiz_options'] ) || ! isset( $settings_array['quiz_text'] ) || ! isset( $settings_array['quiz_leaderboards'] ) ) {
300
  // Load the old options system
301
  $quiz_options = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d LIMIT 1", $this->quiz_id ) );
 
 
 
 
302
  // If no options are present
303
  if ( ! isset( $settings_array['quiz_options'] ) ) {
304
  $scheduled_timeframe = maybe_unserialize( $quiz_options->scheduled_timeframe );
339
  )
340
  );
341
  }
 
342
  // If no text is present
343
  if ( ! isset( $settings_array['quiz_text'] ) ) {
344
  $pagination_text = maybe_unserialize( $quiz_options->pagination_text );
382
  )
383
  );
384
  }
385
+ // If no leadboard is present
386
+ if ( ! isset( $settings_array['quiz_leaderboards'] ) ) {
387
+ $settings_array['quiz_leaderboards'] = maybe_serialize( array( 'template' => $quiz_options->leaderboard_template ) );
388
+ }
389
  // Update new settings system
390
  $results = $wpdb->update(
391
  $wpdb->prefix . 'mlw_quizzes',
php/classes/class-qsm-tracking.php CHANGED
@@ -194,7 +194,7 @@ class QSM_Tracking {
194
  echo '<div class="updated">';
195
  echo '<p>' . esc_html__( "Allow Quiz And Survey Master to track this plugin's usage and help us make this plugin better?", 'quiz-master-next' ) . '<p>';
196
  echo '<p>' . esc_html__( "No sensitive data is tracked. Only feature usage and data about quizzes, surveys, and questions are collected. No questions or user responses is ever collected.", 'quiz-master-next' ) . '<p>';
197
- echo '<p><a href="https://quizandsurveymaster.com/what-the-plugin-tracks/?utm_campaign=qsm_plugin&utm_medium=plugin&utm_source=tracking-notice" target="_blank">' . esc_html__( 'Click here to learn more about why we need this data and what we collect', 'quiz-master-next' ) . '</a></p>';
198
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . esc_html__( 'Allow', 'quiz-master-next' ) . '</a>';
199
  echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'quiz-master-next' ) . '</a>';
200
  echo '</div>';
194
  echo '<div class="updated">';
195
  echo '<p>' . esc_html__( "Allow Quiz And Survey Master to track this plugin's usage and help us make this plugin better?", 'quiz-master-next' ) . '<p>';
196
  echo '<p>' . esc_html__( "No sensitive data is tracked. Only feature usage and data about quizzes, surveys, and questions are collected. No questions or user responses is ever collected.", 'quiz-master-next' ) . '<p>';
197
+ echo '<p><a href="' . esc_url( qsm_get_plugin_link('what-the-plugin-tracks', 'tracking-notice') ) . '" target="_blank">' . esc_html__( 'Click here to learn more about why we need this data and what we collect', 'quiz-master-next' ) . '</a></p>';
198
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . esc_html__( 'Allow', 'quiz-master-next' ) . '</a>';
199
  echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . esc_html__( 'Do not allow', 'quiz-master-next' ) . '</a>';
200
  echo '</div>';
php/classes/question-types/class-question-review-fill-in-blanks.php CHANGED
@@ -45,52 +45,64 @@ class QSM_Question_Review_Fill_In_Blanks extends QSM_Question_Review {
45
  }
46
 
47
  private function process_randomly() {
 
 
48
  $total_user_answers = sizeof( $this->user_answer );
49
  $total_correct_answer = sizeof( $this->correct_answer );
 
50
  if ( $total_user_answers <= $total_correct_answer ) {
51
  foreach ( $this->user_answer as $user_answer ) {
52
- $answer_key = array_search( $this->prepare_for_string_matching( $user_answer ), array_map( array( $this, 'prepare_for_string_matching' ), $this->correct_answer ), true );
 
 
 
 
53
  if ( false !== $answer_key ) {
54
- $this->answer_status = 'correct';
55
  $this->points += $this->answer_array[ $answer_key ][1];
56
- } else {
57
- $this->answer_status = 'incorrect';
58
  }
59
  }
60
  } else {
61
  foreach ( $this->correct_answer as $correct_answer ) {
62
- $answer_key = array_search( $this->prepare_for_string_matching( $correct_answer ), array_map( array( $this, 'prepare_for_string_matching' ), $this->user_answer ), true );
 
 
 
 
63
  if ( false !== $answer_key ) {
64
- $this->answer_status = 'correct';
65
  $this->points += $this->answer_array[ $answer_key ][1];
66
- } else {
67
- $this->answer_status = 'incorrect';
68
  }
69
  }
70
  }
 
 
 
71
  }
72
 
73
  private function process_sequentially() {
 
 
74
  $total_user_answers = sizeof( $this->user_answer );
75
  $total_correct_answer = sizeof( $this->correct_answer );
 
76
  if ( $total_user_answers <= $total_correct_answer ) {
77
  foreach ( $this->user_answer as $user_answer_key => $user_answer ) {
78
- if ( $this->prepare_for_string_matching( $user_answer ) === $this->prepare_for_string_matching( $this->correct_answer[ $user_answer_key ] ) ) {
79
- $this->answer_status = 'correct';
80
  $this->points += $this->answer_array[ $user_answer_key ][1];
81
- } else {
82
- $this->answer_status = 'incorrect';
83
  }
84
  }
85
  } else {
86
  foreach ( $this->correct_answer as $correct_answer_key => $correct_answer ) {
87
- if ( $this->prepare_for_string_matching( $correct_answer ) === $this->prepare_for_string_matching( $this->user_answer[ $correct_answer_key ] ) ) {
88
- $this->answer_status = 'correct';
89
  $this->points += $this->answer_array[ $correct_answer_key ][1];
90
- } else {
91
- $this->answer_status = 'incorrect';
92
  }
93
  }
94
  }
 
 
 
95
  }
96
  }
45
  }
46
 
47
  private function process_randomly() {
48
+ global $mlwQuizMasterNext;
49
+ $user_correct_ans = 0;
50
  $total_user_answers = sizeof( $this->user_answer );
51
  $total_correct_answer = sizeof( $this->correct_answer );
52
+ $case_sensitive = $mlwQuizMasterNext->pluginHelper->get_question_setting( $this->question_id, 'case_sensitive' );
53
  if ( $total_user_answers <= $total_correct_answer ) {
54
  foreach ( $this->user_answer as $user_answer ) {
55
+ if ( 1 === intval($case_sensitive ) ) {
56
+ $answer_key = array_search( $user_answer, $this->correct_answer, true );
57
+ }else {
58
+ $answer_key = array_search( $this->prepare_for_string_matching( $user_answer ), array_map( array( $this, 'prepare_for_string_matching' ), $this->correct_answer ), true );
59
+ }
60
  if ( false !== $answer_key ) {
61
+ $user_correct_ans++;
62
  $this->points += $this->answer_array[ $answer_key ][1];
 
 
63
  }
64
  }
65
  } else {
66
  foreach ( $this->correct_answer as $correct_answer ) {
67
+ if ( 1 === intval($case_sensitive ) ) {
68
+ $answer_key = array_search( $correct_answer, $this->user_answer, true );
69
+ }else {
70
+ $answer_key = array_search( $this->prepare_for_string_matching( $correct_answer ), array_map( array( $this, 'prepare_for_string_matching' ), $this->user_answer ), true );
71
+ }
72
  if ( false !== $answer_key ) {
73
+ $user_correct_ans++;
74
  $this->points += $this->answer_array[ $answer_key ][1];
 
 
75
  }
76
  }
77
  }
78
+ if ( ( $this->correct_answer_logic && $total_user_answers === $user_correct_ans ) || ( ! $this->correct_answer_logic && 0 < $user_correct_ans ) ) {
79
+ $this->answer_status = 'correct';
80
+ }
81
  }
82
 
83
  private function process_sequentially() {
84
+ global $mlwQuizMasterNext;
85
+ $user_correct_ans = 0;
86
  $total_user_answers = sizeof( $this->user_answer );
87
  $total_correct_answer = sizeof( $this->correct_answer );
88
+ $case_sensitive = $mlwQuizMasterNext->pluginHelper->get_question_setting( $this->question_id, 'case_sensitive' );
89
  if ( $total_user_answers <= $total_correct_answer ) {
90
  foreach ( $this->user_answer as $user_answer_key => $user_answer ) {
91
+ if ( ( 1 === intval($case_sensitive) && $user_answer === $this->correct_answer[ $user_answer_key ] ) || ( 1 !== intval($case_sensitive) && $this->prepare_for_string_matching( $user_answer ) === $this->prepare_for_string_matching( $this->correct_answer[ $user_answer_key ] ) ) ) {
92
+ $user_correct_ans++;
93
  $this->points += $this->answer_array[ $user_answer_key ][1];
 
 
94
  }
95
  }
96
  } else {
97
  foreach ( $this->correct_answer as $correct_answer_key => $correct_answer ) {
98
+ if ( ( 1 === intval($case_sensitive) && $correct_answer === $this->user_answer[ $correct_answer_key ] ) || ( 1 !== intval($case_sensitive) && $this->prepare_for_string_matching( $correct_answer ) === $this->prepare_for_string_matching( $this->user_answer[ $correct_answer_key ] ) ) ) {
99
+ $user_correct_ans++;
100
  $this->points += $this->answer_array[ $correct_answer_key ][1];
 
 
101
  }
102
  }
103
  }
104
+ if ( ( $this->correct_answer_logic && $total_user_answers === $user_correct_ans ) || ( ! $this->correct_answer_logic && 0 < $user_correct_ans ) ) {
105
+ $this->answer_status = 'correct';
106
+ }
107
  }
108
  }
php/question-types/qsm-question-title.php CHANGED
@@ -39,7 +39,7 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_
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
  }
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
+ <p><?php echo do_shortcode( wp_kses_post( $question_title . $deselect_answer ) ); ?></p>
43
  </div>
44
  <?php
45
  }
php/question-types/qsm-question-type-fill-in-the-blanks.php CHANGED
@@ -63,6 +63,8 @@ function qmn_fill_blank_display( $id, $question, $answers ) {
63
  * @since 4.4.0
64
  */
65
  function qmn_fill_blank_review( $id, $question, $answers ) {
 
 
66
  $current_question = new QSM_Question_Review_Fill_In_Blanks( $id, $question, $answers );
67
  $user_text_array = $current_question->get_user_answer();
68
  $correct_text_array = $current_question->get_correct_answer();
@@ -73,6 +75,7 @@ function qmn_fill_blank_review( $id, $question, $answers ) {
73
  $return_array['user_compare_text'] = ! empty( $user_text_array ) ? implode( '=====', $user_text_array ) : '' ;
74
  $return_array['user_answer'] = $user_text_array;
75
  $return_array['correct_answer'] = $correct_text_array ;
 
76
  if ( $current_question->get_question_text() ) {
77
  $return_array['question_text'] = $current_question->get_question_text();
78
  }
63
  * @since 4.4.0
64
  */
65
  function qmn_fill_blank_review( $id, $question, $answers ) {
66
+ global $mlwQuizMasterNext;
67
+ $case_sensitive = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'case_sensitive' );
68
  $current_question = new QSM_Question_Review_Fill_In_Blanks( $id, $question, $answers );
69
  $user_text_array = $current_question->get_user_answer();
70
  $correct_text_array = $current_question->get_correct_answer();
75
  $return_array['user_compare_text'] = ! empty( $user_text_array ) ? implode( '=====', $user_text_array ) : '' ;
76
  $return_array['user_answer'] = $user_text_array;
77
  $return_array['correct_answer'] = $correct_text_array ;
78
+ $return_array['case_sensitive'] = $case_sensitive ;
79
  if ( $current_question->get_question_text() ) {
80
  $return_array['question_text'] = $current_question->get_question_text();
81
  }
php/question-types/qsm-question-type-multiple-choice-horizontal.php CHANGED
@@ -28,6 +28,8 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
28
  }
29
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
30
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
 
 
31
  qsm_question_title_func( $question, 'horizontal_multiple_choice', $new_question_title, $id );
32
  ?>
33
  <div class="qmn_radio_answers qmn_radio_horizontal_answers <?php echo esc_attr( $mlw_require_class ); ?>">
@@ -45,8 +47,15 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
45
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
46
  <?php
47
  if ( 'image' === $answerEditor ) {
 
 
 
 
 
 
 
48
  ?>
49
- <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" />
50
  <span class="qsm_image_caption">
51
  <?php
52
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
28
  }
29
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
30
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
31
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
32
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
33
  qsm_question_title_func( $question, 'horizontal_multiple_choice', $new_question_title, $id );
34
  ?>
35
  <div class="qmn_radio_answers qmn_radio_horizontal_answers <?php echo esc_attr( $mlw_require_class ); ?>">
47
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
48
  <?php
49
  if ( 'image' === $answerEditor ) {
50
+ $size_style = '';
51
+ if ( ! empty($image_width) ) {
52
+ $size_style .= 'width:'.$image_width.'px !important;';
53
+ }
54
+ if ( ! empty($image_height) ) {
55
+ $size_style .= ' height:'.$image_height.'px !important;';
56
+ }
57
  ?>
58
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
59
  <span class="qsm_image_caption">
60
  <?php
61
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
php/question-types/qsm-question-type-multiple-choice.php CHANGED
@@ -18,6 +18,8 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
18
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
19
  $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
20
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
 
 
21
  if ( 0 == $required ) {
22
  $mlw_require_class = 'mlwRequiredRadio';
23
  } else {
@@ -52,8 +54,15 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
52
  <label class="qsm-input-label" for="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>">
53
  <?php
54
  if ( 'image' === $answerEditor ) {
 
 
 
 
 
 
 
55
  ?>
56
- <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" />
57
  <span class="qsm_image_caption">
58
  <?php
59
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
18
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
19
  $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
20
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
21
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
22
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
23
  if ( 0 == $required ) {
24
  $mlw_require_class = 'mlwRequiredRadio';
25
  } else {
54
  <label class="qsm-input-label" for="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>">
55
  <?php
56
  if ( 'image' === $answerEditor ) {
57
+ $size_style = '';
58
+ if ( ! empty($image_width) ) {
59
+ $size_style .= 'width:'.$image_width.'px !important;';
60
+ }
61
+ if ( ! empty($image_height) ) {
62
+ $size_style .= ' height:'.$image_height.'px !important;';
63
+ }
64
  ?>
65
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
66
  <span class="qsm_image_caption">
67
  <?php
68
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
php/question-types/qsm-question-type-multiple-response-horizontal.php CHANGED
@@ -26,6 +26,8 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
26
  }
27
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
28
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
 
 
29
  qsm_question_title_func( $question, '', $new_question_title, $id );
30
  ?>
31
  <div class="qmn_check_answers qmn_multiple_horizontal_check <?php echo esc_attr( $mlw_require_class ); ?>">
@@ -41,8 +43,15 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
41
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
42
  <?php
43
  if ( 'image' === $answerEditor ) {
 
 
 
 
 
 
 
44
  ?>
45
- <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" />
46
  <span class="qsm_image_caption">
47
  <?php
48
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
26
  }
27
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
28
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
29
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
30
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
31
  qsm_question_title_func( $question, '', $new_question_title, $id );
32
  ?>
33
  <div class="qmn_check_answers qmn_multiple_horizontal_check <?php echo esc_attr( $mlw_require_class ); ?>">
43
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
44
  <?php
45
  if ( 'image' === $answerEditor ) {
46
+ $size_style = '';
47
+ if ( ! empty($image_width) ) {
48
+ $size_style .= 'width:'.$image_width.'px !important;';
49
+ }
50
+ if ( ! empty($image_height) ) {
51
+ $size_style .= ' height:'.$image_height.'px !important;';
52
+ }
53
  ?>
54
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
55
  <span class="qsm_image_caption">
56
  <?php
57
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
php/question-types/qsm-question-type-multiple-response.php CHANGED
@@ -27,6 +27,8 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
27
  }
28
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
29
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
 
 
30
  qsm_question_title_func( $question, '', $new_question_title, $id );
31
  ?>
32
  <div class="qmn_check_answers <?php echo esc_attr( $mlw_require_class ); ?>">
@@ -44,8 +46,15 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
44
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
45
  <?php
46
  if ( 'image' === $answerEditor ) {
 
 
 
 
 
 
 
47
  ?>
48
- <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" />
49
  <span class="qsm_image_caption">
50
  <?php
51
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
27
  }
28
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
29
  $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
30
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
31
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
32
  qsm_question_title_func( $question, '', $new_question_title, $id );
33
  ?>
34
  <div class="qmn_check_answers <?php echo esc_attr( $mlw_require_class ); ?>">
46
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
47
  <?php
48
  if ( 'image' === $answerEditor ) {
49
+ $size_style = '';
50
+ if ( ! empty($image_width) ) {
51
+ $size_style .= 'width:'.$image_width.'px !important;';
52
+ }
53
+ if ( ! empty($image_height) ) {
54
+ $size_style .= ' height:'.$image_height.'px !important;';
55
+ }
56
  ?>
57
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
58
  <span class="qsm_image_caption">
59
  <?php
60
  $caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
php/question-types/qsm-question-type-polar.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
- }
5
 
6
  /**
7
  * This function displays the fill in the blank question
@@ -14,6 +14,9 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  function qmn_polar_display( $id, $question, $answers ) {
15
  global $mlwQuizMasterNext;
16
  $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
 
 
 
17
  $first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
18
  $second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
19
  $is_reverse = false;
@@ -42,16 +45,58 @@ function qmn_polar_display( $id, $question, $answers ) {
42
  ?>
43
  <span class="mlw_qmn_question question-type-polar-s">
44
  <div class='left-polar-title'> <?php
45
- $left_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[0][0], "answer-" . $answers[0][0], "QSM Answers" );
46
- echo esc_html( $left_title );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  ?> </div>
48
  <div class='slider-main-wrapper'>
49
  <input type='hidden' class='qmn_polar <?php echo esc_attr( $mlw_require_class ); ?>' id='question<?php echo esc_attr( $id ); ?>' name='question<?php echo esc_attr( $id ); ?>' value=''/>
50
  <div id="slider-<?php echo esc_attr( $id ); ?>" <?php echo esc_attr( $slider_data_atts ); ?> ></div>
51
  </div>
52
  <div class='right-polar-title'><?php
53
- $right_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[1][0], "answer-" . $answers[1][0], "QSM Answers" );
54
- echo esc_html( $right_title );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ?></div>
56
  </span>
57
  <?php
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
+ }
5
 
6
  /**
7
  * This function displays the fill in the blank question
14
  function qmn_polar_display( $id, $question, $answers ) {
15
  global $mlwQuizMasterNext;
16
  $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
17
+ $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
18
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
19
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
20
  $first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
21
  $second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
22
  $is_reverse = false;
45
  ?>
46
  <span class="mlw_qmn_question question-type-polar-s">
47
  <div class='left-polar-title'> <?php
48
+ if ( 'image' === $answerEditor ) {
49
+ $size_style = '';
50
+ if ( ! empty($image_width) ) {
51
+ $size_style .= 'width:'.$image_width.'px !important;';
52
+ }
53
+ if ( ! empty($image_height) ) {
54
+ $size_style .= ' height:'.$image_height.'px !important;';
55
+ }
56
+ $left_image = $answers[0][0];
57
+ ?>
58
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $left_image, ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
59
+ <span class="qsm_image_caption">
60
+ <?php
61
+ $caption_text = trim( htmlspecialchars_decode( $answers[0][3], ENT_QUOTES ) );
62
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
63
+ echo esc_html( $caption_text );
64
+ ?>
65
+ </span>
66
+ <?php
67
+ } else {
68
+ $left_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[0][0], "answer-" . $answers[0][0], "QSM Answers" );
69
+ echo do_shortcode( wp_kses_post( $left_title ) );
70
+ }
71
  ?> </div>
72
  <div class='slider-main-wrapper'>
73
  <input type='hidden' class='qmn_polar <?php echo esc_attr( $mlw_require_class ); ?>' id='question<?php echo esc_attr( $id ); ?>' name='question<?php echo esc_attr( $id ); ?>' value=''/>
74
  <div id="slider-<?php echo esc_attr( $id ); ?>" <?php echo esc_attr( $slider_data_atts ); ?> ></div>
75
  </div>
76
  <div class='right-polar-title'><?php
77
+ if ( 'image' === $answerEditor ) {
78
+ $size_style = '';
79
+ if ( ! empty($image_width) ) {
80
+ $size_style .= 'width:'.$image_width.'px !important;';
81
+ }
82
+ if ( ! empty($image_height) ) {
83
+ $size_style .= ' height:'.$image_height.'px !important;';
84
+ }
85
+ $right_image = $answers[1][0];
86
+ ?>
87
+ <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $right_image, ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
88
+ <span class="qsm_image_caption">
89
+ <?php
90
+ $caption_text = trim( htmlspecialchars_decode( $answers[1][3], ENT_QUOTES ) );
91
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
92
+ echo esc_html( $caption_text );
93
+ ?>
94
+ </span>
95
+ <?php
96
+ } else {
97
+ $right_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[1][0], "answer-" . $answers[1][0], "QSM Answers" );
98
+ echo do_shortcode( wp_kses_post( $right_title ) );
99
+ }
100
  ?></div>
101
  </span>
102
  <?php
php/rest-api.php CHANGED
@@ -253,6 +253,8 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
253
  'name' => $question['question_name'],
254
  'answerInfo' => $question['question_answer_info'],
255
  'comments' => $question['comments'],
 
 
256
  'hint' => $question['hints'],
257
  'category' => $question['category'],
258
  'required' => $question['settings']['required'],
@@ -260,6 +262,7 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
260
  'page' => $question['page'],
261
  'answerEditor' => isset( $question['settings']['answerEditor'] ) ? $question['settings']['answerEditor'] : 'text',
262
  'autofill' => isset( $question['settings']['autofill'] ) ? $question['settings']['autofill'] : 0,
 
263
  'limit_text' => isset( $question['settings']['limit_text'] ) ? $question['settings']['limit_text'] : 0,
264
  'limit_multiple_response' => isset( $question['settings']['limit_multiple_response'] ) ? $question['settings']['limit_multiple_response'] : 0,
265
  'file_upload_limit' => isset( $question['settings']['file_upload_limit'] ) ? $question['settings']['file_upload_limit'] : 0,
@@ -551,8 +554,11 @@ function qsm_rest_get_questions( WP_REST_Request $request ) {
551
  'required' => $question['settings']['required'],
552
  'answers' => $question['answers'],
553
  'page' => $question['page'],
 
 
554
  'answerEditor' => isset( $question['settings']['answerEditor'] ) ? $question['settings']['answerEditor'] : 'text',
555
  'autofill' => isset( $question['settings']['autofill'] ) ? $question['settings']['autofill'] : 0,
 
556
  'limit_text' => isset( $question['settings']['limit_text'] ) ? $question['settings']['limit_text'] : 0,
557
  'limit_multiple_response' => isset( $question['settings']['limit_multiple_response'] ) ? $question['settings']['limit_multiple_response'] : 0,
558
  'file_upload_limit' => isset( $question['settings']['file_upload_limit'] ) ? $question['settings']['file_upload_limit'] : 0,
253
  'name' => $question['question_name'],
254
  'answerInfo' => $question['question_answer_info'],
255
  'comments' => $question['comments'],
256
+ 'img_width' => isset( $question['settings']['image_size-width'] ) ? $question['settings']['image_size-width'] : '',
257
+ 'img_height' => isset( $question['settings']['image_size-height'] ) ? $question['settings']['image_size-height'] : '',
258
  'hint' => $question['hints'],
259
  'category' => $question['category'],
260
  'required' => $question['settings']['required'],
262
  'page' => $question['page'],
263
  'answerEditor' => isset( $question['settings']['answerEditor'] ) ? $question['settings']['answerEditor'] : 'text',
264
  'autofill' => isset( $question['settings']['autofill'] ) ? $question['settings']['autofill'] : 0,
265
+ 'case-sensitive' => isset( $question['settings']['case-sensitive'] ) ? $question['settings']['case-sensitive'] : 0,
266
  'limit_text' => isset( $question['settings']['limit_text'] ) ? $question['settings']['limit_text'] : 0,
267
  'limit_multiple_response' => isset( $question['settings']['limit_multiple_response'] ) ? $question['settings']['limit_multiple_response'] : 0,
268
  'file_upload_limit' => isset( $question['settings']['file_upload_limit'] ) ? $question['settings']['file_upload_limit'] : 0,
554
  'required' => $question['settings']['required'],
555
  'answers' => $question['answers'],
556
  'page' => $question['page'],
557
+ 'img_width' => isset( $question['settings']['image_size-width'] ) ? $question['settings']['image_size-width'] : '',
558
+ 'img_height' => isset( $question['settings']['image_size-height'] ) ? $question['settings']['image_size-height'] : '',
559
  'answerEditor' => isset( $question['settings']['answerEditor'] ) ? $question['settings']['answerEditor'] : 'text',
560
  'autofill' => isset( $question['settings']['autofill'] ) ? $question['settings']['autofill'] : 0,
561
+ 'case_sensitive' => isset( $question['settings']['case_sensitive'] ) ? $question['settings']['case_sensitive'] : 0,
562
  'limit_text' => isset( $question['settings']['limit_text'] ) ? $question['settings']['limit_text'] : 0,
563
  'limit_multiple_response' => isset( $question['settings']['limit_multiple_response'] ) ? $question['settings']['limit_multiple_response'] : 0,
564
  'file_upload_limit' => isset( $question['settings']['file_upload_limit'] ) ? $question['settings']['file_upload_limit'] : 0,
php/template-variables.php CHANGED
@@ -46,6 +46,7 @@ add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_date_tak
46
  add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_social_share', 10, 2 );
47
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_result_id', 10, 2 );
48
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_single_question_answer', 20, 2 );
 
49
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_total_possible_points', 10, 2 );
50
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_total_attempted_questions', 10, 2 );
51
  add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_user_full_name', 10, 2 );
@@ -110,7 +111,51 @@ function qsm_variable_single_question_answer( $content, $mlw_quiz_array ) {
110
  }
111
  return $content;
112
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
 
 
 
 
 
 
 
 
114
  /**
115
  * Replace total_possible_points variable with actual points
116
  *
@@ -377,13 +422,22 @@ function mlw_qmn_variable_current_user( $content, $mlw_quiz_array ) {
377
  */
378
  function mlw_qmn_variable_user_full_name( $content, $mlw_quiz_array ) {
379
  if ( false !== strpos( $content, '%FULL_NAME%' ) ) {
380
- $current_user = wp_get_current_user();
381
- $firstname = get_user_meta( $current_user->ID, 'first_name', true );
382
- $lastname = get_user_meta( $current_user->ID, 'last_name', true );
383
- if ( ! empty( $firstname ) && ! empty( $lastname ) ) {
384
- $full_name = $firstname . ' ' . $lastname;
385
- } else {
386
- $full_name = $current_user->display_name;
 
 
 
 
 
 
 
 
 
387
  }
388
 
389
  $content = str_replace( '%FULL_NAME%', ( isset( $full_name ) ? $full_name : '' ), $content );
@@ -609,7 +663,7 @@ function qmn_variable_category_points( $content, $mlw_quiz_array ) {
609
  $return_points = 0;
610
  }
611
  $return_points = apply_filters( 'qsm_category_points', $return_points, $category_name, $mlw_quiz_array );
612
- $content = str_replace( '%CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
613
  }
614
  return $content;
615
  }
@@ -683,7 +737,7 @@ function qmn_variable_category_score( $content, $mlw_quiz_array ) {
683
  if ( $category_data['migrated'] ) {
684
  if ( is_array( $answer['multicategories'] ) ) {
685
  foreach ( $answer['multicategories'] as $category ) {
686
- $category_name_object = get_term_by( 'id', $category, 'qsm_category' );
687
  if ( $category_name_object->name == $category_name && '11' !== $answer['question_type'] ) {
688
  $total_questions += 1;
689
  if ( 'correct' == $answer['correct'] ) {
@@ -934,11 +988,11 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
934
  $mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
935
  $disable_description_on_result = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'disable_description_on_result' );
936
  // Get question setting
937
- $question_settings = isset( $questions[ $answer['id'] ]['settings'] ) ? $questions[ $answer['id'] ]['settings'] : array();
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 = '';
@@ -1033,14 +1087,19 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1033
  foreach ( $total_answers as $key => $single_answer ) {
1034
  $show_user_answer = $new_array_user_answer[ $key ];
1035
 
1036
- $is_answer_correct = false;
1037
- $decode_show_user_answer = htmlspecialchars_decode( mb_strtoupper( $show_user_answer ), ENT_QUOTES );
1038
- $decode_single_user_answer = mb_strtoupper( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) );
 
 
 
 
 
 
1039
  if ( $decode_show_user_answer == $decode_single_user_answer ) {
1040
- $is_answer_correct = true;
1041
  }
1042
  $index = $key + 1;
1043
-
1044
  if ( $is_answer_correct ) {
1045
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">(' . $index . ') ' . $show_user_answer . '</span>';
1046
  } else {
@@ -1053,14 +1112,22 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1053
  }
1054
  }
1055
  } else {
1056
- $options = array();
1057
  foreach ( $total_answers as $key => $single_answer ) {
1058
- $options[] = mb_strtoupper( htmlspecialchars_decode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ), ENT_QUOTES ) );
 
 
 
 
1059
  }
1060
 
1061
  if ( sizeof( $new_array_user_answer ) < sizeof( $total_answers ) ) {
1062
  foreach ( $new_array_user_answer as $show_user_answer ) {
1063
- $key = array_search( mb_strtoupper( $show_user_answer ), $options, true );
 
 
 
 
1064
  if ( false !== $key ) {
1065
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode( $show_user_answer, ENT_QUOTES ) . '</span>';
1066
  } else {
@@ -1072,18 +1139,20 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1072
  }
1073
  } else {
1074
  foreach ( $new_array_user_answer as $show_user_answer ) {
1075
- $key = array_search( mb_strtoupper( $show_user_answer ), $options, true );
 
 
 
 
 
1076
  if ( false !== $key ) {
1077
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . $show_user_answer . '</span>';
1078
  } else {
 
1079
  if ( '' === $show_user_answer ) {
1080
  $show_user_answer = 'No answer provided';
1081
  }
1082
- if ( 'correct' === $answer['correct'] ) {
1083
- $question_with_answer_text .= '<span class="qsm-text-simple-option">' . $show_user_answer . '</span>';
1084
- } else {
1085
- $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . $show_user_answer . '</span>';
1086
- }
1087
  }
1088
  }
1089
  }
@@ -1099,6 +1168,8 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1099
  } elseif ( 13 == $answer['question_type'] ) {
1100
  $questionid = $questions[ $answer['id'] ]['question_id'];
1101
  $question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
 
 
1102
  } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
1103
  $question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
1104
  } else {
@@ -1118,6 +1189,8 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1118
  } elseif ( 13 == $answer['question_type'] ) {
1119
  $questionid = $questions[ $answer['id'] ]['question_id'];
1120
  $question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
 
 
1121
  } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
1122
  $question_type = $answer['question_type'];
1123
  $question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
@@ -1139,7 +1212,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1139
  $question_with_answer_text .= "$open_span_tag" . trim( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) . '</span>';
1140
  }
1141
  } else {
1142
- $question_with_answer_text .= '<span class="qsm-user-answer-text">' . preg_replace( "/[\n\r]+/", "", nl2br( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) ) . '</span>';
1143
  }
1144
  }
1145
  }
@@ -1154,6 +1227,9 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1154
  } else {
1155
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . trim( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
1156
  }
 
 
 
1157
  } elseif ( in_array( $answer['question_type'], $use_custom_user_answer_template, true ) ) {
1158
  $qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
1159
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
@@ -1172,10 +1248,10 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1172
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . do_shortcode( $user_answer_new ) . $close_span_with_br, $mlw_question_answer_display );
1173
  }
1174
  }
1175
- $answer_2 = ! empty( $answer[2] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[2], "answer-" . $answer[2], "QSM Answers" ) : 'NA';
1176
  if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
1177
  $qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
1178
- $qsm_correct_ans = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qsm_correct_ans, "answer-" . $qsm_correct_ans, "QSM Answers" );
1179
  $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
1180
  } elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
1181
  $image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
@@ -1267,12 +1343,15 @@ function qsm_is_allow_score_roundoff() {
1267
  function qmn_polar_display_on_resultspage( $id, $question, $answers, $answer ) {
1268
  $question_display = '';
1269
  global $mlwQuizMasterNext;
1270
- $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
1271
- $input_text = '';
1272
- $first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
1273
- $second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
1274
- $mid_point = ( $second_point - $first_point ) / 2;
1275
- $is_reverse = false;
 
 
 
1276
  if ( $first_point > $second_point ) {
1277
  $is_reverse = true;
1278
  $mid_point = ( $first_point - $second_point ) / 2;
@@ -1317,12 +1396,49 @@ function qmn_polar_display_on_resultspage( $id, $question, $answers, $answer ) {
1317
  }
1318
  }
1319
 
1320
- $input_text .= "<div class='left-polar-title' $left_polar_title_style >" . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[0][0], "answer-" . $answers[0][0], "QSM Answers" ) . '</div>';
1321
- $input_text .= "<div class='slider-main-wrapper'><input type='hidden' class='qmn_polar $mlw_require_class' id='question" . esc_attr( $id ) . "' name='question" . esc_attr( $id ) . "' />";
1322
- $input_text .= '<div id="slider-' . esc_attr( $id ) . '"' . $slider_date_atts . '></div></div>';
1323
- $input_text .= "<div class='right-polar-title' $right_polar_title_style>" . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[1][0], "answer-" . $answers[1][0], "QSM Answers" ) . '</div>';
1324
- $question = $input_text;
1325
- $question_display .= "<span class='mlw_qmn_question mlw-qmn-question-result-$id question-type-polar-s'>" . do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) . '</span>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1326
  return apply_filters( 'qmn_polar_display_front', $question_display, $id, $question, $answers );
1327
  }
1328
 
@@ -1397,8 +1513,8 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
1397
  }
1398
  }
1399
  if ( '' !== $new_question_title ) {
1400
- $new_question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $new_question_title, ENT_QUOTES ), "Question-{$question_id}", "QSM Questions");
1401
- $question_display .= "<div class='mlw_qmn_new_question'>" . $new_question_title . '</div>';
1402
  $polar_extra_class .= ' qsm_remove_bold';
1403
  }
1404
  $question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" . $question_numbering . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
46
  add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_social_share', 10, 2 );
47
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_result_id', 10, 2 );
48
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_single_question_answer', 20, 2 );
49
+ add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_single_answer', 20, 2 );
50
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_total_possible_points', 10, 2 );
51
  add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_total_attempted_questions', 10, 2 );
52
  add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_user_full_name', 10, 2 );
111
  }
112
  return $content;
113
  }
114
+ /**
115
+ * Changed the display structure to new structure.
116
+ *
117
+ * @since 8.0.3
118
+ * @param string $content
119
+ * @param array $mlw_quiz_array
120
+ * Show particular answer.
121
+ */
122
+
123
+ function qsm_variable_single_answer( $content, $mlw_quiz_array ) {
124
+ global $mlwQuizMasterNext,$wpdb;
125
+ $quiz_id = is_object( $mlw_quiz_array ) ? $mlw_quiz_array->quiz_id : $mlw_quiz_array['quiz_id'];
126
+ while ( false !== strpos( $content, '%ANSWER_' ) ) {
127
+ $question_id = mlw_qmn_get_string_between( $content, '%ANSWER_', '%' );
128
+ $question_answers_array = isset( $mlw_quiz_array['question_answers_array'] ) ? $mlw_quiz_array['question_answers_array'] : array();
129
+ $key = array_search( $question_id, array_column( $question_answers_array, 'id' ), true );
130
+ if ( isset( $question_answers_array[ $key ] ) ) {
131
+ $answers = $question_answers_array[ $key ];
132
+ $ser_answer = $wpdb->get_row( $wpdb->prepare( "SELECT question_settings FROM {$wpdb->prefix}mlw_questions WHERE question_id = %d", $question_id ), ARRAY_A );
133
+ $question_settings = qmn_sanitize_input_data( $ser_answer['question_settings'] );
134
+ $answerstr = "";
135
+ if ( isset($answers['user_answer']) ) {
136
+ if ( 13 === intval( $answers['question_type'] ) ) {
137
+ $answerstr .= $answers['points'];
138
+ }elseif ( 'rich' === $question_settings['answerEditor'] ) {
139
+ foreach ( $answers['user_answer'] as $answer ) {
140
+ $answerstr .= htmlspecialchars_decode($answer);
141
+ }
142
+ }
143
+ elseif ( 'image' === $question_settings['answerEditor'] ) {
144
+ foreach ( $answers['user_answer'] as $answer ) {
145
+ $answerstr .= '<span class="qmn_image_option" ><img src="' . htmlspecialchars_decode($answer, ENT_QUOTES ) . '"/></span>';
146
+ }
147
+ }else {
148
+ $answerstr .= implode(",",$answers['user_answer']);
149
+ }
150
 
151
+
152
+ $content = str_replace( '%ANSWER_' . $question_id . '%',$answerstr , $content );
153
+
154
+ }
155
+ }
156
+ }
157
+ return $content;
158
+ }
159
  /**
160
  * Replace total_possible_points variable with actual points
161
  *
422
  */
423
  function mlw_qmn_variable_user_full_name( $content, $mlw_quiz_array ) {
424
  if ( false !== strpos( $content, '%FULL_NAME%' ) ) {
425
+ $full_name = '';
426
+ $user_id = isset( $mlw_quiz_array['user_id'] ) ? $mlw_quiz_array['user_id'] : 0;
427
+ $current_user_id = get_current_user_id();
428
+ if ( is_admin() && $user_id != $current_user_id ) {
429
+ $current_user_id = $user_id;
430
+ }
431
+
432
+ $user = get_user_by( 'ID', $current_user_id );
433
+ if ( $user ) {
434
+ $firstname = get_user_meta( $user->ID, 'first_name', true );
435
+ $lastname = get_user_meta( $user->ID, 'last_name', true );
436
+ if ( ! empty( $firstname ) && ! empty( $lastname ) ) {
437
+ $full_name = $firstname . ' ' . $lastname;
438
+ } else {
439
+ $full_name = $current_user->display_name;
440
+ }
441
  }
442
 
443
  $content = str_replace( '%FULL_NAME%', ( isset( $full_name ) ? $full_name : '' ), $content );
663
  $return_points = 0;
664
  }
665
  $return_points = apply_filters( 'qsm_category_points', $return_points, $category_name, $mlw_quiz_array );
666
+ $content = str_replace( '%CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
667
  }
668
  return $content;
669
  }
737
  if ( $category_data['migrated'] ) {
738
  if ( is_array( $answer['multicategories'] ) ) {
739
  foreach ( $answer['multicategories'] as $category ) {
740
+ $category_name_object = get_term_by( 'id', $category, 'qsm_category' );
741
  if ( $category_name_object->name == $category_name && '11' !== $answer['question_type'] ) {
742
  $total_questions += 1;
743
  if ( 'correct' == $answer['correct'] ) {
988
  $mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
989
  $disable_description_on_result = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'disable_description_on_result' );
990
  // Get question setting
991
+ $question_settings = isset( $questions[ $answer['id'] ]['settings'] ) ? $questions[ $answer['id'] ]['settings'] : array();
992
+ $question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer['question_title'], "Question-{$answer['id']}", 'QSM Questions' );
993
  $question_description = '';
994
  if ( ! empty( $answer[0] ) ) {
995
+ $question_description = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[0], "question-description-{$answer['id']}", 'QSM Questions' );
996
  }
997
  if ( isset( $answer['question_title'] ) && '' !== $answer['question_title'] ) {
998
  $add_br = '';
1087
  foreach ( $total_answers as $key => $single_answer ) {
1088
  $show_user_answer = $new_array_user_answer[ $key ];
1089
 
1090
+ $is_answer_correct = 0;
1091
+ if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
1092
+ $decode_show_user_answer = htmlspecialchars_decode( $show_user_answer, ENT_QUOTES );
1093
+ $decode_single_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' );
1094
+ } else {
1095
+ $decode_show_user_answer = htmlspecialchars_decode( mb_strtoupper( $show_user_answer ), ENT_QUOTES );
1096
+ $decode_single_user_answer = mb_strtoupper( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) );
1097
+ }
1098
+
1099
  if ( $decode_show_user_answer == $decode_single_user_answer ) {
1100
+ $is_answer_correct = 1;
1101
  }
1102
  $index = $key + 1;
 
1103
  if ( $is_answer_correct ) {
1104
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">(' . $index . ') ' . $show_user_answer . '</span>';
1105
  } else {
1112
  }
1113
  }
1114
  } else {
1115
+ $options = array();
1116
  foreach ( $total_answers as $key => $single_answer ) {
1117
+ if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
1118
+ $options[] = htmlspecialchars_decode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ), ENT_QUOTES );
1119
+ } else {
1120
+ $options[] = mb_strtoupper( htmlspecialchars_decode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ), ENT_QUOTES ) );
1121
+ }
1122
  }
1123
 
1124
  if ( sizeof( $new_array_user_answer ) < sizeof( $total_answers ) ) {
1125
  foreach ( $new_array_user_answer as $show_user_answer ) {
1126
+ if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
1127
+ $key = array_search( $show_user_answer , $options ,true);
1128
+ }else {
1129
+ $key = array_search( mb_strtoupper( $show_user_answer ), $options ,true);
1130
+ }
1131
  if ( false !== $key ) {
1132
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . htmlspecialchars_decode( $show_user_answer, ENT_QUOTES ) . '</span>';
1133
  } else {
1139
  }
1140
  } else {
1141
  foreach ( $new_array_user_answer as $show_user_answer ) {
1142
+ if ( isset($answer['case_sensitive']) && 1 === intval( $answer['case_sensitive'] ) ) {
1143
+ $key = array_search( $show_user_answer , $options,true );
1144
+ }else {
1145
+ $key = array_search( mb_strtoupper( $show_user_answer ), $options,true );
1146
+ }
1147
+
1148
  if ( false !== $key ) {
1149
  $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . $show_user_answer . '</span>';
1150
  } else {
1151
+
1152
  if ( '' === $show_user_answer ) {
1153
  $show_user_answer = 'No answer provided';
1154
  }
1155
+ $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . $show_user_answer . '</span>';
 
 
 
 
1156
  }
1157
  }
1158
  }
1168
  } elseif ( 13 == $answer['question_type'] ) {
1169
  $questionid = $questions[ $answer['id'] ]['question_id'];
1170
  $question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
1171
+ $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '', $mlw_question_answer_display );
1172
+ $mlw_question_answer_display = str_replace( '%USER_ANSWER%', $answer['points'], $mlw_question_answer_display );
1173
  } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
1174
  $question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
1175
  } else {
1189
  } elseif ( 13 == $answer['question_type'] ) {
1190
  $questionid = $questions[ $answer['id'] ]['question_id'];
1191
  $question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
1192
+ $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '', $mlw_question_answer_display );
1193
+ $mlw_question_answer_display = str_replace( '%USER_ANSWER%', $answer['points'], $mlw_question_answer_display );
1194
  } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
1195
  $question_type = $answer['question_type'];
1196
  $question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
1212
  $question_with_answer_text .= "$open_span_tag" . trim( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) . '</span>';
1213
  }
1214
  } else {
1215
+ $question_with_answer_text .= '<span class="qsm-user-answer-text">' . preg_replace( "/[\n\r]+/", '', nl2br( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) ) . '</span>';
1216
  }
1217
  }
1218
  }
1227
  } else {
1228
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . trim( htmlspecialchars_decode( $answer[1], ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
1229
  }
1230
+ } elseif ( 13 == $answer['question_type'] ) {
1231
+ $mlw_question_answer_display = str_replace( '%USER_ANSWER%', $answer['points'], $mlw_question_answer_display );
1232
+ $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '', $mlw_question_answer_display );
1233
  } elseif ( in_array( $answer['question_type'], $use_custom_user_answer_template, true ) ) {
1234
  $qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
1235
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
1248
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . do_shortcode( $user_answer_new ) . $close_span_with_br, $mlw_question_answer_display );
1249
  }
1250
  }
1251
+ $answer_2 = ! empty( $answer[2] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[2], 'answer-' . $answer[2], 'QSM Answers' ) : 'NA';
1252
  if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
1253
  $qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
1254
+ $qsm_correct_ans = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qsm_correct_ans, 'answer-' . $qsm_correct_ans, 'QSM Answers' );
1255
  $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
1256
  } elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
1257
  $image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
1343
  function qmn_polar_display_on_resultspage( $id, $question, $answers, $answer ) {
1344
  $question_display = '';
1345
  global $mlwQuizMasterNext;
1346
+ $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
1347
+ $answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
1348
+ $image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
1349
+ $image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
1350
+ $input_text = '';
1351
+ $first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
1352
+ $second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
1353
+ $mid_point = ( $second_point - $first_point ) / 2;
1354
+ $is_reverse = false;
1355
  if ( $first_point > $second_point ) {
1356
  $is_reverse = true;
1357
  $mid_point = ( $first_point - $second_point ) / 2;
1396
  }
1397
  }
1398
 
1399
+ $input_text .= "<div class='left-polar-title' $left_polar_title_style >";
1400
+ if ( 'image' === $answerEditor ) {
1401
+ $size_style = '';
1402
+ if ( ! empty($image_width) ) {
1403
+ $size_style .= 'width:'.$image_width.'px !important;';
1404
+ }
1405
+ if ( ! empty($image_height) ) {
1406
+ $size_style .= ' height:'.$image_height.'px !important;';
1407
+ }
1408
+ $left_image = $answers[0][0];
1409
+ $caption_text = trim( htmlspecialchars_decode( $answers[0][3], ENT_QUOTES ) );
1410
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
1411
+ $input_text .= '<img src="'.esc_url( trim( htmlspecialchars_decode( $left_image, ENT_QUOTES ) ) ).'" style="'.esc_attr( $size_style ).'" />';
1412
+ $input_text .= '<span class="qsm_image_caption">'.esc_html( $caption_text ).'</span>';
1413
+ } else {
1414
+ $left_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[0][0], "answer-" . $answers[0][0], "QSM Answers" );
1415
+ $input_text .= do_shortcode( wp_kses_post( $left_title ) );
1416
+ }
1417
+
1418
+ $input_text .= "</div>";
1419
+ $input_text .= "<div class='slider-main-wrapper'><input type='hidden' class='qmn_polar $mlw_require_class' id='question" . esc_attr( $id ) . "' name='question" . esc_attr( $id ) . "' />";
1420
+ $input_text .= '<div id="slider-' . esc_attr( $id ) . '"' . $slider_date_atts . '></div></div>';
1421
+ $input_text .= "<div class='right-polar-title' $right_polar_title_style>";
1422
+ if ( 'image' === $answerEditor ) {
1423
+ $size_style = '';
1424
+ if ( ! empty($image_width) ) {
1425
+ $size_style .= 'width:'.$image_width.'px !important;';
1426
+ }
1427
+ if ( ! empty($image_height) ) {
1428
+ $size_style .= ' height:'.$image_height.'px !important;';
1429
+ }
1430
+ $right_image = $answers[1][0];
1431
+ $caption_text = trim( htmlspecialchars_decode( $answers[1][3], ENT_QUOTES ) );
1432
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
1433
+ $input_text .= '<img src="'.esc_url( trim( htmlspecialchars_decode( $right_image, ENT_QUOTES ) ) ).'" style="'.esc_attr( $size_style ).'" />';
1434
+ $input_text .= '<span class="qsm_image_caption">'.esc_html( $caption_text ).'</span>';
1435
+ } else {
1436
+ $right_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answers[1][0], "answer-" . $answers[0][0], "QSM Answers" );
1437
+ $input_text .= do_shortcode( wp_kses_post( $right_title ) );
1438
+ }
1439
+ $input_text .= "</div>";
1440
+ $question = $input_text;
1441
+ $question_display .= "<span class='mlw_qmn_question mlw-qmn-question-result-$id question-type-polar-s'>" . do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) . '</span>';
1442
  return apply_filters( 'qmn_polar_display_front', $question_display, $id, $question, $answers );
1443
  }
1444
 
1513
  }
1514
  }
1515
  if ( '' !== $new_question_title ) {
1516
+ $new_question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $new_question_title, ENT_QUOTES ), "Question-{$question_id}", 'QSM Questions' );
1517
+ $question_display .= "<div class='mlw_qmn_new_question'>" . $new_question_title . '</div>';
1518
  $polar_extra_class .= ' qsm_remove_bold';
1519
  }
1520
  $question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" . $question_numbering . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
php/template-variables/qsm-tempvar-question-answers.php CHANGED
@@ -30,7 +30,14 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
30
  }
31
  $image_class = '';
32
  if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] ) {
33
- $show_user_answer = '<img src="' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '"/>';
 
 
 
 
 
 
 
34
  $image_class = 'qmn_image_option';
35
  } else {
36
  $show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' );
30
  }
31
  $image_class = '';
32
  if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] ) {
33
+ $size_style = '';
34
+ if ( ! empty($question_settings['image_size-width']) ) {
35
+ $size_style .= 'width:'.$question_settings['image_size-width'].'px !important;';
36
+ }
37
+ if ( ! empty($question_settings['image_size-height']) ) {
38
+ $size_style .= ' height:'.$question_settings['image_size-height'].'px !important;';
39
+ }
40
+ $show_user_answer = '<img src="' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '" style="' . esc_attr( $size_style ) . '" />';
41
  $image_class = 'qmn_image_option';
42
  } else {
43
  $show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' );
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.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -163,6 +163,21 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
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
4
  Requires at least: 4.9
5
  Tested up to: 6.0
6
  Requires PHP: 5.4
7
+ Stable tag: 8.0.3
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.3 (July 26, 2022) =
167
+ * Feature: Added option to enable/disable case sensitive answer for fill-in blank question
168
+ * Feature: Added option to enable/disable MathJax
169
+ * Feature: Added option to enable/disable emails notifications
170
+ * Feature: Added option to set images size for image type answers
171
+ * Feature: Added %ANSWER_X% variables to show user's answer to a specific question
172
+ * Feature: Added translation support for all Javascript string messages
173
+ * Feature: Added image answer support for polar question type
174
+ * Bug: Fixed display issue with leaderboard customization block
175
+ * Bug: Fixed issue with questions count in quiz list page
176
+ * Bug: Fixed issue with %QUESTION_ANSWER_X% variables
177
+ * Bug: Fixed issue while deleting/duplicating old quizzes
178
+ * Bug: Fixed issue with timer while using pagination
179
+ * Enhancement: Improved UI for image type answers options
180
+
181
  = 8.0.2 (June 23, 2022) =
182
  * Bug: Fixed scoring issue while using random questions
183
  * Bug: Fixed issue with file question type validation settings
templates/qmn_amethyst.css CHANGED
@@ -136,11 +136,13 @@ label.inline .mlw_qmn_question,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
- display: inline;
140
- margin: 0 10px 0 5px;
 
141
  font-weight: normal;
142
  font-size: 14px;
143
  cursor: pointer;
 
144
  }
145
 
146
  .quiz_section.text-block h2 {
@@ -201,7 +203,27 @@ border: 1px solid #e3e3e3;
201
  .qmn_fill_blank.medium { width: 100px; }
202
  .qmn_fill_blank.large { width: 150px; }
203
 
 
 
 
 
 
 
 
 
 
 
 
 
204
 
 
 
 
 
 
 
 
 
205
  /* Alerts and error state */
206
 
207
  .qmn_error_message {
@@ -396,10 +418,6 @@ border: 1px solid #e3e3e3;
396
  font-size: 18px;
397
  }
398
 
399
- .quiz_section.radio .qmn_mc_answer_wrap label {
400
- font-size: 18px;
401
- }
402
-
403
  .quiz_section p.form-help { font-size: 14px; }
404
 
405
  .quiz_section select,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
+ display: inline-block;
140
+ margin: 0 5px;
141
+ padding: 0;
142
  font-weight: normal;
143
  font-size: 14px;
144
  cursor: pointer;
145
+ max-width: calc(100% - 40px);
146
  }
147
 
148
  .quiz_section.text-block h2 {
203
  .qmn_fill_blank.medium { width: 100px; }
204
  .qmn_fill_blank.large { width: 150px; }
205
 
206
+ .qsm-results-page .qmn_image_option,
207
+ .quiz_section .qmn_image_option {
208
+ width: 48%;
209
+ height: 250px;
210
+ display: inline-flex !important;
211
+ position: relative;
212
+ flex-wrap: nowrap;
213
+ overflow: hidden;
214
+ padding: 1%;
215
+ box-sizing: border-box;
216
+ align-items: flex-end;
217
+ }
218
 
219
+ .qsm-results-page .qmn_image_option input[type="radio"],
220
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
221
+ .quiz_section .qmn_image_option input[type="radio"],
222
+ .quiz_section .qmn_image_option input[type="checkbox"] {
223
+ margin: 0 0 3px;
224
+ min-width: 15px;
225
+ min-height: 15px;
226
+ }
227
  /* Alerts and error state */
228
 
229
  .qmn_error_message {
418
  font-size: 18px;
419
  }
420
 
 
 
 
 
421
  .quiz_section p.form-help { font-size: 14px; }
422
 
423
  .quiz_section select,
templates/qmn_base.css CHANGED
@@ -136,11 +136,13 @@ label.inline .mlw_qmn_question,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
- display: inline;
140
- margin: 0 10px 0 5px;
 
141
  font-weight: normal;
142
  font-size: 14px;
143
  cursor: pointer;
 
144
  }
145
 
146
  .quiz_section.text-block h2 {
@@ -200,6 +202,27 @@ border: 1px solid #e3e3e3;
200
  .qmn_fill_blank.medium { width: 100px; }
201
  .qmn_fill_blank.large { width: 150px; }
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
 
204
  /* Alerts and error state */
205
 
@@ -543,10 +566,6 @@ border: 1px solid #e3e3e3;
543
  font-size: 18px;
544
  }
545
 
546
- .quiz_section.radio .qmn_mc_answer_wrap label {
547
- font-size: 18px;
548
- }
549
-
550
  .quiz_section p.form-help { font-size: 14px; }
551
 
552
  .quiz_section select,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
+ display: inline-block;
140
+ margin: 0 5px;
141
+ padding: 0;
142
  font-weight: normal;
143
  font-size: 14px;
144
  cursor: pointer;
145
+ max-width: calc(100% - 40px);
146
  }
147
 
148
  .quiz_section.text-block h2 {
202
  .qmn_fill_blank.medium { width: 100px; }
203
  .qmn_fill_blank.large { width: 150px; }
204
 
205
+ .qsm-results-page .qmn_image_option,
206
+ .quiz_section .qmn_image_option {
207
+ width: 48%;
208
+ height: 250px;
209
+ display: inline-flex !important;
210
+ position: relative;
211
+ flex-wrap: nowrap;
212
+ overflow: hidden;
213
+ padding: 1%;
214
+ box-sizing: border-box;
215
+ align-items: flex-end;
216
+ }
217
+
218
+ .qsm-results-page .qmn_image_option input[type="radio"],
219
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
220
+ .quiz_section .qmn_image_option input[type="radio"],
221
+ .quiz_section .qmn_image_option input[type="checkbox"] {
222
+ margin: 0 0 3px;
223
+ min-width: 15px;
224
+ min-height: 15px;
225
+ }
226
 
227
  /* Alerts and error state */
228
 
566
  font-size: 18px;
567
  }
568
 
 
 
 
 
569
  .quiz_section p.form-help { font-size: 14px; }
570
 
571
  .quiz_section select,
templates/qmn_emerald.css CHANGED
@@ -135,11 +135,13 @@ label.inline .mlw_qmn_question,
135
  .quiz_section .qmn_radio_answers label,
136
  .quiz_section .qmn_check_answers label,
137
  .quiz_section .qmn_accept_answers label {
138
- display: inline;
139
- margin: 0 10px 0 5px;
 
140
  font-weight: normal;
141
  font-size: 14px;
142
  cursor: pointer;
 
143
  }
144
 
145
  .quiz_section.text-block h2 {
@@ -199,7 +201,27 @@ border: 1px solid #e3e3e3;
199
  .qmn_fill_blank.small { width: 50px; }
200
  .qmn_fill_blank.medium { width: 100px; }
201
  .qmn_fill_blank.large { width: 150px; }
 
 
 
 
 
 
 
 
 
 
 
 
202
 
 
 
 
 
 
 
 
 
203
 
204
  /* Alerts and error state */
205
 
@@ -395,10 +417,6 @@ border: 1px solid #e3e3e3;
395
  font-size: 18px;
396
  }
397
 
398
- .quiz_section.radio .qmn_mc_answer_wrap label {
399
- font-size: 18px;
400
- }
401
-
402
  .quiz_section p.form-help { font-size: 14px; }
403
 
404
  .quiz_section select,
135
  .quiz_section .qmn_radio_answers label,
136
  .quiz_section .qmn_check_answers label,
137
  .quiz_section .qmn_accept_answers label {
138
+ display: inline-block;
139
+ margin: 0 5px;
140
+ padding: 0;
141
  font-weight: normal;
142
  font-size: 14px;
143
  cursor: pointer;
144
+ max-width: calc(100% - 40px);
145
  }
146
 
147
  .quiz_section.text-block h2 {
201
  .qmn_fill_blank.small { width: 50px; }
202
  .qmn_fill_blank.medium { width: 100px; }
203
  .qmn_fill_blank.large { width: 150px; }
204
+ .qsm-results-page .qmn_image_option,
205
+ .quiz_section .qmn_image_option {
206
+ width: 48%;
207
+ height: 250px;
208
+ display: inline-flex !important;
209
+ position: relative;
210
+ flex-wrap: nowrap;
211
+ overflow: hidden;
212
+ padding: 1%;
213
+ box-sizing: border-box;
214
+ align-items: flex-end;
215
+ }
216
 
217
+ .qsm-results-page .qmn_image_option input[type="radio"],
218
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
219
+ .quiz_section .qmn_image_option input[type="radio"],
220
+ .quiz_section .qmn_image_option input[type="checkbox"] {
221
+ margin: 0 0 3px;
222
+ min-width: 15px;
223
+ min-height: 15px;
224
+ }
225
 
226
  /* Alerts and error state */
227
 
417
  font-size: 18px;
418
  }
419
 
 
 
 
 
420
  .quiz_section p.form-help { font-size: 14px; }
421
 
422
  .quiz_section select,
templates/qmn_gray.css CHANGED
@@ -136,11 +136,13 @@ label.inline .mlw_qmn_question,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
- display: inline;
140
- margin: 0 10px 0 5px;
 
141
  font-weight: normal;
142
  font-size: 14px;
143
  cursor: pointer;
 
144
  }
145
 
146
  .quiz_section.text-block h2 {
@@ -200,7 +202,27 @@ border: 1px solid #e3e3e3;
200
  .qmn_fill_blank.small { width: 50px; }
201
  .qmn_fill_blank.medium { width: 100px; }
202
  .qmn_fill_blank.large { width: 150px; }
 
 
 
 
 
 
 
 
 
 
 
 
203
 
 
 
 
 
 
 
 
 
204
 
205
  /* Alerts and error state */
206
 
@@ -362,10 +384,6 @@ border: 1px solid #e3e3e3;
362
  font-size: 18px;
363
  }
364
 
365
- .quiz_section.radio .qmn_mc_answer_wrap label {
366
- font-size: 18px;
367
- }
368
-
369
  .quiz_section p.form-help { font-size: 14px; }
370
 
371
  .quiz_section select,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
+ display: inline-block;
140
+ margin: 0 5px;
141
+ padding: 0;
142
  font-weight: normal;
143
  font-size: 14px;
144
  cursor: pointer;
145
+ max-width: calc(100% - 40px);
146
  }
147
 
148
  .quiz_section.text-block h2 {
202
  .qmn_fill_blank.small { width: 50px; }
203
  .qmn_fill_blank.medium { width: 100px; }
204
  .qmn_fill_blank.large { width: 150px; }
205
+ .qsm-results-page .qmn_image_option,
206
+ .quiz_section .qmn_image_option {
207
+ width: 48%;
208
+ height: 250px;
209
+ display: inline-flex !important;
210
+ position: relative;
211
+ flex-wrap: nowrap;
212
+ overflow: hidden;
213
+ padding: 1%;
214
+ box-sizing: border-box;
215
+ align-items: flex-end;
216
+ }
217
 
218
+ .qsm-results-page .qmn_image_option input[type="radio"],
219
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
220
+ .quiz_section .qmn_image_option input[type="radio"],
221
+ .quiz_section .qmn_image_option input[type="checkbox"] {
222
+ margin: 0 0 3px;
223
+ min-width: 15px;
224
+ min-height: 15px;
225
+ }
226
 
227
  /* Alerts and error state */
228
 
384
  font-size: 18px;
385
  }
386
 
 
 
 
 
387
  .quiz_section p.form-help { font-size: 14px; }
388
 
389
  .quiz_section select,
templates/qmn_primary.css CHANGED
@@ -155,18 +155,16 @@ label.inline .mlw_qmn_question,
155
  margin: 5px 0 5px 0;
156
  }
157
 
158
- .qmn_radio_answers .qmn_mc_answer_wrap {
159
- cursor: pointer;
160
- }
161
-
162
  .quiz_section .qmn_radio_answers label,
163
  .quiz_section .qmn_check_answers label,
164
  .quiz_section .qmn_accept_answers label {
165
- display: inline;
166
- margin: 0 10px 0 5px;
 
167
  font-weight: normal;
168
  font-size: 14px;
169
  cursor: pointer;
 
170
  }
171
 
172
  .quiz_section.text-block h2 {
@@ -225,21 +223,6 @@ label.inline .mlw_qmn_question,
225
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
226
  }
227
 
228
- .qsm-results-page .qmn_image_option,
229
- .quiz_section .qmn_image_option {
230
- width: 47%;
231
- height: 250px;
232
- display: inline-flex !important;
233
- /* position: relative; */
234
- }
235
-
236
- .qsm-results-page .qmn_image_option input[type="radio"],
237
- .qsm-results-page .qmn_image_option input[type="checkbox"],
238
- .quiz_section .qmn_image_option input[type="radio"],
239
- .quiz_section .qmn_image_option input[type="checkbox"] {
240
- margin-top: 263px;
241
- }
242
-
243
  .qsm-results-page .qmn_image_option img,
244
  .quiz_section .qmn_image_option img {
245
  width: 100%;
@@ -267,7 +250,27 @@ label.inline .mlw_qmn_question,
267
  .qmn_fill_blank.large {
268
  width: 150px;
269
  }
 
 
 
 
 
 
 
 
 
 
 
 
270
 
 
 
 
 
 
 
 
 
271
 
272
  /* Alerts and error state */
273
 
@@ -488,10 +491,6 @@ label.inline .mlw_qmn_question,
488
  font-size: 18px;
489
  }
490
 
491
- .quiz_section .qmn_radio_answers .qmn_mc_answer_wrap label {
492
- font-size: 18px;
493
- }
494
-
495
  .quiz_section p.form-help {
496
  font-size: 14px;
497
  }
155
  margin: 5px 0 5px 0;
156
  }
157
 
 
 
 
 
158
  .quiz_section .qmn_radio_answers label,
159
  .quiz_section .qmn_check_answers label,
160
  .quiz_section .qmn_accept_answers label {
161
+ display: inline-block;
162
+ margin: 0 5px;
163
+ padding: 0;
164
  font-weight: normal;
165
  font-size: 14px;
166
  cursor: pointer;
167
+ max-width: calc(100% - 40px);
168
  }
169
 
170
  .quiz_section.text-block h2 {
223
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  .qsm-results-page .qmn_image_option img,
227
  .quiz_section .qmn_image_option img {
228
  width: 100%;
250
  .qmn_fill_blank.large {
251
  width: 150px;
252
  }
253
+ .qsm-results-page .qmn_image_option,
254
+ .quiz_section .qmn_image_option {
255
+ width: 48%;
256
+ height: 250px;
257
+ display: inline-flex !important;
258
+ position: relative;
259
+ flex-wrap: nowrap;
260
+ overflow: hidden;
261
+ padding: 1%;
262
+ box-sizing: border-box;
263
+ align-items: flex-end;
264
+ }
265
 
266
+ .qsm-results-page .qmn_image_option input[type="radio"],
267
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
268
+ .quiz_section .qmn_image_option input[type="radio"],
269
+ .quiz_section .qmn_image_option input[type="checkbox"] {
270
+ margin: 0 0 3px;
271
+ min-width: 15px;
272
+ min-height: 15px;
273
+ }
274
 
275
  /* Alerts and error state */
276
 
491
  font-size: 18px;
492
  }
493
 
 
 
 
 
494
  .quiz_section p.form-help {
495
  font-size: 14px;
496
  }
templates/qmn_turquoise.css CHANGED
@@ -136,11 +136,13 @@ label.inline .mlw_qmn_question,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
- display: inline;
140
- margin: 0 10px 0 5px;
 
141
  font-weight: normal;
142
  font-size: 14px;
143
  cursor: pointer;
 
144
  }
145
 
146
  .quiz_section.text-block h2 {
@@ -200,7 +202,27 @@ border: 1px solid #e3e3e3;
200
  .qmn_fill_blank.small { width: 50px; }
201
  .qmn_fill_blank.medium { width: 100px; }
202
  .qmn_fill_blank.large { width: 150px; }
 
 
 
 
 
 
 
 
 
 
 
 
203
 
 
 
 
 
 
 
 
 
204
 
205
  /* Alerts and error state */
206
 
@@ -396,10 +418,6 @@ border: 1px solid #e3e3e3;
396
  font-size: 18px;
397
  }
398
 
399
- .quiz_section.radio .qmn_mc_answer_wrap label {
400
- font-size: 18px;
401
- }
402
-
403
  .quiz_section p.form-help { font-size: 14px; }
404
 
405
  .quiz_section select,
136
  .quiz_section .qmn_radio_answers label,
137
  .quiz_section .qmn_check_answers label,
138
  .quiz_section .qmn_accept_answers label {
139
+ display: inline-block;
140
+ margin: 0 5px;
141
+ padding: 0;
142
  font-weight: normal;
143
  font-size: 14px;
144
  cursor: pointer;
145
+ max-width: calc(100% - 40px);
146
  }
147
 
148
  .quiz_section.text-block h2 {
202
  .qmn_fill_blank.small { width: 50px; }
203
  .qmn_fill_blank.medium { width: 100px; }
204
  .qmn_fill_blank.large { width: 150px; }
205
+ .qsm-results-page .qmn_image_option,
206
+ .quiz_section .qmn_image_option {
207
+ width: 48%;
208
+ height: 250px;
209
+ display: inline-flex !important;
210
+ position: relative;
211
+ flex-wrap: nowrap;
212
+ overflow: hidden;
213
+ padding: 1%;
214
+ box-sizing: border-box;
215
+ align-items: flex-end;
216
+ }
217
 
218
+ .qsm-results-page .qmn_image_option input[type="radio"],
219
+ .qsm-results-page .qmn_image_option input[type="checkbox"],
220
+ .quiz_section .qmn_image_option input[type="radio"],
221
+ .quiz_section .qmn_image_option input[type="checkbox"] {
222
+ margin: 0 0 3px;
223
+ min-width: 15px;
224
+ min-height: 15px;
225
+ }
226
 
227
  /* Alerts and error state */
228
 
418
  font-size: 18px;
419
  }
420
 
 
 
 
 
421
  .quiz_section p.form-help { font-size: 14px; }
422
 
423
  .quiz_section select,