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

Version Description

(June 13, 2022) = * Feature: Added WPML compatibility * Feature: Added option to select correct answer logic * Feature: Added option to show and hide Opt-in question type on result page * Feature: Added validation options in contact form fields * Enhancement: Improved UI for question editor in admin panel * Enhancement: Redesigned contact tab interface in admin panel * Enhancement: Autosave last question when user creates new question * Enhancement: Added column to show the number of questions in quiz list * Enhancement: Added qsm_results_css_inliner hook to edit email template * Bug: Fixed issue with quiz links * Bug: Fixed deletion issue with trash quizzes * Bug: Fixed issues with random questions order * Bug: Fixed %AMOUNT_INCORRECT% & %AMOUNT_ATTEMPTED% variables * Bug: Fixed issue while updating quiz title * Bug: Fixed issue with duplicate question while importing from question bank * Bug: Fixed JS issue with polar question type * Bug: Fixed several PHP warning and errors * Bug: Fixed issue with HTML tags in answer text editor

Download this release

Release Info

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

Code changes from version 7.3.14 to 8.0

Files changed (60) hide show
  1. assets/Puzzle.svg +3 -0
  2. assets/Support.svg +3 -0
  3. css/admin-dashboard.css +12 -1
  4. css/common.css +3 -1
  5. css/qsm-admin-question-rtl.css +4 -870
  6. css/qsm-admin-question.css +501 -749
  7. css/qsm-admin-rtl.css +21 -2175
  8. css/qsm-admin.css +807 -729
  9. data/parsing_script.json +1 -1
  10. js/qsm-admin.js +378 -390
  11. js/qsm-common.js +4 -4
  12. js/qsm-quiz.js +124 -57
  13. mlw_quizmaster2.php +62 -30
  14. php/admin/about-page.php +1 -2
  15. php/admin/addons-page.php +7 -2
  16. php/admin/admin-dashboard.php +75 -54
  17. php/admin/admin-results-details-page.php +1 -1
  18. php/admin/functions.php +262 -111
  19. php/admin/options-page-contact-tab.php +146 -30
  20. php/admin/options-page-email-tab.php +1 -4
  21. php/admin/options-page-option-tab.php +1 -6
  22. php/admin/options-page-questions-tab.php +252 -295
  23. php/admin/options-page-results-page-tab.php +1 -5
  24. php/admin/options-page-text-tab.php +7 -7
  25. php/admin/quiz-options-page.php +134 -51
  26. php/admin/quizzes-page.php +458 -728
  27. php/admin/settings-page.php +145 -69
  28. php/admin/tools-page.php +5 -16
  29. php/classes/class-qmn-background-process.php +2 -2
  30. php/classes/class-qmn-log-manager.php +4 -1
  31. php/classes/class-qmn-plugin-helper.php +182 -11
  32. php/classes/class-qmn-quiz-creator.php +54 -17
  33. php/classes/class-qmn-quiz-manager.php +126 -112
  34. php/classes/class-qsm-contact-manager.php +273 -94
  35. php/classes/class-qsm-emails.php +45 -6
  36. php/classes/class-qsm-fields.php +198 -34
  37. php/classes/class-qsm-install.php +462 -364
  38. php/classes/class-qsm-questions.php +16 -4
  39. php/classes/class-qsm-results-pages.php +9 -5
  40. php/classes/class-qsm-settings.php +14 -0
  41. php/classes/class-qsm-tracking.php +1 -1
  42. php/classes/question-types/class-question-review-choice.php +4 -3
  43. php/classes/question-types/class-question-review.php +2 -0
  44. php/question-types.php +1 -1
  45. php/question-types/qsm-question-title.php +7 -3
  46. php/question-types/qsm-question-type-dropdown.php +3 -1
  47. php/question-types/qsm-question-type-fill-in-the-blanks.php +26 -6
  48. php/question-types/qsm-question-type-multiple-choice-horizontal.php +21 -11
  49. php/question-types/qsm-question-type-multiple-choice.php +11 -5
  50. php/question-types/qsm-question-type-multiple-response-horizontal.php +18 -9
  51. php/question-types/qsm-question-type-multiple-response.php +20 -9
  52. php/question-types/qsm-question-type-opt-in.php +30 -3
  53. php/question-types/qsm-question-type-paragraph.php +1 -1
  54. php/question-types/qsm-question-type-polar.php +9 -3
  55. php/question-types/qsm-question-type-text-or-html.php +5 -1
  56. php/rest-api.php +47 -40
  57. php/template-variables.php +31 -19
  58. php/template-variables/qsm-tempvar-question-answers.php +55 -40
  59. readme.txt +22 -3
  60. templates/qmn_primary.css +9 -0
assets/Puzzle.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M36.584 16C36.8516 15.3875 37 14.7111 37 14C37 11.2386 34.7614 9 32 9C29.2386 9 27 11.2386 27 14C27 14.7111 27.1484 15.3875 27.416 16H16V27.416C15.3875 27.1484 14.7111 27 14 27C11.2386 27 9 29.2386 9 32C9 34.7614 11.2386 37 14 37C14.7111 37 15.3875 36.8516 16 36.584V48H27.416C27.1484 47.3875 27 46.7111 27 46C27 43.2386 29.2386 41 32 41C34.7614 41 37 43.2386 37 46C37 46.7111 36.8516 47.3875 36.584 48H48V36.584C47.3875 36.8516 46.7111 37 46 37C43.2386 37 41 34.7614 41 32C41 29.2386 43.2386 27 46 27C46.7111 27 47.3875 27.1484 48 27.416V16H36.584Z" fill="#757575"/>
3
+ </svg>
assets/Support.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16 23C16 15.8203 21.8203 10 29 10H35C42.1797 10 48 15.8203 48 23V24H46V43H48.5V48C48.5 50.2091 46.7091 52 44.5 52H38V51C38 50.4477 37.5523 50 37 50H27C26.4477 50 26 50.4477 26 51V57C26 57.5523 26.4477 58 27 58H37C37.5523 58 38 57.5523 38 57V56H44.5C48.9183 56 52.5 52.4183 52.5 48V42.7092C53.9659 42.1159 55 40.6787 55 39V28C55 26.1362 53.7252 24.5701 52 24.126V23C52 13.6112 44.3888 6 35 6H29C19.6112 6 12 13.6112 12 23V24.126C10.2748 24.5701 9 26.1362 9 28V39C9 41.2091 10.7909 43 13 43H18V24H16V23Z" fill="#448AB9"/>
3
+ </svg>
css/admin-dashboard.css CHANGED
@@ -555,7 +555,6 @@ ul.popuar-addon-ul::after {
555
  #model-wizard .qsm_popular_addons div.popuar-addon-ul>div>a {
556
  display: block;
557
  width: 100%;
558
- height: 100%;
559
  }
560
 
561
  #model-wizard .qsm_popular_addons a:active,
@@ -601,6 +600,18 @@ ul.popuar-addon-ul::after {
601
  opacity: 0.1;
602
  }
603
 
 
 
 
 
 
 
 
 
 
 
 
 
604
  #accordion .ui-accordion-header-icon {
605
  position: absolute;
606
  right: 24px;
555
  #model-wizard .qsm_popular_addons div.popuar-addon-ul>div>a {
556
  display: block;
557
  width: 100%;
 
558
  }
559
 
560
  #model-wizard .qsm_popular_addons a:active,
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;
css/common.css CHANGED
@@ -357,4 +357,6 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
357
  .qsm_quiz_processing_box .qsm_quiz_processing_message{
358
  margin: 10px 0;
359
  }
360
-
 
 
357
  .qsm_quiz_processing_box .qsm_quiz_processing_message{
358
  margin: 10px 0;
359
  }
360
+ .qsm-text-correct-option.not-opted {
361
+ color: #6f7479;
362
+ }
css/qsm-admin-question-rtl.css CHANGED
@@ -1,870 +1,4 @@
1
- .question-controls {
2
- display: flex;
3
- flex-direction: column;
4
- justify-content: space-between;
5
- align-items: center;
6
- }
7
-
8
- #delete-question-button {
9
- background-color: #dc3232;
10
- float: left;
11
- }
12
-
13
- #unlink-question-button {
14
- float: left;
15
- margin-right: 5px;
16
- }
17
-
18
- #modal-7 {
19
- max-width: 500px;
20
- }
21
-
22
- #modal-7 hr {
23
- margin: 0 -30px;
24
- }
25
-
26
- #modal-7 header {
27
- margin: -10px 0 10px 0;
28
- }
29
-
30
- #modal-7 .qsm-popup__close {
31
- margin: -10px 0 0 -10px;
32
- font-size: 20px;
33
- }
34
-
35
- #modal-7-title {
36
- color: gray;
37
- opacity: 70%;
38
- }
39
-
40
- #modal-7 footer .dashicons {
41
- font-size: 20px;
42
- margin-left: 3px;
43
- vertical-align: middle;
44
- margin-right: -10px;
45
- }
46
-
47
- #modal-7 .qsm-popup__container {
48
- max-width: 560px;
49
- padding-bottom: 20px;
50
- }
51
-
52
- .modal-7-table {
53
- font-size: 16px;
54
- }
55
-
56
- #modal-7 footer {
57
- margin-top: 15px;
58
- }
59
-
60
- .modal-7-table tr td {
61
- vertical-align: top;
62
- padding: 0 0 5px 10px
63
- }
64
-
65
- @media screen and (min-width:700px) {
66
- .question-controls {
67
- flex-direction: row;
68
- }
69
- }
70
-
71
- .page {
72
- width: 100%;
73
- background-color: #fff;
74
- margin: 20px 0;
75
- padding-bottom: 60px;
76
- /*box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.4)*/
77
- position: relative;
78
- padding-right: 15px;
79
- padding-left: 15px;
80
- box-sizing: border-box;
81
- }
82
-
83
- .page-header {
84
- display: flex;
85
- align-items: center;
86
- justify-content: space-between;
87
- background-color: #fff;
88
- padding: 25px 10px 10px 15px;
89
- /*border-bottom: 5px solid #1DD969;*/
90
- }
91
-
92
- .page-header .dashicons {
93
- color: #A6ABAF;
94
- font-size: 25px;
95
- }
96
-
97
- .page-header .dashicons.dashicons-trash {
98
- color: #dc3232;
99
- }
100
-
101
- .page-header .edit-page-button {
102
- margin: 0 10px;
103
- }
104
-
105
- .page-header .edit-page-button span {
106
- color: #1F8CBE;
107
- }
108
-
109
- .page-header span.page-number {
110
- font-size: 18px;
111
- color: #A6ABAF;
112
- margin-right: 10px;
113
- display: inline-block;
114
- font-style: italic;
115
- margin-top: 3px;
116
- }
117
-
118
- .page-header span.page-name {}
119
-
120
- .page-footer {
121
- position: absolute;
122
- bottom: 15px;
123
- width: 100%;
124
- left: 25px;
125
- }
126
-
127
- .page-footer a.button,
128
- .new-answer-button a#new-answer-button {
129
- border: 1px solid #cbcbcb;
130
- color: #7b7575;
131
- background: #F7F7F7;
132
- }
133
-
134
- .new-answer-button a#new-answer-button:hover {
135
- opacity: 0.9;
136
- }
137
-
138
- .page-footer a.button .dashicons,
139
- .new-answer-button a#new-answer-button .dashicons {
140
- line-height: 32px;
141
- }
142
-
143
- .question-create-page {
144
- text-align: center;
145
- }
146
-
147
- .question-create-page .new-page-button .dashicons {
148
- line-height: 30px;
149
- font-size: 16px;
150
- }
151
-
152
- .page-header a {
153
- text-decoration: none;
154
- }
155
-
156
- .page-header-buttons {
157
- text-align: left;
158
- }
159
-
160
- .question,
161
- .question-bank-question {
162
- padding: 10px;
163
- background-color: #F3F3F3;
164
- border: 1px solid #cbcbcb;
165
- margin: 10px 0;
166
- }
167
-
168
- .question a {
169
- text-decoration: none;
170
- }
171
-
172
- .question-content {
173
- display: flex;
174
- align-items: center;
175
- justify-content: space-between;
176
- }
177
-
178
- .question-content .dashicons {
179
- font-size: 22px;
180
- color: #1F8CBE;
181
- }
182
-
183
- .question-content .dashicons.dashicons-trash {
184
- color: #dc3232;
185
- }
186
-
187
- .question-content .dashicons.dashicons-move {
188
- color: #A6ABAF;
189
- font-size: 22px;
190
- }
191
-
192
- .question-content .question-content-text {
193
- color: #1F8CBE;
194
- font-size: 16px;
195
- font-weight: 500;
196
- }
197
-
198
- .question-content .question-category {
199
- color: #939697;
200
- font-size: 14px;
201
- font-weight: normal;
202
- font-style: italic;
203
- }
204
-
205
- .question-content>div {
206
- margin: 0 10px;
207
- }
208
-
209
- .question-content-text {
210
- flex-grow: 1;
211
- }
212
-
213
- .question-bank-question {
214
- display: flex;
215
- align-items: center;
216
- justify-content: space-between;
217
- clear: both;
218
- }
219
-
220
- .qsm-question-bank-select .qsm-select-all-label {
221
- margin-left: 15px;
222
- position: relative;
223
- top: 5px;
224
- vertical-align: top;
225
- }
226
-
227
- .qsm-question-bank-select{
228
- margin-bottom: 15px;
229
- display: flex;
230
- justify-content: space-between;
231
- align-items: center;
232
- }
233
-
234
- #qsm-import-selected-question {
235
- margin-right: 10px;
236
- }
237
-
238
- #question-bank-search-form{
239
- float: right;
240
- }
241
-
242
- .qsm-question-bank-header .qsm-popup__close {
243
- position: absolute;
244
- left: 10px;
245
- top: 25px;
246
- }
247
-
248
- .qsm-question-bank-header {
249
- border-bottom: 2px solid #e3e3e3ad;
250
- padding-bottom: 15px;
251
- }
252
-
253
- .question-bank-question div {
254
- margin: 0 10px;
255
- }
256
-
257
- .question-bank-question>div:nth-child(2) {
258
- width: 100%;
259
- }
260
-
261
- .page-new,
262
- .question-new {
263
- background-color: #fff !important;
264
- }
265
-
266
- .correct-header {
267
- text-align: left;
268
- display: none;
269
- }
270
-
271
- .answers-single {
272
- display: flex;
273
- justify-content: space-between;
274
- margin-bottom: 5px;
275
- padding: 10px 10px;
276
- background: #FAFAFA;
277
- }
278
-
279
- .answers-single:nth-child(2n+2) {
280
- background: #FFF;
281
- }
282
-
283
- .answers-single>div {
284
- margin-right: 5px;
285
- }
286
-
287
- .answer-text-div {
288
- width: 85%;
289
- }
290
-
291
- .answers-single>div:nth-child(4) {
292
- width: 12%;
293
- }
294
-
295
- .qsm-row {
296
- display: block;
297
- width: 100%;
298
- margin-bottom: 13px;
299
- font-size: 16px;
300
- }
301
-
302
- div#correct_answer_info_area {
303
- float: right;
304
- }
305
-
306
- #post-body-content .qsm-row {
307
- margin-bottom: 20px;
308
- }
309
-
310
- .qsm-row>label {
311
- font-weight: normal;
312
- display: block;
313
- margin-bottom: 7px;
314
- color: #7b7575;
315
- }
316
-
317
- .questionElements .qsm-row>label {
318
- position: relative;
319
- }
320
-
321
- .questionElements .qsm-row>label>.qsm-tooltips-icon {
322
- position: relative;
323
- top: 2px;
324
- }
325
-
326
- .questionElements .qsm-question-doc {
327
- text-decoration: none;
328
- position: absolute;
329
- left: 0;
330
- color: #969696;
331
- }
332
-
333
- #categorydiv .qsm-question-doc {
334
- left: 15px;
335
- }
336
-
337
- .questionElements .qsm-question-doc:hover {
338
- color: #0073aa;
339
- }
340
-
341
- .questionElements .qsm-row>label>.qsm-question-doc span.dashicons {
342
- font-size: 17px;
343
- width: auto;
344
- height: auto;
345
- line-height: 23px;
346
- }
347
-
348
- .questionElements .qsm-tooltips-icon .qsm-tooltips {
349
- bottom: 26px;
350
- }
351
-
352
- .questionElements .qsm-tooltips-icon {
353
- cursor: help;
354
- }
355
-
356
- .qsm-row select,
357
- .qsm-row input[type=text],
358
- .qsm-row textarea {
359
- width: 100%;
360
- max-width: 100%;
361
- }
362
-
363
- .qsm-popup {
364
- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
365
- }
366
-
367
- .qsm-popup__overlay {
368
- position: fixed;
369
- top: 0;
370
- right: 0;
371
- left: 0;
372
- bottom: 0;
373
- background: rgba(0, 0, 0, 0.6);
374
- display: flex;
375
- justify-content: center;
376
- align-items: center;
377
- z-index: 9999;
378
- }
379
-
380
- .qsm-popup__container {
381
- background-color: #fff;
382
- padding: 30px;
383
- min-width: 500px;
384
- max-width: 700px;
385
- max-height: 95vh;
386
- border-radius: 4px;
387
- overflow-y: auto;
388
- box-sizing: border-box;
389
- }
390
-
391
- .qsm-popup__header {
392
- display: flex;
393
- justify-content: space-between;
394
- align-items: center;
395
- }
396
-
397
- .qsm-popup__title {
398
- margin-top: 0;
399
- margin-bottom: 0;
400
- font-weight: 600;
401
- font-size: 1.25rem;
402
- line-height: 1.25;
403
- color: #00449e;
404
- box-sizing: border-box;
405
- }
406
-
407
- .qsm-popup__close {
408
- background: transparent;
409
- border: 0;
410
- color: #00449e;
411
- text-decoration: none;
412
- cursor: pointer;
413
- }
414
-
415
- .qsm-popup__header .qsm-popup__close:before {
416
- content: "\2715";
417
- }
418
-
419
- .qsm-popup__content {
420
- margin-top: 2rem;
421
- margin-bottom: 2rem;
422
- line-height: 1.5;
423
- color: rgba(0, 0, 0, .8);
424
- }
425
-
426
- .qsm-popup__btn {
427
- font-size: .875rem;
428
- padding-right: 1rem;
429
- padding-left: 1rem;
430
- padding-top: .5rem;
431
- padding-bottom: .5rem;
432
- background-color: #e6e6e6;
433
- color: rgba(0, 0, 0, .8);
434
- border-radius: .25rem;
435
- border-style: none;
436
- border-width: 0;
437
- cursor: pointer;
438
- -webkit-appearance: button;
439
- text-transform: none;
440
- overflow: visible;
441
- line-height: 1.15;
442
- margin: 0;
443
- will-change: transform;
444
- -moz-osx-font-smoothing: grayscale;
445
- -webkit-backface-visibility: hidden;
446
- backface-visibility: hidden;
447
- -webkit-transform: translateZ(0);
448
- transform: translateZ(0);
449
- transition: -webkit-transform .25s ease-out;
450
- transition: transform .25s ease-out;
451
- transition: transform .25s ease-out, -webkit-transform .25s ease-out;
452
- }
453
-
454
- .qsm-popup__btn:focus,
455
- .qsm-popup__btn:hover {
456
- -webkit-transform: scale(1.05);
457
- transform: scale(1.05);
458
- }
459
-
460
- .qsm-popup__btn-primary {
461
- background-color: #00449e;
462
- color: #fff;
463
- }
464
-
465
- @keyframes mmfadeIn {
466
- from {
467
- opacity: 0;
468
- }
469
-
470
- to {
471
- opacity: 1;
472
- }
473
- }
474
-
475
- @keyframes mmfadeOut {
476
- from {
477
- opacity: 1;
478
- }
479
-
480
- to {
481
- opacity: 0;
482
- }
483
- }
484
-
485
- @keyframes mmslideIn {
486
- from {
487
- transform: translateY(15%);
488
- }
489
-
490
- to {
491
- transform: translateY(0);
492
- }
493
- }
494
-
495
- @keyframes mmslideOut {
496
- from {
497
- transform: translateY(0);
498
- }
499
-
500
- to {
501
- transform: translateY(-10%);
502
- }
503
- }
504
-
505
- .qsm-popup-slide {
506
- display: none;
507
- }
508
-
509
- .qsm-popup-slide.is-open {
510
- display: block;
511
- }
512
-
513
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__overlay {
514
- animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
515
- }
516
-
517
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__container {
518
- animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
519
- }
520
-
521
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__overlay {
522
- animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
523
- }
524
-
525
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__container {
526
- animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
527
- }
528
-
529
- .qsm-popup-slide .qsm-popup__container,
530
- .qsm-popup-slide .qsm-popup__overlay {
531
- will-change: transform;
532
- }
533
-
534
- @-moz-keyframes qsm-spinner-loader {
535
- 0% {
536
- -moz-transform: rotate(0deg);
537
- transform: rotate(0deg);
538
- }
539
-
540
- 100% {
541
- -moz-transform: rotate(360deg);
542
- transform: rotate(360deg);
543
- }
544
- }
545
-
546
- @-webkit-keyframes qsm-spinner-loader {
547
- 0% {
548
- -webkit-transform: rotate(0deg);
549
- transform: rotate(0deg);
550
- }
551
-
552
- 100% {
553
- -webkit-transform: rotate(360deg);
554
- transform: rotate(360deg);
555
- }
556
- }
557
-
558
- @keyframes qsm-spinner-loader {
559
- 0% {
560
- -moz-transform: rotate(0deg);
561
- -ms-transform: rotate(0deg);
562
- -webkit-transform: rotate(0deg);
563
- transform: rotate(0deg);
564
- }
565
-
566
- 100% {
567
- -moz-transform: rotate(360deg);
568
- -ms-transform: rotate(360deg);
569
- -webkit-transform: rotate(360deg);
570
- transform: rotate(360deg);
571
- }
572
- }
573
-
574
- /* :not(:required) hides this rule from IE9 and below */
575
- .qsm-spinner-loader:not(:required) {
576
- -moz-animation: qsm-spinner-loader 1500ms infinite linear;
577
- -webkit-animation: qsm-spinner-loader 1500ms infinite linear;
578
- animation: qsm-spinner-loader 1500ms infinite linear;
579
- -moz-border-radius: 0.5em;
580
- -webkit-border-radius: 0.5em;
581
- border-radius: 0.5em;
582
- -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
583
- -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
584
- box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
585
- display: inline-block;
586
- font-size: 10px;
587
- width: 1em;
588
- height: 1em;
589
- margin: 1.5em;
590
- overflow: hidden;
591
- text-indent: 100%;
592
- }
593
-
594
- /**
595
- * Css for change-answer-editor-label
596
- */
597
- /*.change-answer-editor-label{
598
- display: inline-block;
599
- float: right;
600
- font-size: 14px;
601
- font-weight: normal !important;
602
- }*/
603
- .change-answer-editor-label>#change-answer-editor {
604
- width: auto;
605
- }
606
-
607
- a.import-button.button.disable_import {
608
- position: relative;
609
- z-index: 0;
610
- }
611
-
612
- a.import-button.button.disable_import::before {
613
- content: '';
614
- background: rgba(255, 255, 255, 0.5);
615
- width: 100%;
616
- height: 100%;
617
- right: 0;
618
- left: 0;
619
- top: 0;
620
- bottom: 0;
621
- position: absolute;
622
- z-index: 5;
623
- }
624
-
625
- #question-bank-cat {
626
- width: 150px;
627
- }
628
-
629
- .ui-state-highlight {
630
- background: #F3F3F3;
631
- border: 1px dashed #cbcbcb;
632
- height: 50px;
633
- margin: 15px 10px 0;
634
- opacity: 0.8;
635
- }
636
-
637
- .questionElements #poststuff {
638
- display: inline-block;
639
- width: 100%;
640
- background: #fff;
641
- padding: 10px;
642
- box-sizing: border-box;
643
- padding-bottom: 0;
644
- }
645
-
646
- .questionElements {
647
- padding: 15px 10px;
648
- background-color: #fff;
649
- border: 1px solid #cbcbcb;
650
- margin: 0 10px 0;
651
- box-sizing: border-box;
652
- border-top: medium none;
653
- }
654
-
655
- .questionElements .question-title {
656
- padding: 3px 8px;
657
- font-size: 1.7em;
658
- line-height: 100%;
659
- /* height: 1.7em; */
660
- width: 100%;
661
- outline: 0;
662
- margin: 0 0 3px;
663
- background-color: #fff;
664
- }
665
-
666
- .questionElements #major-publishing-actions {
667
- display: inline-block;
668
- width: 100%;
669
- box-sizing: border-box;
670
- clear: both;
671
- margin-bottom: -3px;
672
- }
673
-
674
- .questionElements #minor-publishing {
675
- padding: 10px 12px 12px;
676
- }
677
-
678
- #advanceddiv input[type="number"] {
679
- width: 100% !important;
680
- }
681
-
682
- .qsm-row .answer-header {
683
- font-weight: 500;
684
- font-size: 20px;
685
- margin-bottom: 30px;
686
- margin-top: 15px;
687
- color: #23282d;
688
- }
689
-
690
- .qsm-row .new-answer-button {
691
- text-align: center;
692
- margin-top: 15px;
693
- }
694
-
695
- #advanceddiv {
696
- margin-bottom: 0;
697
- }
698
-
699
- #answers .delete-answer-button {
700
- text-decoration: none;
701
- color: #dc3232;
702
- vertical-align: middle;
703
- }
704
-
705
- .answers-single .correct-answer {
706
- margin-left: 0;
707
- vertical-align: -webkit-baseline-middle;
708
- }
709
-
710
- .questionElements #postbox-container-1 select {
711
- border: 1px solid #dddddd;
712
- }
713
-
714
- .question-content-text * {
715
- font-size: 16px;
716
- }
717
-
718
- .question-type-description {
719
- color: #31708f;
720
- background: #d9edf7;
721
- border-color: #bce8f1;
722
- padding: 30px 15px;
723
- border-radius: 4px;
724
- font-family: Verdana, sans-serif;
725
- font-size: 15px;
726
- line-height: 21px;
727
- text-align: center;
728
- margin: 0 0 20px 0;
729
- }
730
-
731
- .qsm-show-correct-info-box,
732
- .qsm-show-question-desc-box {
733
- display: inline-block;
734
- margin-bottom: 10px !important;
735
- font-size: 15px;
736
- }
737
-
738
- #delete-action .deletion {
739
- text-decoration: underline;
740
- }
741
-
742
- #category_area>label {
743
- display: none;
744
- }
745
-
746
- #category_area {
747
- margin-top: 10px;
748
- }
749
-
750
- a#qsm-category-add-toggle {
751
- margin-top: 10px;
752
- display: block;
753
- text-decoration: underline;
754
- cursor: pointer;
755
- }
756
-
757
- .quiz_form_type_0.quiz_quiz_systen_3 #question_type_13_description,
758
- .quiz_form_type_0.quiz_quiz_systen_1 #question_type_13_description {
759
- display: none !important;
760
- }
761
-
762
- #qsm-question-id {
763
- float: left;
764
- }
765
-
766
- .qsm-show-correct-info-box,
767
- .qsm-show-question-desc-box {
768
- background: #fff;
769
- }
770
-
771
- .qsm-show-correct-info-box span.dashicons,
772
- .qsm-show-question-desc-box span.dashicons {
773
- line-height: 29px;
774
- }
775
-
776
- #modal-2 .qsm-popup__container {
777
- max-width: 900px;
778
- }
779
-
780
- #set_featured_image {
781
- display: inline-block;
782
- text-decoration: none;
783
- outline: none;
784
- position: relative;
785
- right: calc(100% - 40px);
786
- top: -29px;
787
- background: #eee;
788
- padding: 4px 10px;
789
- border-radius: 5px 0px 0px 5px;
790
- margin-bottom: -29px;
791
- }
792
-
793
- #set_featured_image:focus {
794
- outline: none;
795
- }
796
-
797
- #featured_image_caption {}
798
-
799
- @media screen and (max-width: 575px) {
800
- .qsm-popup__container {
801
- min-width: auto;
802
- max-width: 100%;
803
- }
804
- }
805
-
806
- .question_info_tag {
807
- float: left;
808
- }
809
-
810
- @media (min-width: 783px) and (max-width: 1199px) {
811
- #poststuff #post-body.columns-2 #side-sortables {
812
- min-width: unset;
813
- width: 100%;
814
- }
815
-
816
- .questionElements .postbox {
817
- min-width: unset;
818
- width: 100%;
819
- }
820
-
821
- #post-body.columns-2 #postbox-container-1 {
822
- width: 250px;
823
- float: right;
824
- margin-right: 10px;
825
- }
826
-
827
- .questionElements {
828
- overflow: hidden;
829
- }
830
- }
831
-
832
- @media screen and (max-width: 782px) {
833
-
834
- /*List of questions*/
835
- .question-content .question-content-text {
836
- font-size: 14px;
837
- }
838
-
839
- body .question-content>div {
840
- margin: 0 5px;
841
- }
842
-
843
- .page-footer a.button {
844
- font-size: 10px;
845
- min-height: 25px;
846
- padding: 0 5px;
847
- }
848
-
849
- .page-footer a.button .dashicons {
850
- display: none;
851
- }
852
-
853
- .question-controls .search-box {
854
- height: auto;
855
- }
856
-
857
- .questionElements .postbox {
858
- max-width: 100%;
859
- width: 100%;
860
- min-width: unset;
861
- }
862
-
863
- .questionElements .category {
864
- margin-bottom: 10px;
865
- }
866
-
867
- .answer-text-div {
868
- width: 135%;
869
- }
870
- }
1
+ .question-content .form-actions{left: 10px;right: auto;}
2
+ .qsm-editor-wrap .wp-media-buttons{float: left;margin: 6px 5px -3px 0;}
3
+ .questionElements .new-answer-button{margin-left: 0;margin-right: 36px;}
4
+ #delete-question-button .dashicons, #unlink-question-button .dashicons{margin-left: 5px;margin-right: 0;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/qsm-admin-question.css CHANGED
@@ -1,916 +1,668 @@
1
  .question-controls {
2
- display: flex;
3
- flex-direction: column;
4
- justify-content: space-between;
5
- align-items: center;
 
 
 
6
  }
7
-
8
  #delete-question-button {
9
- background-color: #dc3232;
10
- float: right;
11
- }
12
-
13
- #unlink-question-button,
14
- #save-multi-category-button {
15
- float: right;
16
- margin-left: 5px;
17
- }
18
-
19
- #modal-7,
20
- #modal-8,
21
- #modal-9 {
22
- max-width: 500px;
23
- }
24
-
25
- #modal-7 hr,
26
- #modal-8 hr,
27
- #modal-9 hr {
28
- margin: 0 -30px;
29
- }
30
-
31
- #modal-7 header,
32
- #modal-8 header,
33
- #modal-9 header {
34
- margin: -10px 0 10px 0;
35
- }
36
-
37
- #modal-7 .qsm-popup__close,
38
- #modal-8 .qsm-popup__close,
39
- #modal-9 .qsm-popup__close {
40
- margin: -10px -10px 0 0;
41
- font-size: 20px;
42
- }
43
-
44
- #modal-7-title,
45
- #modal-8-title,
46
- #modal-9-title {
47
- color: #00449e;
48
- opacity: 70%;
49
- }
50
-
51
- #modal-7 footer .dashicons,
52
- #modal-8 footer .dashicons,
53
- #modal-9 footer .dashicons {
54
- font-size: 20px;
55
- margin-right: 3px;
56
- vertical-align: middle;
57
- margin-left: -10px;
58
- }
59
-
60
- #modal-7 .qsm-popup__container,
61
- #modal-8 .qsm-popup__container,
62
- #modal-9 .qsm-popup__container {
63
- max-width: 560px;
64
- padding-bottom: 20px;
65
- }
66
-
67
- .modal-7-table,
68
- .modal-8-table,
69
- .modal-9-table {
70
- font-size: 16px;
71
  }
72
-
73
- #modal-7 footer,
74
- #modal-8 footer,
75
- #modal-9 footer {
76
- margin-top: 15px;
77
  }
78
-
79
- .modal-7-table tr td,
80
- .modal-8-table tr td,
81
- .modal-9-table tr td {
82
- vertical-align: top;
83
- padding: 0 10px 5px 0
84
  }
85
-
86
  #modal-9-content .info {
87
- width: 100%;
88
- margin-bottom: -20px;
89
- color: red;
90
- font-size: 15px;
91
  }
92
-
93
  @media screen and (min-width:700px) {
94
- .question-controls {
95
- flex-direction: row;
96
  }
97
  }
98
-
99
  .page {
100
- width: 100%;
101
- background-color: #fff;
102
- margin: 20px 0;
103
- padding-bottom: 60px;
104
- /*box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.4)*/
105
- position: relative;
106
- padding-left: 15px;
107
- padding-right: 15px;
108
- box-sizing: border-box;
109
  }
110
-
111
  .page-header {
112
- display: flex;
113
- align-items: center;
114
- justify-content: space-between;
115
- background-color: #fff;
116
- padding: 25px 15px 10px 10px;
117
- /*border-bottom: 5px solid #1DD969;*/
118
- }
119
-
120
  .page-header .dashicons {
121
- color: #A6ABAF;
122
- font-size: 25px;
123
  }
124
-
125
  .page-header .dashicons.dashicons-trash {
126
- color: #dc3232;
127
  }
128
-
129
  .page-header .edit-page-button {
130
- margin: 0 10px;
131
  }
132
-
133
  .page-header .edit-page-button span {
134
- color: #1F8CBE;
135
  }
136
-
137
  .page-header span.page-number {
138
- font-size: 18px;
139
- color: #A6ABAF;
140
- margin-left: 10px;
141
- display: inline-block;
142
- font-style: italic;
143
- margin-top: 3px;
144
  }
145
-
146
- .page-header span.page-name {}
147
-
148
  .page-footer {
149
- position: absolute;
150
- bottom: 15px;
151
- width: 100%;
152
- right: 25px;
153
- }
154
-
155
- .page-footer a.button,
156
- .new-answer-button a#new-answer-button {
157
- border: 1px solid #cbcbcb;
158
- color: #7b7575;
159
- background: #F7F7F7;
 
 
 
 
160
  }
161
-
162
- .new-answer-button a#new-answer-button:hover {
163
- opacity: 0.9;
164
- }
165
-
166
- .page-footer a.button .dashicons,
167
- .new-answer-button a#new-answer-button .dashicons {
168
- line-height: 32px;
169
- }
170
-
171
  .question-create-page {
172
- text-align: center;
173
  }
174
-
175
  .question-create-page .new-page-button .dashicons {
176
- line-height: 30px;
177
- font-size: 16px;
178
  }
179
-
180
  .page-header a {
181
- text-decoration: none;
182
  }
183
-
184
  .page-header-buttons {
185
- text-align: right;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
-
188
- .question,
189
- .question-bank-question {
190
- padding: 10px;
191
- background-color: #F3F3F3;
192
- border: 1px solid #cbcbcb;
193
- margin: 10px 0;
194
- }
195
-
196
  .question a {
197
- text-decoration: none;
198
  }
199
-
200
  .question-content {
201
- display: flex;
202
- align-items: center;
203
- justify-content: space-between;
 
 
 
 
 
 
 
 
 
204
  }
205
-
206
- .question-content .dashicons {
207
- font-size: 22px;
208
- color: #1F8CBE;
209
  }
210
-
211
- .question-content .dashicons.dashicons-trash {
212
- color: #dc3232;
213
  }
214
-
215
  .question-content .dashicons.dashicons-move {
216
- color: #A6ABAF;
217
- font-size: 22px;
218
  }
219
-
220
  .question-content .question-content-text {
221
- color: #1F8CBE;
222
- font-size: 16px;
223
- font-weight: 500;
 
 
 
 
 
 
 
 
 
 
 
 
224
  }
225
-
226
  .question-content .question-category {
227
- color: #939697;
228
- font-size: 14px;
229
- font-weight: normal;
230
- font-style: italic;
231
  }
232
-
233
  .question-content>div {
234
- margin: 0 10px;
235
  }
236
-
237
  .question-content-text {
238
- flex-grow: 1;
239
  }
240
-
241
  .question-bank-question {
242
- display: flex;
243
- align-items: center;
244
- justify-content: space-between;
245
- clear: both;
 
 
246
  }
247
-
248
  .qsm-question-bank-select .qsm-select-all-label {
249
- margin-right: 15px;
250
- position: relative;
251
- top: 5px;
252
- vertical-align: top;
253
- }
254
-
255
- .qsm-question-bank-select{
256
- margin-bottom: 15px;
257
- display: flex;
258
- justify-content: space-between;
259
- align-items: center;
260
- }
261
-
262
- #qsm-import-selected-question {
263
- margin-left: 10px;
264
  }
265
-
266
- #question-bank-search-form{
267
- float: left;
268
  }
269
-
270
- .qsm-question-bank-header .qsm-popup__close {
271
- position: absolute;
272
- right: 10px;
273
- top: 25px;
274
  }
275
-
276
- .qsm-question-bank-header {
277
- border-bottom: 2px solid #e3e3e3ad;
278
- padding-bottom: 15px;
 
 
 
 
 
 
279
  }
280
-
281
- .question-bank-question div {
282
- margin: 0 10px;
283
  }
284
-
285
  .question-bank-question>div:nth-child(2) {
286
- width: 100%;
287
  }
288
-
289
- .page-new,
290
- .question-new {
291
- background-color: #fff !important;
292
  }
293
-
294
  .correct-header {
295
- text-align: right;
296
- display: none;
297
  }
298
-
299
  .answers-single {
300
- display: flex;
301
- justify-content: space-between;
302
- margin-bottom: 5px;
303
- padding: 10px 10px;
304
- background: #FAFAFA;
 
305
  }
306
-
307
- .answers-single:nth-child(2n+2) {
308
- background: #FFF;
309
  }
310
-
311
  .answers-single>div {
312
- margin-left: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  }
314
-
315
- .answer-text-div {
316
- width: 85%;
 
 
 
317
  }
318
-
319
- .answers-single>div:nth-child(4) {
320
- width: 12%;
321
  }
322
-
323
- .qsm-row {
324
- display: block;
325
- width: 100%;
326
- margin-bottom: 13px;
327
- font-size: 16px;
328
  }
329
-
330
- div#correct_answer_info_area {
331
- float: left;
332
  }
333
-
334
- #post-body-content .qsm-row {
335
- margin-bottom: 20px;
336
  }
337
-
338
- .qsm-row>label {
339
- font-weight: normal;
340
- display: block;
341
- margin-bottom: 7px;
342
- color: #7b7575;
343
  }
344
-
345
- .questionElements .qsm-row>label {
346
- position: relative;
347
  }
348
-
349
- .questionElements .qsm-row>label>.qsm-tooltips-icon {
350
- position: relative;
351
- top: 2px;
352
  }
353
-
354
  .questionElements .qsm-question-doc {
355
- text-decoration: none;
356
- position: absolute;
357
- right: 0;
358
- color: #969696;
359
  }
360
-
361
  #categorydiv .qsm-question-doc {
362
- right: 15px;
363
  }
364
-
365
  .questionElements .qsm-question-doc:hover {
366
- color: #0073aa;
367
  }
368
-
369
  .questionElements .qsm-row>label>.qsm-question-doc span.dashicons {
370
- font-size: 17px;
371
- width: auto;
372
- height: auto;
373
- line-height: 23px;
374
  }
375
-
376
  .questionElements .qsm-tooltips-icon .qsm-tooltips {
377
- bottom: 26px;
378
  }
379
-
380
  .questionElements .qsm-tooltips-icon {
381
- cursor: help;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  }
383
-
384
- .qsm-row select,
385
- .qsm-row input[type=text],
386
- .qsm-row textarea {
387
- width: 100%;
388
- max-width: 100%;
389
- }
390
-
391
- .qsm-popup {
392
- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
393
- }
394
-
395
- .qsm-popup__overlay {
396
- position: fixed;
397
- top: 0;
398
- left: 0;
399
- right: 0;
400
- bottom: 0;
401
- background: rgba(0, 0, 0, 0.6);
402
- display: flex;
403
- justify-content: center;
404
- align-items: center;
405
- z-index: 9999;
406
- }
407
-
408
- .qsm-popup__container {
409
- background-color: #fff;
410
- padding: 30px;
411
- min-width: 500px;
412
- max-width: 700px;
413
- max-height: 95vh;
414
- border-radius: 4px;
415
- overflow-y: auto;
416
- box-sizing: border-box;
417
- }
418
-
419
- .qsm-popup__header {
420
- display: flex;
421
- justify-content: space-between;
422
- align-items: center;
423
- }
424
-
425
- .qsm-popup__title {
426
- margin-top: 0;
427
- margin-bottom: 0;
428
- font-weight: 600;
429
- font-size: 1.25rem;
430
- line-height: 1.25;
431
- color: #00449e;
432
- box-sizing: border-box;
433
- }
434
-
435
- .qsm-popup__close {
436
- background: transparent;
437
- border: 0;
438
- color: #00449e;
439
- text-decoration: none;
440
- cursor: pointer;
441
- }
442
-
443
- .qsm-popup__header .qsm-popup__close:before {
444
- content: "\2715";
445
- }
446
-
447
- .qsm-popup__content {
448
- margin-top: 2rem;
449
- margin-bottom: 2rem;
450
- line-height: 1.5;
451
- color: rgba(0, 0, 0, .8);
452
- }
453
-
454
- .qsm-popup__btn {
455
- font-size: .875rem;
456
- padding-left: 1rem;
457
- padding-right: 1rem;
458
- padding-top: .5rem;
459
- padding-bottom: .5rem;
460
- background-color: #e6e6e6;
461
- color: rgba(0, 0, 0, .8);
462
- border-radius: .25rem;
463
- border-style: none;
464
- border-width: 0;
465
- cursor: pointer;
466
- -webkit-appearance: button;
467
- text-transform: none;
468
- overflow: visible;
469
- line-height: 1.15;
470
- margin: 0;
471
- will-change: transform;
472
- -moz-osx-font-smoothing: grayscale;
473
- -webkit-backface-visibility: hidden;
474
- backface-visibility: hidden;
475
- -webkit-transform: translateZ(0);
476
- transform: translateZ(0);
477
- transition: -webkit-transform .25s ease-out;
478
- transition: transform .25s ease-out;
479
- transition: transform .25s ease-out, -webkit-transform .25s ease-out;
480
- }
481
-
482
- .qsm-popup__btn:focus,
483
- .qsm-popup__btn:hover {
484
- -webkit-transform: scale(1.05);
485
- transform: scale(1.05);
486
- }
487
-
488
- .qsm-popup__btn-primary {
489
- background-color: #00449e;
490
- color: #fff;
491
- }
492
-
493
- @keyframes mmfadeIn {
494
- from {
495
- opacity: 0;
496
- }
497
-
498
- to {
499
- opacity: 1;
500
- }
501
- }
502
-
503
- @keyframes mmfadeOut {
504
- from {
505
- opacity: 1;
506
- }
507
-
508
- to {
509
- opacity: 0;
510
- }
511
- }
512
-
513
- @keyframes mmslideIn {
514
- from {
515
- transform: translateY(15%);
516
- }
517
-
518
- to {
519
- transform: translateY(0);
520
- }
521
- }
522
-
523
- @keyframes mmslideOut {
524
- from {
525
- transform: translateY(0);
526
- }
527
-
528
- to {
529
- transform: translateY(-10%);
530
- }
531
- }
532
-
533
- .qsm-popup-slide {
534
- display: none;
535
- }
536
-
537
- .qsm-popup-slide.is-open {
538
- display: block;
539
- }
540
-
541
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__overlay {
542
- animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
543
- }
544
-
545
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__container {
546
- animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
547
- }
548
-
549
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__overlay {
550
- animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
551
- }
552
-
553
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__container {
554
- animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
555
- }
556
-
557
- .qsm-popup-slide .qsm-popup__container,
558
- .qsm-popup-slide .qsm-popup__overlay {
559
- will-change: transform;
560
- }
561
-
562
  @-moz-keyframes qsm-spinner-loader {
563
- 0% {
564
- -moz-transform: rotate(0deg);
565
- transform: rotate(0deg);
566
  }
567
-
568
- 100% {
569
- -moz-transform: rotate(360deg);
570
- transform: rotate(360deg);
571
  }
572
  }
573
-
574
  @-webkit-keyframes qsm-spinner-loader {
575
- 0% {
576
- -webkit-transform: rotate(0deg);
577
- transform: rotate(0deg);
578
  }
579
-
580
- 100% {
581
- -webkit-transform: rotate(360deg);
582
- transform: rotate(360deg);
583
  }
584
  }
585
-
586
  @keyframes qsm-spinner-loader {
587
- 0% {
588
- -moz-transform: rotate(0deg);
589
- -ms-transform: rotate(0deg);
590
- -webkit-transform: rotate(0deg);
591
- transform: rotate(0deg);
592
  }
593
-
594
- 100% {
595
- -moz-transform: rotate(360deg);
596
- -ms-transform: rotate(360deg);
597
- -webkit-transform: rotate(360deg);
598
- transform: rotate(360deg);
599
  }
600
  }
601
-
602
  /* :not(:required) hides this rule from IE9 and below */
603
  .qsm-spinner-loader:not(:required) {
604
- -moz-animation: qsm-spinner-loader 1500ms infinite linear;
605
- -webkit-animation: qsm-spinner-loader 1500ms infinite linear;
606
- animation: qsm-spinner-loader 1500ms infinite linear;
607
- -moz-border-radius: 0.5em;
608
- -webkit-border-radius: 0.5em;
609
- border-radius: 0.5em;
610
- -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
611
- -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
612
- box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
613
- display: inline-block;
614
- font-size: 10px;
615
- width: 1em;
616
- height: 1em;
617
- margin: 1.5em;
618
- overflow: hidden;
619
- text-indent: 100%;
620
- }
621
-
622
- /**
623
- * Css for change-answer-editor-label
624
- */
625
- /*.change-answer-editor-label{
626
- display: inline-block;
627
- float: right;
628
- font-size: 14px;
629
- font-weight: normal !important;
630
- }*/
631
  .change-answer-editor-label>#change-answer-editor {
632
- width: auto;
633
  }
634
-
635
  a.import-button.button.disable_import {
636
- position: relative;
637
- z-index: 0;
638
  }
639
-
640
  a.import-button.button.disable_import::before {
641
- content: '';
642
- background: rgba(255, 255, 255, 0.5);
643
- width: 100%;
644
- height: 100%;
645
- left: 0;
646
- right: 0;
647
- top: 0;
648
- bottom: 0;
649
- position: absolute;
650
- z-index: 5;
651
- }
652
-
653
- #question-bank-cat {
654
- width: 150px;
655
- }
656
-
657
  .ui-state-highlight {
658
- background: #F3F3F3;
659
- border: 1px dashed #cbcbcb;
660
- height: 50px;
661
- margin: 15px 10px 0;
662
- opacity: 0.8;
663
  }
664
-
665
  .questionElements #poststuff {
666
- display: inline-block;
667
- width: 100%;
668
- background: #fff;
669
- padding: 10px;
670
- box-sizing: border-box;
671
- padding-bottom: 0;
672
  }
673
-
674
  .questionElements {
675
- padding: 15px 10px;
676
- background-color: #fff;
677
- border: 1px solid #cbcbcb;
678
- margin: 0 10px 0;
679
- box-sizing: border-box;
680
- border-top: medium none;
681
  }
682
-
683
  .questionElements .question-title {
684
- padding: 3px 8px;
685
- font-size: 1.7em;
686
- line-height: 100%;
687
- /* height: 1.7em; */
688
- width: 100%;
689
- outline: 0;
690
- margin: 0 0 3px;
691
- background-color: #fff;
692
  }
693
-
694
  .questionElements #major-publishing-actions {
695
- display: inline-block;
696
- width: 100%;
697
- box-sizing: border-box;
698
- clear: both;
699
- margin-bottom: -3px;
700
  }
701
-
702
  .questionElements #minor-publishing {
703
- padding: 10px 12px 12px;
704
  }
705
-
706
  #advanceddiv input[type="number"] {
707
- width: 100% !important;
708
- }
709
-
710
- .qsm-row .answer-header {
711
- font-weight: 500;
712
- font-size: 20px;
713
- margin-bottom: 30px;
714
- margin-top: 15px;
715
- color: #23282d;
716
- }
717
-
718
- .qsm-row .new-answer-button {
719
- text-align: center;
720
- margin-top: 15px;
721
- }
722
-
723
  #advanceddiv {
724
- margin-bottom: 0;
725
  }
726
-
727
  #answers .delete-answer-button {
728
- text-decoration: none;
729
- color: #dc3232;
730
- vertical-align: middle;
731
  }
732
-
733
  .answers-single .correct-answer {
734
- margin-right: 0;
735
- vertical-align: -webkit-baseline-middle;
736
  }
737
-
738
  .questionElements #postbox-container-1 select {
739
- border: 1px solid #dddddd;
 
740
  }
741
-
742
  .question-content-text * {
743
- font-size: 16px;
744
  }
745
-
746
  .question-type-description {
747
- color: #31708f;
748
- background: #d9edf7;
749
- border-color: #bce8f1;
750
- padding: 30px 15px;
751
- border-radius: 4px;
752
- font-family: Verdana, sans-serif;
753
- font-size: 15px;
754
- line-height: 21px;
755
- text-align: center;
756
- margin: 0 0 20px 0;
757
- }
758
-
759
- .qsm-show-correct-info-box,
760
  .qsm-show-question-desc-box {
761
- display: inline-block;
762
- margin-bottom: 10px !important;
763
- font-size: 15px;
 
 
 
 
 
 
764
  }
765
-
766
  #delete-action .deletion {
767
- text-decoration: underline;
768
  }
769
-
770
  #category_area>label {
771
- display: none;
772
  }
773
-
774
  #category_area {
775
- margin-top: 10px;
776
  }
777
-
778
  a#qsm-category-add-toggle {
779
- margin-top: 10px;
780
- display: block;
781
- text-decoration: underline;
782
- cursor: pointer;
783
- }
784
-
785
- .add-multiple-category {
786
- text-align: center;
787
- display: block;
788
- width: 100%;
789
- cursor: pointer;
790
- }
791
-
792
- .quiz_form_type_0.quiz_quiz_systen_3 #question_type_13_description,
793
- .quiz_form_type_0.quiz_quiz_systen_1 #question_type_13_description {
794
- display: none !important;
795
- }
796
-
797
- #qsm-question-id {
798
- float: right;
799
  }
800
-
801
- div#multi_categories_wrapper {
802
- display: inline-block;
803
- width: 100%;
804
- max-height: 250px;
805
- box-sizing: border-box;
806
- border: 1px solid #DDD;
807
- padding: 15px;
808
- overflow: hidden;
809
- overflow-y: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  }
811
-
812
- .qsm-show-correct-info-box,
813
- .qsm-show-question-desc-box {
814
- background: #fff;
815
  }
816
-
817
- .qsm-show-correct-info-box span.dashicons,
818
- .qsm-show-question-desc-box span.dashicons {
819
- line-height: 29px;
820
  }
821
-
822
  #modal-2 .qsm-popup__container {
823
- max-width: 900px;
 
 
 
824
  }
825
-
826
  #set_featured_image {
827
- display: inline-block;
828
- text-decoration: none;
829
- outline: none;
830
- position: relative;
831
- left: calc(100% - 40px);
832
- top: -29px;
833
- background: #eee;
834
- padding: 4px 10px;
835
- border-radius: 0px 5px 5px 0px;
836
- margin-bottom: -29px;
837
- }
838
-
839
  #set_featured_image:focus {
840
- outline: none;
841
- }
842
-
843
- #featured_image_caption {}
844
-
845
- @media screen and (max-width: 575px) {
846
- .qsm-popup__container {
847
- min-width: auto;
848
- max-width: 100%;
849
- }
850
  }
851
-
852
  .question_info_tag {
853
- float: right;
854
  }
855
-
856
  @media (min-width: 783px) and (max-width: 1199px) {
857
- #poststuff #post-body.columns-2 #side-sortables {
858
- min-width: unset;
859
- width: 100%;
860
  }
861
-
862
- .questionElements .postbox {
863
- min-width: unset;
864
- width: 100%;
865
  }
866
-
867
- #post-body.columns-2 #postbox-container-1 {
868
- width: 250px;
869
- float: left;
870
- margin-left: 10px;
871
  }
872
-
873
- .questionElements {
874
- overflow: hidden;
875
  }
876
  }
877
-
878
  @media screen and (max-width: 782px) {
879
-
880
  /*List of questions*/
881
- .question-content .question-content-text {
882
- font-size: 14px;
883
  }
884
-
885
- body .question-content>div {
886
- margin: 0 5px;
887
  }
888
-
889
- .page-footer a.button {
890
- font-size: 10px;
891
- min-height: 25px;
892
- padding: 0 5px;
893
  }
894
-
895
- .page-footer a.button .dashicons {
896
- display: none;
897
  }
898
-
899
- .question-controls .search-box {
900
- height: auto;
901
  }
902
-
903
- .questionElements .postbox {
904
- max-width: 100%;
905
- width: 100%;
906
- min-width: unset;
907
  }
908
-
909
- .questionElements .category {
910
- margin-bottom: 10px;
911
  }
912
-
913
- .answer-text-div {
914
- width: 135%;
915
  }
916
- }
1
  .question-controls {
2
+ display: flex;
3
+ flex-direction: column;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ }
7
+ .qsm_tab_content a.button-gray{
8
+ border: transparent;
9
  }
 
10
  #delete-question-button {
11
+ background-color: #dc3232;
12
+ }
13
+ #delete-question-button , #unlink-question-button {
14
+ display: inline-flex;
15
+ margin: 0 5px;
16
+ align-items: center;
17
+ flex-wrap: nowrap;
18
+ }
19
+ #delete-question-button .dashicons, #unlink-question-button .dashicons{
20
+ margin-right: 5px;
21
+ }
22
+ #modal-7 .qsm-popup__container{
23
+ max-width: 560px;
24
+ }
25
+ #modal-8 {
26
+ max-width: 500px;
27
+ }
28
+ #modal-8 hr {
29
+ margin: 0 -20px;
30
+ }
31
+ #modal-8 header {
32
+ margin: -10px 0 10px 0;
33
+ }
34
+ #modal-8 .qsm-popup__close {
35
+ margin: -10px -10px 0 0;
36
+ font-size: 20px;
37
+ }
38
+ #modal-8-title{
39
+ color: #00449e;
40
+ opacity: 70%;
41
+ }
42
+ #modal-8 footer .dashicons{
43
+ font-size: 20px;
44
+ margin-right: 3px;
45
+ vertical-align: middle;
46
+ margin-left: -10px;
47
+ }
48
+ #modal-8 .qsm-popup__container {
49
+ max-width: 560px;
50
+ padding-bottom: 20px;
51
+ }
52
+ .modal-7-table, .modal-8-table {
53
+ font-size: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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;
 
 
 
 
61
  }
 
62
  #modal-9-content .info {
63
+ width: 100%;
64
+ margin: 5px 0 0;
65
+ color: red;
66
+ font-size: 15px;
67
  }
 
68
  @media screen and (min-width:700px) {
69
+ .question-controls {
70
+ flex-direction: row;
71
  }
72
  }
 
73
  .page {
74
+ width: 100%;
75
+ background-color: #fafafa;
76
+ margin: 20px 0;
77
+ padding-bottom: 90px;
78
+ border: 1px solid #dadadb;
79
+ position: relative;
80
+ box-sizing: border-box;
 
 
81
  }
 
82
  .page-header {
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: space-between;
86
+ background-color: #fafafa;
87
+ padding: 15px 20px;
88
+ margin: 0 0 20px;
89
+ box-shadow: 0 2px 6px 0 #DADADB;
90
+ }
91
  .page-header .dashicons {
92
+ color: #A6ABAF;
93
+ font-size: 25px;
94
  }
 
95
  .page-header .dashicons.dashicons-trash {
96
+ color: #dc3232;
97
  }
 
98
  .page-header .edit-page-button {
99
+ margin: 0 10px;
100
  }
 
101
  .page-header .edit-page-button span {
102
+ color: #1F8CBE;
103
  }
 
104
  .page-header span.page-number {
105
+ font-size: 18px;
106
+ color: #A6ABAF;
107
+ display: inline-block;
108
+ font-style: italic;
109
+ margin: 3px 10px 0;
 
110
  }
 
 
 
111
  .page-footer {
112
+ position: absolute;
113
+ left: 0;
114
+ bottom: 0;
115
+ width: 100%;
116
+ padding: 8px 20px;
117
+ box-sizing: border-box;
118
+ background-color: #fafafa;
119
+ box-shadow: 0 -2px 6px 0 #dadadb;
120
+ }
121
+ .page-footer a.qsm-dashed-btn{
122
+ min-width: 45%;
123
+ padding: 8px 15px;
124
+ }
125
+ .page-footer a.button .dashicons, .new-answer-button a#new-answer-button .dashicons {
126
+ line-height: 32px;
127
  }
 
 
 
 
 
 
 
 
 
 
128
  .question-create-page {
129
+ text-align: center;
130
  }
 
131
  .question-create-page .new-page-button .dashicons {
132
+ line-height: 30px;
133
+ font-size: 16px;
134
  }
 
135
  .page-header a {
136
+ text-decoration: none;
137
  }
 
138
  .page-header-buttons {
139
+ display: flex;
140
+ width: 100%;
141
+ justify-content: space-around;
142
+ align-content: center;
143
+ align-items: center;
144
+ flex-wrap: wrap;
145
+ flex-direction: row;
146
+ }
147
+ .question, .question-bank-question {
148
+ box-sizing: border-box;
149
+ background: #ffffff;
150
+ border: 1px solid #dfd4d4;
151
+ border-radius: 3px;
152
+ padding: 6px 5px;
153
+ margin: 10px 20px 0;
154
  }
 
 
 
 
 
 
 
 
 
155
  .question a {
156
+ text-decoration: none;
157
  }
 
158
  .question-content {
159
+ display: flex;
160
+ width: 100%;
161
+ min-height: 40px;
162
+ align-items: center;
163
+ flex-direction: row;
164
+ flex-wrap: wrap;
165
+ align-content: center;
166
+ position: relative;
167
+ }
168
+ .question-content-title-box{
169
+ max-width: calc(100% - 200px);
170
+ line-height: 20px;
171
  }
172
+ .question-content .qsm-actions-link-box{
173
+ display: none;
 
 
174
  }
175
+ .question.opened .qsm-actions-link-box, .question-content:hover .qsm-actions-link-box{
176
+ display: inline-flex;
 
177
  }
 
178
  .question-content .dashicons.dashicons-move {
179
+ color: #A6ABAF;
180
+ font-size: 22px;
181
  }
 
182
  .question-content .question-content-text {
183
+ color: #1F8CBE;
184
+ font-size: 16px;
185
+ font-weight: 500;
186
+ margin: 2px 0;
187
+ }
188
+ .question-content .form-actions{
189
+ display: inline-flex;
190
+ flex-wrap: wrap;
191
+ flex-direction: row;
192
+ align-items: center;
193
+ position: absolute;
194
+ right: 10px;
195
+ margin: 0;
196
+ width: 140px;
197
+ justify-content: center;
198
  }
 
199
  .question-content .question-category {
200
+ color: #939697;
201
+ font-weight: normal;
202
+ font-style: italic;
203
+ margin: 3px 0;
204
  }
 
205
  .question-content>div {
206
+ margin: 0 10px;
207
  }
 
208
  .question-content-text {
209
+ flex-grow: 1;
210
  }
 
211
  .question-bank-question {
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: space-between;
215
+ clear: both;
216
+ padding: 0 10px;
217
+ margin: 10px 0 0;
218
  }
 
219
  .qsm-question-bank-select .qsm-select-all-label {
220
+ margin-right: 15px;
221
+ position: relative;
222
+ top: 5px;
223
+ vertical-align: top;
224
+ }
225
+ .qsm-question-bank-filters{
226
+ display: flex;
227
+ justify-content: space-between;
228
+ flex-wrap: nowrap;
229
+ padding: 0 20px;
230
+ }
231
+ .qsm-question-bank-search{
232
+ display: inline-flex;
 
 
233
  }
234
+ #modal-2 .qsm-popup__footer.qsm-question-bank-footer{
235
+ display: none;
 
236
  }
237
+ #modal-2 .qsm-popup__footer.qsm-question-bank-footer.opened{
238
+ display: flex;
 
 
 
239
  }
240
+ .postbox-container .postbox{
241
+ background: #fefefe;
242
+ border: 1px solid #f0f0f0;
243
+ }
244
+ .postbox-container .postbox h2.hndle {
245
+ border-bottom: 1px solid #dadada;
246
+ padding: 10px 12px;
247
+ }
248
+ #qsm-import-selected-question {
249
+ margin-left: 10px;
250
  }
251
+ .question-bank-question div.question-bank-selection {
252
+ margin: 0 10px;
 
253
  }
 
254
  .question-bank-question>div:nth-child(2) {
255
+ width: 75%;
256
  }
257
+ .page-new, .question-new {
258
+ background-color: #fff !important;
 
 
259
  }
 
260
  .correct-header {
261
+ text-align: right;
262
+ display: none;
263
  }
 
264
  .answers-single {
265
+ display: flex;
266
+ margin: 0;
267
+ padding: 0 2px;
268
+ flex-wrap: wrap;
269
+ position: relative;
270
+ flex-direction: row;
271
  }
272
+ .answers-single select, .answers-single textarea, .answers-single input[type=text], .answers-single input[type=number]{
273
+ padding: 4px 10px;
274
+ margin: 0;
275
  }
 
276
  .answers-single>div {
277
+ min-width: 80px;
278
+ width: 100px;
279
+ margin-right: 5px;
280
+ margin-bottom: 5px;
281
+ text-align: center;
282
+ }
283
+ .answers-single>div:nth-child(4){
284
+ min-width: auto;
285
+ width: 70px;
286
+ padding: 5px 0;
287
+ }
288
+ .answers-single>div.answer-text-div {
289
+ width: 560px;
290
+ max-width: 60%;
291
+ position: relative;
292
+ }
293
+ .answers-single>div.remove-answer-icon{
294
+ width: 20px;
295
+ min-width: 25px;
296
+ padding: 4px 0;
297
+ }
298
+ .qsm-question-misc-options{
299
+ display: inline-block;
300
+ width: 100%;
301
+ box-sizing: border-box;
302
+ margin: 20px 0 0;
303
  }
304
+ .qsm-feature-image-upl, .qsm-feature-image-rmv{
305
+ display: block;
306
+ width: 100%;
307
+ font-size: 14px;
308
+ margin: 10px 0 0;
309
+ text-decoration: none;
310
  }
311
+ .questionElements .qsm-row>label {
312
+ position: relative;
 
313
  }
314
+ .questionElements .qsm-row>label>.qsm-tooltips-icon {
315
+ position: relative;
316
+ top: 2px;
 
 
 
317
  }
318
+ .qsm-editor-wrap #wp-question-text-wrap{
319
+ margin-bottom: 20px;
 
320
  }
321
+ .qsm-editor-wrap .wp-media-buttons{
322
+ float: right;
323
+ margin: 6px 0 -3px 5px;
324
  }
325
+ .qsm-editor-wrap .wp-media-buttons button{
326
+ font-size: 11px;
327
+ padding: 0 5px;
328
+ min-height: 26px;
329
+ margin: 0;
330
+ border-radius: 1px;
331
  }
332
+ .qsm-editor-wrap .wp-media-buttons button .wp-media-buttons-icon{
333
+ width:18px;
334
+ height: 18px;
335
  }
336
+ .qsm-editor-wrap .wp-media-buttons button .wp-media-buttons-icon:before{
337
+ font-size: 16px;
 
 
338
  }
 
339
  .questionElements .qsm-question-doc {
340
+ text-decoration: none;
341
+ color: #969696;
342
+ display: inline-block;
343
+ box-sizing: border-box;
344
  }
 
345
  #categorydiv .qsm-question-doc {
346
+ right: 15px;
347
  }
 
348
  .questionElements .qsm-question-doc:hover {
349
+ color: #0073aa;
350
  }
 
351
  .questionElements .qsm-row>label>.qsm-question-doc span.dashicons {
352
+ font-size: 17px;
353
+ width: auto;
354
+ height: auto;
355
+ line-height: 23px;
356
  }
 
357
  .questionElements .qsm-tooltips-icon .qsm-tooltips {
358
+ bottom: 26px;
359
  }
 
360
  .questionElements .qsm-tooltips-icon {
361
+ cursor: help;
362
+ }
363
+ #modal-2 .qsm-popup__content{
364
+ padding: 20px 0 0;
365
+ }
366
+ #modal-page-1 .qsm-popup__footer, #modal-2 .qsm-popup__footer, #modal-7 .qsm-popup__footer{
367
+ display: flex;
368
+ justify-content: space-between;
369
+ align-items: center;
370
+ }
371
+ #modal-2 #question-bank{
372
+ display: inline-block;
373
+ width: 100%;
374
+ box-sizing: border-box;
375
+ overflow-y: auto;
376
+ max-height: calc(100vh - 230px);
377
+ flex-wrap: nowrap;
378
+ flex-direction: column;
379
+ padding: 0 20px 20px;
380
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  @-moz-keyframes qsm-spinner-loader {
382
+ 0% {
383
+ -moz-transform: rotate(0deg);
384
+ transform: rotate(0deg);
385
  }
386
+ 100% {
387
+ -moz-transform: rotate(360deg);
388
+ transform: rotate(360deg);
 
389
  }
390
  }
 
391
  @-webkit-keyframes qsm-spinner-loader {
392
+ 0% {
393
+ -webkit-transform: rotate(0deg);
394
+ transform: rotate(0deg);
395
  }
396
+ 100% {
397
+ -webkit-transform: rotate(360deg);
398
+ transform: rotate(360deg);
 
399
  }
400
  }
 
401
  @keyframes qsm-spinner-loader {
402
+ 0% {
403
+ -moz-transform: rotate(0deg);
404
+ -ms-transform: rotate(0deg);
405
+ -webkit-transform: rotate(0deg);
406
+ transform: rotate(0deg);
407
  }
408
+ 100% {
409
+ -moz-transform: rotate(360deg);
410
+ -ms-transform: rotate(360deg);
411
+ -webkit-transform: rotate(360deg);
412
+ transform: rotate(360deg);
 
413
  }
414
  }
 
415
  /* :not(:required) hides this rule from IE9 and below */
416
  .qsm-spinner-loader:not(:required) {
417
+ -moz-animation: qsm-spinner-loader 1500ms infinite linear;
418
+ -webkit-animation: qsm-spinner-loader 1500ms infinite linear;
419
+ animation: qsm-spinner-loader 1500ms infinite linear;
420
+ -moz-border-radius: 0.5em;
421
+ -webkit-border-radius: 0.5em;
422
+ border-radius: 0.5em;
423
+ -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
424
+ -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
425
+ box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
426
+ display: inline-block;
427
+ font-size: 10px;
428
+ width: 1em;
429
+ height: 1em;
430
+ margin: 1.5em;
431
+ overflow: hidden;
432
+ text-indent: 100%;
433
+ }
434
+ /** * Css for change-answer-editor-label */
 
 
 
 
 
 
 
 
 
435
  .change-answer-editor-label>#change-answer-editor {
436
+ width: auto;
437
  }
 
438
  a.import-button.button.disable_import {
439
+ position: relative;
440
+ z-index: 0;
441
  }
 
442
  a.import-button.button.disable_import::before {
443
+ content: '';
444
+ background: rgba(255, 255, 255, 0.5);
445
+ width: 100%;
446
+ height: 100%;
447
+ left: 0;
448
+ right: 0;
449
+ top: 0;
450
+ bottom: 0;
451
+ position: absolute;
452
+ z-index: 5;
453
+ }
 
 
 
 
 
454
  .ui-state-highlight {
455
+ background: #F3F3F3;
456
+ border: 1px dashed #cbcbcb;
457
+ height: 50px;
458
+ margin: 15px 10px 0;
459
+ opacity: 0.8;
460
  }
 
461
  .questionElements #poststuff {
462
+ display: inline-block;
463
+ width: 100%;
464
+ padding: 10px;
465
+ box-sizing: border-box;
466
+ padding-bottom: 0;
 
467
  }
 
468
  .questionElements {
469
+ padding: 15px 10px;
470
+ background-color: #fafafa;
471
+ border: 1px solid #cbcbcb;
472
+ margin: 0 20px 0;
473
+ box-sizing: border-box;
474
+ border-top: medium none;
475
  }
 
476
  .questionElements .question-title {
477
+ padding: 6px 10px;
478
+ font-size: 22px;
479
+ line-height: 100%;
480
+ outline: 0;
481
+ margin: 0 0 3px;
482
+ background-color: #fff;
 
 
483
  }
 
484
  .questionElements #major-publishing-actions {
485
+ display: inline-block;
486
+ width: 100%;
487
+ box-sizing: border-box;
488
+ clear: both;
489
+ margin-bottom: -3px;
490
  }
 
491
  .questionElements #minor-publishing {
492
+ padding: 10px 12px 12px;
493
  }
 
494
  #advanceddiv input[type="number"] {
495
+ width: 100% !important;
496
+ }
497
+ .questionElements .new-answer-button {
498
+ text-align: center;
499
+ width: 550px;
500
+ max-width: 60%;
501
+ margin-left: 33px;
502
+ }
 
 
 
 
 
 
 
 
503
  #advanceddiv {
504
+ margin-bottom: 0;
505
  }
 
506
  #answers .delete-answer-button {
507
+ text-decoration: none;
508
+ color: #dc3232;
509
+ vertical-align: middle;
510
  }
 
511
  .answers-single .correct-answer {
512
+ margin-right: 0;
513
+ vertical-align: -webkit-baseline-middle;
514
  }
 
515
  .questionElements #postbox-container-1 select {
516
+ border: 1px solid #dddddd;
517
+ border-radius: 1px;
518
  }
 
519
  .question-content-text * {
520
+ font-size: 16px;
521
  }
 
522
  .question-type-description {
523
+ color: #31708f;
524
+ background: #d9edf7;
525
+ border-color: #bce8f1;
526
+ padding: 30px 15px;
527
+ border-radius: 4px;
528
+ font-family: Verdana, sans-serif;
529
+ font-size: 15px;
530
+ line-height: 21px;
531
+ text-align: center;
532
+ margin: 0 0 20px 0;
533
+ }
 
 
534
  .qsm-show-question-desc-box {
535
+ display: inline-block;
536
+ margin-bottom: 10px !important;
537
+ font-size: 14px;
538
+ text-decoration: none;
539
+ }
540
+ .qsm-hide-question-desc-box{
541
+ display: inline-block;
542
+ font-size: 14px;
543
+ text-decoration: none;
544
  }
 
545
  #delete-action .deletion {
546
+ text-decoration: underline;
547
  }
 
548
  #category_area>label {
549
+ display: none;
550
  }
 
551
  #category_area {
552
+ margin-top: 10px;
553
  }
 
554
  a#qsm-category-add-toggle {
555
+ margin-top: 10px;
556
+ display: block;
557
+ text-decoration: underline;
558
+ cursor: pointer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  }
560
+ #categorydiv .inside{
561
+ margin: 0;
562
+ padding: 0;
563
+ }
564
+ .multi_category_area{
565
+ margin: 0;
566
+ }
567
+ .multi_category_area .qsm-category-filter{
568
+ margin: 0;
569
+ border-width: 0 !important;
570
+ border-bottom: 1px solid #eee !important;
571
+ padding: 3px 8px;
572
+ }
573
+ .multi_category_area .qsm_categories_list {
574
+ display: inline-block;
575
+ width: 100%;
576
+ max-height: 250px;
577
+ box-sizing: border-box;
578
+ padding: 5px 15px;
579
+ overflow: hidden;
580
+ overflow-y: auto;
581
+ font-size: 14px;
582
+ }
583
+ .multi_category_area ul{
584
+ margin: 0;
585
+ }
586
+ .multi_category_area a.add-multiple-category {
587
+ display: inline-block;
588
+ cursor: pointer;
589
+ margin: 10px 12px 10px;
590
+ text-decoration: none;
591
  }
592
+ .quiz_form_type_0.quiz_quiz_systen_3 #question_type_13_description, .quiz_form_type_0.quiz_quiz_systen_1 #question_type_13_description {
593
+ display: none !important;
 
 
594
  }
595
+ #qsm-question-id {
596
+ float: right;
 
 
597
  }
 
598
  #modal-2 .qsm-popup__container {
599
+ min-width: 650px;
600
+ max-width: 900px;
601
+ max-height: 90vh;
602
+ overflow: hidden;
603
  }
 
604
  #set_featured_image {
605
+ text-decoration: none;
606
+ outline: none;
607
+ position: absolute;
608
+ right: 0;
609
+ top: 0;
610
+ background: #eee;
611
+ padding: 9px 10px;
612
+ border-radius: 0px 1px 1px 0px;
613
+ }
 
 
 
614
  #set_featured_image:focus {
615
+ outline: none;
 
 
 
 
 
 
 
 
 
616
  }
 
617
  .question_info_tag {
618
+ float: right;
619
  }
 
620
  @media (min-width: 783px) and (max-width: 1199px) {
621
+ #poststuff #post-body.columns-2 #side-sortables {
622
+ min-width: unset;
623
+ width: 100%;
624
  }
625
+ .questionElements .postbox {
626
+ min-width: unset;
627
+ width: 100%;
 
628
  }
629
+ #post-body.columns-2 #postbox-container-1 {
630
+ width: 250px;
631
+ float: left;
632
+ margin-left: 10px;
 
633
  }
634
+ .questionElements {
635
+ overflow: hidden;
 
636
  }
637
  }
 
638
  @media screen and (max-width: 782px) {
 
639
  /*List of questions*/
640
+ .question-content .question-content-text {
641
+ font-size: 14px;
642
  }
643
+ body .question-content>div {
644
+ margin: 0 5px;
 
645
  }
646
+ .page-footer a.button {
647
+ font-size: 10px;
648
+ min-height: 25px;
649
+ padding: 0 5px;
 
650
  }
651
+ .page-footer a.button .dashicons {
652
+ display: none;
 
653
  }
654
+ .question-controls .search-box {
655
+ height: auto;
 
656
  }
657
+ .questionElements .postbox {
658
+ max-width: 100%;
659
+ width: 100%;
660
+ min-width: unset;
 
661
  }
662
+ .questionElements .category {
663
+ margin-bottom: 10px;
 
664
  }
665
+ .answer-text-div {
666
+ width: 135%;
 
667
  }
668
+ }
css/qsm-admin-rtl.css CHANGED
@@ -1,2175 +1,21 @@
1
- /********************
2
- Quizzes/Surveys Page
3
- *********************/
4
-
5
- /*.qsm-quizes-page .widefat td {
6
- font-size: 16px !important;
7
- }*/
8
-
9
- @-moz-keyframes qsm-spinner-loader {
10
- 0% {
11
- -moz-transform: rotate(0deg);
12
- transform: rotate(0deg);
13
- }
14
-
15
- 100% {
16
- -moz-transform: rotate(360deg);
17
- transform: rotate(360deg);
18
- }
19
- }
20
-
21
- @-webkit-keyframes qsm-spinner-loader {
22
- 0% {
23
- -webkit-transform: rotate(0deg);
24
- transform: rotate(0deg);
25
- }
26
-
27
- 100% {
28
- -webkit-transform: rotate(360deg);
29
- transform: rotate(360deg);
30
- }
31
- }
32
-
33
- @keyframes qsm-spinner-loader {
34
- 0% {
35
- -moz-transform: rotate(0deg);
36
- -ms-transform: rotate(0deg);
37
- -webkit-transform: rotate(0deg);
38
- transform: rotate(0deg);
39
- }
40
-
41
- 100% {
42
- -moz-transform: rotate(360deg);
43
- -ms-transform: rotate(360deg);
44
- -webkit-transform: rotate(360deg);
45
- transform: rotate(360deg);
46
- }
47
- }
48
-
49
- /* :not(:required) hides this rule from IE9 and below */
50
- .qsm-spinner-loader:not(:required) {
51
- -moz-animation: qsm-spinner-loader 1500ms infinite linear;
52
- -webkit-animation: qsm-spinner-loader 1500ms infinite linear;
53
- animation: qsm-spinner-loader 1500ms infinite linear;
54
- -moz-border-radius: 0.5em;
55
- -webkit-border-radius: 0.5em;
56
- border-radius: 0.5em;
57
- -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
58
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
59
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
60
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
61
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
62
- -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
63
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
64
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
65
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
66
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
67
- box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
68
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
69
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
70
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
71
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
72
- display: inline-block;
73
- font-size: 10px;
74
- width: 1em;
75
- height: 1em;
76
- margin: 1.5em;
77
- overflow: hidden;
78
- text-indent: 100%;
79
- }
80
-
81
- span.qsm-quiz-name {
82
- font-size: 14px;
83
- font-weight: 600;
84
- }
85
-
86
- .qsm-quizzes-page-content {
87
- display: flex;
88
- flex-direction: column;
89
- justify-content: space-between;
90
- }
91
-
92
- .qsm-quiz-page-wrapper {
93
- flex-grow: 1;
94
- }
95
-
96
- .qsm-quiz-page-wrapper-with-ads {
97
- flex-grow: 1;
98
- }
99
-
100
- .qsm-news-ads {
101
- background-color: #fff;
102
- border: 1px solid #dfd4d4;
103
- margin-top: 30px;
104
- display: none;
105
- }
106
-
107
- .qsm-news-ads-title {
108
- text-align: center;
109
- border-bottom: 1px solid #dfd4d4;
110
- margin: 0;
111
- padding: 10px 0;
112
- background-color: #fff;
113
- }
114
-
115
- .qsm-edit-name {
116
- font-size: 12px !important;
117
- }
118
-
119
- .qsm-action-link {
120
- font-size: 14px !important;
121
- }
122
-
123
- .qsm-action-links:hover {
124
- background-color: black;
125
- }
126
-
127
- .qsm-action-link-delete {
128
- color: red !important;
129
- }
130
-
131
- .qsm-dialog-form label {
132
- display: inline-block;
133
- font-size: 16px;
134
- font-weight: bold;
135
- padding-left: 30px;
136
- }
137
-
138
- .qsm-quiz-page-addon {
139
- width: 100%;
140
- float: right;
141
- }
142
-
143
- .qsm-addon-browse-addons {
144
- background: #fff;
145
- padding: 0;
146
- width: 100%;
147
- display: inline-block;
148
- box-sizing: border-box;
149
- margin-bottom: 30px;
150
- }
151
-
152
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon {
153
- float: right;
154
- }
155
-
156
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon {
157
- padding-top: 9px;
158
- padding-right: 30px;
159
- }
160
-
161
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a.active {
162
- background: #222;
163
- color: #fff;
164
- outline: none;
165
- box-shadow: none;
166
- }
167
-
168
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a {
169
- padding: 7px 15px;
170
- font-weight: normal;
171
- border-radius: 5px;
172
- }
173
-
174
- .qsm-addon-browse-addons .qsm-addon-anchor-left {
175
- float: right;
176
- }
177
-
178
- .qsm-addon-browse-addons .qsm-addon-list-right {
179
- float: left;
180
- padding-top: 15px;
181
- padding-left: 30px;
182
- }
183
-
184
- .qsm-addon-browse-addons .qsm-addon-list-right>span {
185
- margin-left: 10px;
186
- font-size: 16px;
187
- }
188
-
189
- .qsm-addon-browse-addons .qsm-addon-anchor-left a {
190
- display: inline-block;
191
- font-size: 16px;
192
- color: #474444;
193
- text-decoration: none;
194
- /*margin-top: 5px;*/
195
- margin-left: 15px;
196
- }
197
-
198
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a {
199
- background: #aaaaaa;
200
- padding: 15px 25px;
201
- color: #fff;
202
- margin-left: -4px;
203
- box-sizing: border-box;
204
- }
205
-
206
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a span.dashicons {
207
- height: 15px;
208
- }
209
-
210
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a.active {
211
- background: #007cba;
212
- }
213
-
214
- .qsm_popular_addons div.popuar-addon-ul {
215
- width: 100%;
216
- display: inline-block;
217
- }
218
-
219
- .qsm_popular_addons div.popuar-addon-ul>div {
220
- background: #fff;
221
- padding: 10px;
222
- width: 31%;
223
- margin-left: 2%;
224
- float: right;
225
- margin-bottom: 30px;
226
- box-sizing: border-box;
227
- }
228
-
229
- .qsm_popular_addons div.popuar-addon-ul>div:nth-child(3n + 4) {
230
- clear: both;
231
- }
232
-
233
- .qsm_popular_addons div.popuar-addon-ul .addon-itd-wrap {
234
- width: 100%;
235
- display: inline-block;
236
- }
237
-
238
- .qsm_popular_addons div.popuar-addon-ul .addon-image {
239
- width: 100px;
240
- height: 80px;
241
- background-size: cover;
242
- background-repeat: no-repeat;
243
- background-position: center center;
244
- background-color: #f0f0f0;
245
- float: right;
246
- }
247
-
248
- .qsm_popular_addons div.popuar-addon-ul .addon-title-descption {
249
- width: calc(100% - 110px);
250
- float: left;
251
- }
252
-
253
- .qsm_popular_addons div.popuar-addon-ul .description {
254
- display: block;
255
- margin-bottom: 5px;
256
- }
257
-
258
- .qsm_popular_addons div.popuar-addon-ul .addon-title {
259
- font-size: 16px;
260
- color: #222;
261
- font-weight: bold;
262
- text-decoration: none;
263
- margin-bottom: 5px;
264
- display: block;
265
- }
266
-
267
- .qsm_popular_addons div.popuar-addon-ul .addon-price {
268
- border-top: 1px solid #f1f1f1;
269
- padding-top: 10px;
270
- margin-top: 15px;
271
- }
272
-
273
- .qsm_popular_addons div.popuar-addon-ul .addon-price-btn {
274
- background: #fff;
275
- border: #fff;
276
- color: #007cba;
277
- font-weight: bold;
278
- font-size: 14px;
279
- }
280
-
281
- .qsm_popular_addons div.popuar-addon-ul .addon-get-link {
282
- float: left;
283
- background: #fff;
284
- color: #007cba;
285
- border-width: 2px;
286
- font-weight: bold;
287
- }
288
-
289
- .qsm_popular_addons div.popuar-addon-ul .addon-get-link span.dashicons {
290
- margin-top: 4px;
291
- }
292
-
293
- .qsm_popular_addons div.popuar-addon-ul>div .description-wrap {
294
- padding: 20px;
295
- }
296
-
297
- .qsm_popular_addons div.popuar-addon-ul>div .description-wrap .description {
298
- display: block;
299
- width: 100%;
300
- margin-bottom: 15px;
301
- font-size: 14px;
302
- font-style: normal;
303
- }
304
-
305
- .qsm_popular_addons div.popuar-addon-ul>div img {
306
- max-width: 100%;
307
- }
308
-
309
- .qsm-quiz-page-addon.qsm-addon-page-list {
310
- width: 75%;
311
- float: right;
312
- margin-top: 0;
313
- }
314
-
315
- .qsm-addon-news-ads {
316
- width: 25%;
317
- float: left;
318
- background: #007cba;
319
- padding: 10px 20px 30px 20px;
320
- box-sizing: border-box;
321
- margin-top: 0;
322
- }
323
-
324
- .qsm-addon-news-ads .qsm-news-ads-title {
325
- border-bottom: 0;
326
- margin-top: 20px;
327
- background: #fff;
328
- padding: 16px;
329
- color: #007cba;
330
- font-weight: bold;
331
- position: relative;
332
- }
333
-
334
- .qsm-addon-news-ads .qsm-news-ads-title:before,
335
- .qsm-addon-news-ads .qsm-news-ads-title:after {
336
- content: "";
337
- position: absolute;
338
- height: 0;
339
- width: 0;
340
- top: 0;
341
- right: 0;
342
- border-style: solid;
343
- border-width: 25px;
344
- }
345
-
346
- .qsm-addon-news-ads .qsm-news-ads-title:before {
347
- border-color: transparent #007cba transparent transparent;
348
- }
349
-
350
- .qsm-addon-news-ads .qsm-news-ads-title:after {
351
- left: 0;
352
- right: auto;
353
- border-color: transparent transparent transparent #007cba;
354
- }
355
-
356
- .qsm-addon-news-ads .qsm-info-widget {
357
- text-align: right;
358
- padding: 30px;
359
- }
360
-
361
- .qsm-addon-news-ads .qsm-info-widget h3 {
362
- color: #222;
363
- font-weight: bold;
364
- margin-top: 20px;
365
- margin-bottom: 15px;
366
- }
367
-
368
- .qsm-addon-news-ads .qsm-info-widget p {
369
- font-size: 14px;
370
- }
371
-
372
- .qsm-addon-news-ads .qsm-info-widget {
373
- transform: none !important;
374
- max-width: 100%;
375
- position: relative;
376
- background: #fff;
377
- text-align: center;
378
- margin-top: 70px;
379
- }
380
-
381
- .qsm-addon-news-ads .qsm-info-widget .bundle-icon {
382
- width: 40px;
383
- height: 40px;
384
- padding: 20px;
385
- border-radius: 50%;
386
- position: absolute;
387
- top: -40px;
388
- right: calc(50% - 40px);
389
- border: 2px solid #fff;
390
- box-shadow: 0px 0px 5px 1px rgb(0 0 0 / 16%);
391
- }
392
-
393
- .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .bundle-icon {
394
- background: #00b592;
395
- }
396
-
397
- .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn {
398
- color: #fff;
399
- width: 100%;
400
- padding: 5px;
401
- font-size: 14px;
402
- position: relative;
403
- margin-top: 0;
404
- }
405
-
406
- .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn span.dashicons {
407
- position: absolute;
408
- top: 10px;
409
- left: 10px;
410
- }
411
-
412
- .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .addon-bundle-btn {
413
- background: #00b592;
414
- border-color: #00b592;
415
- }
416
-
417
- .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .bundle-icon {
418
- background: #ed706f;
419
- }
420
-
421
- .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .addon-bundle-btn {
422
- background: #ed706f;
423
- border-color: #ed706f;
424
- }
425
-
426
- .qsm-active-addons .installed_title {
427
- background: #fff;
428
- margin: 0;
429
- padding: 15px;
430
- border: 1px solid #ccd0d4;
431
- color: #007cba;
432
- font-size: 16px;
433
- display: none;
434
- }
435
-
436
- .qsm-active-addons .installed_addons_wrapper,
437
- .qsm-active-addons .no_addons_installed {
438
- border: 1px solid #ccd0d4;
439
- /*border-top: medium none;*/
440
- }
441
-
442
- .qsm-active-addons .no_addons_installed {
443
- padding: 30px 25%;
444
- background: #fff;
445
- text-align: center;
446
- font-style: italic;
447
- font-size: 16px;
448
- line-height: 22px;
449
- }
450
-
451
- .qsm-active-addons .installed_addons_wrapper .installed_addon {
452
- padding: 15px 15px 27px 15px;
453
- background: #fff;
454
- border-bottom: 1px solid #cdc7c7;
455
- }
456
-
457
- .qsm-active-addons .installed_addons_wrapper .installed_addon:last-child {
458
- border-bottom: medium none;
459
- }
460
-
461
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_name {
462
- font-size: 14px;
463
- font-weight: bold;
464
- position: relative;
465
- top: 5px;
466
- }
467
-
468
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link {
469
- float: left;
470
- }
471
-
472
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link a {
473
- background: #fff;
474
- border-width: 2px;
475
- font-weight: 500;
476
- font-size: 13px;
477
- padding-right: 15px;
478
- padding-left: 15px;
479
- }
480
-
481
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link span.dashicons {
482
- margin-top: 4px;
483
- }
484
-
485
- .qsm-active-addons {
486
- width: 100%;
487
- box-sizing: border-box;
488
- margin-bottom: 30px;
489
- }
490
-
491
- .quizzes-surveys_page_qmn_addons .qsm-news-ads {
492
- width: 15%;
493
- float: left;
494
- }
495
-
496
- .qsm-help-page .handle-order-higher,
497
- .qsm-help-page .handle-order-lower {
498
- display: none;
499
- }
500
-
501
- @media screen and (min-width: 1200px) {
502
- .qsm-quiz-page-wrapper-with-ads {
503
- margin-left: 0;
504
- width: 100%;
505
- }
506
-
507
- .qsm-news-ads .qsm-info-widget {
508
- float: right;
509
- max-width: unset;
510
- width: 31.3%;
511
- }
512
-
513
- .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
514
- clear: both;
515
- }
516
-
517
- .qsm-news-ads .remove-ads-adv-link {
518
- width: 100%;
519
- float: right;
520
- }
521
- }
522
-
523
- @media screen and (max-width: 767px) {
524
- .qsm-quiz-page-addon {
525
- width: 100%;
526
- }
527
-
528
- .quizzes-surveys_page_qmn_addons .qsm-news-ads {
529
- width: 100%;
530
- }
531
- }
532
-
533
- /********************
534
- Options Page
535
- *********************/
536
-
537
- .template_list_holder {
538
- width: 100%;
539
- }
540
-
541
- .template_variable {
542
- width: 50%;
543
- float: right;
544
- font-size: 14px;
545
- }
546
-
547
- .template_name {
548
- font-weight: bold;
549
- }
550
-
551
- /********************
552
- Results Pages & Emails Tab
553
- *********************/
554
- .results-page,
555
- #qsm_emails .qsm-email {
556
- width: 100%;
557
- background-color: #fff;
558
- margin: 20px 0;
559
- /*padding-bottom: 15px;*/
560
- box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.06);
561
- }
562
-
563
- .results-page .results-page-content,
564
- #qsm_emails .qsm-email .qsm-email-content {
565
- background: #fff;
566
- padding-left: 15px;
567
- padding-right: 15px;
568
- width: 100%;
569
- box-sizing: border-box;
570
- }
571
-
572
- .results-page-header,
573
- #qsm_emails .qsm-email-header {
574
- display: flex;
575
- align-items: center;
576
- justify-content: flex-end;
577
- background-color: #fff;
578
- padding: 10px 35px;
579
- border-bottom: 1px solid #dfd4d4;
580
- }
581
-
582
- .delete-page-button,
583
- #qsm_emails .delete-email-button {
584
- background: none;
585
- border: none;
586
- color: #dc3232;
587
- cursor: pointer;
588
- transition-duration: 200ms;
589
- }
590
-
591
- .delete-page-button:hover,
592
- #qsm_emails .delete-email-button:hover {
593
- transform: scale(1.2);
594
- }
595
-
596
- .results-page-content,
597
- .qsm-email-content {
598
- display: flex;
599
- flex-direction: column;
600
- }
601
-
602
- .results-page-when,
603
- .results-page-show,
604
- .email-when,
605
- .email-show {
606
- padding: 10px;
607
- background-color: #f1f1f1;
608
- border: 1px solid #dfd4d4;
609
- margin: 15px 0;
610
- min-width: 60%;
611
- }
612
-
613
- .results-page-when,
614
- .email-when {
615
- margin-left: 15px;
616
- }
617
-
618
- .results-page-content-header,
619
- .email-content-header {
620
- margin-bottom: 10px;
621
- }
622
-
623
- .email-show label {
624
- margin-bottom: 5px;
625
- display: block;
626
- }
627
-
628
- .results-page-content-header h4,
629
- .results-page-content-header p,
630
- .email-content-header h4,
631
- .email-content-header p {
632
- margin: 0;
633
- }
634
-
635
- .results-page-condition,
636
- .email-condition {
637
- display: flex;
638
- flex-direction: column;
639
- margin-bottom: 15px;
640
- justify-content: space-around;
641
- }
642
-
643
- .results-page-condition>select,
644
- .results-page-condition>input,
645
- .email-condition>select,
646
- .email-condition>input {
647
- max-width: 100%;
648
- }
649
-
650
- .delete-condition-button {
651
- background: none;
652
- border: 1px solid #1dd969;
653
- color: #dc3232;
654
- cursor: pointer;
655
- transition-duration: 200ms;
656
- padding: 6px;
657
- }
658
-
659
- .delete-condition-button:hover {
660
- transform: scale(1.1);
661
- }
662
-
663
- .email-show .label {
664
- display: block;
665
- }
666
-
667
- .results-page-show textarea,
668
- .to-email,
669
- .subject,
670
- .email-template {
671
- width: 100%;
672
- margin-bottom: 10px;
673
- }
674
-
675
- @media screen and (min-width: 760px) {
676
-
677
- .results-page-content,
678
- .qsm-email-content {
679
- flex-direction: row;
680
- justify-content: space-around;
681
- }
682
-
683
- .results-page-when,
684
- .results-page-show,
685
- .email-when,
686
- .email-show {
687
- width: calc(50% - 15px);
688
- min-width: unset;
689
- }
690
-
691
- .results-page-condition,
692
- .email-condition {
693
- align-items: center;
694
- flex-direction: row;
695
- }
696
-
697
- .results-page-condition>select,
698
- .results-page-condition>input,
699
- .email-condition>select,
700
- .email-condition>input {
701
- max-width: 30%;
702
- }
703
-
704
- .delete-condition-button {
705
- border: none;
706
- }
707
- }
708
-
709
- /********************
710
- Quiz Styles Tab
711
- *********************/
712
-
713
- .qsm-styles {
714
- display: flex;
715
- flex-direction: column;
716
- }
717
-
718
- .qsm_featured_image_preview {
719
- max-height: 200px;
720
- max-width: 300px;
721
- margin: 5px 0;
722
- border-radius: 3px;
723
- }
724
-
725
- .qsm_featured_image_preview:hover:before {
726
- content: "\f147";
727
- font-family: "dashicons";
728
- color: #5cb85c;
729
- margin-left: 5px;
730
- }
731
-
732
-
733
- @media screen and (min-width: 700px) {
734
- .qsm-styles {
735
- flex-direction: row;
736
- flex-wrap: wrap;
737
- }
738
- }
739
-
740
- /********************
741
- About/Credits Page
742
- *********************/
743
-
744
- div.qsm_icon_wrap {
745
- position: absolute;
746
- top: 0;
747
- left: 0;
748
- background-color: rgba(54, 58, 66, 1);
749
- color: #1dd969;
750
- background-position: center 24px;
751
- background-size: 85px 85px;
752
- font-size: 14px;
753
- text-align: center;
754
- font-weight: 600;
755
- margin: 5px 0 0;
756
- padding-top: 120px;
757
- height: 40px;
758
- display: inline-block;
759
- width: 150px;
760
- text-rendering: optimizeLegibility;
761
- border: 5px solid #106daa;
762
- -moz-border-radius: 20px;
763
- -webkit-border-radius: 20px;
764
- -khtml-border-radius: 20px;
765
- border-radius: 20px;
766
- }
767
-
768
- .qsm-tab-content .feature {
769
- margin-bottom: 20px;
770
- }
771
-
772
- .qsm-tab-content .feature .feature-headline {
773
- margin: 1.1em 0 0.2em;
774
- font-size: 40px;
775
- font-weight: 300;
776
- line-height: 1.3;
777
- text-align: center;
778
- }
779
-
780
- .qsm-tab-content .feature .feature-text {
781
- text-align: center;
782
- font-size: 16px;
783
- }
784
-
785
- ul.changelog {
786
- background-color: #fff;
787
- padding: 10px 10px;
788
- }
789
-
790
- ul.changelog li {
791
- padding: 4px 0px;
792
- }
793
-
794
- ul.changelog li div.two {
795
- width: 70%;
796
- float: right;
797
- display: inline-block;
798
- height: 25px;
799
- margin-left: 20px;
800
- background: #d9e0e4;
801
- text-align: center;
802
- line-height: 25px;
803
- }
804
-
805
- ul.changelog li.fixed>div {
806
- background: #f0ffe1;
807
- color: #444;
808
- border-left: 1px solid #5cb85c;
809
- width: 20%;
810
- }
811
-
812
- ul.changelog li.fixed div.two:before {
813
- content: "\f147";
814
- font-family: "dashicons";
815
- color: #5cb85c;
816
- margin-left: 5px;
817
- }
818
-
819
- ul.changelog li.add>div {
820
- background: #ffeed0;
821
- color: #444;
822
- border-left: 1px solid #efa537;
823
- width: 20%;
824
- }
825
-
826
- ul.changelog li.add div.two:before {
827
- content: "\f155";
828
- font-family: "dashicons";
829
- color: #efa537;
830
- margin-left: 5px;
831
- }
832
-
833
- ul.changelog li.update>div {
834
- background: #bde7ff;
835
- color: #444;
836
- border-left: 1px solid #106daa;
837
- width: 20%;
838
- }
839
-
840
- ul.changelog li.update div.two:before {
841
- content: "\f463";
842
- font-family: "dashicons";
843
- color: #106daa;
844
- margin-left: 5px;
845
- }
846
-
847
- /********************
848
- Addons Page
849
- *********************/
850
-
851
- .qsm-addons {
852
- display: flex;
853
- flex-direction: column;
854
- }
855
-
856
- @media screen and (min-width: 700px) {
857
- .qsm-addons {
858
- flex-direction: row;
859
- flex-wrap: wrap;
860
- }
861
- }
862
-
863
- /********************
864
- Help Page
865
- *********************/
866
-
867
- .quiz_email_support p#mlw_support_message {
868
- color: red;
869
- font-size: 20px;
870
- }
871
-
872
- .quiz_email_support input,
873
- .quiz_email_support textarea {
874
- width: 100% !important;
875
- }
876
-
877
- .quiz_email_support textarea {
878
- min-height: 200px;
879
- }
880
-
881
- .quiz_email_support label {
882
- font-weight: bold;
883
- }
884
-
885
- /********************
886
- Misc.
887
- *********************/
888
-
889
- /* Ads */
890
- .help-decide {
891
- display: block;
892
- text-align: center;
893
- background: #fff;
894
- border: 5px solid #1dd969;
895
- color: #000;
896
- font-weight: bold;
897
- }
898
-
899
- .help-decide p {
900
- font-size: 14px;
901
- }
902
-
903
- /* Info Bar */
904
- .qsm-info-box {
905
- display: block;
906
- text-align: center;
907
- background: #fff;
908
- border: 1px solid #dfd4d4;
909
- /* color: #000; */
910
- font-weight: bold;
911
- /* font-size: 14px; */
912
- margin-bottom: 20px;
913
- margin-top: 10px;
914
- }
915
-
916
- .qsm-info-box p {
917
- font-size: 14px;
918
- }
919
-
920
- /* Info Widget */
921
- .qsm-quiz-page-addon .qsm-info-widget {
922
- margin-top: 0;
923
- background: #fff;
924
- margin-right: 0;
925
- }
926
-
927
- .qsm-info-widget {
928
- text-align: center;
929
- border: 1px solid #dfd4d4;
930
- margin: 30px 1% 0 1%;
931
- background: #f1f1f1;
932
- padding: 10px 15px;
933
- transition-duration: 0.5s;
934
- max-width: 330px;
935
- box-sizing: border-box;
936
- }
937
-
938
- .admin_page_mlw_quiz_options .qsm-info-widget {
939
- background: #fff;
940
- margin: 0 0 20px 0;
941
- cursor: pointer;
942
- }
943
-
944
- .admin_page_mlw_quiz_options .qsm-info-widget:hover,
945
- .admin_page_mlw_quiz_options div.mlw_qmn_themeBlockActive.qsm-info-widget {
946
- background-color: #333;
947
- color: #fff;
948
- }
949
-
950
- #mlw_qmn_theme_block_primary {
951
- background-color: #005e8e;
952
- color: #fff;
953
- }
954
-
955
- #mlw_qmn_theme_block_amethyst {
956
- background-color: #9b59b6;
957
- color: #fff;
958
- }
959
-
960
- #mlw_qmn_theme_block_emerald {
961
- background-color: #006732;
962
- color: #fff;
963
- }
964
-
965
- #mlw_qmn_theme_block_turquoise {
966
- background-color: #006552;
967
- color: #fff;
968
- }
969
-
970
- #mlw_qmn_theme_block_gray {
971
- background-color: #595959;
972
- color: #fff;
973
- }
974
-
975
- .mlw_qmn_themeBlockActive.qsm-info-widget {
976
- transform: scale(1.1);
977
- border: 2px solid #d5a8a8;
978
- }
979
-
980
- .qsm-info-widget a.button-primary {
981
- margin-top: 15px;
982
- }
983
-
984
- .qsm-quiz-page-addon a.button-primary {
985
- margin-top: 0 !important;
986
- }
987
-
988
- .qsm-info-widget:hover {
989
- transform: scale(1.1);
990
- }
991
-
992
- /* Options tabs */
993
- .qsm_tab_content,
994
- .mlw_tab_content {
995
- padding: 10px 10px 10px 10px;
996
- }
997
-
998
- .admin_page_mlw_quiz_options .qsm_tab_content>form>.button-primary:nth-child(3) {
999
- display: none;
1000
- }
1001
-
1002
- .qsm_tab_content label {
1003
- margin-left: 5px;
1004
- }
1005
-
1006
- /* Popup */
1007
-
1008
- .qsm-popup {
1009
- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
1010
- helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
1011
- }
1012
-
1013
- .qsm-popup__overlay {
1014
- position: fixed;
1015
- top: 0;
1016
- right: 0;
1017
- left: 0;
1018
- bottom: 0;
1019
- background: rgba(0, 0, 0, 0.6);
1020
- display: flex;
1021
- justify-content: center;
1022
- align-items: center;
1023
- z-index: 9999;
1024
- }
1025
-
1026
- .qsm-popup__container {
1027
- background-color: #fff;
1028
- padding: 30px;
1029
- min-width: 500px;
1030
- max-width: 700px;
1031
- max-height: 95vh;
1032
- border-radius: 4px;
1033
- overflow-y: auto;
1034
- box-sizing: border-box;
1035
- }
1036
-
1037
- .qsm-popup__header {
1038
- display: flex;
1039
- justify-content: space-between;
1040
- align-items: center;
1041
- }
1042
-
1043
- .qsm-popup__title {
1044
- margin-top: 0;
1045
- margin-bottom: 0;
1046
- font-weight: 600;
1047
- font-size: 1.25rem;
1048
- line-height: 1.25;
1049
- color: #00449e;
1050
- box-sizing: border-box;
1051
- }
1052
-
1053
- .qsm-popup__close {
1054
- background: transparent;
1055
- border: 0;
1056
- color: #00449e;
1057
- text-decoration: none;
1058
- }
1059
-
1060
- .qsm-popup__header .qsm-popup__close:before {
1061
- content: "\2715";
1062
- }
1063
-
1064
- .qsm-popup__content {
1065
- margin-top: 2rem;
1066
- margin-bottom: 2rem;
1067
- line-height: 1.5;
1068
- color: rgba(0, 0, 0, 0.8);
1069
- }
1070
-
1071
- body .qsm-popup__btn {
1072
- font-size: 0.875rem;
1073
- padding-right: 1rem;
1074
- padding-left: 1rem;
1075
- padding-top: 0.5rem;
1076
- padding-bottom: 0.5rem;
1077
- background-color: #e6e6e6;
1078
- color: rgba(0, 0, 0, 0.8);
1079
- border-radius: 0.25rem;
1080
- border-style: none;
1081
- border-width: 0;
1082
- cursor: pointer;
1083
- -webkit-appearance: button;
1084
- text-transform: none;
1085
- overflow: visible;
1086
- line-height: 1.15;
1087
- margin: 0;
1088
- will-change: transform;
1089
- -moz-osx-font-smoothing: grayscale;
1090
- -webkit-backface-visibility: hidden;
1091
- backface-visibility: hidden;
1092
- -webkit-transform: translateZ(0);
1093
- transform: translateZ(0);
1094
- transition: -webkit-transform 0.25s ease-out;
1095
- transition: transform 0.25s ease-out;
1096
- transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
1097
- }
1098
-
1099
- .qsm-popup__btn:focus,
1100
- .qsm-popup__btn:hover {
1101
- -webkit-transform: scale(1.05);
1102
- transform: scale(1.05);
1103
- }
1104
-
1105
- body .qsm-popup__btn-primary {
1106
- background-color: #00449e;
1107
- color: #fff;
1108
- }
1109
-
1110
- @keyframes mmfadeIn {
1111
- from {
1112
- opacity: 0;
1113
- }
1114
-
1115
- to {
1116
- opacity: 1;
1117
- }
1118
- }
1119
-
1120
- @keyframes mmfadeOut {
1121
- from {
1122
- opacity: 1;
1123
- }
1124
-
1125
- to {
1126
- opacity: 0;
1127
- }
1128
- }
1129
-
1130
- @keyframes mmslideIn {
1131
- from {
1132
- transform: translateY(15%);
1133
- }
1134
-
1135
- to {
1136
- transform: translateY(0);
1137
- }
1138
- }
1139
-
1140
- @keyframes mmslideOut {
1141
- from {
1142
- transform: translateY(0);
1143
- }
1144
-
1145
- to {
1146
- transform: translateY(-10%);
1147
- }
1148
- }
1149
-
1150
- .qsm-popup-slide {
1151
- display: none;
1152
- }
1153
-
1154
- .qsm-popup-slide.is-open {
1155
- display: block !important;
1156
- }
1157
-
1158
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__overlay {
1159
- animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
1160
- }
1161
-
1162
- .qsm-popup-slide[aria-hidden="false"] .qsm-popup__container {
1163
- animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
1164
- }
1165
-
1166
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__overlay {
1167
- animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
1168
- }
1169
-
1170
- .qsm-popup-slide[aria-hidden="true"] .qsm-popup__container {
1171
- animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
1172
- }
1173
-
1174
- .qsm-popup-slide .qsm-popup__container,
1175
- .qsm-popup-slide .qsm-popup__overlay {
1176
- will-change: transform;
1177
- }
1178
-
1179
- /**
1180
- * Shortcode accordion
1181
- */
1182
- .sc-opener {
1183
- position: relative;
1184
- font-size: 14px !important;
1185
- margin-bottom: 10px;
1186
- cursor: pointer;
1187
- display: inline-block;
1188
- color: #0073aa !important;
1189
- font-weight: 500;
1190
- }
1191
-
1192
- .sc-opener span.dashicons {
1193
- position: relative;
1194
- top: 2px;
1195
- margin-left: 5px;
1196
- }
1197
-
1198
- .sc-content {
1199
- display: none;
1200
- }
1201
-
1202
- .quiz-preview-link {
1203
- margin-right: 10px;
1204
- position: relative;
1205
- top: 3px;
1206
- }
1207
-
1208
- #show-advanced-option {
1209
- font-size: 16px;
1210
- cursor: pointer;
1211
- color: #0073aa;
1212
- margin-bottom: 15px;
1213
- }
1214
-
1215
- .remove-ads-adv-link {
1216
- text-align: center;
1217
- margin-top: 30px;
1218
- }
1219
-
1220
- .qsm-info-widget h3 {
1221
- line-height: 132%;
1222
- }
1223
-
1224
- .remove-ads-adv-link a {
1225
- background: #1dd969;
1226
- text-align: center;
1227
- color: #fff;
1228
- padding: 3px 10px;
1229
- border-radius: 5px;
1230
- display: inline-block;
1231
- text-decoration: none;
1232
- font-size: 13px;
1233
- font-weight: bold;
1234
- margin-bottom: 10px;
1235
- }
1236
-
1237
- .help-decide a.remove-adv-button {
1238
- background: #1dd969;
1239
- text-align: center;
1240
- color: #fff;
1241
- padding: 3px 10px;
1242
- border-radius: 5px;
1243
- display: inline-block;
1244
- text-decoration: none;
1245
- font-size: 13px;
1246
- font-weight: bold;
1247
- margin-right: 10px;
1248
- }
1249
-
1250
- h3.addon_category_name {
1251
- width: 100%;
1252
- background: transparent;
1253
- padding: 15px 0;
1254
- border-bottom: 1px solid #d7d1d1;
1255
- margin-bottom: 30px;
1256
- }
1257
-
1258
- /*Design of new radio taggle*/
1259
- .buttonset.ui-buttonset .ui-button.ui-state-active {
1260
- background: #e21130 none repeat scroll 0 0;
1261
- border-color: #e21130 !important;
1262
- }
1263
-
1264
- .buttonset.ui-buttonset .ui-button.ui-state-active span.ui-button-text {
1265
- color: #fff !important;
1266
- }
1267
-
1268
- .buttonset.ui-buttonset.green .ui-state-active {
1269
- background: #44c767 none repeat scroll 0 0;
1270
- border-color: #44c767 !important;
1271
- }
1272
-
1273
- .buttonset.ui-buttonset .ui-button.ui-state-active.ui-corner-left {
1274
- background: #44c767 none repeat scroll 0 0;
1275
- border-color: #44c767 !important;
1276
- }
1277
-
1278
- .buttonset.ui-buttonset label {
1279
- background: #fff;
1280
- border: 1px solid #b6b6b6;
1281
- margin-left: -5px !important;
1282
- }
1283
-
1284
- .buttonset.ui-buttonset label span.ui-button-text {
1285
- color: #727272;
1286
- font-size: 12px;
1287
- height: 35px;
1288
- line-height: 35px;
1289
- min-width: 20px;
1290
- padding: 0 10px;
1291
- }
1292
-
1293
- .qsm_tab_content input[type="text"],
1294
- .qsm_tab_content input[type="number"],
1295
- .qsm_tab_content input[type="url"],
1296
- .qsm_global_settings input[type="text"],
1297
- .qsm_global_settings input[type="number"],
1298
- .qsm_global_settings input[type="email"],
1299
- .qsm_global_settings input[type="url"],
1300
- .qsm-addon-setting-wrap input[type="email"],
1301
- .qsm-addon-setting-wrap input[type="url"],
1302
- .qsm-addon-setting-wrap input[type="text"],
1303
- .qsm-addon-setting-wrap input[type="number"] {
1304
- background: #ffffff none repeat scroll 0 0;
1305
- border: 1px solid #dddddd;
1306
- border-radius: 5px;
1307
- box-shadow: none;
1308
- color: #666666;
1309
- /*padding: 10px 15px;*/
1310
- width: auto;
1311
- height: auto;
1312
- /*min-width: 230px;*/
1313
- /*max-width:100%;*/
1314
- }
1315
-
1316
- .qsm_tab_content textarea {
1317
- background: #ffffff none repeat scroll 0 0;
1318
- border: 1px solid #dddddd;
1319
- border-radius: 5px;
1320
- box-shadow: none;
1321
- color: #666666;
1322
- padding: 10px 15px;
1323
- width: 100%;
1324
- height: auto;
1325
- }
1326
-
1327
- .global-sub-text {
1328
- margin-right: 15px;
1329
- }
1330
-
1331
- /* The switch - the box around the slider */
1332
- .switch {
1333
- position: relative;
1334
- display: inline-block;
1335
- width: 60px;
1336
- height: 34px;
1337
- }
1338
-
1339
- /* Hide default HTML checkbox */
1340
- .switch input[type="checkbox"] {
1341
- opacity: 0;
1342
- width: 0;
1343
- height: 0;
1344
- }
1345
-
1346
- /* The slider */
1347
- .slider {
1348
- position: absolute;
1349
- cursor: pointer;
1350
- top: 0;
1351
- right: 0;
1352
- left: 0;
1353
- bottom: 0;
1354
- background-color: #ccc;
1355
- -webkit-transition: 0.4s;
1356
- transition: 0.4s;
1357
- }
1358
-
1359
- .slider:before {
1360
- position: absolute;
1361
- content: "";
1362
- height: 26px;
1363
- width: 26px;
1364
- right: 4px;
1365
- bottom: 4px;
1366
- background-color: white;
1367
- -webkit-transition: 0.4s;
1368
- transition: 0.4s;
1369
- }
1370
-
1371
- input:checked+.slider {
1372
- background-color: #2196f3;
1373
- }
1374
-
1375
- input:focus+.slider {
1376
- box-shadow: 0 0 1px #2196f3;
1377
- }
1378
-
1379
- input:checked+.slider:before {
1380
- -webkit-transform: translateX(-26px);
1381
- -ms-transform: translateX(-26px);
1382
- transform: translateX(-26px);
1383
- }
1384
-
1385
- /* Rounded sliders */
1386
- .slider.round {
1387
- border-radius: 34px;
1388
- }
1389
-
1390
- .slider.round:before {
1391
- border-radius: 50%;
1392
- }
1393
-
1394
- input#sc-shortcode-model-text,
1395
- input#sc-shortcode-model-text-link {
1396
- height: 30px;
1397
- }
1398
-
1399
- div#modal-6 label {
1400
- display: block;
1401
- font-size: 14px;
1402
- margin-bottom: 5px;
1403
- font-weight: 500;
1404
- color: #999;
1405
- font-style: italic;
1406
- }
1407
-
1408
- #modal-6 .button>span.dashicons {
1409
- line-height: 29px;
1410
- }
1411
-
1412
- .qsm-list-shortcode-view span.dashicons {
1413
- font-size: 24px;
1414
- }
1415
-
1416
- /**
1417
- * No quiz screen design
1418
- */
1419
- .qsm-no-quiz-wrapper {
1420
- text-align: center;
1421
- max-width: 100%;
1422
- width: 100%;
1423
- }
1424
-
1425
- .qsm-no-quiz-wrapper .dashicons.dashicons-format-chat {
1426
- font-size: 200px;
1427
- display: block;
1428
- /* line-height: 200px; */
1429
- width: auto;
1430
- height: auto;
1431
- }
1432
-
1433
- .qsm-no-quiz-wrapper h2 {
1434
- margin-bottom: 30px;
1435
- }
1436
-
1437
- .qsm-no-quiz-wrapper .buttons {
1438
- margin-bottom: 30px;
1439
- }
1440
-
1441
- .qsm-no-quiz-wrapper .buttons a {
1442
- margin-left: 20px;
1443
- }
1444
-
1445
- .qsm-no-quiz-wrapper .buttons a:last-child {
1446
- color: #8b8888;
1447
- }
1448
-
1449
- .qsm-no-quiz-wrapper .buttons a:last-child .dashicons {
1450
- line-height: 46px;
1451
- }
1452
-
1453
- .qsm-no-quiz-wrapper h3 {
1454
- color: #8b8888;
1455
- margin-bottom: 30px;
1456
- }
1457
-
1458
- /**
1459
- * Option page design
1460
- */
1461
- span.qsm-ph_text {
1462
- width: 100px;
1463
- display: inline-block;
1464
- }
1465
-
1466
- tr .qsm-opt-desc {
1467
- color: #666;
1468
- font-style: italic;
1469
- font-size: 14px;
1470
- margin-top: 5px;
1471
- display: block;
1472
- }
1473
-
1474
- #quiz_settings_wrapper .qsm-opt-desc {
1475
- display: none !important;
1476
- }
1477
-
1478
- .form-table td fieldset label {
1479
- margin-left: 20px !important;
1480
- }
1481
-
1482
- .form-table .qsm-opt-tr {
1483
- position: relative;
1484
- padding-left: 24px;
1485
- padding-top: 15px;
1486
- }
1487
-
1488
- td.scheduled_time_start {
1489
- padding-bottom: 0 !important;
1490
- }
1491
-
1492
- .qsm-opt-tr .qsm-tooltips-icon {
1493
- margin: 0 0 0 0;
1494
- position: relative;
1495
- left: 0;
1496
- top: 4px;
1497
- color: #666;
1498
- display: inline-block;
1499
- font-size: 1.2em;
1500
- font-style: normal;
1501
- cursor: help;
1502
- width: auto;
1503
- height: auto;
1504
- }
1505
-
1506
- .qsm-tooltips-icon .qsm-tooltips {
1507
- background-color: #333;
1508
- border-radius: 3px;
1509
- color: #ffffff;
1510
- display: none;
1511
- font-size: 12px;
1512
- padding: 10px 5px;
1513
- line-height: 1.5;
1514
- opacity: 0;
1515
- right: 50%;
1516
- position: absolute;
1517
- text-align: center;
1518
- bottom: 25px;
1519
- width: 200px;
1520
- transform: translateX(50%);
1521
- transition: opacity 0.5s ease 0s;
1522
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
1523
- Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
1524
- }
1525
-
1526
- .qsm-tooltips-icon .qsm-tooltips a {
1527
- color: #fff;
1528
- }
1529
-
1530
- .qsm-tooltips-icon .qsm-tooltips:before {
1531
- border-color: #333 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
1532
- border-style: solid;
1533
- border-width: 8px 7px 0;
1534
- bottom: -8px;
1535
- content: "";
1536
- right: 50%;
1537
- transform: translateX(50%);
1538
- position: absolute;
1539
- }
1540
-
1541
- .qsm-tooltips-icon:hover .qsm-tooltips,
1542
- .qsm-tooltips:hover {
1543
- display: block;
1544
- opacity: 1;
1545
- z-index: 9999;
1546
- }
1547
-
1548
- /**
1549
- * Text Tab design
1550
- */
1551
- .qsm-text-main-wrap {
1552
- display: inline-block;
1553
- width: 100%;
1554
- }
1555
-
1556
- .qsm-text-main-wrap #post-body-content {
1557
- background: #fff;
1558
- box-sizing: border-box;
1559
- }
1560
-
1561
- .qsm-text-main-wrap #postbox-container-1 {
1562
- position: relative;
1563
- background: #fff;
1564
- box-sizing: border-box;
1565
- }
1566
-
1567
- .qsm-text-main-wrap #postbox-container-1 .qsm-text-header h5 {
1568
- font-size: 14px;
1569
- margin: 0;
1570
- font-weight: bold;
1571
- }
1572
-
1573
- .qsm-text-main-wrap #postbox-container-1 .qsm-text-header .description {
1574
- color: #666;
1575
- }
1576
-
1577
- .qsm-text-main-wrap .qsm-text-header {
1578
- padding: 20px;
1579
- border-bottom: 1px solid #f1f1f1;
1580
- }
1581
-
1582
- .qsm-text-main-wrap .qsm-text-header .message-dropdown {
1583
- display: inline-block;
1584
- }
1585
-
1586
- .qsm-text-main-wrap .qsm-text-header .message-dropdown label {
1587
- font-size: 14px;
1588
- font-weight: bold;
1589
- }
1590
-
1591
- .qsm-text-main-wrap .qsm-text-header .save-text-changes {
1592
- float: left;
1593
- }
1594
-
1595
- .qsm-text-main-wrap .qsm-text-conent {
1596
- padding: 20px;
1597
- border-bottom: 1px solid #f1f1f1;
1598
- position: relative;
1599
- }
1600
-
1601
- .qsm-text-conent.qsm-text-allowed-variables span.qsm-text-template-span {
1602
- display: inline-block;
1603
- margin-bottom: 10px;
1604
- margin-left: 10px;
1605
- position: relative;
1606
- }
1607
-
1608
- #show-all-variable-content span.qsm-text-template-span {
1609
- display: inline-block;
1610
- position: relative;
1611
- text-align: center;
1612
- padding: 0 5px;
1613
- }
1614
-
1615
- #show-all-variable-content .popup-template-span-wrap {
1616
- margin-bottom: 20px;
1617
- margin-left: 3%;
1618
- width: 30%;
1619
- display: inline-block;
1620
- border: 1px solid #def0ff;
1621
- }
1622
-
1623
- #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1624
- right: calc(100% - 100px);
1625
- }
1626
-
1627
- #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips:before {
1628
- right: 93%;
1629
- }
1630
-
1631
- .qsm-text-template-span .qsm-tooltips-icon {
1632
- vertical-align: middle;
1633
- line-height: 10px;
1634
- width: unset;
1635
- height: 12px;
1636
- color: #2271b1;
1637
- border: 0.5px solid #2271b1;
1638
- border-radius: 50%;
1639
- font-size: 10px;
1640
- display: none;
1641
- }
1642
-
1643
- .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1644
- right: calc(100% - 10px);
1645
- bottom: 30px;
1646
- }
1647
-
1648
- .qsm-text-label-wrapper>h2 {
1649
- font-size: 24px;
1650
- border-bottom: 1px solid #ccc;
1651
- padding-bottom: 10px;
1652
- line-height: normal;
1653
- }
1654
-
1655
- .qsm-text-label-wrapper form>button:nth-child(3) {
1656
- display: none;
1657
- }
1658
-
1659
- .qsm-text-label-wrapper .section_heading {
1660
- margin-top: 0;
1661
- }
1662
-
1663
- #show-all-variable .qsm-popup__container {
1664
- min-width: 50vw;
1665
- max-width: 1040px;
1666
- padding: 0;
1667
- }
1668
-
1669
- #show-all-variable-content {
1670
- margin-bottom: 0 !important;
1671
- padding: 20px;
1672
- margin: 0;
1673
- }
1674
-
1675
- #show-all-variable .qsm-popup__header {
1676
- border-bottom: 1px solid #f1f1f1;
1677
- padding: 20px;
1678
- }
1679
-
1680
- #show-all-variable .qsm-popup__header .qsm-popup__title {
1681
- color: #23282d;
1682
- margin-bottom: 7px;
1683
- }
1684
-
1685
- #show-all-variable .qsm-popup__footer {
1686
- border-top: 1px solid #f1f1f1;
1687
- padding: 20px;
1688
- }
1689
-
1690
- .qsm-view-preview-btn {
1691
- text-decoration: none;
1692
- line-height: normal;
1693
- margin-right: -5px;
1694
- }
1695
-
1696
- .qsm-view-preview-btn span.dashicons,
1697
- .edit-quiz-name span.dashicons {
1698
- line-height: 12px;
1699
- vertical-align: bottom;
1700
- }
1701
-
1702
- .mlw_quiz_options form:first-child {
1703
- margin-left: 10px;
1704
- float: left;
1705
- }
1706
-
1707
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit {
1708
- box-shadow: none;
1709
- float: left;
1710
- margin-left: 5px;
1711
- }
1712
-
1713
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit:hover {
1714
- opacity: 0.8;
1715
- }
1716
-
1717
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit span.dashicons {
1718
- line-height: 27px;
1719
- }
1720
-
1721
- .mlw_quiz_options .nav-tab-wrapper {
1722
- margin-top: 20px;
1723
- }
1724
-
1725
- .mlw_quiz_options .edit-quiz-name {
1726
- float: none;
1727
- text-decoration: none;
1728
- }
1729
-
1730
- .qsm_text_customize_label {
1731
- position: fixed;
1732
- bottom: 20px;
1733
- left: 25px;
1734
- background: #fff;
1735
- color: #5c5959;
1736
- padding: 10px 20px;
1737
- box-sizing: border-box;
1738
- z-index: 99;
1739
- border-radius: 5px;
1740
- border: 1px solid #cdbaba;
1741
- cursor: pointer;
1742
- }
1743
-
1744
- .qsm-text-tab-message-loader {
1745
- position: absolute;
1746
- top: 50%;
1747
- right: 50%;
1748
- z-index: 99;
1749
- transform: translate(50%, -50%);
1750
- }
1751
-
1752
- .qsm_text_customize_label .dashicons {
1753
- font-size: 14px;
1754
- line-height: 20px;
1755
- }
1756
-
1757
- /**
1758
- * Admin result page design
1759
- */
1760
- .overview-main-wrapper {
1761
- display: flex;
1762
- width: 100%;
1763
- }
1764
-
1765
- .overview-main-wrapper .overview-inner-wrap {
1766
- margin-left: 2%;
1767
- width: 33.33%;
1768
- }
1769
-
1770
- .overview-main-wrapper .overview-inner-wrap .inside {
1771
- min-height: 105px;
1772
- }
1773
-
1774
- .overview-main-wrapper .overview-inner-wrap:last-child {
1775
- margin-left: 0;
1776
- }
1777
-
1778
- .overview-main-wrapper .overview-inner-wrap h2.hndle,
1779
- .comment-inner-wrap h2.hndle,
1780
- .response-inner-wrap h2.hndle {
1781
- margin: 0;
1782
- padding: 10px;
1783
- }
1784
-
1785
- .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span {
1786
- display: block;
1787
- margin-bottom: 5px;
1788
- }
1789
-
1790
- .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span:last-child {
1791
- margin-bottom: 0;
1792
- }
1793
-
1794
- .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>label {
1795
- font-weight: bold;
1796
- }
1797
-
1798
- .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>span {
1799
- float: left;
1800
- }
1801
-
1802
- .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper {
1803
- display: -webkit-box;
1804
- display: -moz-box;
1805
- display: -ms-flexbox;
1806
- display: -webkit-flex;
1807
- display: flex;
1808
- -webkit-flex-flow: row wrap;
1809
- justify-content: center;
1810
- -webkit-justify-content: center;
1811
- flex-wrap: nowrap;
1812
- }
1813
-
1814
- .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div {
1815
- padding: 15px 30px;
1816
- background: #f1f1f1;
1817
- margin-left: 10px;
1818
- max-width: 120px;
1819
- width: 100%;
1820
- }
1821
-
1822
- .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div:last-child {
1823
- margin-left: 0;
1824
- }
1825
-
1826
- .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-span {
1827
- display: block;
1828
- font-size: 36px;
1829
- font-weight: bold;
1830
- text-align: center;
1831
- }
1832
-
1833
- .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-text {
1834
- display: block;
1835
- font-size: 16px;
1836
- font-weight: bold;
1837
- text-align: center;
1838
- }
1839
-
1840
- .response-inner-wrap .inside {
1841
- padding: 10px;
1842
- margin: 0;
1843
- }
1844
-
1845
- .response-inner-wrap .inside .qmn_question_answer {
1846
- background-color: #f1f1f1;
1847
- padding: 10px;
1848
- margin-bottom: 0;
1849
- background-repeat: no-repeat;
1850
- background-position: 5% center;
1851
- padding-left: 12%;
1852
- }
1853
-
1854
- .response-inner-wrap .inside .qmn_question_answer:nth-child(2n) {
1855
- background-color: #fff;
1856
- }
1857
-
1858
- .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_incorrect {
1859
- background-image: url(../assets/wrong.png);
1860
- }
1861
-
1862
- .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_incorrect,
1863
- .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_incorrect {
1864
- background-image: none;
1865
- }
1866
-
1867
- .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_correct {
1868
- background-image: url(../assets/right.png);
1869
- }
1870
-
1871
- .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_correct,
1872
- .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_correct {
1873
- background-image: none;
1874
- }
1875
-
1876
- .old_template_result_wrap {
1877
- padding: 15px;
1878
- background: #fff;
1879
- }
1880
-
1881
- .result-page-title {
1882
- text-align: right;
1883
- display: inline-block;
1884
- float: right;
1885
- font-size: 23px;
1886
- font-weight: 400;
1887
- margin: 0;
1888
- line-height: 30px;
1889
- }
1890
-
1891
- .result-tab-content a.button>span.dashicons {
1892
- line-height: 29px;
1893
- font-size: 18px;
1894
- margin-right: -4px;
1895
- margin-left: -4px;
1896
- }
1897
-
1898
- .result-page-wrapper .tablenav-pages {
1899
- margin-right: 10px;
1900
- }
1901
-
1902
- .result-page-wrapper .tablenav.top {
1903
- margin-bottom: 20px;
1904
- margin-top: 20px;
1905
- }
1906
-
1907
- .inner-sidebar1 .handlediv {
1908
- display: none !important;
1909
- }
1910
-
1911
- .inner-sidebar1 .hndle {
1912
- padding-right: 10px;
1913
- padding-top: 10px;
1914
- margin: 0;
1915
- padding-bottom: 10px;
1916
- }
1917
-
1918
- .inner-sidebar1 .inside h3,
1919
- .inner-sidebar1 .inside h4 {
1920
- margin-bottom: 10px;
1921
- }
1922
-
1923
- .qsm-quiz-email-tab,
1924
- .qsm-quiz-result-tab {
1925
- max-width: 1200px;
1926
- width: 100%;
1927
- }
1928
-
1929
- .qsm-quiz-email-tab .qsm-show-all-variable-text span.dashicons,
1930
- .qsm-quiz-result-tab .qsm-show-all-variable-text span.dashicons {
1931
- font-size: 16px;
1932
- line-height: 22px;
1933
- }
1934
-
1935
- .qsm-quiz-email-tab .qsm-show-all-variable-text,
1936
- .qsm-quiz-result-tab .qsm-show-all-variable-text {
1937
- position: fixed;
1938
- bottom: 20px;
1939
- left: 25px;
1940
- background: #fff;
1941
- color: #5c5959;
1942
- padding: 10px 20px;
1943
- box-sizing: border-box;
1944
- z-index: 99;
1945
- border-radius: 5px;
1946
- border: 1px solid #cdbaba;
1947
- cursor: pointer;
1948
- text-decoration: none;
1949
- }
1950
-
1951
- .popup-template-span-wrap .popup-copied-des {
1952
- color: green;
1953
- }
1954
-
1955
- .popup-template-span-wrap .popup-copied-des span.dashicons {
1956
- line-height: 28px;
1957
- }
1958
-
1959
- .comment-inner-wrap {
1960
- display: none;
1961
- }
1962
-
1963
- #qsm_themes h2.wp-heading-inline {
1964
- display: inline-block;
1965
- margin-left: 5px;
1966
- }
1967
-
1968
- /**
1969
- * Style tab design
1970
- */
1971
- .wp-upload-form {
1972
- background: #fafafa;
1973
- border: 1px solid #ccd0d4;
1974
- padding: 30px;
1975
- margin: 0 auto 30px 0;
1976
- display: inline-flex;
1977
- justify-content: space-between;
1978
- align-items: center;
1979
- }
1980
-
1981
- @media (min-width: 768px) and (max-width: 1199px) {
1982
- .qsm-news-ads .qsm-info-widget {
1983
- float: right;
1984
- max-width: unset;
1985
- width: 31.3%;
1986
- }
1987
-
1988
- .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
1989
- clear: both;
1990
- }
1991
-
1992
- .remove-ads-adv-link {
1993
- width: 100%;
1994
- display: inline-block;
1995
- margin-bottom: 30px;
1996
- }
1997
- }
1998
-
1999
- @media screen and (max-width: 782px) {
2000
- .form-table td fieldset label {
2001
- margin-top: -1px !important;
2002
- vertical-align: top;
2003
- }
2004
-
2005
- .qsm-tooltips-icon .qsm-tooltips {
2006
- right: -90px;
2007
- }
2008
-
2009
- .qsm-opt-tr .qsm-tooltips-icon {
2010
- left: 13px;
2011
- }
2012
-
2013
- .qsm-tooltips-icon .qsm-tooltips:before {
2014
- right: auto;
2015
- left: -3px;
2016
- }
2017
- }
2018
-
2019
- @media screen and (max-width: 767px) {
2020
- .qsm-quiz-row td:nth-of-type(2n) {
2021
- display: none;
2022
- }
2023
-
2024
- .qsm-quiz-page-wrapper,
2025
- .qsm-quiz-page-wrapper-with-ads {
2026
- overflow-x: auto;
2027
- }
2028
-
2029
- .qsm-quiz-page-wrapper thead th:nth-of-type(2n),
2030
- .qsm-quiz-page-wrapper tfoot th:nth-of-type(2n),
2031
- .qsm-quiz-page-wrapper-with-ads thead th:nth-of-type(2n),
2032
- .qsm-quiz-page-wrapper-with-ads tfoot th:nth-of-type(2n) {
2033
- display: none;
2034
- }
2035
-
2036
- .qsm-quiz-page-wrapper .row-actions {
2037
- display: inline-block !important;
2038
- }
2039
-
2040
- .qsm-quiz-page-wrapper p.search-box {
2041
- bottom: -30px;
2042
- }
2043
-
2044
- .qsm-popup__container {
2045
- min-width: auto;
2046
- max-width: 100%;
2047
- }
2048
-
2049
- #show-advanced-option {
2050
- display: block;
2051
- width: 100%;
2052
- float: right;
2053
- }
2054
-
2055
- .contact-form-label {
2056
- display: inline-block;
2057
- }
2058
-
2059
- .template_variable {
2060
- width: 100%;
2061
- max-width: 100%;
2062
- margin-bottom: 10px;
2063
- word-break: break-word;
2064
- }
2065
-
2066
- .qsm_tab_content .form-table input[type="radio"] {
2067
- top: 6px;
2068
- margin-bottom: 8px;
2069
- }
2070
-
2071
- .result-page-wrapper form {
2072
- overflow: scroll;
2073
- width: 100%;
2074
- }
2075
-
2076
- p.search-box {
2077
- bottom: -30px;
2078
- }
2079
-
2080
- .quizzes-surveys_page_qsm_quiz_help .hndle {
2081
- padding-right: 15px;
2082
- padding-bottom: 15px;
2083
- }
2084
-
2085
- .qsm-news-ads .qsm-info-widget {
2086
- width: calc(100% - 30px);
2087
- max-width: 100%;
2088
- box-sizing: border-box;
2089
- margin: 15px 15px 0 15px;
2090
- }
2091
-
2092
- .form-table .qsm-opt-tr {
2093
- padding-bottom: 10px;
2094
- }
2095
-
2096
- .overview-main-wrapper {
2097
- display: block;
2098
- }
2099
-
2100
- .overview-main-wrapper .overview-inner-wrap {
2101
- margin-left: 0;
2102
- width: 100%;
2103
- }
2104
-
2105
- .result-page-title {
2106
- margin-bottom: 10px;
2107
- }
2108
- }
2109
-
2110
- .qsm-text-template-span .button{
2111
- padding: 0px;
2112
- border: none;
2113
- min-height: unset;
2114
- font-size: 12px;
2115
- background: unset;
2116
- }
2117
-
2118
- .qsm-text-template-span .template-variable:hover {
2119
- background: unset;
2120
- }
2121
-
2122
-
2123
- .qsm-text-template-span .click-to-copy{
2124
- display: none;
2125
- position: absolute;
2126
- width: calc(100% - 25px);
2127
- text-align: center;
2128
- left: 0;
2129
- }
2130
-
2131
-
2132
- .qsm-text-template-span:hover .click-to-copy{
2133
- display: inline-block;
2134
- background: #def0ff;
2135
- }
2136
-
2137
-
2138
- .qsm-text-template-span .qsm-tooltips-icon:before{
2139
- content:"\003F";
2140
- padding: 0px 3px;
2141
- vertical-align: top;
2142
- }
2143
-
2144
- .qsm-text-template-span:hover .qsm-tooltips-icon{
2145
- display: inline-block;
2146
-
2147
- }
2148
-
2149
- .qsm-text-template-span:hover .temp-var-seperator{
2150
- position: absolute;
2151
- display: flex;
2152
- right: 0;
2153
- top: 0;
2154
- align-items: center;
2155
- justify-content: center;
2156
- height: 100%;
2157
- width:25px;
2158
- z-index:99;
2159
- border-left: 1px dashed #a1c1d8;
2160
- background: #def0ff;
2161
- }
2162
-
2163
- #show-all-variable-content .popup-template-span-wrap:hover{
2164
- background: #def0ff;
2165
- border-color: #a1c1d8 ;
2166
- border-style: dashed;
2167
- }
2168
-
2169
- .popup-template-span-wrap .qsm-text-template-span .popup-copied-des span.dashicons{
2170
- line-height: 1;
2171
- }
2172
-
2173
- #result_page_fb_image {
2174
- width: 25em;
2175
- }
1
+ .qsm-help-tab-dropdown-list{transform: translateX(-100%);left: 0;right: auto;}
2
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item{text-align: right;}
3
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item:after{content: '\f340';left: 20px;right:auto;}
4
+ .qsm-toggle-box .toggle-indicator{float: left;}
5
+ .contact-tab-content{margin-right: 0;margin-left: 40px;}
6
+ .contact-tab-content .hide-control{float: left;}
7
+ .contact-form-field-settings{left: 0;right: auto;}
8
+ .contact-form-field-settings:after, .contact-form-field-settings:before{right: 28%;left: auto;}
9
+ .contact-tab-sidebar .inside .inside-row input[type=checkbox]{margin: -0.25rem 0 0 8px;}
10
+ .contact-form-field .sortable-handle{padding: 0 15px 0 0;}
11
+ .qsm_tab_content label{margin-left:5px;margin-right: 0;}
12
+ .form-table .qsm-opt-tr{padding-left: 24px;padding-right: 0;}
13
+ .qsm-quiz-email-tab .qsm-show-all-variable-text, .qsm-quiz-result-tab .qsm-show-all-variable-text{left: 25px;right: auto;}
14
+ .qsm-option-tab-dropdown-list{right: 0;left: auto;}
15
+ .nav-tab{margin-left: .5em;margin-right: 0;}
16
+ .qsm-option-tab-dropdown-item{margin:0;}
17
+ .overview-main-wrapper .overview-inner-wrap:last-child {margin-left: 0;}
18
+ .overview-main-wrapper .overview-inner-wrap {margin-left: 2%;margin-right: 0;}
19
+ div.qsm_icon_wrap{left:0;right:auto;}
20
+ .text-right{text-align: left !important;}
21
+ .text-left{text-align: right !important;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/qsm-admin.css CHANGED
@@ -1,51 +1,42 @@
1
- /********************
2
- Quizzes/Surveys Page
3
- *********************/
4
-
5
  /*.qsm-quizes-page .widefat td {
6
- font-size: 16px !important;
7
- }*/
8
-
9
  @-moz-keyframes qsm-spinner-loader {
10
  0% {
11
  -moz-transform: rotate(0deg);
12
  transform: rotate(0deg);
13
- }
14
-
15
  100% {
16
  -moz-transform: rotate(360deg);
17
  transform: rotate(360deg);
18
- }
19
  }
20
-
21
  @-webkit-keyframes qsm-spinner-loader {
22
  0% {
23
  -webkit-transform: rotate(0deg);
24
  transform: rotate(0deg);
25
- }
26
-
27
  100% {
28
  -webkit-transform: rotate(360deg);
29
  transform: rotate(360deg);
30
- }
31
  }
32
-
33
  @keyframes qsm-spinner-loader {
34
  0% {
35
  -moz-transform: rotate(0deg);
36
  -ms-transform: rotate(0deg);
37
  -webkit-transform: rotate(0deg);
38
  transform: rotate(0deg);
39
- }
40
-
41
  100% {
42
  -moz-transform: rotate(360deg);
43
  -ms-transform: rotate(360deg);
44
  -webkit-transform: rotate(360deg);
45
  transform: rotate(360deg);
46
- }
47
  }
48
-
49
  /* :not(:required) hides this rule from IE9 and below */
50
  .qsm-spinner-loader:not(:required) {
51
  -moz-animation: qsm-spinner-loader 1500ms infinite linear;
@@ -54,21 +45,9 @@ Quizzes/Surveys Page
54
  -moz-border-radius: 0.5em;
55
  -webkit-border-radius: 0.5em;
56
  border-radius: 0.5em;
57
- -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
58
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
59
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
60
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
61
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
62
- -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
63
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
64
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
65
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
66
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
67
- box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0,
68
- rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0,
69
- rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0,
70
- rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0,
71
- rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
72
  display: inline-block;
73
  font-size: 10px;
74
  width: 1em;
@@ -77,33 +56,27 @@ Quizzes/Surveys Page
77
  overflow: hidden;
78
  text-indent: 100%;
79
  }
80
-
81
  span.qsm-quiz-name {
82
  font-size: 14px;
83
  font-weight: 600;
84
  }
85
-
86
  .qsm-quizzes-page-content {
87
  display: flex;
88
  flex-direction: column;
89
  justify-content: space-between;
90
  }
91
-
92
  .qsm-quiz-page-wrapper {
93
  flex-grow: 1;
94
  }
95
-
96
  .qsm-quiz-page-wrapper-with-ads {
97
  flex-grow: 1;
98
  }
99
-
100
  .qsm-news-ads {
101
  background-color: #fff;
102
  border: 1px solid #dfd4d4;
103
  margin-top: 30px;
104
  display: none;
105
  }
106
-
107
  .qsm-news-ads-title {
108
  text-align: center;
109
  border-bottom: 1px solid #dfd4d4;
@@ -111,90 +84,74 @@ span.qsm-quiz-name {
111
  padding: 10px 0;
112
  background-color: #fff;
113
  }
114
-
115
  .qsm-edit-name {
116
  font-size: 12px !important;
117
  }
118
-
119
  .qsm-action-link {
120
  font-size: 14px !important;
121
  }
122
-
123
  .qsm-action-links:hover {
124
  background-color: black;
125
  }
126
-
127
- .qsm-action-link-delete {
128
  color: red !important;
 
 
 
129
  }
130
-
131
  .qsm-dialog-form label {
132
  display: inline-block;
133
  font-size: 16px;
134
  font-weight: bold;
135
  padding-right: 30px;
136
  }
137
-
138
  .qsm-quiz-page-addon {
139
  width: 100%;
140
  float: left;
141
  }
142
-
143
  .qsm-addon-browse-addons {
144
  background: #fff;
145
  padding: 0;
146
  width: 100%;
147
- display: inline-block;
148
  box-sizing: border-box;
149
  margin-bottom: 30px;
 
 
 
150
  }
151
-
152
- .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon {
153
- float: left;
154
- }
155
-
156
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon {
157
- padding-top: 9px;
158
- padding-left: 30px;
159
  }
160
-
161
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a.active {
162
  background: #222;
163
  color: #fff;
164
  outline: none;
165
  box-shadow: none;
166
  }
167
-
168
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a {
169
  padding: 7px 15px;
170
  font-weight: normal;
171
  border-radius: 5px;
172
  }
173
-
174
  .qsm-addon-browse-addons .qsm-addon-anchor-left {
175
- float: left;
176
  }
177
-
178
  .qsm-addon-browse-addons .qsm-addon-list-right {
179
- float: right;
180
- padding-top: 15px;
181
- padding-right: 30px;
182
  }
183
-
184
  .qsm-addon-browse-addons .qsm-addon-list-right>span {
185
- margin-right: 10px;
186
  font-size: 16px;
187
  }
188
-
189
  .qsm-addon-browse-addons .qsm-addon-anchor-left a {
190
  display: inline-block;
191
  font-size: 16px;
192
  color: #474444;
193
  text-decoration: none;
194
- /*margin-top: 5px;*/
195
- margin-right: 15px;
196
  }
197
-
198
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a {
199
  background: #aaaaaa;
200
  padding: 15px 25px;
@@ -202,39 +159,35 @@ span.qsm-quiz-name {
202
  margin-right: -4px;
203
  box-sizing: border-box;
204
  }
205
-
206
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a span.dashicons {
207
  height: 15px;
208
  }
209
-
210
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a.active {
211
  background: #007cba;
212
  }
213
-
214
  .qsm_popular_addons div.popuar-addon-ul {
215
  width: 100%;
216
- display: inline-block;
 
217
  }
218
-
219
  .qsm_popular_addons div.popuar-addon-ul>div {
220
  background: #fff;
221
  padding: 10px;
222
  width: 31%;
223
  margin-right: 2%;
224
- float: left;
225
- margin-bottom: 30px;
226
  box-sizing: border-box;
 
227
  }
228
-
229
  .qsm_popular_addons div.popuar-addon-ul>div:nth-child(3n + 4) {
230
  clear: both;
231
  }
232
-
233
  .qsm_popular_addons div.popuar-addon-ul .addon-itd-wrap {
234
  width: 100%;
235
- display: inline-block;
 
 
236
  }
237
-
238
  .qsm_popular_addons div.popuar-addon-ul .addon-image {
239
  width: 100px;
240
  height: 80px;
@@ -242,19 +195,14 @@ span.qsm-quiz-name {
242
  background-repeat: no-repeat;
243
  background-position: center center;
244
  background-color: #f0f0f0;
245
- float: left;
246
  }
247
-
248
  .qsm_popular_addons div.popuar-addon-ul .addon-title-descption {
249
  width: calc(100% - 110px);
250
- float: right;
251
  }
252
-
253
  .qsm_popular_addons div.popuar-addon-ul .description {
254
  display: block;
255
  margin-bottom: 5px;
256
  }
257
-
258
  .qsm_popular_addons div.popuar-addon-ul .addon-title {
259
  font-size: 16px;
260
  color: #222;
@@ -263,13 +211,14 @@ span.qsm-quiz-name {
263
  margin-bottom: 5px;
264
  display: block;
265
  }
266
-
267
  .qsm_popular_addons div.popuar-addon-ul .addon-price {
268
  border-top: 1px solid #f1f1f1;
269
  padding-top: 10px;
270
  margin-top: 15px;
 
 
 
271
  }
272
-
273
  .qsm_popular_addons div.popuar-addon-ul .addon-price-btn {
274
  background: #fff;
275
  border: #fff;
@@ -277,23 +226,18 @@ span.qsm-quiz-name {
277
  font-weight: bold;
278
  font-size: 14px;
279
  }
280
-
281
  .qsm_popular_addons div.popuar-addon-ul .addon-get-link {
282
- float: right;
283
  background: #fff;
284
  color: #007cba;
285
  border-width: 2px;
286
  font-weight: bold;
287
  }
288
-
289
  .qsm_popular_addons div.popuar-addon-ul .addon-get-link span.dashicons {
290
  margin-top: 4px;
291
  }
292
-
293
  .qsm_popular_addons div.popuar-addon-ul>div .description-wrap {
294
  padding: 20px;
295
  }
296
-
297
  .qsm_popular_addons div.popuar-addon-ul>div .description-wrap .description {
298
  display: block;
299
  width: 100%;
@@ -301,17 +245,14 @@ span.qsm-quiz-name {
301
  font-size: 14px;
302
  font-style: normal;
303
  }
304
-
305
  .qsm_popular_addons div.popuar-addon-ul>div img {
306
  max-width: 100%;
307
  }
308
-
309
  .qsm-quiz-page-addon.qsm-addon-page-list {
310
  width: 75%;
311
  float: left;
312
  margin-top: 0;
313
  }
314
-
315
  .qsm-addon-news-ads {
316
  width: 25%;
317
  float: right;
@@ -320,7 +261,6 @@ span.qsm-quiz-name {
320
  box-sizing: border-box;
321
  margin-top: 0;
322
  }
323
-
324
  .qsm-addon-news-ads .qsm-news-ads-title {
325
  border-bottom: 0;
326
  margin-top: 20px;
@@ -331,9 +271,7 @@ span.qsm-quiz-name {
331
  position: relative;
332
  font-size: 14px;
333
  }
334
-
335
- .qsm-addon-news-ads .qsm-news-ads-title:before,
336
- .qsm-addon-news-ads .qsm-news-ads-title:after {
337
  content: "";
338
  position: absolute;
339
  height: 0;
@@ -343,33 +281,27 @@ span.qsm-quiz-name {
343
  border-style: solid;
344
  border-width: 25px;
345
  }
346
-
347
  .qsm-addon-news-ads .qsm-news-ads-title:before {
348
  border-color: transparent transparent transparent #007cba;
349
  }
350
-
351
  .qsm-addon-news-ads .qsm-news-ads-title:after {
352
  right: 0;
353
  left: auto;
354
  border-color: transparent #007cba transparent transparent;
355
  }
356
-
357
  .qsm-addon-news-ads .qsm-info-widget {
358
  text-align: left;
359
  padding: 30px;
360
  }
361
-
362
  .qsm-addon-news-ads .qsm-info-widget h3 {
363
  color: #222;
364
  font-weight: bold;
365
  margin-top: 20px;
366
  margin-bottom: 15px;
367
  }
368
-
369
  .qsm-addon-news-ads .qsm-info-widget p {
370
  font-size: 14px;
371
  }
372
-
373
  .qsm-addon-news-ads .qsm-info-widget {
374
  transform: none !important;
375
  max-width: 100%;
@@ -378,7 +310,6 @@ span.qsm-quiz-name {
378
  text-align: center;
379
  margin-top: 70px;
380
  }
381
-
382
  .qsm-addon-news-ads .qsm-info-widget .bundle-icon {
383
  width: 40px;
384
  height: 40px;
@@ -390,20 +321,16 @@ span.qsm-quiz-name {
390
  border: 2px solid #fff;
391
  box-shadow: 0px 0px 5px 1px rgb(0 0 0 / 16%);
392
  }
393
-
394
  .qsm-addon-news-ads .qsm-info-widget .bundle-icon img {
395
  max-width: 40px;
396
  max-height: 40px;
397
  }
398
-
399
  .qsm-addon-news-ads .qsm-info-widget:nth-child(4) .bundle-icon {
400
  background: #2271b1;
401
  }
402
-
403
  .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .bundle-icon {
404
  background: #00b592;
405
  }
406
-
407
  .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn {
408
  color: #fff;
409
  width: 100%;
@@ -412,27 +339,22 @@ span.qsm-quiz-name {
412
  position: relative;
413
  margin-top: 0;
414
  }
415
-
416
  .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn span.dashicons {
417
  position: absolute;
418
  top: 10px;
419
  right: 10px;
420
  }
421
-
422
  .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .addon-bundle-btn {
423
  background: #00b592;
424
  border-color: #00b592;
425
  }
426
-
427
  .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .bundle-icon {
428
  background: #ed706f;
429
  }
430
-
431
  .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .addon-bundle-btn {
432
  background: #ed706f;
433
  border-color: #ed706f;
434
  }
435
-
436
  .qsm-active-addons .installed_title {
437
  background: #fff;
438
  margin: 0;
@@ -442,13 +364,11 @@ span.qsm-quiz-name {
442
  font-size: 16px;
443
  display: none;
444
  }
445
-
446
- .qsm-active-addons .installed_addons_wrapper,
447
- .qsm-active-addons .no_addons_installed {
448
  border: 1px solid #ccd0d4;
449
- /*border-top: medium none;*/
 
450
  }
451
-
452
  .qsm-active-addons .no_addons_installed {
453
  padding: 30px 25%;
454
  background: #fff;
@@ -457,134 +377,96 @@ span.qsm-quiz-name {
457
  font-size: 16px;
458
  line-height: 22px;
459
  }
460
-
461
  .qsm-active-addons .no_addons_installed a {
462
  margin-top: 20px;
463
  }
464
-
465
  .qsm-active-addons .installed_addons_wrapper .installed_addon {
466
- padding: 15px 15px 27px 15px;
467
  background: #fff;
468
  border-bottom: 1px solid #cdc7c7;
 
 
 
469
  }
470
-
471
  .qsm-active-addons .installed_addons_wrapper .installed_addon:last-child {
472
  border-bottom: medium none;
473
  }
474
-
475
  .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_name {
476
  font-size: 14px;
477
  font-weight: bold;
478
- position: relative;
479
- top: 5px;
480
- }
481
-
482
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link {
483
- float: right;
484
- }
485
-
486
- .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link a {
487
- background: #fff;
488
- border-width: 2px;
489
- font-weight: 500;
490
- font-size: 13px;
491
- padding-left: 15px;
492
- padding-right: 15px;
493
  }
494
-
495
  .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link span.dashicons {
496
  margin-top: 4px;
497
  }
498
-
499
  .qsm-active-addons {
500
  width: 100%;
501
  box-sizing: border-box;
502
  margin-bottom: 30px;
503
  }
504
-
505
  .quizzes-surveys_page_qmn_addons .qsm-news-ads {
506
  width: 15%;
507
  float: right;
508
  }
509
-
510
- .qsm-help-page .handle-order-higher,
511
- .qsm-help-page .handle-order-lower {
512
  display: none;
513
  }
514
-
515
  @media screen and (min-width: 1200px) {
516
  .qsm-quiz-page-wrapper-with-ads {
517
  margin-right: 0;
518
  width: 100%;
519
- }
520
-
521
  .qsm-news-ads .qsm-info-widget {
522
  float: left;
523
  max-width: unset;
524
  width: 31.3%;
525
- }
526
-
527
  .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
528
  clear: both;
529
- }
530
-
531
  .qsm-news-ads .remove-ads-adv-link {
532
  width: 100%;
533
  float: left;
534
- }
535
  }
536
-
537
  @media screen and (max-width: 767px) {
538
  .qsm-quiz-page-addon {
539
  width: 100%;
540
- }
541
-
542
  .quizzes-surveys_page_qmn_addons .qsm-news-ads {
543
  width: 100%;
544
- }
545
  }
546
-
547
- /********************
548
- Options Page
549
- *********************/
550
-
551
  .template_list_holder {
552
  width: 100%;
553
  }
554
-
555
  .template_variable {
556
  width: 50%;
557
  float: left;
558
  font-size: 14px;
559
  }
560
-
561
  .template_name {
562
  font-weight: bold;
563
  }
564
-
565
- /********************
566
- Results Pages & Emails Tab
567
- *********************/
568
- .results-page,
569
- #qsm_emails .qsm-email {
570
  width: 100%;
571
  background-color: #fff;
572
  margin: 20px 0;
573
- /*padding-bottom: 15px;*/
 
574
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.06);
575
  }
576
-
577
- .results-page .results-page-content,
578
- #qsm_emails .qsm-email .qsm-email-content {
579
  background: #fff;
580
  padding-right: 15px;
581
  padding-left: 15px;
582
  width: 100%;
583
  box-sizing: border-box;
584
  }
585
-
586
- .results-page-header,
587
- #qsm_emails .qsm-email-header {
588
  display: flex;
589
  align-items: center;
590
  justify-content: flex-end;
@@ -592,8 +474,6 @@ Results Pages & Emails Tab
592
  padding: 10px 35px;
593
  border-bottom: 1px solid #dfd4d4;
594
  }
595
-
596
- .delete-page-button,
597
  #qsm_emails .delete-email-button {
598
  background: none;
599
  border: none;
@@ -601,66 +481,42 @@ Results Pages & Emails Tab
601
  cursor: pointer;
602
  transition-duration: 200ms;
603
  }
604
-
605
- .delete-page-button:hover,
606
  #qsm_emails .delete-email-button:hover {
607
  transform: scale(1.2);
608
  }
609
-
610
- .results-page-content,
611
- .qsm-email-content {
612
  display: flex;
613
  flex-direction: column;
614
  }
615
-
616
- .results-page-when,
617
- .results-page-show,
618
- .email-when,
619
- .email-show {
620
  padding: 10px;
621
  background-color: #f1f1f1;
622
  border: 1px solid #dfd4d4;
623
  margin: 15px 0;
624
  min-width: 60%;
625
  }
626
-
627
- .results-page-when,
628
- .email-when {
629
  margin-right: 15px;
630
  }
631
-
632
- .results-page-content-header,
633
- .email-content-header {
634
  margin-bottom: 10px;
635
  }
636
-
637
  .email-show label {
638
  margin-bottom: 5px;
639
  display: block;
640
  }
641
-
642
- .results-page-content-header h4,
643
- .results-page-content-header p,
644
- .email-content-header h4,
645
- .email-content-header p {
646
  margin: 0;
647
  }
648
-
649
- .results-page-condition,
650
- .email-condition {
651
  display: flex;
652
  flex-direction: column;
653
  margin-bottom: 15px;
654
- /* justify-content: space-around; */
655
  }
656
-
657
- .results-page-condition>select,
658
- .results-page-condition>input,
659
- .email-condition>select,
660
- .email-condition>input {
661
  max-width: 100%;
662
  }
663
-
664
  .delete-condition-button {
665
  background: none;
666
  border: 1px solid #1dd969;
@@ -669,95 +525,63 @@ Results Pages & Emails Tab
669
  transition-duration: 200ms;
670
  padding: 6px;
671
  }
672
-
673
  .delete-condition-button:hover {
674
  transform: scale(1.1);
675
  }
676
-
677
  .email-show .label {
678
  display: block;
679
  }
680
-
681
- .results-page-show textarea,
682
- .to-email,
683
- .subject,
684
- .email-template {
685
  width: 100%;
686
  margin-bottom: 10px;
687
  }
688
-
689
  @media screen and (min-width: 760px) {
690
-
691
- .results-page-content,
692
- .qsm-email-content {
693
  flex-direction: row;
694
  justify-content: space-around;
695
- }
696
-
697
- .results-page-when,
698
- .results-page-show,
699
- .email-when,
700
- .email-show {
701
  width: calc(50% - 15px);
702
  min-width: unset;
703
- }
704
-
705
- .results-page-condition,
706
- .email-condition {
707
  align-items: center;
708
  flex-direction: row;
709
- }
710
-
711
- .results-page-condition>select,
712
- .results-page-condition>input,
713
- .email-condition>select,
714
- .email-condition>input {
715
  max-width: 23%;
716
- }
717
-
718
  .delete-condition-button {
719
  border: none;
720
- }
721
  }
722
-
723
- /********************
724
- Quiz Styles Tab
725
- *********************/
726
-
727
  .qsm-styles {
728
  display: flex;
729
  flex-direction: column;
730
  }
731
-
732
  .qsm_featured_image_preview {
733
  max-height: 200px;
734
  max-width: 300px;
735
  margin: 5px 0;
736
  border-radius: 3px;
737
  }
738
-
739
  .qsm_featured_image_preview:hover:before {
740
  content: "\f147";
741
  font-family: "dashicons";
742
  color: #5cb85c;
743
  margin-right: 5px;
744
  }
745
-
746
-
747
  @media screen and (min-width: 700px) {
748
  .qsm-styles {
749
  flex-direction: row;
750
  flex-wrap: wrap;
751
- }
752
  }
753
-
754
- /********************
755
- About/Credits Page
756
- *********************/
757
-
758
  div.qsm_icon_wrap {
759
  position: absolute;
760
- top: 0;
761
  right: 0;
762
  background-color: rgba(54, 58, 66, 1);
763
  color: #1dd969;
@@ -767,7 +591,7 @@ div.qsm_icon_wrap {
767
  text-align: center;
768
  font-weight: 600;
769
  margin: 5px 0 0;
770
- padding-top: 120px;
771
  height: 40px;
772
  display: inline-block;
773
  width: 150px;
@@ -778,11 +602,9 @@ div.qsm_icon_wrap {
778
  -khtml-border-radius: 20px;
779
  border-radius: 20px;
780
  }
781
-
782
  .qsm-tab-content .feature {
783
  margin-bottom: 20px;
784
  }
785
-
786
  .qsm-tab-content .feature .feature-headline {
787
  margin: 1.1em 0 0.2em;
788
  font-size: 40px;
@@ -790,21 +612,17 @@ div.qsm_icon_wrap {
790
  line-height: 1.3;
791
  text-align: center;
792
  }
793
-
794
  .qsm-tab-content .feature .feature-text {
795
  text-align: center;
796
  font-size: 16px;
797
  }
798
-
799
  ul.changelog {
800
  background-color: #fff;
801
  padding: 10px 10px;
802
  }
803
-
804
  ul.changelog li {
805
  padding: 4px 0px;
806
  }
807
-
808
  ul.changelog li div.two {
809
  width: 70%;
810
  float: left;
@@ -815,91 +633,68 @@ ul.changelog li div.two {
815
  text-align: center;
816
  line-height: 25px;
817
  }
818
-
819
  ul.changelog li.fixed>div {
820
  background: #f0ffe1;
821
  color: #444;
822
  border-right: 1px solid #5cb85c;
823
  width: 20%;
824
  }
825
-
826
  ul.changelog li.fixed div.two:before {
827
  content: "\f147";
828
  font-family: "dashicons";
829
  color: #5cb85c;
830
  margin-right: 5px;
831
  }
832
-
833
  ul.changelog li.add>div {
834
  background: #ffeed0;
835
  color: #444;
836
  border-right: 1px solid #efa537;
837
  width: 20%;
838
  }
839
-
840
  ul.changelog li.add div.two:before {
841
  content: "\f155";
842
  font-family: "dashicons";
843
  color: #efa537;
844
  margin-right: 5px;
845
  }
846
-
847
  ul.changelog li.update>div {
848
  background: #bde7ff;
849
  color: #444;
850
  border-right: 1px solid #106daa;
851
  width: 20%;
852
  }
853
-
854
  ul.changelog li.update div.two:before {
855
  content: "\f463";
856
  font-family: "dashicons";
857
  color: #106daa;
858
  margin-right: 5px;
859
  }
860
-
861
- /********************
862
- Addons Page
863
- *********************/
864
-
865
  .qsm-addons {
866
  display: flex;
867
  flex-direction: column;
868
  }
869
-
870
  @media screen and (min-width: 700px) {
871
  .qsm-addons {
872
  flex-direction: row;
873
  flex-wrap: wrap;
874
- }
875
  }
876
-
877
- /********************
878
- Help Page
879
- *********************/
880
-
881
  .quiz_email_support p#mlw_support_message {
882
  color: red;
883
  font-size: 20px;
884
  }
885
-
886
- .quiz_email_support input,
887
- .quiz_email_support textarea {
888
  width: 100% !important;
889
  }
890
-
891
  .quiz_email_support textarea {
892
  min-height: 200px;
893
  }
894
-
895
  .quiz_email_support label {
896
  font-weight: bold;
897
  }
898
-
899
- /********************
900
- Misc.
901
- *********************/
902
-
903
  /* Ads */
904
  .help-decide {
905
  display: block;
@@ -909,35 +704,32 @@ Misc.
909
  color: #000;
910
  font-weight: bold;
911
  }
912
-
913
  .help-decide p {
914
  font-size: 14px;
915
  }
916
-
917
  /* Info Bar */
918
  .qsm-info-box {
919
  display: block;
920
  text-align: center;
921
  background: #fff;
922
  border: 1px solid #dfd4d4;
923
- /* color: #000; */
 
924
  font-weight: bold;
925
- /* font-size: 14px; */
 
926
  margin-bottom: 20px;
927
  margin-top: 10px;
928
  }
929
-
930
  .qsm-info-box p {
931
  font-size: 14px;
932
  }
933
-
934
  /* Info Widget */
935
  .qsm-quiz-page-addon .qsm-info-widget {
936
  margin-top: 0;
937
  background: #fff;
938
  margin-left: 0;
939
  }
940
-
941
  .qsm-info-widget {
942
  text-align: center;
943
  border: 1px solid #dfd4d4;
@@ -948,82 +740,76 @@ Misc.
948
  max-width: 330px;
949
  box-sizing: border-box;
950
  }
951
-
 
 
 
952
  .admin_page_mlw_quiz_options .qsm-info-widget {
953
  background: #fff;
954
  margin: 0 0 20px 0;
955
  cursor: pointer;
956
  }
957
-
958
- .admin_page_mlw_quiz_options .qsm-info-widget:hover,
959
- .admin_page_mlw_quiz_options div.mlw_qmn_themeBlockActive.qsm-info-widget {
960
  background-color: #333;
961
  color: #fff;
962
  }
963
-
964
  #mlw_qmn_theme_block_primary {
965
  background-color: #005e8e;
966
  color: #fff;
967
  }
968
-
969
  #mlw_qmn_theme_block_amethyst {
970
  background-color: #9b59b6;
971
  color: #fff;
972
  }
973
-
974
  #mlw_qmn_theme_block_emerald {
975
  background-color: #006732;
976
  color: #fff;
977
  }
978
-
979
  #mlw_qmn_theme_block_turquoise {
980
  background-color: #006552;
981
  color: #fff;
982
  }
983
-
984
  #mlw_qmn_theme_block_gray {
985
  background-color: #595959;
986
  color: #fff;
987
  }
988
-
989
  .mlw_qmn_themeBlockActive.qsm-info-widget {
990
  transform: scale(1.1);
991
  border: 2px solid #d5a8a8;
992
  }
993
-
994
  .qsm-info-widget a.button-primary {
995
  margin-top: 15px;
996
  }
997
-
998
  .qsm-quiz-page-addon a.button-primary {
999
  margin-top: 0 !important;
1000
  }
1001
-
1002
  .qsm-info-widget:hover {
1003
  transform: scale(1.1);
1004
  }
1005
-
1006
  /* Options tabs */
1007
- .qsm_tab_content,
1008
- .mlw_tab_content {
1009
  padding: 10px 10px 10px 10px;
1010
  }
1011
-
1012
  .admin_page_mlw_quiz_options .qsm_tab_content>form>.button-primary:nth-child(3) {
1013
  display: none;
1014
  }
1015
-
1016
  .qsm_tab_content label {
1017
  margin-right: 5px;
1018
  }
1019
-
 
 
 
 
 
 
 
 
 
1020
  /* Popup */
1021
-
1022
  .qsm-popup {
1023
- font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
1024
- helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
1025
  }
1026
-
1027
  .qsm-popup__overlay {
1028
  position: fixed;
1029
  top: 0;
@@ -1036,7 +822,6 @@ Misc.
1036
  align-items: center;
1037
  z-index: 9999;
1038
  }
1039
-
1040
  .qsm-popup__container {
1041
  background-color: #fff;
1042
  padding: 30px;
@@ -1047,41 +832,35 @@ Misc.
1047
  overflow-y: auto;
1048
  box-sizing: border-box;
1049
  }
1050
-
1051
  .qsm-popup__header {
1052
  display: flex;
1053
  justify-content: space-between;
1054
  align-items: center;
1055
  }
1056
-
1057
  .qsm-popup__title {
1058
  margin-top: 0;
1059
  margin-bottom: 0;
1060
  font-weight: 600;
1061
  font-size: 1.25rem;
1062
  line-height: 1.25;
1063
- color: #00449e;
1064
  box-sizing: border-box;
1065
  }
1066
-
1067
  .qsm-popup__close {
1068
  background: transparent;
1069
  border: 0;
1070
  color: #00449e;
1071
  text-decoration: none;
1072
  }
1073
-
1074
  .qsm-popup__header .qsm-popup__close:before {
1075
  content: "\2715";
1076
  }
1077
-
1078
  .qsm-popup__content {
1079
  margin-top: 2rem;
1080
  margin-bottom: 2rem;
1081
  line-height: 1.5;
1082
  color: rgba(0, 0, 0, 0.8);
1083
  }
1084
-
1085
  body .qsm-popup__btn {
1086
  font-size: 0.875rem;
1087
  padding-left: 1rem;
@@ -1099,100 +878,71 @@ body .qsm-popup__btn {
1099
  overflow: visible;
1100
  line-height: 1.15;
1101
  margin: 0;
1102
- will-change: transform;
1103
- -moz-osx-font-smoothing: grayscale;
1104
- -webkit-backface-visibility: hidden;
1105
- backface-visibility: hidden;
1106
- -webkit-transform: translateZ(0);
1107
- transform: translateZ(0);
1108
- transition: -webkit-transform 0.25s ease-out;
1109
- transition: transform 0.25s ease-out;
1110
- transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
1111
- }
1112
-
1113
- .qsm-popup__btn:focus,
1114
- .qsm-popup__btn:hover {
1115
- -webkit-transform: scale(1.05);
1116
- transform: scale(1.05);
1117
- }
1118
-
1119
  body .qsm-popup__btn-primary {
1120
  background-color: #00449e;
1121
  color: #fff;
1122
  }
1123
-
1124
  @keyframes mmfadeIn {
1125
  from {
1126
  opacity: 0;
1127
- }
1128
-
1129
  to {
1130
  opacity: 1;
1131
- }
1132
  }
1133
-
1134
  @keyframes mmfadeOut {
1135
  from {
1136
  opacity: 1;
1137
- }
1138
-
1139
  to {
1140
  opacity: 0;
1141
- }
1142
  }
1143
-
1144
  @keyframes mmslideIn {
1145
  from {
1146
  transform: translateY(15%);
1147
- }
1148
-
1149
  to {
1150
  transform: translateY(0);
1151
- }
1152
  }
1153
-
1154
  @keyframes mmslideOut {
1155
  from {
1156
  transform: translateY(0);
1157
- }
1158
-
1159
  to {
1160
  transform: translateY(-10%);
1161
- }
1162
  }
1163
-
1164
  .qsm-popup-slide {
1165
  display: none;
1166
  }
1167
-
1168
  .qsm-popup-slide.is-open {
1169
  display: block !important;
1170
  }
1171
-
1172
  .qsm-popup-slide[aria-hidden="false"] .qsm-popup__overlay {
1173
  animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
1174
  }
1175
-
1176
  .qsm-popup-slide[aria-hidden="false"] .qsm-popup__container {
1177
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
1178
  }
1179
-
1180
  .qsm-popup-slide[aria-hidden="true"] .qsm-popup__overlay {
1181
  animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
1182
  }
1183
-
1184
  .qsm-popup-slide[aria-hidden="true"] .qsm-popup__container {
1185
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
1186
  }
1187
-
1188
- .qsm-popup-slide .qsm-popup__container,
1189
- .qsm-popup-slide .qsm-popup__overlay {
1190
  will-change: transform;
1191
  }
1192
-
1193
- /**
1194
- * Shortcode accordion
1195
- */
 
 
 
1196
  .sc-opener {
1197
  position: relative;
1198
  font-size: 14px !important;
@@ -1202,39 +952,32 @@ body .qsm-popup__btn-primary {
1202
  color: #0073aa !important;
1203
  font-weight: 500;
1204
  }
1205
-
1206
  .sc-opener span.dashicons {
1207
  position: relative;
1208
  top: 2px;
1209
  margin-right: 5px;
1210
  }
1211
-
1212
  .sc-content {
1213
  display: none;
1214
  }
1215
-
1216
  .quiz-preview-link {
1217
  margin-left: 10px;
1218
  position: relative;
1219
  top: 3px;
1220
  }
1221
-
1222
  #show-advanced-option {
1223
  font-size: 16px;
1224
  cursor: pointer;
1225
  color: #0073aa;
1226
  margin-bottom: 15px;
1227
  }
1228
-
1229
  .remove-ads-adv-link {
1230
  text-align: center;
1231
  margin-top: 30px;
1232
  }
1233
-
1234
  .qsm-info-widget h3 {
1235
  line-height: 132%;
1236
  }
1237
-
1238
  .remove-ads-adv-link a {
1239
  background: #1dd969;
1240
  text-align: center;
@@ -1247,7 +990,6 @@ body .qsm-popup__btn-primary {
1247
  font-weight: bold;
1248
  margin-bottom: 10px;
1249
  }
1250
-
1251
  .help-decide a.remove-adv-button {
1252
  background: #1dd969;
1253
  text-align: center;
@@ -1260,7 +1002,6 @@ body .qsm-popup__btn-primary {
1260
  font-weight: bold;
1261
  margin-left: 10px;
1262
  }
1263
-
1264
  h3.addon_category_name {
1265
  width: 100%;
1266
  background: transparent;
@@ -1268,33 +1009,27 @@ h3.addon_category_name {
1268
  border-bottom: 1px solid #d7d1d1;
1269
  margin-bottom: 30px;
1270
  }
1271
-
1272
  /*Design of new radio taggle*/
1273
  .buttonset.ui-buttonset .ui-button.ui-state-active {
1274
  background: #e21130 none repeat scroll 0 0;
1275
  border-color: #e21130 !important;
1276
  }
1277
-
1278
  .buttonset.ui-buttonset .ui-button.ui-state-active span.ui-button-text {
1279
  color: #fff !important;
1280
  }
1281
-
1282
  .buttonset.ui-buttonset.green .ui-state-active {
1283
  background: #44c767 none repeat scroll 0 0;
1284
  border-color: #44c767 !important;
1285
  }
1286
-
1287
  .buttonset.ui-buttonset .ui-button.ui-state-active.ui-corner-left {
1288
  background: #44c767 none repeat scroll 0 0;
1289
  border-color: #44c767 !important;
1290
  }
1291
-
1292
  .buttonset.ui-buttonset label {
1293
  background: #fff;
1294
  border: 1px solid #b6b6b6;
1295
  margin-right: -5px !important;
1296
  }
1297
-
1298
  .buttonset.ui-buttonset label span.ui-button-text {
1299
  color: #727272;
1300
  font-size: 12px;
@@ -1303,30 +1038,16 @@ h3.addon_category_name {
1303
  min-width: 20px;
1304
  padding: 0 10px;
1305
  }
1306
-
1307
- .qsm_tab_content input[type="text"],
1308
- .qsm_tab_content input[type="number"],
1309
- .qsm_tab_content input[type="url"],
1310
- .qsm_global_settings input[type="text"],
1311
- .qsm_global_settings input[type="number"],
1312
- .qsm_global_settings input[type="email"],
1313
- .qsm_global_settings input[type="url"],
1314
- .qsm-addon-setting-wrap input[type="email"],
1315
- .qsm-addon-setting-wrap input[type="text"],
1316
- .qsm-addon-setting-wrap input[type="url"],
1317
- .qsm-addon-setting-wrap input[type="number"] {
1318
  background: #ffffff none repeat scroll 0 0;
1319
  border: 1px solid #dddddd;
1320
- border-radius: 5px;
1321
  box-shadow: none;
1322
  color: #666666;
1323
- /*padding: 10px 15px;*/
1324
  width: auto;
1325
  height: auto;
1326
- /*min-width: 230px;*/
1327
- /*max-width:100%;*/
1328
  }
1329
-
1330
  .qsm_tab_content textarea {
1331
  background: #ffffff none repeat scroll 0 0;
1332
  border: 1px solid #dddddd;
@@ -1337,11 +1058,9 @@ h3.addon_category_name {
1337
  width: 100%;
1338
  height: auto;
1339
  }
1340
-
1341
  .global-sub-text {
1342
  margin-left: 15px;
1343
  }
1344
-
1345
  /* The switch - the box around the slider */
1346
  .switch {
1347
  position: relative;
@@ -1349,14 +1068,12 @@ h3.addon_category_name {
1349
  width: 60px;
1350
  height: 34px;
1351
  }
1352
-
1353
  /* Hide default HTML checkbox */
1354
  .switch input[type="checkbox"] {
1355
  opacity: 0;
1356
  width: 0;
1357
  height: 0;
1358
  }
1359
-
1360
  /* The slider */
1361
  .slider {
1362
  position: absolute;
@@ -1369,7 +1086,6 @@ h3.addon_category_name {
1369
  -webkit-transition: 0.4s;
1370
  transition: 0.4s;
1371
  }
1372
-
1373
  .slider:before {
1374
  position: absolute;
1375
  content: "";
@@ -1381,35 +1097,27 @@ h3.addon_category_name {
1381
  -webkit-transition: 0.4s;
1382
  transition: 0.4s;
1383
  }
1384
-
1385
  input:checked+.slider {
1386
  background-color: #2196f3;
1387
  }
1388
-
1389
  input:focus+.slider {
1390
  box-shadow: 0 0 1px #2196f3;
1391
  }
1392
-
1393
  input:checked+.slider:before {
1394
  -webkit-transform: translateX(26px);
1395
  -ms-transform: translateX(26px);
1396
  transform: translateX(26px);
1397
  }
1398
-
1399
  /* Rounded sliders */
1400
  .slider.round {
1401
  border-radius: 34px;
1402
  }
1403
-
1404
  .slider.round:before {
1405
  border-radius: 50%;
1406
  }
1407
-
1408
- input#sc-shortcode-model-text,
1409
- input#sc-shortcode-model-text-link {
1410
  height: 30px;
1411
  }
1412
-
1413
  div#modal-6 label {
1414
  display: block;
1415
  font-size: 14px;
@@ -1418,65 +1126,50 @@ div#modal-6 label {
1418
  color: #999;
1419
  font-style: italic;
1420
  }
1421
-
1422
  #modal-6 .button>span.dashicons {
1423
  line-height: 29px;
1424
  }
1425
-
1426
  .qsm-list-shortcode-view span.dashicons {
1427
  font-size: 24px;
1428
  }
1429
-
1430
- /**
1431
- * No quiz screen design
1432
- */
1433
  .qsm-no-quiz-wrapper {
1434
  text-align: center;
1435
  max-width: 100%;
1436
  width: 100%;
1437
  }
1438
-
1439
  .qsm-no-quiz-wrapper .dashicons.dashicons-format-chat {
1440
  font-size: 200px;
1441
  display: block;
1442
- /* line-height: 200px; */
 
1443
  width: auto;
1444
  height: auto;
1445
  }
1446
-
1447
  .qsm-no-quiz-wrapper h2 {
1448
  margin-bottom: 30px;
1449
  }
1450
-
1451
  .qsm-no-quiz-wrapper .buttons {
1452
  margin-bottom: 30px;
1453
  }
1454
-
1455
  .qsm-no-quiz-wrapper .buttons a {
1456
  margin-right: 20px;
1457
  }
1458
-
1459
  .qsm-no-quiz-wrapper .buttons a:last-child {
1460
  color: #8b8888;
1461
  }
1462
-
1463
  .qsm-no-quiz-wrapper .buttons a:last-child .dashicons {
1464
  line-height: 46px;
1465
  }
1466
-
1467
  .qsm-no-quiz-wrapper h3 {
1468
  color: #8b8888;
1469
  margin-bottom: 30px;
1470
  }
1471
-
1472
- /**
1473
- * Option page design
1474
- */
1475
  span.qsm-ph_text {
1476
  width: 100px;
1477
  display: inline-block;
1478
  }
1479
-
1480
  tr .qsm-opt-desc {
1481
  color: #666;
1482
  font-style: italic;
@@ -1484,25 +1177,20 @@ tr .qsm-opt-desc {
1484
  margin-top: 5px;
1485
  display: block;
1486
  }
1487
-
1488
  #quiz_settings_wrapper .qsm-opt-desc {
1489
  display: none !important;
1490
  }
1491
-
1492
  .form-table td fieldset label {
1493
  margin-right: 20px !important;
1494
  }
1495
-
1496
  .form-table .qsm-opt-tr {
1497
  position: relative;
1498
  padding-right: 24px;
1499
  padding-top: 15px;
1500
  }
1501
-
1502
  td.scheduled_time_start {
1503
  padding-bottom: 0 !important;
1504
  }
1505
-
1506
  .qsm-opt-tr .qsm-tooltips-icon {
1507
  margin: 0 0 0 0;
1508
  position: relative;
@@ -1516,7 +1204,6 @@ td.scheduled_time_start {
1516
  width: auto;
1517
  height: auto;
1518
  }
1519
-
1520
  .qsm-tooltips-icon .qsm-tooltips {
1521
  background-color: #333;
1522
  border-radius: 3px;
@@ -1533,14 +1220,11 @@ td.scheduled_time_start {
1533
  width: 200px;
1534
  transform: translateX(-50%);
1535
  transition: opacity 0.5s ease 0s;
1536
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
1537
- Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
1538
  }
1539
-
1540
  .qsm-tooltips-icon .qsm-tooltips a {
1541
  color: #fff;
1542
  }
1543
-
1544
  .qsm-tooltips-icon .qsm-tooltips:before {
1545
  border-color: #333 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
1546
  border-style: solid;
@@ -1551,81 +1235,66 @@ td.scheduled_time_start {
1551
  transform: translateX(-50%);
1552
  position: absolute;
1553
  }
1554
-
1555
- .qsm-tooltips-icon:hover .qsm-tooltips,
1556
- .qsm-tooltips:hover {
1557
  display: block;
1558
  opacity: 1;
1559
  z-index: 9999;
1560
  }
1561
-
1562
- /**
1563
- * Text Tab design
1564
- */
1565
  .qsm-text-main-wrap {
1566
  display: inline-block;
1567
  width: 100%;
1568
  }
1569
-
1570
  .qsm-text-main-wrap #post-body-content {
1571
  background: #fff;
1572
  box-sizing: border-box;
1573
  }
1574
-
1575
  .qsm-text-main-wrap #postbox-container-1 {
1576
  position: relative;
1577
  background: #fff;
1578
  box-sizing: border-box;
1579
  }
1580
-
1581
  .qsm-text-main-wrap #postbox-container-1 .qsm-text-header h5 {
1582
  font-size: 14px;
1583
  margin: 0;
1584
  font-weight: bold;
1585
  }
1586
-
1587
  .qsm-text-main-wrap #postbox-container-1 .qsm-text-header .description {
1588
  color: #666;
 
 
1589
  }
1590
-
1591
  .qsm-text-main-wrap .qsm-text-header {
1592
  padding: 20px;
1593
  border-bottom: 1px solid #f1f1f1;
 
 
 
1594
  }
1595
-
1596
- .qsm-text-main-wrap .qsm-text-header .message-dropdown {
1597
- display: inline-block;
1598
- }
1599
-
1600
  .qsm-text-main-wrap .qsm-text-header .message-dropdown label {
1601
  font-size: 14px;
1602
  font-weight: bold;
1603
  }
1604
-
1605
- .qsm-text-main-wrap .qsm-text-header .save-text-changes {
1606
- float: right;
1607
- }
1608
-
1609
  .qsm-text-main-wrap .qsm-text-conent {
1610
  padding: 20px;
1611
  border-bottom: 1px solid #f1f1f1;
1612
  position: relative;
1613
  }
1614
-
1615
  .qsm-text-conent.qsm-text-allowed-variables span.qsm-text-template-span {
1616
  display: inline-block;
1617
  margin-bottom: 10px;
1618
  margin-right: 10px;
1619
  position: relative;
1620
  }
1621
-
1622
  #show-all-variable-content span.qsm-text-template-span {
1623
  display: inline-block;
1624
  position: relative;
1625
  text-align: center;
1626
  padding: 0 5px;
1627
  }
1628
-
1629
  #show-all-variable-content .popup-template-span-wrap {
1630
  margin-bottom: 20px;
1631
  margin-right: 5px;
@@ -1633,15 +1302,12 @@ td.scheduled_time_start {
1633
  display: inline-block;
1634
  border: 1px solid #def0ff;
1635
  }
1636
-
1637
  #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1638
  left: calc(100% - 100px);
1639
  }
1640
-
1641
  #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips:before {
1642
  left: 93%;
1643
  }
1644
-
1645
  .qsm-text-template-span .qsm-tooltips-icon {
1646
  vertical-align: middle;
1647
  width: unset;
@@ -1652,94 +1318,168 @@ td.scheduled_time_start {
1652
  font-size: 8px;
1653
  display: none;
1654
  }
1655
-
1656
  .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1657
  left: calc(100% - 10px);
1658
  bottom: 30px;
1659
  }
1660
-
1661
  .qsm-text-label-wrapper>h2 {
1662
  font-size: 24px;
1663
  border-bottom: 1px solid #ccc;
1664
  padding-bottom: 10px;
1665
  line-height: normal;
1666
  }
1667
-
1668
  .qsm-text-label-wrapper form>button:nth-child(3) {
1669
  display: none;
1670
  }
1671
-
1672
  .qsm-text-label-wrapper .section_heading {
1673
  margin-top: 0;
1674
  }
1675
-
1676
  #show-all-variable .qsm-popup__container {
1677
  min-width: 80vw;
1678
  max-width: 1040px;
1679
  padding: 0;
1680
  }
1681
-
1682
  #show-all-variable-content {
1683
  margin-bottom: 0 !important;
1684
- padding: 20px 73px 20px 30px;
1685
  margin: 0;
1686
  }
1687
-
1688
  #show-all-variable .qsm-popup__header {
1689
  border-bottom: 1px solid #f1f1f1;
1690
  padding: 20px;
1691
  }
1692
-
1693
  #show-all-variable .qsm-popup__header .qsm-popup__title {
1694
  color: #23282d;
1695
  margin-bottom: 7px;
1696
  }
1697
-
1698
  #show-all-variable .qsm-popup__footer {
1699
  border-top: 1px solid #f1f1f1;
1700
  padding: 20px;
1701
  }
1702
-
1703
  .qsm-view-preview-btn {
1704
  text-decoration: none;
1705
  line-height: normal;
1706
  margin-left: -5px;
1707
  }
1708
-
1709
- .qsm-view-preview-btn span.dashicons,
1710
- .edit-quiz-name span.dashicons {
1711
- line-height: 12px;
1712
- vertical-align: bottom;
1713
- }
1714
-
1715
- .mlw_quiz_options form:first-child {
1716
- margin-right: 10px;
1717
- float: right;
1718
- }
1719
-
1720
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit {
1721
- box-shadow: none;
1722
- float: right;
1723
  margin-right: 5px;
 
 
 
 
 
 
 
1724
  }
1725
-
1726
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit:hover {
1727
- opacity: 0.8;
1728
  }
1729
-
1730
- .mlw_quiz_options a.button.button-default.qsm-btn-quiz-edit span.dashicons {
1731
  line-height: 27px;
1732
  }
1733
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1734
  .mlw_quiz_options .nav-tab-wrapper {
1735
  margin-top: 20px;
1736
  }
1737
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1738
  .mlw_quiz_options .edit-quiz-name {
1739
- float: none;
1740
- text-decoration: none;
 
 
1741
  }
1742
-
1743
  .qsm_text_customize_label {
1744
  position: fixed;
1745
  bottom: 20px;
@@ -1753,7 +1493,6 @@ td.scheduled_time_start {
1753
  border: 1px solid #cdbaba;
1754
  cursor: pointer;
1755
  }
1756
-
1757
  .qsm-text-tab-message-loader {
1758
  position: absolute;
1759
  top: 50%;
@@ -1761,57 +1500,42 @@ td.scheduled_time_start {
1761
  z-index: 99;
1762
  transform: translate(-50%, -50%);
1763
  }
1764
-
1765
  .qsm_text_customize_label .dashicons {
1766
  font-size: 14px;
1767
  line-height: 20px;
1768
  }
1769
-
1770
- /**
1771
- * Admin result page design
1772
- */
1773
  .overview-main-wrapper {
1774
  display: flex;
1775
  width: 100%;
1776
  }
1777
-
1778
  .overview-main-wrapper .overview-inner-wrap {
1779
  margin-right: 2%;
1780
  width: 33.33%;
1781
  }
1782
-
1783
  .overview-main-wrapper .overview-inner-wrap .inside {
1784
  min-height: 105px;
1785
  }
1786
-
1787
  .overview-main-wrapper .overview-inner-wrap:last-child {
1788
  margin-right: 0;
1789
  }
1790
-
1791
- .overview-main-wrapper .overview-inner-wrap h2.hndle,
1792
- .comment-inner-wrap h2.hndle,
1793
- .response-inner-wrap h2.hndle {
1794
  margin: 0;
1795
  padding: 10px;
1796
  }
1797
-
1798
  .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span {
1799
  display: block;
1800
  margin-bottom: 5px;
1801
  }
1802
-
1803
  .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span:last-child {
1804
  margin-bottom: 0;
1805
  }
1806
-
1807
  .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>label {
1808
  font-weight: bold;
1809
  }
1810
-
1811
  .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>span {
1812
  float: right;
1813
  }
1814
-
1815
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper {
1816
  display: -webkit-box;
1817
  display: -moz-box;
@@ -1823,7 +1547,6 @@ td.scheduled_time_start {
1823
  -webkit-justify-content: center;
1824
  flex-wrap: nowrap;
1825
  }
1826
-
1827
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div {
1828
  padding: 15px 30px;
1829
  background: #f1f1f1;
@@ -1831,66 +1554,51 @@ td.scheduled_time_start {
1831
  max-width: 120px;
1832
  width: 100%;
1833
  }
1834
-
1835
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div:last-child {
1836
  margin-right: 0;
1837
  }
1838
-
1839
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-span {
1840
  display: block;
1841
  font-size: 36px;
1842
  font-weight: bold;
1843
  text-align: center;
1844
  }
1845
-
1846
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-text {
1847
  display: block;
1848
  font-size: 16px;
1849
  font-weight: bold;
1850
  text-align: center;
1851
  }
1852
-
1853
  .response-inner-wrap .inside {
1854
  padding: 10px;
1855
  margin: 0;
1856
  }
1857
-
1858
  .response-inner-wrap .inside .qmn_question_answer {
1859
  background-color: #f1f1f1;
1860
  padding: 10px;
1861
  margin-bottom: 0;
1862
  background-repeat: no-repeat;
1863
  background-position: 95% center;
1864
- padding-right: 12%;
1865
  }
1866
-
1867
  .response-inner-wrap .inside .qmn_question_answer:nth-child(2n) {
1868
  background-color: #fff;
1869
  }
1870
-
1871
  .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_incorrect {
1872
  background-image: url(../assets/wrong.png);
1873
  }
1874
-
1875
- .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_incorrect,
1876
- .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_incorrect {
1877
  background-image: none;
1878
  }
1879
-
1880
  .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_correct {
1881
  background-image: url(../assets/right.png);
1882
  }
1883
-
1884
- .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_correct,
1885
- .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_correct {
1886
  background-image: none;
1887
  }
1888
-
1889
  .old_template_result_wrap {
1890
  padding: 15px;
1891
  background: #fff;
1892
  }
1893
-
1894
  .result-page-title {
1895
  text-align: left;
1896
  display: inline-block;
@@ -1900,54 +1608,38 @@ td.scheduled_time_start {
1900
  margin: 0;
1901
  line-height: 30px;
1902
  }
1903
-
1904
  .result-tab-content a.button>span.dashicons {
1905
  line-height: 29px;
1906
  font-size: 18px;
1907
  margin-left: -4px;
1908
  margin-right: -4px;
1909
  }
1910
-
1911
  .result-page-wrapper .tablenav-pages {
1912
  margin-left: 10px;
1913
  }
1914
-
1915
  .result-page-wrapper .tablenav.top {
1916
  margin-bottom: 20px;
1917
  margin-top: 20px;
1918
  }
1919
-
1920
  .inner-sidebar1 .handlediv {
1921
  display: none !important;
1922
  }
1923
-
1924
  .inner-sidebar1 .hndle {
1925
- padding-left: 10px;
1926
- padding-top: 10px;
1927
  margin: 0;
1928
- padding-bottom: 10px;
1929
  }
1930
-
1931
- .inner-sidebar1 .inside h3,
1932
- .inner-sidebar1 .inside h4 {
1933
  margin-bottom: 10px;
1934
  }
1935
-
1936
- .qsm-quiz-email-tab,
1937
- .qsm-quiz-result-tab {
1938
  max-width: 1200px;
1939
  width: 100%;
1940
  }
1941
-
1942
- .qsm-quiz-email-tab .qsm-show-all-variable-text span.dashicons,
1943
- .qsm-quiz-result-tab .qsm-show-all-variable-text span.dashicons {
1944
  font-size: 16px;
1945
  line-height: 22px;
1946
  }
1947
-
1948
- .qsm-quiz-email-tab .qsm-show-all-variable-text,
1949
- .qsm-quiz-result-tab .qsm-show-all-variable-text,
1950
- #slack-integration .qsm-show-all-variable-text {
1951
  position: fixed;
1952
  bottom: 20px;
1953
  right: 25px;
@@ -1961,165 +1653,128 @@ td.scheduled_time_start {
1961
  cursor: pointer;
1962
  text-decoration: none;
1963
  }
1964
-
1965
  .popup-template-span-wrap .popup-copied-des {
1966
  color: green;
1967
  }
1968
-
1969
  .popup-template-span-wrap .popup-copied-des span.dashicons {
1970
  line-height: 28px;
1971
  }
1972
-
1973
  .comment-inner-wrap {
1974
- /* display: none;*/
 
1975
  }
1976
-
1977
  @media (min-width: 768px) and (max-width: 1199px) {
1978
  .qsm-news-ads .qsm-info-widget {
1979
  float: left;
1980
  max-width: unset;
1981
  width: 31.3%;
1982
- }
1983
-
1984
  .qsm-news-ads .qsm-info-widget:nth-child(3n+5) {
1985
  clear: both;
1986
- }
1987
-
1988
  .remove-ads-adv-link {
1989
  width: 100%;
1990
  display: inline-block;
1991
  margin-bottom: 30px;
1992
- }
1993
  }
1994
-
1995
  @media screen and (max-width: 782px) {
1996
  .form-table td fieldset label {
1997
  margin-top: -1px !important;
1998
  vertical-align: top;
1999
- }
2000
-
2001
  .qsm-tooltips-icon .qsm-tooltips {
2002
  left: -90px;
2003
- }
2004
-
2005
  .qsm-opt-tr .qsm-tooltips-icon {
2006
  right: 13px;
2007
- }
2008
-
2009
  .qsm-tooltips-icon .qsm-tooltips:before {
2010
  left: auto;
2011
  right: -3px;
2012
- }
2013
  }
2014
-
2015
  @media screen and (max-width: 767px) {
2016
  .qsm-quiz-row td:nth-of-type(2n) {
2017
  display: none;
2018
- }
2019
-
2020
- .qsm-quiz-page-wrapper,
2021
- .qsm-quiz-page-wrapper-with-ads {
2022
  overflow-x: auto;
2023
- }
2024
-
2025
- .qsm-quiz-page-wrapper thead th:nth-of-type(2n),
2026
- .qsm-quiz-page-wrapper tfoot th:nth-of-type(2n),
2027
- .qsm-quiz-page-wrapper-with-ads thead th:nth-of-type(2n),
2028
- .qsm-quiz-page-wrapper-with-ads tfoot th:nth-of-type(2n) {
2029
  display: none;
2030
- }
2031
-
2032
  .qsm-quiz-page-wrapper .row-actions {
2033
  display: inline-block !important;
2034
- }
2035
-
2036
  .qsm-quiz-page-wrapper p.search-box {
2037
  bottom: -30px;
2038
- }
2039
-
2040
  .qsm-popup__container {
2041
  min-width: auto;
2042
  max-width: 100%;
2043
- }
2044
-
2045
  #show-advanced-option {
2046
  display: block;
2047
  width: 100%;
2048
  float: left;
2049
- }
2050
-
2051
  .contact-form-label {
2052
  display: inline-block;
2053
- }
2054
-
2055
  .template_variable {
2056
  width: 100%;
2057
  max-width: 100%;
2058
  margin-bottom: 10px;
2059
  word-break: break-word;
2060
- }
2061
-
2062
  .qsm_tab_content .form-table input[type=radio] {
2063
  top: 6px;
2064
  margin-bottom: 8px;
2065
- }
2066
-
2067
  .result-page-wrapper form {
2068
  overflow: scroll;
2069
  width: 100%;
2070
-
2071
- }
2072
-
2073
  p.search-box {
2074
  bottom: -30px;
2075
- }
2076
-
2077
  .quizzes-surveys_page_qsm_quiz_help .hndle {
2078
  padding-left: 15px;
2079
  padding-bottom: 15px;
2080
- }
2081
-
2082
  .qsm-news-ads .qsm-info-widget {
2083
  width: calc(100% - 30px);
2084
  max-width: 100%;
2085
  box-sizing: border-box;
2086
  margin: 15px 15px 0 15px;
2087
- }
2088
-
2089
  .form-table .qsm-opt-tr {
2090
  padding-bottom: 10px;
2091
- }
2092
-
2093
  .overview-main-wrapper {
2094
  display: block;
2095
- }
2096
-
2097
  .overview-main-wrapper .overview-inner-wrap {
2098
  margin-right: 0;
2099
  width: 100%;
2100
- }
2101
-
2102
  .result-page-title {
2103
  margin-bottom: 10px;
2104
- }
2105
  }
2106
-
2107
  .popup-template-span-wrap .popup-copied-des span.dashicons {
2108
  line-height: 28px;
2109
  }
2110
-
2111
  .comment-inner-wrap {
2112
- /* display: none;*/
 
2113
  }
2114
-
2115
  #qsm_themes h2.wp-heading-inline {
2116
  display: inline-block;
2117
  margin-right: 5px;
2118
  }
2119
-
2120
- /**
2121
- * Style tab design
2122
- */
2123
  .wp-upload-form {
2124
  background: #fafafa;
2125
  border: 1px solid #ccd0d4;
@@ -2129,153 +1784,119 @@ td.scheduled_time_start {
2129
  justify-content: space-between;
2130
  align-items: center;
2131
  }
2132
-
2133
  @media (min-width: 768px) and (max-width: 1199px) {
2134
  .qsm-news-ads .qsm-info-widget {
2135
  float: left;
2136
  max-width: unset;
2137
  width: 31.3%;
2138
- }
2139
-
2140
  .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
2141
  clear: both;
2142
- }
2143
-
2144
  .remove-ads-adv-link {
2145
  width: 100%;
2146
  display: inline-block;
2147
  margin-bottom: 30px;
2148
- }
2149
  }
2150
-
2151
  @media screen and (max-width: 782px) {
2152
  .form-table td fieldset label {
2153
  margin-top: -1px !important;
2154
  vertical-align: top;
2155
- }
2156
-
2157
  .qsm-tooltips-icon .qsm-tooltips {
2158
  left: -90px;
2159
- }
2160
-
2161
  .qsm-opt-tr .qsm-tooltips-icon {
2162
  right: 13px;
2163
- }
2164
-
2165
  .qsm-tooltips-icon .qsm-tooltips:before {
2166
  left: auto;
2167
  right: -3px;
2168
- }
2169
  }
2170
-
2171
  @media screen and (max-width: 767px) {
2172
  .qsm-quiz-row td:nth-of-type(2n) {
2173
  display: none;
2174
- }
2175
-
2176
- .qsm-quiz-page-wrapper,
2177
- .qsm-quiz-page-wrapper-with-ads {
2178
  overflow-x: auto;
2179
- }
2180
-
2181
- .qsm-quiz-page-wrapper thead th:nth-of-type(2n),
2182
- .qsm-quiz-page-wrapper tfoot th:nth-of-type(2n),
2183
- .qsm-quiz-page-wrapper-with-ads thead th:nth-of-type(2n),
2184
- .qsm-quiz-page-wrapper-with-ads tfoot th:nth-of-type(2n) {
2185
  display: none;
2186
- }
2187
-
2188
  .qsm-quiz-page-wrapper .row-actions {
2189
  display: inline-block !important;
2190
- }
2191
-
2192
  .qsm-quiz-page-wrapper p.search-box {
2193
  bottom: -30px;
2194
- }
2195
-
2196
  .qsm-popup__container {
2197
  min-width: auto;
2198
  max-width: 100%;
2199
- }
2200
-
2201
  #show-advanced-option {
2202
  display: block;
2203
  width: 100%;
2204
  float: left;
2205
- }
2206
-
2207
  .contact-form-label {
2208
  display: inline-block;
2209
- }
2210
-
2211
  .template_variable {
2212
  width: 100%;
2213
  max-width: 100%;
2214
  margin-bottom: 10px;
2215
  word-break: break-word;
2216
- }
2217
-
2218
  .qsm_tab_content .form-table input[type="radio"] {
2219
  top: 6px;
2220
  margin-bottom: 8px;
2221
- }
2222
-
2223
  .result-page-wrapper form {
2224
  overflow: scroll;
2225
  width: 100%;
2226
- }
2227
-
2228
  p.search-box {
2229
  bottom: -30px;
2230
- }
2231
-
2232
  .quizzes-surveys_page_qsm_quiz_help .hndle {
2233
  padding-left: 15px;
2234
  padding-bottom: 15px;
2235
- }
2236
-
2237
  .qsm-news-ads .qsm-info-widget {
2238
  width: calc(100% - 30px);
2239
  max-width: 100%;
2240
  box-sizing: border-box;
2241
  margin: 15px 15px 0 15px;
2242
- }
2243
-
2244
  .form-table .qsm-opt-tr {
2245
  padding-bottom: 10px;
2246
- }
2247
-
2248
  .overview-main-wrapper {
2249
  display: block;
2250
- }
2251
-
2252
  .overview-main-wrapper .overview-inner-wrap {
2253
  margin-right: 0;
2254
  width: 100%;
2255
- }
2256
-
2257
  .result-page-title {
2258
  margin-bottom: 10px;
2259
- }
2260
  }
2261
-
2262
  .qsm-text-template-span{
2263
  min-width: 100px;
2264
-
2265
  }
2266
-
2267
  .qsm-text-template-span .button{
2268
  padding: 0px;
2269
  border: none;
2270
  min-height: unset;
2271
  font-size: 12px;
2272
- background: unset;
2273
  }
2274
-
2275
  .qsm-text-template-span .template-variable:hover {
2276
  background: unset;
2277
  }
2278
-
2279
  .qsm-text-template-span .click-to-copy{
2280
  display: none;
2281
  position: absolute;
@@ -2283,25 +1904,18 @@ td.scheduled_time_start {
2283
  text-align: center;
2284
  left: 0;
2285
  }
2286
-
2287
-
2288
  .qsm-text-template-span:hover .click-to-copy{
2289
  display: inline-block;
2290
  background: #def0ff;
2291
  }
2292
-
2293
-
2294
  .qsm-text-template-span .qsm-tooltips-icon:before{
2295
  content:"\003F";
2296
  padding: 0px 3px;
2297
- vertical-align: top;
2298
  }
2299
-
2300
  .qsm-text-template-span:hover .qsm-tooltips-icon{
2301
  display: inline-block;
2302
-
2303
  }
2304
-
2305
  .qsm-text-template-span:hover .temp-var-seperator{
2306
  position: absolute;
2307
  display: flex;
@@ -2310,45 +1924,509 @@ td.scheduled_time_start {
2310
  align-items: center;
2311
  justify-content: center;
2312
  height: 100%;
2313
- width:25px;
2314
  z-index:99;
2315
  border-left: 1px dashed #a1c1d8;
2316
  background: #def0ff;
2317
  }
2318
-
2319
  #show-all-variable-content .popup-template-span-wrap:hover{
2320
  background: #def0ff;
2321
  border-color: #a1c1d8 ;
2322
  border-style: dashed;
2323
  }
2324
-
2325
  .popup-template-span-wrap .qsm-text-template-span .popup-copied-des span.dashicons{
2326
  line-height: 1;
2327
- }
2328
-
2329
  #result_page_fb_image {
2330
  width: 25em;
2331
  }
2332
-
2333
  .audit_buttons{
2334
  display: flex;
2335
  align-items: center;
2336
  justify-content: space-between;
2337
  }
2338
  input#question_search::-webkit-search-cancel-button {
2339
- outline: none;
2340
- appearance: none;
2341
  }
2342
- #mlw_quiz_wrap div#mlw_quiz_options h1#qsm_title_quiz {
2343
- display: block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2344
  }
2345
  #result_details {
2346
- font-size: 2em;
2347
- display: flex;
2348
- align-items: center;
2349
- justify-content: space-between;
2350
- margin-bottom: 10px;
2351
  }
2352
  input#duplicate_questions {
2353
- margin-left: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2354
  }
1
+ /******************** Quizzes/Surveys Page *********************/
 
 
 
2
  /*.qsm-quizes-page .widefat td {
3
+ font-size: 16px !important;
4
+ }
5
+ */
6
  @-moz-keyframes qsm-spinner-loader {
7
  0% {
8
  -moz-transform: rotate(0deg);
9
  transform: rotate(0deg);
10
+ }
 
11
  100% {
12
  -moz-transform: rotate(360deg);
13
  transform: rotate(360deg);
14
+ }
15
  }
 
16
  @-webkit-keyframes qsm-spinner-loader {
17
  0% {
18
  -webkit-transform: rotate(0deg);
19
  transform: rotate(0deg);
20
+ }
 
21
  100% {
22
  -webkit-transform: rotate(360deg);
23
  transform: rotate(360deg);
24
+ }
25
  }
 
26
  @keyframes qsm-spinner-loader {
27
  0% {
28
  -moz-transform: rotate(0deg);
29
  -ms-transform: rotate(0deg);
30
  -webkit-transform: rotate(0deg);
31
  transform: rotate(0deg);
32
+ }
 
33
  100% {
34
  -moz-transform: rotate(360deg);
35
  -ms-transform: rotate(360deg);
36
  -webkit-transform: rotate(360deg);
37
  transform: rotate(360deg);
38
+ }
39
  }
 
40
  /* :not(:required) hides this rule from IE9 and below */
41
  .qsm-spinner-loader:not(:required) {
42
  -moz-animation: qsm-spinner-loader 1500ms infinite linear;
45
  -moz-border-radius: 0.5em;
46
  -webkit-border-radius: 0.5em;
47
  border-radius: 0.5em;
48
+ -moz-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
49
+ -webkit-box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
50
+ box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
 
 
 
 
 
 
 
 
 
 
 
 
51
  display: inline-block;
52
  font-size: 10px;
53
  width: 1em;
56
  overflow: hidden;
57
  text-indent: 100%;
58
  }
 
59
  span.qsm-quiz-name {
60
  font-size: 14px;
61
  font-weight: 600;
62
  }
 
63
  .qsm-quizzes-page-content {
64
  display: flex;
65
  flex-direction: column;
66
  justify-content: space-between;
67
  }
 
68
  .qsm-quiz-page-wrapper {
69
  flex-grow: 1;
70
  }
 
71
  .qsm-quiz-page-wrapper-with-ads {
72
  flex-grow: 1;
73
  }
 
74
  .qsm-news-ads {
75
  background-color: #fff;
76
  border: 1px solid #dfd4d4;
77
  margin-top: 30px;
78
  display: none;
79
  }
 
80
  .qsm-news-ads-title {
81
  text-align: center;
82
  border-bottom: 1px solid #dfd4d4;
84
  padding: 10px 0;
85
  background-color: #fff;
86
  }
 
87
  .qsm-edit-name {
88
  font-size: 12px !important;
89
  }
 
90
  .qsm-action-link {
91
  font-size: 14px !important;
92
  }
 
93
  .qsm-action-links:hover {
94
  background-color: black;
95
  }
96
+ .qsm-action-link-delete, .qsm-popup__footer .delete-page-button{
 
97
  color: red !important;
98
+ border: transparent;
99
+ background: transparent;
100
+ cursor: pointer;
101
  }
 
102
  .qsm-dialog-form label {
103
  display: inline-block;
104
  font-size: 16px;
105
  font-weight: bold;
106
  padding-right: 30px;
107
  }
 
108
  .qsm-quiz-page-addon {
109
  width: 100%;
110
  float: left;
111
  }
 
112
  .qsm-addon-browse-addons {
113
  background: #fff;
114
  padding: 0;
115
  width: 100%;
 
116
  box-sizing: border-box;
117
  margin-bottom: 30px;
118
+ display: inline-flex;
119
+ justify-content: space-between;
120
+ align-items: center;
121
  }
 
 
 
 
 
122
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon {
123
+ padding: 9px 20px 0;
 
124
  }
 
125
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a.active {
126
  background: #222;
127
  color: #fff;
128
  outline: none;
129
  box-shadow: none;
130
  }
 
131
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-add-addon a {
132
  padding: 7px 15px;
133
  font-weight: normal;
134
  border-radius: 5px;
135
  }
 
136
  .qsm-addon-browse-addons .qsm-addon-anchor-left {
137
+ display: inline-flex;
138
  }
 
139
  .qsm-addon-browse-addons .qsm-addon-list-right {
140
+ display: inline-flex;
141
+ align-items: center;
142
+ padding: 0 15px;
143
  }
 
144
  .qsm-addon-browse-addons .qsm-addon-list-right>span {
145
+ margin: 10px;
146
  font-size: 16px;
147
  }
 
148
  .qsm-addon-browse-addons .qsm-addon-anchor-left a {
149
  display: inline-block;
150
  font-size: 16px;
151
  color: #474444;
152
  text-decoration: none;
153
+ margin: 0;
 
154
  }
 
155
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a {
156
  background: #aaaaaa;
157
  padding: 15px 25px;
159
  margin-right: -4px;
160
  box-sizing: border-box;
161
  }
 
162
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a span.dashicons {
163
  height: 15px;
164
  }
 
165
  .qsm-addon-browse-addons .qsm-addon-anchor-left .qsm-install-addon a.active {
166
  background: #007cba;
167
  }
 
168
  .qsm_popular_addons div.popuar-addon-ul {
169
  width: 100%;
170
+ display: flex;
171
+ flex-wrap: wrap;
172
  }
 
173
  .qsm_popular_addons div.popuar-addon-ul>div {
174
  background: #fff;
175
  padding: 10px;
176
  width: 31%;
177
  margin-right: 2%;
178
+ margin-bottom: 2%;
 
179
  box-sizing: border-box;
180
+ box-shadow: 0 0 10px 1px #ddd;
181
  }
 
182
  .qsm_popular_addons div.popuar-addon-ul>div:nth-child(3n + 4) {
183
  clear: both;
184
  }
 
185
  .qsm_popular_addons div.popuar-addon-ul .addon-itd-wrap {
186
  width: 100%;
187
+ display: inline-flex;
188
+ justify-content: space-between;
189
+ flex-wrap: nowrap;
190
  }
 
191
  .qsm_popular_addons div.popuar-addon-ul .addon-image {
192
  width: 100px;
193
  height: 80px;
195
  background-repeat: no-repeat;
196
  background-position: center center;
197
  background-color: #f0f0f0;
 
198
  }
 
199
  .qsm_popular_addons div.popuar-addon-ul .addon-title-descption {
200
  width: calc(100% - 110px);
 
201
  }
 
202
  .qsm_popular_addons div.popuar-addon-ul .description {
203
  display: block;
204
  margin-bottom: 5px;
205
  }
 
206
  .qsm_popular_addons div.popuar-addon-ul .addon-title {
207
  font-size: 16px;
208
  color: #222;
211
  margin-bottom: 5px;
212
  display: block;
213
  }
 
214
  .qsm_popular_addons div.popuar-addon-ul .addon-price {
215
  border-top: 1px solid #f1f1f1;
216
  padding-top: 10px;
217
  margin-top: 15px;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: space-between;
221
  }
 
222
  .qsm_popular_addons div.popuar-addon-ul .addon-price-btn {
223
  background: #fff;
224
  border: #fff;
226
  font-weight: bold;
227
  font-size: 14px;
228
  }
 
229
  .qsm_popular_addons div.popuar-addon-ul .addon-get-link {
 
230
  background: #fff;
231
  color: #007cba;
232
  border-width: 2px;
233
  font-weight: bold;
234
  }
 
235
  .qsm_popular_addons div.popuar-addon-ul .addon-get-link span.dashicons {
236
  margin-top: 4px;
237
  }
 
238
  .qsm_popular_addons div.popuar-addon-ul>div .description-wrap {
239
  padding: 20px;
240
  }
 
241
  .qsm_popular_addons div.popuar-addon-ul>div .description-wrap .description {
242
  display: block;
243
  width: 100%;
245
  font-size: 14px;
246
  font-style: normal;
247
  }
 
248
  .qsm_popular_addons div.popuar-addon-ul>div img {
249
  max-width: 100%;
250
  }
 
251
  .qsm-quiz-page-addon.qsm-addon-page-list {
252
  width: 75%;
253
  float: left;
254
  margin-top: 0;
255
  }
 
256
  .qsm-addon-news-ads {
257
  width: 25%;
258
  float: right;
261
  box-sizing: border-box;
262
  margin-top: 0;
263
  }
 
264
  .qsm-addon-news-ads .qsm-news-ads-title {
265
  border-bottom: 0;
266
  margin-top: 20px;
271
  position: relative;
272
  font-size: 14px;
273
  }
274
+ .qsm-addon-news-ads .qsm-news-ads-title:before, .qsm-addon-news-ads .qsm-news-ads-title:after {
 
 
275
  content: "";
276
  position: absolute;
277
  height: 0;
281
  border-style: solid;
282
  border-width: 25px;
283
  }
 
284
  .qsm-addon-news-ads .qsm-news-ads-title:before {
285
  border-color: transparent transparent transparent #007cba;
286
  }
 
287
  .qsm-addon-news-ads .qsm-news-ads-title:after {
288
  right: 0;
289
  left: auto;
290
  border-color: transparent #007cba transparent transparent;
291
  }
 
292
  .qsm-addon-news-ads .qsm-info-widget {
293
  text-align: left;
294
  padding: 30px;
295
  }
 
296
  .qsm-addon-news-ads .qsm-info-widget h3 {
297
  color: #222;
298
  font-weight: bold;
299
  margin-top: 20px;
300
  margin-bottom: 15px;
301
  }
 
302
  .qsm-addon-news-ads .qsm-info-widget p {
303
  font-size: 14px;
304
  }
 
305
  .qsm-addon-news-ads .qsm-info-widget {
306
  transform: none !important;
307
  max-width: 100%;
310
  text-align: center;
311
  margin-top: 70px;
312
  }
 
313
  .qsm-addon-news-ads .qsm-info-widget .bundle-icon {
314
  width: 40px;
315
  height: 40px;
321
  border: 2px solid #fff;
322
  box-shadow: 0px 0px 5px 1px rgb(0 0 0 / 16%);
323
  }
 
324
  .qsm-addon-news-ads .qsm-info-widget .bundle-icon img {
325
  max-width: 40px;
326
  max-height: 40px;
327
  }
 
328
  .qsm-addon-news-ads .qsm-info-widget:nth-child(4) .bundle-icon {
329
  background: #2271b1;
330
  }
 
331
  .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .bundle-icon {
332
  background: #00b592;
333
  }
 
334
  .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn {
335
  color: #fff;
336
  width: 100%;
339
  position: relative;
340
  margin-top: 0;
341
  }
 
342
  .qsm-addon-news-ads .qsm-info-widget .addon-bundle-btn span.dashicons {
343
  position: absolute;
344
  top: 10px;
345
  right: 10px;
346
  }
 
347
  .qsm-addon-news-ads .qsm-info-widget:nth-child(2) .addon-bundle-btn {
348
  background: #00b592;
349
  border-color: #00b592;
350
  }
 
351
  .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .bundle-icon {
352
  background: #ed706f;
353
  }
 
354
  .qsm-addon-news-ads .qsm-info-widget:nth-child(3) .addon-bundle-btn {
355
  background: #ed706f;
356
  border-color: #ed706f;
357
  }
 
358
  .qsm-active-addons .installed_title {
359
  background: #fff;
360
  margin: 0;
364
  font-size: 16px;
365
  display: none;
366
  }
367
+ .qsm-active-addons .installed_addons_wrapper, .qsm-active-addons .no_addons_installed {
 
 
368
  border: 1px solid #ccd0d4;
369
+ /*border-top: medium none;
370
+ */
371
  }
 
372
  .qsm-active-addons .no_addons_installed {
373
  padding: 30px 25%;
374
  background: #fff;
377
  font-size: 16px;
378
  line-height: 22px;
379
  }
 
380
  .qsm-active-addons .no_addons_installed a {
381
  margin-top: 20px;
382
  }
 
383
  .qsm-active-addons .installed_addons_wrapper .installed_addon {
384
+ padding: 15px;
385
  background: #fff;
386
  border-bottom: 1px solid #cdc7c7;
387
+ display: flex;
388
+ justify-content: space-between;
389
+ align-items: center;
390
  }
 
391
  .qsm-active-addons .installed_addons_wrapper .installed_addon:last-child {
392
  border-bottom: medium none;
393
  }
 
394
  .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_name {
395
  font-size: 14px;
396
  font-weight: bold;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  }
398
+ .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link a {background: #FFF;}
399
  .qsm-active-addons .installed_addons_wrapper .installed_addon .installed_addon_link span.dashicons {
400
  margin-top: 4px;
401
  }
 
402
  .qsm-active-addons {
403
  width: 100%;
404
  box-sizing: border-box;
405
  margin-bottom: 30px;
406
  }
 
407
  .quizzes-surveys_page_qmn_addons .qsm-news-ads {
408
  width: 15%;
409
  float: right;
410
  }
411
+ .qsm-help-page .handle-order-higher, .qsm-help-page .handle-order-lower,
412
+ .qsm-tools-page .handle-order-higher, .qsm-tools-page .handle-order-lower{
 
413
  display: none;
414
  }
 
415
  @media screen and (min-width: 1200px) {
416
  .qsm-quiz-page-wrapper-with-ads {
417
  margin-right: 0;
418
  width: 100%;
419
+ }
 
420
  .qsm-news-ads .qsm-info-widget {
421
  float: left;
422
  max-width: unset;
423
  width: 31.3%;
424
+ }
 
425
  .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
426
  clear: both;
427
+ }
 
428
  .qsm-news-ads .remove-ads-adv-link {
429
  width: 100%;
430
  float: left;
431
+ }
432
  }
 
433
  @media screen and (max-width: 767px) {
434
  .qsm-quiz-page-addon {
435
  width: 100%;
436
+ }
 
437
  .quizzes-surveys_page_qmn_addons .qsm-news-ads {
438
  width: 100%;
439
+ }
440
  }
441
+ /******************** Options Page *********************/
 
 
 
 
442
  .template_list_holder {
443
  width: 100%;
444
  }
 
445
  .template_variable {
446
  width: 50%;
447
  float: left;
448
  font-size: 14px;
449
  }
 
450
  .template_name {
451
  font-weight: bold;
452
  }
453
+ /******************** Results Pages & Emails Tab *********************/
454
+ .results-page, #qsm_emails .qsm-email {
 
 
 
 
455
  width: 100%;
456
  background-color: #fff;
457
  margin: 20px 0;
458
+ /*padding-bottom: 15px;
459
+ */
460
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.06);
461
  }
462
+ .results-page .results-page-content, #qsm_emails .qsm-email .qsm-email-content {
 
 
463
  background: #fff;
464
  padding-right: 15px;
465
  padding-left: 15px;
466
  width: 100%;
467
  box-sizing: border-box;
468
  }
469
+ .results-page-header, #qsm_emails .qsm-email-header {
 
 
470
  display: flex;
471
  align-items: center;
472
  justify-content: flex-end;
474
  padding: 10px 35px;
475
  border-bottom: 1px solid #dfd4d4;
476
  }
 
 
477
  #qsm_emails .delete-email-button {
478
  background: none;
479
  border: none;
481
  cursor: pointer;
482
  transition-duration: 200ms;
483
  }
 
 
484
  #qsm_emails .delete-email-button:hover {
485
  transform: scale(1.2);
486
  }
487
+ .results-page-content, .qsm-email-content {
 
 
488
  display: flex;
489
  flex-direction: column;
490
  }
491
+ .results-page-when, .results-page-show, .email-when, .email-show {
 
 
 
 
492
  padding: 10px;
493
  background-color: #f1f1f1;
494
  border: 1px solid #dfd4d4;
495
  margin: 15px 0;
496
  min-width: 60%;
497
  }
498
+ .results-page-when, .email-when {
 
 
499
  margin-right: 15px;
500
  }
501
+ .results-page-content-header, .email-content-header {
 
 
502
  margin-bottom: 10px;
503
  }
 
504
  .email-show label {
505
  margin-bottom: 5px;
506
  display: block;
507
  }
508
+ .results-page-content-header h4, .results-page-content-header p, .email-content-header h4, .email-content-header p {
 
 
 
 
509
  margin: 0;
510
  }
511
+ .results-page-condition, .email-condition {
 
 
512
  display: flex;
513
  flex-direction: column;
514
  margin-bottom: 15px;
 
515
  }
516
+ .results-page-condition>select, .results-page-condition>input, .email-condition>select, .email-condition>input {
517
+ min-width: auto !important;
 
 
 
518
  max-width: 100%;
519
  }
 
520
  .delete-condition-button {
521
  background: none;
522
  border: 1px solid #1dd969;
525
  transition-duration: 200ms;
526
  padding: 6px;
527
  }
 
528
  .delete-condition-button:hover {
529
  transform: scale(1.1);
530
  }
 
531
  .email-show .label {
532
  display: block;
533
  }
534
+ .results-page-show textarea, .to-email, .subject, .email-template {
 
 
 
 
535
  width: 100%;
536
  margin-bottom: 10px;
537
  }
 
538
  @media screen and (min-width: 760px) {
539
+ .results-page-content, .qsm-email-content {
 
 
540
  flex-direction: row;
541
  justify-content: space-around;
542
+ }
543
+ .results-page-when, .results-page-show, .email-when, .email-show {
 
 
 
 
544
  width: calc(50% - 15px);
545
  min-width: unset;
546
+ }
547
+ .results-page-condition, .email-condition {
 
 
548
  align-items: center;
549
  flex-direction: row;
550
+ }
551
+ .results-page-condition>select, .results-page-condition>input, .email-condition>select, .email-condition>input {
 
 
 
 
552
  max-width: 23%;
553
+ }
 
554
  .delete-condition-button {
555
  border: none;
556
+ }
557
  }
558
+ /******************** Quiz Styles Tab *********************/
 
 
 
 
559
  .qsm-styles {
560
  display: flex;
561
  flex-direction: column;
562
  }
 
563
  .qsm_featured_image_preview {
564
  max-height: 200px;
565
  max-width: 300px;
566
  margin: 5px 0;
567
  border-radius: 3px;
568
  }
 
569
  .qsm_featured_image_preview:hover:before {
570
  content: "\f147";
571
  font-family: "dashicons";
572
  color: #5cb85c;
573
  margin-right: 5px;
574
  }
 
 
575
  @media screen and (min-width: 700px) {
576
  .qsm-styles {
577
  flex-direction: row;
578
  flex-wrap: wrap;
579
+ }
580
  }
581
+ /******************** About/Credits Page *********************/
 
 
 
 
582
  div.qsm_icon_wrap {
583
  position: absolute;
584
+ top: -20px;
585
  right: 0;
586
  background-color: rgba(54, 58, 66, 1);
587
  color: #1dd969;
591
  text-align: center;
592
  font-weight: 600;
593
  margin: 5px 0 0;
594
+ padding-top: 100px;
595
  height: 40px;
596
  display: inline-block;
597
  width: 150px;
602
  -khtml-border-radius: 20px;
603
  border-radius: 20px;
604
  }
 
605
  .qsm-tab-content .feature {
606
  margin-bottom: 20px;
607
  }
 
608
  .qsm-tab-content .feature .feature-headline {
609
  margin: 1.1em 0 0.2em;
610
  font-size: 40px;
612
  line-height: 1.3;
613
  text-align: center;
614
  }
 
615
  .qsm-tab-content .feature .feature-text {
616
  text-align: center;
617
  font-size: 16px;
618
  }
 
619
  ul.changelog {
620
  background-color: #fff;
621
  padding: 10px 10px;
622
  }
 
623
  ul.changelog li {
624
  padding: 4px 0px;
625
  }
 
626
  ul.changelog li div.two {
627
  width: 70%;
628
  float: left;
633
  text-align: center;
634
  line-height: 25px;
635
  }
 
636
  ul.changelog li.fixed>div {
637
  background: #f0ffe1;
638
  color: #444;
639
  border-right: 1px solid #5cb85c;
640
  width: 20%;
641
  }
 
642
  ul.changelog li.fixed div.two:before {
643
  content: "\f147";
644
  font-family: "dashicons";
645
  color: #5cb85c;
646
  margin-right: 5px;
647
  }
 
648
  ul.changelog li.add>div {
649
  background: #ffeed0;
650
  color: #444;
651
  border-right: 1px solid #efa537;
652
  width: 20%;
653
  }
 
654
  ul.changelog li.add div.two:before {
655
  content: "\f155";
656
  font-family: "dashicons";
657
  color: #efa537;
658
  margin-right: 5px;
659
  }
 
660
  ul.changelog li.update>div {
661
  background: #bde7ff;
662
  color: #444;
663
  border-right: 1px solid #106daa;
664
  width: 20%;
665
  }
 
666
  ul.changelog li.update div.two:before {
667
  content: "\f463";
668
  font-family: "dashicons";
669
  color: #106daa;
670
  margin-right: 5px;
671
  }
672
+ /******************** Addons Page *********************/
 
 
 
 
673
  .qsm-addons {
674
  display: flex;
675
  flex-direction: column;
676
  }
 
677
  @media screen and (min-width: 700px) {
678
  .qsm-addons {
679
  flex-direction: row;
680
  flex-wrap: wrap;
681
+ }
682
  }
683
+ /******************** Help Page *********************/
 
 
 
 
684
  .quiz_email_support p#mlw_support_message {
685
  color: red;
686
  font-size: 20px;
687
  }
688
+ .quiz_email_support input, .quiz_email_support textarea {
 
 
689
  width: 100% !important;
690
  }
 
691
  .quiz_email_support textarea {
692
  min-height: 200px;
693
  }
 
694
  .quiz_email_support label {
695
  font-weight: bold;
696
  }
697
+ /******************** Misc. *********************/
 
 
 
 
698
  /* Ads */
699
  .help-decide {
700
  display: block;
704
  color: #000;
705
  font-weight: bold;
706
  }
 
707
  .help-decide p {
708
  font-size: 14px;
709
  }
 
710
  /* Info Bar */
711
  .qsm-info-box {
712
  display: block;
713
  text-align: center;
714
  background: #fff;
715
  border: 1px solid #dfd4d4;
716
+ /* color: #000;
717
+ */
718
  font-weight: bold;
719
+ /* font-size: 14px;
720
+ */
721
  margin-bottom: 20px;
722
  margin-top: 10px;
723
  }
 
724
  .qsm-info-box p {
725
  font-size: 14px;
726
  }
 
727
  /* Info Widget */
728
  .qsm-quiz-page-addon .qsm-info-widget {
729
  margin-top: 0;
730
  background: #fff;
731
  margin-left: 0;
732
  }
 
733
  .qsm-info-widget {
734
  text-align: center;
735
  border: 1px solid #dfd4d4;
740
  max-width: 330px;
741
  box-sizing: border-box;
742
  }
743
+ .admin_page_mlw_quiz_options .update-nag{display: none;}
744
+ .admin_page_mlw_quiz_options #wpcontent{
745
+ overflow: hidden;
746
+ }
747
  .admin_page_mlw_quiz_options .qsm-info-widget {
748
  background: #fff;
749
  margin: 0 0 20px 0;
750
  cursor: pointer;
751
  }
752
+ .admin_page_mlw_quiz_options .qsm-info-widget:hover, .admin_page_mlw_quiz_options div.mlw_qmn_themeBlockActive.qsm-info-widget {
 
 
753
  background-color: #333;
754
  color: #fff;
755
  }
 
756
  #mlw_qmn_theme_block_primary {
757
  background-color: #005e8e;
758
  color: #fff;
759
  }
 
760
  #mlw_qmn_theme_block_amethyst {
761
  background-color: #9b59b6;
762
  color: #fff;
763
  }
 
764
  #mlw_qmn_theme_block_emerald {
765
  background-color: #006732;
766
  color: #fff;
767
  }
 
768
  #mlw_qmn_theme_block_turquoise {
769
  background-color: #006552;
770
  color: #fff;
771
  }
 
772
  #mlw_qmn_theme_block_gray {
773
  background-color: #595959;
774
  color: #fff;
775
  }
 
776
  .mlw_qmn_themeBlockActive.qsm-info-widget {
777
  transform: scale(1.1);
778
  border: 2px solid #d5a8a8;
779
  }
 
780
  .qsm-info-widget a.button-primary {
781
  margin-top: 15px;
782
  }
 
783
  .qsm-quiz-page-addon a.button-primary {
784
  margin-top: 0 !important;
785
  }
 
786
  .qsm-info-widget:hover {
787
  transform: scale(1.1);
788
  }
 
789
  /* Options tabs */
790
+ .qsm_tab_content, .mlw_tab_content {
 
791
  padding: 10px 10px 10px 10px;
792
  }
 
793
  .admin_page_mlw_quiz_options .qsm_tab_content>form>.button-primary:nth-child(3) {
794
  display: none;
795
  }
 
796
  .qsm_tab_content label {
797
  margin-right: 5px;
798
  }
799
+ .qsm_tab_content a{
800
+ cursor: pointer;
801
+ text-decoration: none;
802
+ outline: none;
803
+ }
804
+ .qsm_tab_content a:hover,.qsm_tab_content a:focus{
805
+ outline: none;
806
+ text-decoration: none;
807
+ box-shadow: none;
808
+ }
809
  /* Popup */
 
810
  .qsm-popup {
811
+ font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;
 
812
  }
 
813
  .qsm-popup__overlay {
814
  position: fixed;
815
  top: 0;
822
  align-items: center;
823
  z-index: 9999;
824
  }
 
825
  .qsm-popup__container {
826
  background-color: #fff;
827
  padding: 30px;
832
  overflow-y: auto;
833
  box-sizing: border-box;
834
  }
 
835
  .qsm-popup__header {
836
  display: flex;
837
  justify-content: space-between;
838
  align-items: center;
839
  }
 
840
  .qsm-popup__title {
841
  margin-top: 0;
842
  margin-bottom: 0;
843
  font-weight: 600;
844
  font-size: 1.25rem;
845
  line-height: 1.25;
846
+ color: #2271b1;
847
  box-sizing: border-box;
848
  }
 
849
  .qsm-popup__close {
850
  background: transparent;
851
  border: 0;
852
  color: #00449e;
853
  text-decoration: none;
854
  }
 
855
  .qsm-popup__header .qsm-popup__close:before {
856
  content: "\2715";
857
  }
 
858
  .qsm-popup__content {
859
  margin-top: 2rem;
860
  margin-bottom: 2rem;
861
  line-height: 1.5;
862
  color: rgba(0, 0, 0, 0.8);
863
  }
 
864
  body .qsm-popup__btn {
865
  font-size: 0.875rem;
866
  padding-left: 1rem;
878
  overflow: visible;
879
  line-height: 1.15;
880
  margin: 0;
881
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
  body .qsm-popup__btn-primary {
883
  background-color: #00449e;
884
  color: #fff;
885
  }
 
886
  @keyframes mmfadeIn {
887
  from {
888
  opacity: 0;
889
+ }
 
890
  to {
891
  opacity: 1;
892
+ }
893
  }
 
894
  @keyframes mmfadeOut {
895
  from {
896
  opacity: 1;
897
+ }
 
898
  to {
899
  opacity: 0;
900
+ }
901
  }
 
902
  @keyframes mmslideIn {
903
  from {
904
  transform: translateY(15%);
905
+ }
 
906
  to {
907
  transform: translateY(0);
908
+ }
909
  }
 
910
  @keyframes mmslideOut {
911
  from {
912
  transform: translateY(0);
913
+ }
 
914
  to {
915
  transform: translateY(-10%);
916
+ }
917
  }
 
918
  .qsm-popup-slide {
919
  display: none;
920
  }
 
921
  .qsm-popup-slide.is-open {
922
  display: block !important;
923
  }
 
924
  .qsm-popup-slide[aria-hidden="false"] .qsm-popup__overlay {
925
  animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
926
  }
 
927
  .qsm-popup-slide[aria-hidden="false"] .qsm-popup__container {
928
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
929
  }
 
930
  .qsm-popup-slide[aria-hidden="true"] .qsm-popup__overlay {
931
  animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
932
  }
 
933
  .qsm-popup-slide[aria-hidden="true"] .qsm-popup__container {
934
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
935
  }
936
+ .qsm-popup-slide .qsm-popup__container, .qsm-popup-slide .qsm-popup__overlay {
 
 
937
  will-change: transform;
938
  }
939
+ .qsm-popup select, .qsm-popup textarea, .qsm-popup input[type=text], .qsm-popup input[type=search], .qsm-popup input[type=number]{
940
+ min-width: 200px !important;
941
+ max-width: 200px !important;
942
+ border: 1px solid #dddddd;
943
+ border-radius: 1px;
944
+ }
945
+ /** * Shortcode accordion */
946
  .sc-opener {
947
  position: relative;
948
  font-size: 14px !important;
952
  color: #0073aa !important;
953
  font-weight: 500;
954
  }
 
955
  .sc-opener span.dashicons {
956
  position: relative;
957
  top: 2px;
958
  margin-right: 5px;
959
  }
 
960
  .sc-content {
961
  display: none;
962
  }
 
963
  .quiz-preview-link {
964
  margin-left: 10px;
965
  position: relative;
966
  top: 3px;
967
  }
 
968
  #show-advanced-option {
969
  font-size: 16px;
970
  cursor: pointer;
971
  color: #0073aa;
972
  margin-bottom: 15px;
973
  }
 
974
  .remove-ads-adv-link {
975
  text-align: center;
976
  margin-top: 30px;
977
  }
 
978
  .qsm-info-widget h3 {
979
  line-height: 132%;
980
  }
 
981
  .remove-ads-adv-link a {
982
  background: #1dd969;
983
  text-align: center;
990
  font-weight: bold;
991
  margin-bottom: 10px;
992
  }
 
993
  .help-decide a.remove-adv-button {
994
  background: #1dd969;
995
  text-align: center;
1002
  font-weight: bold;
1003
  margin-left: 10px;
1004
  }
 
1005
  h3.addon_category_name {
1006
  width: 100%;
1007
  background: transparent;
1009
  border-bottom: 1px solid #d7d1d1;
1010
  margin-bottom: 30px;
1011
  }
 
1012
  /*Design of new radio taggle*/
1013
  .buttonset.ui-buttonset .ui-button.ui-state-active {
1014
  background: #e21130 none repeat scroll 0 0;
1015
  border-color: #e21130 !important;
1016
  }
 
1017
  .buttonset.ui-buttonset .ui-button.ui-state-active span.ui-button-text {
1018
  color: #fff !important;
1019
  }
 
1020
  .buttonset.ui-buttonset.green .ui-state-active {
1021
  background: #44c767 none repeat scroll 0 0;
1022
  border-color: #44c767 !important;
1023
  }
 
1024
  .buttonset.ui-buttonset .ui-button.ui-state-active.ui-corner-left {
1025
  background: #44c767 none repeat scroll 0 0;
1026
  border-color: #44c767 !important;
1027
  }
 
1028
  .buttonset.ui-buttonset label {
1029
  background: #fff;
1030
  border: 1px solid #b6b6b6;
1031
  margin-right: -5px !important;
1032
  }
 
1033
  .buttonset.ui-buttonset label span.ui-button-text {
1034
  color: #727272;
1035
  font-size: 12px;
1038
  min-width: 20px;
1039
  padding: 0 10px;
1040
  }
1041
+ .qsm_tab_content input[type="text"], .qsm_tab_content input[type="number"], .qsm_tab_content input[type="url"], .qsm_global_settings input[type="text"], .qsm_global_settings input[type="number"], .qsm_global_settings input[type="email"], .qsm_global_settings input[type="url"], .qsm-addon-setting-wrap input[type="email"], .qsm-addon-setting-wrap input[type="text"], .qsm-addon-setting-wrap input[type="url"], .qsm-addon-setting-wrap input[type="number"] {
 
 
 
 
 
 
 
 
 
 
 
1042
  background: #ffffff none repeat scroll 0 0;
1043
  border: 1px solid #dddddd;
1044
+ border-radius: 1px;
1045
  box-shadow: none;
1046
  color: #666666;
 
1047
  width: auto;
1048
  height: auto;
1049
+ min-width: 300px;
 
1050
  }
 
1051
  .qsm_tab_content textarea {
1052
  background: #ffffff none repeat scroll 0 0;
1053
  border: 1px solid #dddddd;
1058
  width: 100%;
1059
  height: auto;
1060
  }
 
1061
  .global-sub-text {
1062
  margin-left: 15px;
1063
  }
 
1064
  /* The switch - the box around the slider */
1065
  .switch {
1066
  position: relative;
1068
  width: 60px;
1069
  height: 34px;
1070
  }
 
1071
  /* Hide default HTML checkbox */
1072
  .switch input[type="checkbox"] {
1073
  opacity: 0;
1074
  width: 0;
1075
  height: 0;
1076
  }
 
1077
  /* The slider */
1078
  .slider {
1079
  position: absolute;
1086
  -webkit-transition: 0.4s;
1087
  transition: 0.4s;
1088
  }
 
1089
  .slider:before {
1090
  position: absolute;
1091
  content: "";
1097
  -webkit-transition: 0.4s;
1098
  transition: 0.4s;
1099
  }
 
1100
  input:checked+.slider {
1101
  background-color: #2196f3;
1102
  }
 
1103
  input:focus+.slider {
1104
  box-shadow: 0 0 1px #2196f3;
1105
  }
 
1106
  input:checked+.slider:before {
1107
  -webkit-transform: translateX(26px);
1108
  -ms-transform: translateX(26px);
1109
  transform: translateX(26px);
1110
  }
 
1111
  /* Rounded sliders */
1112
  .slider.round {
1113
  border-radius: 34px;
1114
  }
 
1115
  .slider.round:before {
1116
  border-radius: 50%;
1117
  }
1118
+ input#sc-shortcode-model-text, input#sc-shortcode-model-text-link {
 
 
1119
  height: 30px;
1120
  }
 
1121
  div#modal-6 label {
1122
  display: block;
1123
  font-size: 14px;
1126
  color: #999;
1127
  font-style: italic;
1128
  }
 
1129
  #modal-6 .button>span.dashicons {
1130
  line-height: 29px;
1131
  }
 
1132
  .qsm-list-shortcode-view span.dashicons {
1133
  font-size: 24px;
1134
  }
1135
+ /** * No quiz screen design */
 
 
 
1136
  .qsm-no-quiz-wrapper {
1137
  text-align: center;
1138
  max-width: 100%;
1139
  width: 100%;
1140
  }
 
1141
  .qsm-no-quiz-wrapper .dashicons.dashicons-format-chat {
1142
  font-size: 200px;
1143
  display: block;
1144
+ /* line-height: 200px;
1145
+ */
1146
  width: auto;
1147
  height: auto;
1148
  }
 
1149
  .qsm-no-quiz-wrapper h2 {
1150
  margin-bottom: 30px;
1151
  }
 
1152
  .qsm-no-quiz-wrapper .buttons {
1153
  margin-bottom: 30px;
1154
  }
 
1155
  .qsm-no-quiz-wrapper .buttons a {
1156
  margin-right: 20px;
1157
  }
 
1158
  .qsm-no-quiz-wrapper .buttons a:last-child {
1159
  color: #8b8888;
1160
  }
 
1161
  .qsm-no-quiz-wrapper .buttons a:last-child .dashicons {
1162
  line-height: 46px;
1163
  }
 
1164
  .qsm-no-quiz-wrapper h3 {
1165
  color: #8b8888;
1166
  margin-bottom: 30px;
1167
  }
1168
+ /** * Option page design */
 
 
 
1169
  span.qsm-ph_text {
1170
  width: 100px;
1171
  display: inline-block;
1172
  }
 
1173
  tr .qsm-opt-desc {
1174
  color: #666;
1175
  font-style: italic;
1177
  margin-top: 5px;
1178
  display: block;
1179
  }
 
1180
  #quiz_settings_wrapper .qsm-opt-desc {
1181
  display: none !important;
1182
  }
 
1183
  .form-table td fieldset label {
1184
  margin-right: 20px !important;
1185
  }
 
1186
  .form-table .qsm-opt-tr {
1187
  position: relative;
1188
  padding-right: 24px;
1189
  padding-top: 15px;
1190
  }
 
1191
  td.scheduled_time_start {
1192
  padding-bottom: 0 !important;
1193
  }
 
1194
  .qsm-opt-tr .qsm-tooltips-icon {
1195
  margin: 0 0 0 0;
1196
  position: relative;
1204
  width: auto;
1205
  height: auto;
1206
  }
 
1207
  .qsm-tooltips-icon .qsm-tooltips {
1208
  background-color: #333;
1209
  border-radius: 3px;
1220
  width: 200px;
1221
  transform: translateX(-50%);
1222
  transition: opacity 0.5s ease 0s;
1223
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 
1224
  }
 
1225
  .qsm-tooltips-icon .qsm-tooltips a {
1226
  color: #fff;
1227
  }
 
1228
  .qsm-tooltips-icon .qsm-tooltips:before {
1229
  border-color: #333 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
1230
  border-style: solid;
1235
  transform: translateX(-50%);
1236
  position: absolute;
1237
  }
1238
+ .qsm-tooltips-icon:hover .qsm-tooltips, .qsm-tooltips:hover {
 
 
1239
  display: block;
1240
  opacity: 1;
1241
  z-index: 9999;
1242
  }
1243
+ .qsm-tab-btns a{
1244
+ margin: 0 10px;
1245
+ }
1246
+ /** * Text Tab design */
1247
  .qsm-text-main-wrap {
1248
  display: inline-block;
1249
  width: 100%;
1250
  }
 
1251
  .qsm-text-main-wrap #post-body-content {
1252
  background: #fff;
1253
  box-sizing: border-box;
1254
  }
 
1255
  .qsm-text-main-wrap #postbox-container-1 {
1256
  position: relative;
1257
  background: #fff;
1258
  box-sizing: border-box;
1259
  }
 
1260
  .qsm-text-main-wrap #postbox-container-1 .qsm-text-header h5 {
1261
  font-size: 14px;
1262
  margin: 0;
1263
  font-weight: bold;
1264
  }
 
1265
  .qsm-text-main-wrap #postbox-container-1 .qsm-text-header .description {
1266
  color: #666;
1267
+ display: block;
1268
+ font-weight: 400;
1269
  }
 
1270
  .qsm-text-main-wrap .qsm-text-header {
1271
  padding: 20px;
1272
  border-bottom: 1px solid #f1f1f1;
1273
+ display: flex;
1274
+ align-items: flex-start;
1275
+ justify-content: space-between;
1276
  }
 
 
 
 
 
1277
  .qsm-text-main-wrap .qsm-text-header .message-dropdown label {
1278
  font-size: 14px;
1279
  font-weight: bold;
1280
  }
 
 
 
 
 
1281
  .qsm-text-main-wrap .qsm-text-conent {
1282
  padding: 20px;
1283
  border-bottom: 1px solid #f1f1f1;
1284
  position: relative;
1285
  }
 
1286
  .qsm-text-conent.qsm-text-allowed-variables span.qsm-text-template-span {
1287
  display: inline-block;
1288
  margin-bottom: 10px;
1289
  margin-right: 10px;
1290
  position: relative;
1291
  }
 
1292
  #show-all-variable-content span.qsm-text-template-span {
1293
  display: inline-block;
1294
  position: relative;
1295
  text-align: center;
1296
  padding: 0 5px;
1297
  }
 
1298
  #show-all-variable-content .popup-template-span-wrap {
1299
  margin-bottom: 20px;
1300
  margin-right: 5px;
1302
  display: inline-block;
1303
  border: 1px solid #def0ff;
1304
  }
 
1305
  #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1306
  left: calc(100% - 100px);
1307
  }
 
1308
  #show-all-variable-content .popup-template-span-wrap:nth-child(3n + 3) .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips:before {
1309
  left: 93%;
1310
  }
 
1311
  .qsm-text-template-span .qsm-tooltips-icon {
1312
  vertical-align: middle;
1313
  width: unset;
1318
  font-size: 8px;
1319
  display: none;
1320
  }
 
1321
  .qsm-text-template-span .qsm-tooltips-icon .qsm-tooltips {
1322
  left: calc(100% - 10px);
1323
  bottom: 30px;
1324
  }
 
1325
  .qsm-text-label-wrapper>h2 {
1326
  font-size: 24px;
1327
  border-bottom: 1px solid #ccc;
1328
  padding-bottom: 10px;
1329
  line-height: normal;
1330
  }
 
1331
  .qsm-text-label-wrapper form>button:nth-child(3) {
1332
  display: none;
1333
  }
 
1334
  .qsm-text-label-wrapper .section_heading {
1335
  margin-top: 0;
1336
  }
 
1337
  #show-all-variable .qsm-popup__container {
1338
  min-width: 80vw;
1339
  max-width: 1040px;
1340
  padding: 0;
1341
  }
 
1342
  #show-all-variable-content {
1343
  margin-bottom: 0 !important;
1344
+ padding: 20px 30px;
1345
  margin: 0;
1346
  }
 
1347
  #show-all-variable .qsm-popup__header {
1348
  border-bottom: 1px solid #f1f1f1;
1349
  padding: 20px;
1350
  }
 
1351
  #show-all-variable .qsm-popup__header .qsm-popup__title {
1352
  color: #23282d;
1353
  margin-bottom: 7px;
1354
  }
 
1355
  #show-all-variable .qsm-popup__footer {
1356
  border-top: 1px solid #f1f1f1;
1357
  padding: 20px;
1358
  }
 
1359
  .qsm-view-preview-btn {
1360
  text-decoration: none;
1361
  line-height: normal;
1362
  margin-left: -5px;
1363
  }
1364
+ .mlw_quiz_options .button.button-default.qsm-btn-quiz-edit {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1365
  margin-right: 5px;
1366
+ text-align: center;
1367
+ line-height: 1.6em;
1368
+ border: none;
1369
+ background: #fff;
1370
+ border-radius: 0;
1371
+ padding-bottom: 8px;
1372
+ border-bottom: 2px solid transparent;
1373
  }
1374
+ .mlw_quiz_options .button.button-default.qsm-btn-quiz-edit:hover {
1375
+ border-bottom: 2px solid;
 
1376
  }
1377
+ .mlw_quiz_options .button.button-default.qsm-btn-quiz-edit span.dashicons {
 
1378
  line-height: 27px;
1379
  }
1380
+ .qsm-help-tab-dropdown-list {
1381
+ display: inline-block;
1382
+ box-sizing: border-box;
1383
+ position: absolute;
1384
+ top: 100%;
1385
+ right: 0;
1386
+ min-width: 300px;
1387
+ z-index: 9;
1388
+ background: #FFF;
1389
+ border: 1px solid #e0e0e0;
1390
+ box-shadow: -5px 6px 6px 0 #ddd;
1391
+ font-size: 14px;
1392
+ transform: translateX(100%);
1393
+ transition-duration: .3s;
1394
+ transition-timing-function: ease-in-out;
1395
+ }
1396
+ .qsm-help-tab-dropdown-list.opened{
1397
+ transform:none;
1398
+ }
1399
+ .qsm-help-tab-dropdown-list h3{
1400
+ background: #f5f5f5;
1401
+ padding: 15px 20px;
1402
+ margin: 0;
1403
+ line-height: 1.2;
1404
+ font-size: calc(16px);
1405
+ }
1406
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item{
1407
+ display: block;
1408
+ border-bottom: 1px solid #f0f0f0;
1409
+ padding: 15px 20px;
1410
+ color: #1F8CBE;
1411
+ text-align: left;
1412
+ position: relative;
1413
+ }
1414
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item:after{
1415
+ content: '\f344';
1416
+ font-family: dashicons;
1417
+ display: inline-block;
1418
+ line-height: 1;
1419
+ font-weight: 400;
1420
+ font-style: normal;
1421
+ text-decoration: inherit;
1422
+ text-transform: none;
1423
+ width: 20px;
1424
+ height: 20px;
1425
+ font-size: 20px;
1426
+ vertical-align: top;
1427
+ text-align: center;
1428
+ position: absolute;
1429
+ right: 20px;
1430
+ }
1431
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item:last-child{
1432
+ border-color: transparent;
1433
+ }
1434
+ .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item:hover, .qsm-quiz-nav-bar .qsm-help-tab-dropdown-list a.qsm-help-tab-item:focus{
1435
+ border-bottom: 1px solid #eee;
1436
+ background-color: #f0f0f0;
1437
+ }
1438
+ .qsm-help-tab-dropdown-list a.qsm-help-tab-item .dashicons{
1439
+ display: inline-block;
1440
+ }
1441
+ .qsm-help-tab-dropdown-list .qsm-help-tab-icon{
1442
+ display: inline-block;
1443
+ height: 20px;
1444
+ width: auto;
1445
+ vertical-align: top;
1446
+ }
1447
  .mlw_quiz_options .nav-tab-wrapper {
1448
  margin-top: 20px;
1449
  }
1450
+ .nav-tab-wrapper .qsm-tab-icon{
1451
+ display: inline-block;
1452
+ vertical-align: top;
1453
+ width: auto;
1454
+ height: 25px;
1455
+ }
1456
+ .qsm-option-tab-dropdown{
1457
+ position: relative;
1458
+ display: inline-block;
1459
+ margin-bottom: -5px;
1460
+ }
1461
+ .qsm-option-tab-dropdown-list {
1462
+ position: absolute;
1463
+ left: 8px;
1464
+ z-index: 9999;
1465
+ top: 35px;
1466
+ display: none;
1467
+ }
1468
+ .qsm-option-tab-dropdown-item{
1469
+ border-bottom: 1px solid #c3c4c7;
1470
+ min-width: 100px;
1471
+ width: 100%;
1472
+ margin: 0;
1473
+ }
1474
+ .qsm-option-tab-dropdown:hover .qsm-option-tab-dropdown-list{
1475
+ display: block;
1476
+ }
1477
  .mlw_quiz_options .edit-quiz-name {
1478
+ text-decoration: none;
1479
+ box-shadow: none;
1480
+ outline: none;
1481
+ margin: 0 5px;
1482
  }
 
1483
  .qsm_text_customize_label {
1484
  position: fixed;
1485
  bottom: 20px;
1493
  border: 1px solid #cdbaba;
1494
  cursor: pointer;
1495
  }
 
1496
  .qsm-text-tab-message-loader {
1497
  position: absolute;
1498
  top: 50%;
1500
  z-index: 99;
1501
  transform: translate(-50%, -50%);
1502
  }
 
1503
  .qsm_text_customize_label .dashicons {
1504
  font-size: 14px;
1505
  line-height: 20px;
1506
  }
1507
+ /** * Admin result page design */
 
 
 
1508
  .overview-main-wrapper {
1509
  display: flex;
1510
  width: 100%;
1511
  }
 
1512
  .overview-main-wrapper .overview-inner-wrap {
1513
  margin-right: 2%;
1514
  width: 33.33%;
1515
  }
 
1516
  .overview-main-wrapper .overview-inner-wrap .inside {
1517
  min-height: 105px;
1518
  }
 
1519
  .overview-main-wrapper .overview-inner-wrap:last-child {
1520
  margin-right: 0;
1521
  }
1522
+ .overview-main-wrapper .overview-inner-wrap h2.hndle, .comment-inner-wrap h2.hndle, .response-inner-wrap h2.hndle {
 
 
 
1523
  margin: 0;
1524
  padding: 10px;
1525
  }
 
1526
  .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span {
1527
  display: block;
1528
  margin-bottom: 5px;
1529
  }
 
1530
  .overview-main-wrapper .candidate-detail-wrap.overview-inner-wrap .result-candidate-span:last-child {
1531
  margin-bottom: 0;
1532
  }
 
1533
  .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>label {
1534
  font-weight: bold;
1535
  }
 
1536
  .overview-main-wrapper .overview-inner-wrap.candidate-detail-wrap .result-candidate-span>span {
1537
  float: right;
1538
  }
 
1539
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper {
1540
  display: -webkit-box;
1541
  display: -moz-box;
1547
  -webkit-justify-content: center;
1548
  flex-wrap: nowrap;
1549
  }
 
1550
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div {
1551
  padding: 15px 30px;
1552
  background: #f1f1f1;
1554
  max-width: 120px;
1555
  width: 100%;
1556
  }
 
1557
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper>div:last-child {
1558
  margin-right: 0;
1559
  }
 
1560
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-span {
1561
  display: block;
1562
  font-size: 36px;
1563
  font-weight: bold;
1564
  text-align: center;
1565
  }
 
1566
  .overview-main-wrapper .overview-inner-wrap .timer-div-wrapper span.timer-text {
1567
  display: block;
1568
  font-size: 16px;
1569
  font-weight: bold;
1570
  text-align: center;
1571
  }
 
1572
  .response-inner-wrap .inside {
1573
  padding: 10px;
1574
  margin: 0;
1575
  }
 
1576
  .response-inner-wrap .inside .qmn_question_answer {
1577
  background-color: #f1f1f1;
1578
  padding: 10px;
1579
  margin-bottom: 0;
1580
  background-repeat: no-repeat;
1581
  background-position: 95% center;
 
1582
  }
 
1583
  .response-inner-wrap .inside .qmn_question_answer:nth-child(2n) {
1584
  background-color: #fff;
1585
  }
 
1586
  .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_incorrect {
1587
  background-image: url(../assets/wrong.png);
1588
  }
1589
+ .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_incorrect, .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_incorrect {
 
 
1590
  background-image: none;
1591
  }
 
1592
  .response-inner-wrap .inside .qmn_question_answer.qmn_question_answer_correct {
1593
  background-image: url(../assets/right.png);
1594
  }
1595
+ .response-inner-wrap .inside .qsm-add-border-bottom.qmn_question_answer.qmn_question_answer_correct, .response-inner-wrap .inside .qsm-remove-border-bottom.qmn_question_answer.qmn_question_answer_correct {
 
 
1596
  background-image: none;
1597
  }
 
1598
  .old_template_result_wrap {
1599
  padding: 15px;
1600
  background: #fff;
1601
  }
 
1602
  .result-page-title {
1603
  text-align: left;
1604
  display: inline-block;
1608
  margin: 0;
1609
  line-height: 30px;
1610
  }
 
1611
  .result-tab-content a.button>span.dashicons {
1612
  line-height: 29px;
1613
  font-size: 18px;
1614
  margin-left: -4px;
1615
  margin-right: -4px;
1616
  }
 
1617
  .result-page-wrapper .tablenav-pages {
1618
  margin-left: 10px;
1619
  }
 
1620
  .result-page-wrapper .tablenav.top {
1621
  margin-bottom: 20px;
1622
  margin-top: 20px;
1623
  }
 
1624
  .inner-sidebar1 .handlediv {
1625
  display: none !important;
1626
  }
 
1627
  .inner-sidebar1 .hndle {
1628
+ padding: 10px;
 
1629
  margin: 0;
 
1630
  }
1631
+ .inner-sidebar1 .inside h3, .inner-sidebar1 .inside h4 {
 
 
1632
  margin-bottom: 10px;
1633
  }
1634
+ .qsm-quiz-email-tab, .qsm-quiz-result-tab {
 
 
1635
  max-width: 1200px;
1636
  width: 100%;
1637
  }
1638
+ .qsm-quiz-email-tab .qsm-show-all-variable-text span.dashicons, .qsm-quiz-result-tab .qsm-show-all-variable-text span.dashicons {
 
 
1639
  font-size: 16px;
1640
  line-height: 22px;
1641
  }
1642
+ .qsm-quiz-email-tab .qsm-show-all-variable-text, .qsm-quiz-result-tab .qsm-show-all-variable-text {
 
 
 
1643
  position: fixed;
1644
  bottom: 20px;
1645
  right: 25px;
1653
  cursor: pointer;
1654
  text-decoration: none;
1655
  }
 
1656
  .popup-template-span-wrap .popup-copied-des {
1657
  color: green;
1658
  }
 
1659
  .popup-template-span-wrap .popup-copied-des span.dashicons {
1660
  line-height: 28px;
1661
  }
 
1662
  .comment-inner-wrap {
1663
+ /* display: none;
1664
+ */
1665
  }
 
1666
  @media (min-width: 768px) and (max-width: 1199px) {
1667
  .qsm-news-ads .qsm-info-widget {
1668
  float: left;
1669
  max-width: unset;
1670
  width: 31.3%;
1671
+ }
 
1672
  .qsm-news-ads .qsm-info-widget:nth-child(3n+5) {
1673
  clear: both;
1674
+ }
 
1675
  .remove-ads-adv-link {
1676
  width: 100%;
1677
  display: inline-block;
1678
  margin-bottom: 30px;
1679
+ }
1680
  }
 
1681
  @media screen and (max-width: 782px) {
1682
  .form-table td fieldset label {
1683
  margin-top: -1px !important;
1684
  vertical-align: top;
1685
+ }
 
1686
  .qsm-tooltips-icon .qsm-tooltips {
1687
  left: -90px;
1688
+ }
 
1689
  .qsm-opt-tr .qsm-tooltips-icon {
1690
  right: 13px;
1691
+ }
 
1692
  .qsm-tooltips-icon .qsm-tooltips:before {
1693
  left: auto;
1694
  right: -3px;
1695
+ }
1696
  }
 
1697
  @media screen and (max-width: 767px) {
1698
  .qsm-quiz-row td:nth-of-type(2n) {
1699
  display: none;
1700
+ }
1701
+ .qsm-quiz-page-wrapper, .qsm-quiz-page-wrapper-with-ads {
 
 
1702
  overflow-x: auto;
1703
+ }
1704
+ .qsm-quiz-page-wrapper thead th:nth-of-type(2n), .qsm-quiz-page-wrapper tfoot th:nth-of-type(2n), .qsm-quiz-page-wrapper-with-ads thead th:nth-of-type(2n), .qsm-quiz-page-wrapper-with-ads tfoot th:nth-of-type(2n) {
 
 
 
 
1705
  display: none;
1706
+ }
 
1707
  .qsm-quiz-page-wrapper .row-actions {
1708
  display: inline-block !important;
1709
+ }
 
1710
  .qsm-quiz-page-wrapper p.search-box {
1711
  bottom: -30px;
1712
+ }
 
1713
  .qsm-popup__container {
1714
  min-width: auto;
1715
  max-width: 100%;
1716
+ }
 
1717
  #show-advanced-option {
1718
  display: block;
1719
  width: 100%;
1720
  float: left;
1721
+ }
 
1722
  .contact-form-label {
1723
  display: inline-block;
1724
+ }
 
1725
  .template_variable {
1726
  width: 100%;
1727
  max-width: 100%;
1728
  margin-bottom: 10px;
1729
  word-break: break-word;
1730
+ }
 
1731
  .qsm_tab_content .form-table input[type=radio] {
1732
  top: 6px;
1733
  margin-bottom: 8px;
1734
+ }
 
1735
  .result-page-wrapper form {
1736
  overflow: scroll;
1737
  width: 100%;
1738
+ }
 
 
1739
  p.search-box {
1740
  bottom: -30px;
1741
+ }
 
1742
  .quizzes-surveys_page_qsm_quiz_help .hndle {
1743
  padding-left: 15px;
1744
  padding-bottom: 15px;
1745
+ }
 
1746
  .qsm-news-ads .qsm-info-widget {
1747
  width: calc(100% - 30px);
1748
  max-width: 100%;
1749
  box-sizing: border-box;
1750
  margin: 15px 15px 0 15px;
1751
+ }
 
1752
  .form-table .qsm-opt-tr {
1753
  padding-bottom: 10px;
1754
+ }
 
1755
  .overview-main-wrapper {
1756
  display: block;
1757
+ }
 
1758
  .overview-main-wrapper .overview-inner-wrap {
1759
  margin-right: 0;
1760
  width: 100%;
1761
+ }
 
1762
  .result-page-title {
1763
  margin-bottom: 10px;
1764
+ }
1765
  }
 
1766
  .popup-template-span-wrap .popup-copied-des span.dashicons {
1767
  line-height: 28px;
1768
  }
 
1769
  .comment-inner-wrap {
1770
+ /* display: none;
1771
+ */
1772
  }
 
1773
  #qsm_themes h2.wp-heading-inline {
1774
  display: inline-block;
1775
  margin-right: 5px;
1776
  }
1777
+ /** * Style tab design */
 
 
 
1778
  .wp-upload-form {
1779
  background: #fafafa;
1780
  border: 1px solid #ccd0d4;
1784
  justify-content: space-between;
1785
  align-items: center;
1786
  }
 
1787
  @media (min-width: 768px) and (max-width: 1199px) {
1788
  .qsm-news-ads .qsm-info-widget {
1789
  float: left;
1790
  max-width: unset;
1791
  width: 31.3%;
1792
+ }
 
1793
  .qsm-news-ads .qsm-info-widget:nth-child(3n + 5) {
1794
  clear: both;
1795
+ }
 
1796
  .remove-ads-adv-link {
1797
  width: 100%;
1798
  display: inline-block;
1799
  margin-bottom: 30px;
1800
+ }
1801
  }
 
1802
  @media screen and (max-width: 782px) {
1803
  .form-table td fieldset label {
1804
  margin-top: -1px !important;
1805
  vertical-align: top;
1806
+ }
 
1807
  .qsm-tooltips-icon .qsm-tooltips {
1808
  left: -90px;
1809
+ }
 
1810
  .qsm-opt-tr .qsm-tooltips-icon {
1811
  right: 13px;
1812
+ }
 
1813
  .qsm-tooltips-icon .qsm-tooltips:before {
1814
  left: auto;
1815
  right: -3px;
1816
+ }
1817
  }
 
1818
  @media screen and (max-width: 767px) {
1819
  .qsm-quiz-row td:nth-of-type(2n) {
1820
  display: none;
1821
+ }
1822
+ .qsm-quiz-page-wrapper, .qsm-quiz-page-wrapper-with-ads {
 
 
1823
  overflow-x: auto;
1824
+ }
1825
+ .qsm-quiz-page-wrapper thead th:nth-of-type(2n), .qsm-quiz-page-wrapper tfoot th:nth-of-type(2n), .qsm-quiz-page-wrapper-with-ads thead th:nth-of-type(2n), .qsm-quiz-page-wrapper-with-ads tfoot th:nth-of-type(2n) {
 
 
 
 
1826
  display: none;
1827
+ }
 
1828
  .qsm-quiz-page-wrapper .row-actions {
1829
  display: inline-block !important;
1830
+ }
 
1831
  .qsm-quiz-page-wrapper p.search-box {
1832
  bottom: -30px;
1833
+ }
 
1834
  .qsm-popup__container {
1835
  min-width: auto;
1836
  max-width: 100%;
1837
+ }
 
1838
  #show-advanced-option {
1839
  display: block;
1840
  width: 100%;
1841
  float: left;
1842
+ }
 
1843
  .contact-form-label {
1844
  display: inline-block;
1845
+ }
 
1846
  .template_variable {
1847
  width: 100%;
1848
  max-width: 100%;
1849
  margin-bottom: 10px;
1850
  word-break: break-word;
1851
+ }
 
1852
  .qsm_tab_content .form-table input[type="radio"] {
1853
  top: 6px;
1854
  margin-bottom: 8px;
1855
+ }
 
1856
  .result-page-wrapper form {
1857
  overflow: scroll;
1858
  width: 100%;
1859
+ }
 
1860
  p.search-box {
1861
  bottom: -30px;
1862
+ }
 
1863
  .quizzes-surveys_page_qsm_quiz_help .hndle {
1864
  padding-left: 15px;
1865
  padding-bottom: 15px;
1866
+ }
 
1867
  .qsm-news-ads .qsm-info-widget {
1868
  width: calc(100% - 30px);
1869
  max-width: 100%;
1870
  box-sizing: border-box;
1871
  margin: 15px 15px 0 15px;
1872
+ }
 
1873
  .form-table .qsm-opt-tr {
1874
  padding-bottom: 10px;
1875
+ }
 
1876
  .overview-main-wrapper {
1877
  display: block;
1878
+ }
 
1879
  .overview-main-wrapper .overview-inner-wrap {
1880
  margin-right: 0;
1881
  width: 100%;
1882
+ }
 
1883
  .result-page-title {
1884
  margin-bottom: 10px;
1885
+ }
1886
  }
 
1887
  .qsm-text-template-span{
1888
  min-width: 100px;
 
1889
  }
 
1890
  .qsm-text-template-span .button{
1891
  padding: 0px;
1892
  border: none;
1893
  min-height: unset;
1894
  font-size: 12px;
1895
+ background: unset;
1896
  }
 
1897
  .qsm-text-template-span .template-variable:hover {
1898
  background: unset;
1899
  }
 
1900
  .qsm-text-template-span .click-to-copy{
1901
  display: none;
1902
  position: absolute;
1904
  text-align: center;
1905
  left: 0;
1906
  }
 
 
1907
  .qsm-text-template-span:hover .click-to-copy{
1908
  display: inline-block;
1909
  background: #def0ff;
1910
  }
 
 
1911
  .qsm-text-template-span .qsm-tooltips-icon:before{
1912
  content:"\003F";
1913
  padding: 0px 3px;
1914
+ vertical-align: top;
1915
  }
 
1916
  .qsm-text-template-span:hover .qsm-tooltips-icon{
1917
  display: inline-block;
 
1918
  }
 
1919
  .qsm-text-template-span:hover .temp-var-seperator{
1920
  position: absolute;
1921
  display: flex;
1924
  align-items: center;
1925
  justify-content: center;
1926
  height: 100%;
1927
+ width:25px;
1928
  z-index:99;
1929
  border-left: 1px dashed #a1c1d8;
1930
  background: #def0ff;
1931
  }
 
1932
  #show-all-variable-content .popup-template-span-wrap:hover{
1933
  background: #def0ff;
1934
  border-color: #a1c1d8 ;
1935
  border-style: dashed;
1936
  }
 
1937
  .popup-template-span-wrap .qsm-text-template-span .popup-copied-des span.dashicons{
1938
  line-height: 1;
1939
+ }
 
1940
  #result_page_fb_image {
1941
  width: 25em;
1942
  }
 
1943
  .audit_buttons{
1944
  display: flex;
1945
  align-items: center;
1946
  justify-content: space-between;
1947
  }
1948
  input#question_search::-webkit-search-cancel-button {
1949
+ outline: none;
1950
+ appearance: none;
1951
  }
1952
+ .mlw_quiz_options .qsm-quiz-nav-bar {
1953
+ display: flex;
1954
+ justify-content: space-between;
1955
+ background: #fff;
1956
+ margin: -10px -20px 0 -21px;
1957
+ padding: 0;
1958
+ box-shadow: 0 1px 10px 0px #ddd;
1959
+ align-items: center;
1960
+ flex-wrap: wrap;
1961
+ flex-direction: row;
1962
+ z-index: 99;
1963
+ position: relative;
1964
+ }
1965
+ .qsm-alerts{
1966
+ margin-top: 20px;
1967
+ }
1968
+ .mlw_quiz_options .notice{
1969
+ border-top: 1px solid #dfd4d4;
1970
+ border-bottom: 1px solid #dfd4d4;
1971
+ border-right: 1px solid #dfd4d4;
1972
+ }
1973
+ .qsm-quiz-nav-bar .qsm-quiz-heading{
1974
+ padding: 0 20px;
1975
+ display: inline-flex;
1976
+ align-items: center;
1977
+ flex-wrap: nowrap;
1978
+ flex-direction: row;
1979
+ }
1980
+ .qsm-quiz-nav-bar .qsm-quiz-heading .qsm_quiz_title{
1981
+ padding: 0;
1982
+ margin: 0;
1983
+ font-size: 23px;
1984
+ font-weight: 400;
1985
+ line-height: 1.3;
1986
+ }
1987
+ .qsm-quiz-nav-bar .qsm-quiz-top-nav-links{
1988
+ position: relative;
1989
+ display: inline-flex;
1990
+ flex-direction: row;
1991
+ flex-wrap: wrap;
1992
+ align-items: center;
1993
+ }
1994
+ .qsm-quiz-nav-bar .qsm-quiz-top-nav-links a{
1995
+ text-decoration: none;
1996
+ box-shadow: none;
1997
+ outline: none;
1998
+ padding: 10px 12px 8px;
1999
+ font-weight: 400;
2000
+ color: #757575;
2001
+ border-bottom: 3px solid transparent;
2002
+ min-width: 50px;
2003
+ text-align: center;
2004
+ }
2005
+ .qsm-quiz-nav-bar .qsm-quiz-top-nav-links a:hover, .qsm-quiz-nav-bar .qsm-quiz-top-nav-links a:focus{
2006
+ color: #1F8CBE;
2007
+ border-bottom: 3px solid #1F8CBE;
2008
+ }
2009
+ .qsm-quiz-nav-bar .qsm-quiz-top-nav-links .dashicons{
2010
+ display: block;
2011
+ margin: 0 auto;
2012
+ color: inherit;
2013
+ font-size: 20px;
2014
  }
2015
  #result_details {
2016
+ font-size: 2em;
2017
+ display: flex;
2018
+ align-items: center;
2019
+ justify-content: space-between;
2020
+ margin-bottom: 10px;
2021
  }
2022
  input#duplicate_questions {
2023
+ margin-left: 10px;
2024
+ }
2025
+ .text-right{
2026
+ text-align: right !important;
2027
+ }
2028
+ .text-left{
2029
+ text-align: left !important;
2030
+ }
2031
+ .qsm-dashed-btn, a.qsm-dashed-btn, button.qsm-dashed-btn, input.qsm-dashed-btn{
2032
+ display: inline-block;
2033
+ text-align: center;
2034
+ border: 2px dashed #ccc;
2035
+ box-shadow: none;
2036
+ text-decoration: none;
2037
+ font-size: 14px;
2038
+ margin: 5px 0;
2039
+ padding: 8px 15px;
2040
+ cursor: pointer;
2041
+ -webkit-appearance: none;
2042
+ border-radius: 4px;
2043
+ box-sizing: border-box;
2044
+ color: #2196f3;
2045
+ }
2046
+ .qsm-block-btn, .qsm-dashed-btn.qsm-block-btn{
2047
+ width: 100%;
2048
+ padding: 10px 15px;
2049
+ font-size: 16px;
2050
+ text-align: center;
2051
+ }
2052
+ .qsm-switch {
2053
+ display: inline-block;
2054
+ box-sizing: border-box;
2055
+ position: relative;
2056
+ width: 44px;
2057
+ height: 22px;
2058
+ margin: 0 5px;
2059
+ }
2060
+ .qsm-switch input {
2061
+ opacity: 0;
2062
+ width: 0;
2063
+ height: 0;
2064
+ }
2065
+ .qsm-switch .switch-slider {
2066
+ position: absolute;
2067
+ cursor: pointer;
2068
+ top: 0;
2069
+ left: 0;
2070
+ right: 0;
2071
+ bottom: 0;
2072
+ background-color: #ccc;
2073
+ border-radius: 50px;
2074
+ -webkit-transition: 0.4s;
2075
+ transition: 0.4s;
2076
+ }
2077
+ .qsm-switch .switch-slider:before {
2078
+ position: absolute;
2079
+ content: "";
2080
+ height: 10px;
2081
+ width: 10px;
2082
+ left: 4px;
2083
+ bottom: 6px;
2084
+ background-color: white;
2085
+ border-radius: 50px;
2086
+ -webkit-transition: 0.4s;
2087
+ transition: 0.4s;
2088
+ }
2089
+ .qsm-switch input:checked + .switch-slider {
2090
+ background-color: #2196f3;
2091
+ }
2092
+ .qsm-switch input:focus + .switch-slider {
2093
+ box-shadow: 0 0 1px #2196f3;
2094
+ }
2095
+ .qsm-switch input:checked + .switch-slider:before {
2096
+ -webkit-transform: translateX(26px);
2097
+ -ms-transform: translateX(26px);
2098
+ transform: translateX(26px);
2099
+ }
2100
+ .qsm-actions-link-box {
2101
+ display: inline-flex;
2102
+ align-items: center;
2103
+ flex-wrap: nowrap;
2104
+ box-shadow: 0 0 5px 0px #ddd;
2105
+ border-radius: 5px;
2106
+ margin: 0 5px;
2107
+ }
2108
+ .qsm-actions-link-box a:first-child {
2109
+ border-radius: 5px 0 0 5px;
2110
+ }
2111
+ .qsm-actions-link-box a:last-child {
2112
+ border-radius: 0 5px 5px 0;
2113
+ }
2114
+ .qsm-actions-link-box a {
2115
+ padding: 9px;
2116
+ color: #3c434a;
2117
+ border: 1px solid #ddd;
2118
+ cursor: pointer;
2119
+ }
2120
+ .qsm-actions-link-box a.disabled{
2121
+ cursor: not-allowed;
2122
+ }
2123
+ .qsm-actions-link-box a:hover, .qsm-actions-link-box a:focus {
2124
+ outline: none;
2125
+ box-shadow: none;
2126
+ background: #eee;
2127
+ }
2128
+ .qsm-actions-link-box a span {
2129
+ font-size: 16px;
2130
+ height: auto;
2131
+ }
2132
+ .qsm-toggle-box{
2133
+ display: inline-block;
2134
+ width: 100%;
2135
+ box-sizing: border-box;
2136
+ position: relative;
2137
+ margin: 6px 0;
2138
+ background: #fefefe;
2139
+ border: 1px solid #f0f0f0;
2140
+ }
2141
+ .qsm-toggle-box .qsm-toggle-box-handle{
2142
+ display: inline-block;
2143
+ width: 100%;
2144
+ box-sizing: border-box;
2145
+ font-size: 16px;
2146
+ text-decoration: none;
2147
+ padding: 15px 20px;
2148
+ margin: 0;
2149
+ background: #FFF;
2150
+ color: #666666;
2151
+ cursor: pointer;
2152
+ }
2153
+ .qsm-toggle-box .qsm-toggle-box-handle:hover, .qsm-toggle-box .qsm-toggle-box-handle:focus{
2154
+ outline:none;
2155
+ text-decoration: none;
2156
+ box-shadow: none;
2157
+ }
2158
+ .qsm-toggle-box .toggle-indicator{
2159
+ display: inline-block;
2160
+ vertical-align: middle;
2161
+ width: 20px;
2162
+ height: 20px;
2163
+ float: right;
2164
+ color: inherit;
2165
+ }
2166
+ .qsm-toggle-box .toggle-indicator:before{
2167
+ content: "\f347";
2168
+ display: inline-block;
2169
+ font: normal 20px/1 dashicons;
2170
+ -webkit-font-smoothing: antialiased;
2171
+ -moz-osx-font-smoothing: grayscale;
2172
+ text-decoration: none;
2173
+ }
2174
+ .qsm-toggle-box.opened .toggle-indicator:before{
2175
+ content: "\f343";
2176
+ }
2177
+ .qsm-toggle-box .qsm-toggle-box-content{
2178
+ display: none;
2179
+ padding: 15px 20px;
2180
+ border-top: 1px solid #eee;
2181
+ }
2182
+ .qsm-toggle-box .qsm-toggle-box-content label{
2183
+ display: inline-block;
2184
+ margin: 0 5px 5px;
2185
+ min-width: 80px;
2186
+ }
2187
+ .qsm-toggle-box .qsm-toggle-box-content select, .qsm-toggle-box .qsm-toggle-box-content textarea, .qsm-toggle-box .qsm-toggle-box-content input[type=text], .qsm-toggle-box .qsm-toggle-box-content input[type=date], .qsm-toggle-box .qsm-toggle-box-content input[type=number], .qsm-toggle-box .qsm-toggle-box-content input[type=url]{
2188
+ display: inline-block;
2189
+ max-width: 100%;
2190
+ width: 200px;
2191
+ min-width: auto;
2192
+ border: 1px solid #dddddd;
2193
+ border-radius: 1px;
2194
+ }
2195
+ .qsm-standard-popup .qsm-popup__container{
2196
+ padding: 0;
2197
+ margin: 0;
2198
+ position: relative;
2199
+ min-width: 450px;
2200
+ }
2201
+ .qsm-standard-popup .qsm-popup__header h2{
2202
+ padding: 10px 20px;
2203
+ }
2204
+ .qsm-standard-popup .qsm-popup__header .qsm-popup__close{
2205
+ position: relative;
2206
+ font-size: 22px;
2207
+ border: 1px solid #ddd;
2208
+ padding: 15px;
2209
+ cursor: pointer;
2210
+ }
2211
+ .qsm-standard-popup .qsm-popup__content{
2212
+ padding: 20px 20px;
2213
+ margin: 0;
2214
+ box-shadow: inset 0 0 10px 1px #ddd;
2215
+ }
2216
+ .qsm-standard-popup .qsm-popup__content a{outline: none;box-shadow: none;text-decoration: underline;}
2217
+ .qsm-standard-popup .qsm-popup__content table{
2218
+ width: 100%;
2219
+ border-spacing: 0 5px;
2220
+ }
2221
+ .qsm-standard-popup .qsm-popup__footer{
2222
+ padding: 12px 20px;
2223
+ }
2224
+ #qsm-global-default-popup .qsm-popup__footer {
2225
+ display: flex;
2226
+ justify-content: flex-end;
2227
+ align-items: center;
2228
+ flex-wrap: nowrap;
2229
+ }
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;
2236
+ width: 100%;
2237
+ flex-direction: row;
2238
+ flex-wrap: wrap;
2239
+ justify-content: flex-start;
2240
+ align-content: flex-start;
2241
+ margin-bottom: 150px;
2242
+ }
2243
+ .contact-form-builder-wrap a{
2244
+ display: inline-block;
2245
+ box-sizing: border-box;
2246
+ text-decoration: none;
2247
+ }
2248
+ .contact-tab-content {
2249
+ width: 750px;
2250
+ max-width: 65%;
2251
+ margin-right: 40px;
2252
+ }
2253
+ .contact-tab-sidebar{
2254
+ max-width: 25%;
2255
+ }
2256
+ .contact-tab-sidebar .postbox{
2257
+ min-width: 300px;
2258
+ background: #fafafa;
2259
+ border: none;
2260
+ }
2261
+ .contact-tab-sidebar .postbox-header{
2262
+ padding: 4px;
2263
+ border-bottom: 1px solid #dadada;
2264
+ }
2265
+ .contact-tab-sidebar .inside{
2266
+ padding: 0px 15px 10px;
2267
+ margin: 0 !important;
2268
+ }
2269
+ .contact-tab-sidebar .inside .inside-row{
2270
+ display: block;
2271
+ width: 100%;
2272
+ margin: 15px 0;
2273
+ }
2274
+ .contact-tab-sidebar .inside .inside-row label{
2275
+ margin: 0;
2276
+ font-size: 14px;
2277
+ }
2278
+ .contact-tab-sidebar .inside .inside-row input[type=checkbox]{
2279
+ margin: -.25rem 8px 0 0;
2280
+ }
2281
+ .contact-tab-content .hide-control{
2282
+ display: inline-block;
2283
+ float: right;
2284
+ margin: -30px 0 0;
2285
+ font-size: 16px;
2286
+ }
2287
+ .contact-form-field {
2288
+ display: flex;
2289
+ padding: 12px 5px;
2290
+ margin: 0 0 10px;
2291
+ background: #ffffff;
2292
+ border: 1px solid #dfd4d4;
2293
+ justify-content: space-between;
2294
+ align-items: center;
2295
+ position: relative;
2296
+ }
2297
+ .contact-form-field.new {
2298
+ background: #f1f1f1;
2299
+ }
2300
+ .contact-form-field.deleting {
2301
+ background: #ff6666;
2302
+ }
2303
+ .contact-form-field.disabled-field{
2304
+ background: #f5f5f5;
2305
+ }
2306
+ .contact-form-field.hidden-field{
2307
+ display: none;
2308
+ }
2309
+ .contact-form-field .contact-form-group {
2310
+ padding: 0 15px;
2311
+ vertical-align: middle;
2312
+ }
2313
+ .contact-form-field .contact-form-inputs, .contact-form-field .contact-form-actions {
2314
+ min-width: 150px;
2315
+ }
2316
+ .contact-form-field .sortable-handle {
2317
+ width: 25px;
2318
+ padding: 0 0 0 15px;
2319
+ }
2320
+ .contact-form-field .field-required-flag{
2321
+ display: none;
2322
+ position: absolute;
2323
+ top: 5px;
2324
+ right: 6px;
2325
+ font-size: 20px;
2326
+ font-weight: bold;
2327
+ color: red;
2328
+ }
2329
+ .contact-form-field .sortable-handle a.move-field{
2330
+ display: inline-block;
2331
+ box-sizing: border-box;
2332
+ text-decoration: none;
2333
+ color: #3c434a;
2334
+ cursor: move;
2335
+ }
2336
+ .contact-form-field .sortable-handle a.move-field span{
2337
+ color: #A6ABAF;
2338
+ font-size: 22px;
2339
+ }
2340
+ .contact-form-field .contact-form-group .contact-form-label {
2341
+ display: block;
2342
+ font-weight: bold;
2343
+ margin: 0 0 5px;
2344
+ }
2345
+ .contact-form-field .contact-form-group .contact-form-control, .contact-form-field .contact-form-group select.contact-form-control, .contact-form-field .contact-form-group input[type="text"].contact-form-control {
2346
+ display: block;
2347
+ font-size: 14px;
2348
+ line-height: 1.4;
2349
+ width: 100%;
2350
+ min-width: 180px;
2351
+ border: 1px solid #ccc;
2352
+ border-radius: 4px;
2353
+ padding: 5px 8px;
2354
+ }
2355
+ /* Settings style */
2356
+ .contact-form-field-settings{
2357
+ position: absolute;
2358
+ right: 0;
2359
+ top: 100%;
2360
+ z-index: 999;
2361
+ width: 350px;
2362
+ padding: 20px;
2363
+ box-sizing: border-box;
2364
+ border-radius: 4px;
2365
+ background: #ffffff;
2366
+ border: 1px solid #dfd4d4;
2367
+ box-shadow: 0 0 6px 2px #ddd;
2368
+ }
2369
+ .contact-form-field-settings:after, .contact-form-field-settings:before {
2370
+ border: solid transparent;
2371
+ content: " ";
2372
+ display: block;
2373
+ height: 0;
2374
+ position: absolute;
2375
+ pointer-events: none;
2376
+ width: 0;
2377
+ left: 28%;
2378
+ border-width: 15px;
2379
+ border-color: rgba(255, 255, 255, 0);
2380
+ }
2381
+ .contact-form-field-settings:after {
2382
+ border-bottom-color: #FFF;
2383
+ top: -28px;
2384
+ }
2385
+ .contact-form-field-settings:before {
2386
+ border-bottom-color: #dfd4d4;
2387
+ top: -30px;
2388
+ }
2389
+ .contact-form-field-settings h3{
2390
+ margin-top: 0;
2391
+ padding: 0 0 10px;
2392
+ border-bottom: 1px solid #ccc;
2393
+ }
2394
+ .contact-form-field-settings .contact-form-group{
2395
+ display: inline-block;
2396
+ width: 100%;
2397
+ box-sizing: border-box;
2398
+ padding: 0;
2399
+ margin: 5px 0 10px;
2400
+ }
2401
+ /* Switch style*/
2402
+ .contact-form-field label.qsm-switch {
2403
+ display: inline-block;
2404
+ box-sizing: border-box;
2405
+ position: relative;
2406
+ width: 51px;
2407
+ height: 25px;
2408
+ margin: 0 5px;
2409
+ }
2410
+ .contact-form-field label.qsm-switch .switch-slider:before {
2411
+ height: 15px;
2412
+ width: 15px;
2413
+ left: 5px;
2414
+ bottom: 5px;
2415
+ border-radius: 50px;
2416
+ }
2417
+ .qsm-row {
2418
+ display: block;
2419
+ width: 100%;
2420
+ margin-bottom: 10px;
2421
+ }
2422
+ .qsm-row > label {
2423
+ font-weight: normal;
2424
+ display: block;
2425
+ margin-bottom: 5px;
2426
+ color: #7b7575;
2427
+ }
2428
+ .qsm-row select, .qsm-row input[type=text], .qsm-row textarea {
2429
+ width: 100%;
2430
+ max-width: 100%;
2431
+ min-width: auto;
2432
  }
data/parsing_script.json CHANGED
@@ -1 +1 @@
1
- {"change_log":["Bug: Fixed issue with comments field UI", "Bug: Fixed issue with support Link", "Bug: Fixed issue with %CATEGORY_SCORE_X% template variable", "Bug: Fixed issue while using multiple quiz shortcodes", "Bug: Fixed issue with qmn_register_my_templates hook", "Bug: Fixed issue with answer text limit", "Bug: Fixed issue while using limit questions with random questions", "Feature: Added option to customize the label of Retake Quiz Button"],"products":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053"},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426"}],"new_addons":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Ivoryv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Fragrancev2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/how-to-create-a-geography-quiz-using-qsm\/","title":"Geography Quiz Simplified using QSM! (5 easy steps)","excerpt":"<p>Remember those years when you thought the earth was flat? And then you grew up and got to know about geography&#8230; Well, some people are still stuck with the old thoughts. Just kidding, the geography quizzes that we used to take in our school times are very similar to what we have now but the [&hellip;]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/looking-for-the-best-questionnaire-plugin-for-wordpress\/","title":"10+ Best WordPress Questionnaire Plugins of 2022 [Compared]","excerpt":"<p>In this article, we have discussed 10 WordPress Questionnaire Plugins that are multipurpose meaning can be used to create quizzes, surveys, polls, user forms, exam, etc., and have explained their features, and their uses.<\/p>\n"}],"popular_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "},{"name":"Paypal and Stripe Payment Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Paypal-and-Stripe-Payment-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63522","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "},{"name":"Simple Popups","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Simple-Popups.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=38572","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"},{"name":"Google Analytics Tracking","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Google-Analytics-Tracking.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=34421","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimited":"87.00"},"description":"Track your quiz and survey submissions in Google Analytics."},{"name":"Logic","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Logic.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=8071","price":{"personal1site":"49.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":""},{"name":"Reporting And Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."},{"name":"MailPoet Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/MailPoet-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/mailpoet-integration\/","price":{"personal1site":"25.00","business2-5sites":"40.00","developerunlimitedsites":"62.00"},"description":"Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"}],"on_sale_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "}],"bundles":[{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"desc":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle.","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PRO.png"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"desc":"14+ addons to add useful features to your quiz and surveys. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Plus.png"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"desc":"All the right addons to get you started with QSM premium features. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic.png"}],"themes":[{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-pool.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-ivory.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-fragrance.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/fragrance-qsm-theme-demo"},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-breeze.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/breeze-qsm-theme-demo"}]}
1
+ {"change_log":[""," Bug: Fixed issue with paragraph question type\n"," Bug: Fixed issue with qmn_register_my_templates hook\n"," Bug: Fixed issue with %CATEGORY_POINTS_X% template variable\n"," Bug: Fixed issue with question numbers in email\n"," Bug: Fixed issue with elementor popup\n"," Bug: Issue fixed with touch devices\n"," Feature: Added option to set default number of answers\n"," Feature: Added option to search questions from question bank\n"," Enhancement: Made UI improvements in polar question"],"products":[{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861"},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858"},{"name":"Plugin Configuration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452658"},{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053"}],"new_addons":[{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861","price":{"amount":"99.00"},"description":""},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858","price":{"amount":"199.00"},"description":""},{"name":"Plugin Configuration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452658","price":{"amount":"49.00"},"description":""},{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Ivoryv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Fragrancev2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/avenger-quiz-which-avenger-are-you-quiz\/","title":"Super Avenger Quiz: Which Avenger Are You? Find Out in 1 minute!","excerpt":"<p>Avengers is one of the most cherished and precious gifts that MCU (Marvel Comic Universe) has provided us. Thank you, Stan Lee. But have you wondered which Avenger are you? Don&#8217;t worry, we do not leave you in question, take an Avenger Quiz to find out which of the 6 (core members) Avengers are you! [&hellip;]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/creating-a-snowflake-test-quiz-using-qsm\/","title":"Creating a Snowflake Test Quiz in 4 easy steps!","excerpt":"<p>Snowflake test is the talk the hour, did you take one yet? No? Well, that&#8217;s okay, because Quiz and Survey Master has made one just for you! In this blog, you could not only take this super famous snowflake test online quiz but you will also get to know all about this test! The Quiz [&hellip;]<\/p>\n"}],"popular_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "},{"name":"Paypal and Stripe Payment Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Paypal-and-Stripe-Payment-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63522","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "},{"name":"Simple Popups","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Simple-Popups.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=38572","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"},{"name":"Google Analytics Tracking","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Google-Analytics-Tracking.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=34421","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimited":"87.00"},"description":"Track your quiz and survey submissions in Google Analytics."},{"name":"Logic","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Logic.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=8071","price":{"personal1site":"49.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":""},{"name":"Reporting & Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."},{"name":"MailPoet Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/MailPoet-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/mailpoet-integration\/","price":{"personal1site":"25.00","business2-5sites":"40.00","developerunlimitedsites":"62.00"},"description":"Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"}],"on_sale_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "}],"bundles":[{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"desc":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle.","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PRO.png"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"desc":"14+ addons to add useful features to your quiz and surveys. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Plus.png"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"desc":"All the right addons to get you started with QSM premium features. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic.png"}],"themes":[{"name":"Companion","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/companion.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=505248","price":{"amount":"0.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/quiz\/where-should-i-travel-next\/"},{"name":"Serene","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/serene.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=503010","price":{"amount":"0.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/quiz\/the-ultimate-harry-potter-quiz"},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-pool.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-ivory.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-fragrance.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/fragrance-qsm-theme-demo"},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-breeze.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/breeze-qsm-theme-demo"}]}
js/qsm-admin.js CHANGED
@@ -50,6 +50,11 @@ var QSMAdmin;
50
  QSMAdmin.selectTab($(this));
51
  });
52
 
 
 
 
 
 
53
  $('#qmn_check_all').change(function () {
54
  $('.qmn_delete_checkbox').prop('checked', jQuery('#qmn_check_all').prop('checked'));
55
  });
@@ -167,29 +172,6 @@ var QSMAdmin;
167
  );
168
  });
169
 
170
- jQuery('#create-quiz-button').on('click', function (event) {
171
- event.preventDefault();
172
- if (jQuery('#new-quiz-form').find('.quiz_name').val() === '') {
173
- jQuery('#new-quiz-form').find('.quiz_name').addClass('qsm-required');
174
- jQuery('#new-quiz-form').find('.quiz_name').focus();
175
- return;
176
- }
177
- jQuery('#new-quiz-form').submit();
178
- });
179
-
180
- //Hide/Show legacy option
181
- jQuery('#legacy_options').parents('tr').nextAll('tr').hide();
182
- jQuery(document).on('click', '#legacy_options', function (e) {
183
- e.preventDefault();
184
- if (jQuery('#legacy_options').parents('tr').next('tr').is(':visible')) {
185
- jQuery(this).text('').text('Show Legacy options');
186
- jQuery('#legacy_options').parents('tr').nextAll('tr').hide();
187
- } else {
188
- jQuery(this).text('').text('Hide Legacy options');
189
- jQuery('#legacy_options').parents('tr').nextAll('tr').show();
190
- }
191
- });
192
-
193
  //Dismiss the welcome panel
194
  jQuery('.qsm-welcome-panel-dismiss').click(function (e) {
195
  e.preventDefault();
@@ -488,6 +470,32 @@ var QSMAdmin;
488
  jQuery('.qsm_setting__data').html('<p>'+JSON.stringify(JSON.parse(qsm_get_setting_data), null, 2)+'</p>');
489
  });
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  }(jQuery));
492
 
493
  // result page
@@ -517,6 +525,14 @@ function deleteResults(id, quizName) {
517
  }
518
 
519
  //quiz options style tab
 
 
 
 
 
 
 
 
520
 
521
  if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
522
  if (window.location.href.indexOf('tab=style')> 0 ){
@@ -526,17 +542,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
526
  jQuery("#mlw_qmn_theme_block_" + theme).toggleClass("mlw_qmn_themeBlockActive");
527
  }
528
 
529
- jQuery(document).ready(function() {
530
- jQuery('.quiz_style_tab').click(function(e) {
531
- e.preventDefault();
532
- var current_id = jQuery(this).attr('data-id');
533
- jQuery('.quiz_style_tab').removeClass('current');
534
- jQuery(this).addClass('current');
535
- jQuery('.quiz_style_tab_content').hide();
536
- jQuery('#' + current_id).show();
537
- });
538
- });
539
-
540
  jQuery(document).ready(function() {
541
  jQuery(document).on('click', '.qsm-activate-theme', function() {
542
  jQuery(this).parents('.theme-wrapper').find('input[name=quiz_theme_id]').prop("checked", true);
@@ -577,84 +582,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
577
  //QSM - Quizzes/Surveys Page
578
 
579
  (function ($) {
580
- if (jQuery('body').hasClass('qsm_page_mlw_quiz_list')){
581
- var QSMQuizzesSurveys;
582
- QSMQuizzesSurveys = {
583
- load: function () {
584
- if (0 !== qsmQuizObject.length) {
585
- // Do nothing
586
- } else {
587
- var queryString = window.location.search;
588
- var urlParams = new URLSearchParams(queryString);
589
- if (urlParams.has('paged') || urlParams.has('s')) {
590
- //do nothing
591
- } else {
592
- var template = wp.template('no-quiz');
593
- $('.qsm-quizzes-page-content').hide();
594
- $('#new_quiz_button').parent().after(template());
595
- }
596
- }
597
- },
598
- addQuizRow: function (quizData) {
599
- var template = wp.template('quiz-row');
600
- var values = {
601
- 'id': quizData.id,
602
- 'name': quizData.name,
603
- 'link': quizData.link,
604
- 'postID': quizData.postID,
605
- 'views': quizData.views,
606
- 'taken': quizData.taken,
607
- 'lastActivity': quizData.lastActivity,
608
- 'lastActivityDateTime': quizData.lastActivityDateTime,
609
- 'post_status': quizData.post_status != 'publish' ? '— ' + quizData.post_status : ''
610
- };
611
- var row = $(template(values));
612
- $('#the-list').append(row);
613
- },
614
- searchQuizzes: function (query) {
615
- $(".qsm-quiz-row").each(function () {
616
- if (-1 === $(this).find('.row-title').text().toLowerCase().indexOf(query.toLowerCase())) {
617
- $(this).hide();
618
- } else {
619
- $(this).show();
620
- }
621
- });
622
- },
623
- deleteQuiz: function (quiz_id) {
624
- $('#delete_quiz_id').val(quiz_id+'QID');
625
- $.each(qsmQuizObject, function (i, val) {
626
- if (val.id == quiz_id) {
627
- $('#delete_quiz_name').val(val.name);
628
- }
629
- });
630
- MicroModal.show('modal-5');
631
- },
632
- editQuizName: function (quiz_id) {
633
- $('#edit_quiz_id').val(quiz_id);
634
- $.each(qsmQuizObject, function (i, val) {
635
- if (val.id == quiz_id) {
636
- $('#edit_quiz_name').val(val.name);
637
- }
638
- });
639
- MicroModal.show('modal-3');
640
- },
641
- duplicateQuiz: function (quiz_id) {
642
- $('#duplicate_quiz_id').val(quiz_id+'QID');
643
- MicroModal.show('modal-4');
644
- },
645
- /**
646
- * Opens the popup to reset quiz stats
647
- *
648
- * @param int The ID of the quiz
649
- */
650
- openResetPopup: function (quiz_id) {
651
- quiz_id = parseInt(quiz_id);
652
- $('#reset_quiz_id').val(quiz_id);
653
- MicroModal.show('modal-1');
654
- },
655
- };
656
-
657
- QSMQuizzesSurveys.load();
658
 
659
  $('#new_quiz_button_two').on('click', function (event) {
660
  event.preventDefault();
@@ -730,19 +658,23 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
730
 
731
  $(document).on('click', '#the-list .qsm-action-link-delete', function (event) {
732
  event.preventDefault();
733
- QSMQuizzesSurveys.deleteQuiz($(this).parents('.qsm-quiz-row').data('id'));
 
 
 
 
734
  });
735
  $(document).on('click', '#the-list .qsm-action-link-duplicate', function (event) {
736
  event.preventDefault();
737
- QSMQuizzesSurveys.duplicateQuiz($(this).parents('.qsm-quiz-row').data('id'));
738
- });
739
- $(document).on('click', '#the-list .qsm-edit-name', function (event) {
740
- event.preventDefault();
741
- QSMQuizzesSurveys.editQuizName($(this).parents('.qsm-quiz-row').data('id'));
742
  });
743
  $(document).on('click', '#the-list .qsm-action-link-reset', function (event) {
744
  event.preventDefault();
745
- QSMQuizzesSurveys.openResetPopup($(this).parents('.qsm-quiz-row').data('id'));
 
 
746
  });
747
  $('#reset-stats-button').on('click', function (event) {
748
  event.preventDefault();
@@ -757,12 +689,12 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
757
  $('#delete-quiz-form').submit();
758
  });
759
 
760
- $(document).on('click', '#bulk-submit', function (event) {
761
- event.preventDefault();
762
- if($("#bulk-action-top").val()=="delete_pr" || $("#bulk-action-bottom").val()=="delete_pr"){
763
- MicroModal.show('modal-bulk-delete');
764
- } else{
765
- $('#posts-filter').submit();
766
  }
767
  });
768
  $(document).on('click', '.qsm-list-shortcode-view', function (e) {
@@ -807,15 +739,15 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
807
  // QSM - Quiz Wizard
808
 
809
  (function ($) {
810
- if (jQuery('body').hasClass('qsm_page_mlw_quiz_list') || jQuery('body').hasClass('toplevel_page_qsm_dashboard')){
811
  $('#create-quiz-button').on('click', function (event) {
 
812
  if ($('#new-quiz-form').find('.quiz_name').val() === '') {
813
  $('#new-quiz-form').find('.quiz_name').addClass('qsm-required');
814
  $('.qsm-wizard-wrap[data-show="quiz_settings"]').trigger('click');
815
  $('#new-quiz-form').find('.quiz_name').focus();
816
  return;
817
  }
818
- event.preventDefault();
819
  $('#new-quiz-form').submit();
820
  });
821
 
@@ -1047,201 +979,217 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1047
  if (window.location.href.indexOf('tab=contact') > 0 ){
1048
 
1049
  QSMContact = {
1050
- load : function() {
1051
- if($.isArray(qsmContactObject.contactForm) && qsmContactObject.contactForm.length > 0){
1052
- $.each( qsmContactObject.contactForm, function( i, val ) {
1053
- QSMContact.addField( val );
1054
- });
1055
- }
1056
- },
1057
- addField : function( fieldArray ) {
1058
- var new_label = fieldArray.label.replace(/"/g, "'");
1059
- var contactField = $( '<div class="contact-form-field new"><span class="dashicons dashicons-move"></span>' +
1060
- '<div class="contact-form-group">' +
1061
- '<label class="contact-form-label">Field Type</label>' +
1062
- '<select class="contact-form-control wide type-control">' +
1063
- '<option value="none">Select a type...</option>' +
1064
- '<option value="text">Small Open Answer</option>' +
1065
- '<option value="email">Email</option>' +
1066
- '<option value="checkbox">Checkbox</option>' +
1067
- '<option value="date">Date</option>' +
1068
- '</select>' +
1069
- '</div>' +
1070
- '<div class="contact-form-group">' +
1071
- '<label class="contact-form-label">Label</label>' +
1072
- '<input type="text" class="contact-form-control label-control" value="' + new_label + '">' +
1073
- '</div>' +
1074
- '<div class="contact-form-group">' +
1075
- '<label class="contact-form-label">Used For</label>' +
1076
- '<select class="contact-form-control use-control">' +
1077
- '<option value="none"></option>' +
1078
- '<option value="name">Name</option>' +
1079
- '<option value="email">Email</option>' +
1080
- '<option value="comp">Business</option>' +
1081
- '<option value="phone">Phone</option>' +
1082
- '</select>' +
1083
- '</div>' +
1084
- '<div class="contact-form-group">' +
1085
- '<label class="contact-form-label">Required?</label>' +
1086
- '<input type="checkbox" class="required-control">' +
1087
- '</div>' +
1088
- '<div class="contact-form-group">' +
1089
- '<a href="javascript:void(0)" class="delete-field">Delete</a> | ' +
1090
- '<a href="javascript:void(0)" class="copy-field">Duplicate</a>' +
1091
- '</div>' +
1092
- '</div>'
1093
- );
1094
- if ( true === fieldArray.required || "true" === fieldArray.required ) {
1095
- contactField.find( '.required-control' ).prop( 'checked', true );
1096
- }
1097
- switch ( fieldArray.type ) {
1098
- case 'text':
1099
- contactField.find( '.type-control option[value="text"]').prop( 'selected', true );
1100
- break;
1101
- case 'email':
1102
- contactField.find( '.type-control option[value="email"]').prop( 'selected', true );
1103
- break;
1104
- case 'checkbox':
1105
- contactField.find( '.type-control option[value="checkbox"]').prop( 'selected', true );
1106
- break;
1107
- case 'date':
1108
- contactField.find( '.type-control option[value="date"]').prop( 'selected', true );
1109
- break;
1110
- default:
1111
-
1112
- }
1113
- switch ( fieldArray.use ) {
1114
- case 'name':
1115
- contactField.find( '.use-control option[value="name"]').prop( 'selected', true );
1116
- break;
1117
- case 'email':
1118
- contactField.find( '.use-control option[value="email"]').prop( 'selected', true );
1119
- break;
1120
- case 'comp':
1121
- contactField.find( '.use-control option[value="comp"]').prop( 'selected', true );
1122
- break;
1123
- case 'phone':
1124
- contactField.find( '.use-control option[value="phone"]').prop( 'selected', true );
1125
- break;
1126
- default:
1127
-
1128
- }
1129
- $( '.contact-form' ).append( contactField );
1130
- setTimeout( QSMContact.removeNew, 250 );
1131
- },
1132
- removeNew: function() {
1133
- $( '.contact-form-field' ).removeClass( 'new' );
1134
- },
1135
- duplicateField: function( linkClicked ) {
1136
- var field = linkClicked.parents( '.contact-form-field' );
1137
- var fieldArray = {
1138
- label: field.find( '.label-control' ).val(),
1139
- type: field.find( '.type-control' ).val(),
1140
- required: field.find( '.required-control' ).prop( 'checked' ),
1141
- use: field.find( '.use-control' ).val()
1142
- };
1143
- QSMContact.addField( fieldArray );
1144
- },
1145
- deleteField: function( field ) {
1146
- var parent = field.parents( '.contact-form-field' );
1147
- parent.addClass( 'deleting' );
1148
- setTimeout( function() {
1149
- parent.remove();
1150
- }, 250 );
1151
- },
1152
- newField : function() {
1153
- var fieldArray = {
1154
- label : '',
1155
- type : 'text',
1156
- answers : [],
1157
- required : false,
1158
- use: ''
1159
- };
1160
- QSMContact.addField( fieldArray );
1161
- },
1162
- save : function() {
1163
- QSMContact.displayAlert( 'Saving contact fields...', 'info' );
1164
- var contactFields = $( '.contact-form-field' );
1165
- var contactForm = [];
1166
- var contactEach;
1167
- $.each( contactFields, function( i, val ) {
1168
- contactEach = {
1169
- label: $( this ).find( '.label-control' ).val().replace( /(<([^>]+)>)/ig, '' ),
1170
- type: $( this ).find( '.type-control' ).val(),
1171
- required: $( this ).find( '.required-control' ).prop( 'checked' ),
1172
- use: $( this ).find( '.use-control' ).val()
1173
- };
1174
- contactForm.push( contactEach );
1175
- });
1176
- var data = {
1177
- action: 'qsm_save_contact',
1178
- contact_form: contactForm,
1179
- quiz_id : qsmContactObject.quizID,
1180
- nonce : qsmContactObject.saveNonce,
1181
- };
1182
-
1183
- jQuery.post( ajaxurl, data, function( response ) {
1184
- QSMContact.saved( JSON.parse( response ) );
1185
- });
1186
- },
1187
- saved : function( response ) {
1188
- if ( response.status ) {
1189
- QSMContact.displayAlert( '<strong>Success</strong> Your contact fields have been saved!', 'success' );
1190
- } else {
1191
- QSMContact.displayAlert( '<strong>Error</strong> There was an error encountered when saving your contact fields. Please try again.', 'error' );
1192
- }
1193
- },
1194
- displayAlert: function( message, type ) {
1195
- QSMContact.clearAlerts();
1196
- $( '.contact-message' ).addClass( 'notice' );
1197
- switch ( type ) {
1198
- case 'info':
1199
- $( '.contact-message' ).addClass( 'notice-info' );
1200
- break;
1201
- case 'error':
1202
- $( '.contact-message' ).addClass( 'notice-error' );
1203
- break;
1204
- case 'success':
1205
- $( '.contact-message' ).addClass( 'notice-success' );
1206
- break;
1207
- default:
1208
- }
1209
- $( '.contact-message' ).append( '<p>' + message + '</p>' );
1210
- },
1211
- clearAlerts: function() {
1212
- $( '.contact-message' ).empty().removeClass().addClass( 'contact-message' );
1213
- }
1214
  };
1215
  $(function() {
1216
-
1217
  QSMContact.load();
1218
- if( $('.contact-form > .contact-form-field').length === 0 ){
1219
- $('.save-contact').hide();
1220
- }
1221
- $( '.add-contact-field' ).on( 'click', function() {
1222
- QSMContact.newField();
1223
- if( $('.contact-form > .contact-form-field').length === 0 ){
1224
- $('.save-contact').hide();
1225
- }else{
1226
- $('.save-contact').show();
1227
- }
1228
- });
1229
- $( '.save-contact' ).on( 'click', function() {
1230
- QSMContact.save();
1231
- });
1232
- $( '.contact-form' ).on( 'click', '.delete-field', function( event ) {
1233
- event.preventDefault();
1234
- QSMContact.deleteField( $( this ) );
1235
- });
1236
- $( '.contact-form' ).on( 'click', '.copy-field', function( event ) {
1237
- event.preventDefault();
1238
- QSMContact.duplicateField( $( this ) );
1239
- });
1240
- $( '.contact-form' ).sortable({
1241
- opacity: 70,
1242
- cursor: 'grabbing',
1243
- handle: 'span.dashicons-move'
1244
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1245
  });
1246
  }
1247
  }
@@ -1512,32 +1460,25 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1512
  if (pagination.total_pages > pagination.current_page) {
1513
  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 + '"/>';
1514
  pagination_html += '<input type="hidden" id="question_back_total_pages" value="' + pagination.total_pages + '"/>';
1515
- pagination_html += '<a href="javascript:void(0)" class="button button-primary qb-load-more-question">Load More Questions</a></div>';
1516
  $('#question-bank').append(pagination_html);
1517
  }
1518
  if (pagination.current_page == 1) {
1519
- if ($('#question-bank-search-form').length == 0) {
1520
- $('.qsm-question-bank-search').append('<form action="" method="post" id="question-bank-search-form"><input type="search" name="search" value="' + response.search + '" id="question-bank-search-input" placeholder="Search questions"></form>');
1521
- if ( qsmQuestionSettings.categories.length > 0) {
1522
- var category_arr = qsmQuestionSettings.categories;
1523
- $cat_html = '<select name="question-bank-cat" id="question-bank-cat">';
1524
- $cat_html += '<option value="">All Categories</option>';
1525
- $.each(category_arr, function (index, value) {
1526
- if (value.category !== '') {
1527
- if (typeof value.cat_id !== 'undefined' && value.cat_id !== '') {
1528
- $cat_html += '<option value="' + value.cat_id + '">' + value.category + ' Questions</option>';
1529
- } else {
1530
- $cat_html += '<option value="' + value.category + '">' + value.category + ' Questions</option>';
1531
- }
1532
- }
1533
- });
1534
- $cat_html += '</select>';
1535
- $('.qsm-question-bank-search').append($cat_html);
1536
- $('#question-bank-cat').val(pagination.category);
1537
- }
1538
- $('.qsm-question-bank-search').append('<button class="button button-primary" id="qsm-import-selected-question">Add Selected Questions</button>');
1539
- }
1540
- $('#question-bank').prepend('<div class="qsm-question-bank-select"><label class="qsm-select-all-label"><input type="checkbox" id="qsm_select_all_question" /> Select All Question</label><a href="javascript:void(0)" class="qsm-action-link-delete" id="qsm-delete-selected-question">Delete Selected Items from Question Bank</a>');
1541
  }
1542
  },
1543
  addQuestionToQuestionBank: function (question) {
@@ -1554,6 +1495,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1554
  }));
1555
  },
1556
  addQuestionFromQuestionBank: function (questionID) {
 
1557
  var model = new QSMQuestion.question({
1558
  id: questionID
1559
  });
@@ -1567,13 +1509,17 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1567
  });
1568
  },
1569
  questionBankSuccess: function (model) {
1570
- var page = parseInt($('#add-question-bank-page').val(), 10);
1571
- model.set('page', page);
1572
- QSMQuestion.questions.add(model);
1573
- QSMQuestion.addQuestionToPage(model);
1574
- $('.import-button').removeClass('disable_import');
1575
- QSMQuestion.countTotal();
1576
- import_button.html('').html('Add Question');
 
 
 
 
1577
  },
1578
  prepareCategories: function () {
1579
  QSMQuestion.categories = [];
@@ -1620,7 +1566,9 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1620
  for (var i = 0; i < qsmQuestionSettings.pages.length; i++) {
1621
  for (var j = 0; j < qsmQuestionSettings.pages[i].length; j++) {
1622
  question = QSMQuestion.questions.get(qsmQuestionSettings.pages[i][j]);
1623
- QSMQuestion.addQuestionToPage(question);
 
 
1624
  }
1625
  }
1626
  } else {
@@ -1646,6 +1594,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1646
  var pages = [];
1647
  var qpages = [];
1648
  var pageInfo = null;
 
1649
 
1650
  // Cycles through each page and add page + questions to pages variable
1651
  _.each(jQuery('.page'), function (page) {
@@ -1673,6 +1622,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1673
  nonce: qsmQuestionSettings.saveNonce,
1674
  pages: pages,
1675
  qpages: qpages,
 
1676
  };
1677
 
1678
  jQuery.ajax(ajaxurl, {
@@ -1720,6 +1670,18 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1720
  });
1721
  setTimeout(QSMQuestion.removeNew, 250);
1722
  },
 
 
 
 
 
 
 
 
 
 
 
 
1723
  addNewQuestion: function (model) {
1724
  var default_answers = parseInt(qsmQuestionSettings.default_answers);
1725
  var count = 0;
@@ -1733,6 +1695,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1733
  count++;
1734
  }
1735
  }
 
1736
  },
1737
  addQuestionToPage: function (model) {
1738
  var page = model.get('page') + 1;
@@ -1755,10 +1718,9 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1755
  } else {
1756
  questionName = new_question_title;
1757
  }
1758
-
1759
- if (questionName == '')
1760
- questionName = 'Your new question!';
1761
-
1762
  $('.page:nth-child(' + page + ')').append(template({
1763
  id: model.id,
1764
  category: model.get('category'),
@@ -1925,11 +1887,21 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
1925
  var new_question_title = model.get('question_title');
1926
  if (new_question_title !== '') {
1927
  questionName = $.QSMSanitize(new_question_title);
 
 
 
 
 
 
 
 
 
 
1928
  }
1929
  $('.question[data-question-id=' + model.id + ']').replaceWith(template({
1930
  id: model.id,
1931
  type: model.get('type'),
1932
- category: model.get('category'),
1933
  question: questionName
1934
  }));
1935
  setTimeout(function () {
@@ -2006,11 +1978,14 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2006
  CurrentElement.parents('.question').next('.questionElements').slideUp('slow');
2007
  $('.questions').sortable('enable');
2008
  $('.page').sortable('enable');
 
2009
  } else {
 
2010
  CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
2011
  }
2012
  return;
2013
  } else {
 
2014
  $('.questions .questionElements').slideDown('slow');
2015
  $('.questions .questionElements').remove();
2016
  }
@@ -2248,12 +2223,17 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2248
 
2249
  $('.questions').on('click', '.new-question-button', function (event) {
2250
  event.preventDefault();
 
 
 
2251
  QSMQuestion.createQuestion($(this).parents('.page').index());
2252
- $('.save-page-button').trigger('click');
2253
  });
2254
 
2255
  $('.questions').on('click', '.add-question-bank-button', function (event) {
2256
  event.preventDefault();
 
 
 
2257
  QSMQuestion.openQuestionBank($(this).parents('.page').index());
2258
  });
2259
 
@@ -2288,7 +2268,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2288
  $(document).on('click', '.questions .duplicate-question-button', function (event) {
2289
  event.preventDefault();
2290
  QSMQuestion.duplicateQuestion($(this).parents('.question').data('question-id'));
2291
- $('.save-page-button').trigger('click');
2292
  });
2293
  $('.questions').on('click', '.delete-question-button', function (event) {
2294
  event.preventDefault();
@@ -2330,12 +2309,14 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2330
  MicroModal.close('modal-7');
2331
  });
2332
 
2333
- $('.questions').on('click', '.delete-page-button', function (event) {
2334
  event.preventDefault();
2335
  if (confirm('Are you sure?')) {
2336
- $(this).parents('.page').remove();
 
2337
  $('.save-page-button').trigger('click');
2338
  QSMQuestion.countTotal();
 
2339
  }
2340
  });
2341
  $(document).on('click', '#answers .delete-answer-button', function (event) {
@@ -2397,12 +2378,13 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2397
  QSMQuestion.addNewAnswer(answer, 0);
2398
  });
2399
 
2400
- $('.qsm-popup-bank').on('click', '.import-button', function (event) {
2401
  event.preventDefault();
2402
  $(this).text('').text('Adding Question');
2403
  import_button = $(this);
2404
- QSMQuestion.addQuestionFromQuestionBank($(this).parents('.question-bank-question').data('question-id'));
2405
  $('.import-button').addClass('disable_import');
 
 
2406
  });
2407
 
2408
  //Click on selected question button.
@@ -2421,6 +2403,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2421
  });
2422
  $('.import-button').addClass('disable_import');
2423
  $('#question-bank').find('[name="qsm-question-checkbox[]"]').attr('checked', false);
 
2424
  }
2425
  });
2426
  //Delete question from question bank
@@ -2459,8 +2442,22 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2459
  });
2460
 
2461
  //Select all button.
 
 
 
 
 
 
 
 
2462
  $(document).on('change', '#qsm_select_all_question', function (event) {
 
2463
  $('.qsm-question-checkbox').prop('checked', jQuery('#qsm_select_all_question').prop('checked'));
 
 
 
 
 
2464
  });
2465
 
2466
  $('.save-page-button').on('click', function (event) {
@@ -2596,23 +2593,22 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2596
  //Hide/show quesion description
2597
  $(document).on('click', '.qsm-show-question-desc-box', function (e) {
2598
  e.preventDefault();
2599
- if ($(this).next('.qsm-row').is(':visible')) {
2600
- $(this).html('').html('<span class="dashicons dashicons-plus-alt2"></span> ' + qsmQuestionSettings.show_desc_text);
2601
- $(this).next('.qsm-row').slideUp();
2602
- } else {
2603
- $(this).hide();
2604
- questionElements = $(this).parents('.questionElements');
2605
- var question_description = wp.editor.getContent('question-text');
2606
- if (question_description == '' || question_description == null) {
2607
- console.log(questionElements.find('#question_type').val());
2608
- if (6 == questionElements.find('#question_type').val()) {
2609
- tinyMCE.get('question-text').setContent('');
2610
- } else {
2611
- tinyMCE.get('question-text').setContent('Add description here!');
2612
- }
2613
- }
2614
- $(this).next('.qsm-row').slideDown();
2615
- }
2616
  });
2617
 
2618
  //Open file upload on feature image
@@ -2647,17 +2643,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2647
  button.hide().prev().html('Upload image');
2648
  });
2649
 
2650
- //Hide/show correct answer info
2651
- $(document).on('click', '.qsm-show-correct-info-box', function (e) {
2652
- e.preventDefault();
2653
- if ($(this).next('.qsm-row').is(':visible')) {
2654
- $(this).html('').html('<span class="dashicons dashicons-plus-alt2"></span> ' + qsmQuestionSettings.show_correct_info_text);
2655
- $(this).next('.qsm-row').slideUp();
2656
- } else {
2657
- $(this).hide();
2658
- $(this).next('.qsm-row').slideDown();
2659
- }
2660
- });
2661
  });
2662
  var decodeEntities = (function () {
2663
  //create a new html document (doesn't execute script tags in child elements)
@@ -2764,6 +2749,10 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2764
  $(document).on('click', '.add-multiple-category', function (e) {
2765
  e.preventDefault();
2766
  MicroModal.show('modal-9', {
 
 
 
 
2767
  onClose: function () {
2768
  $('#modal-9-content .info').html('');
2769
  $('#new-category-name').val('');
@@ -2813,7 +2802,6 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
2813
  }
2814
  $('.qsm_category_checklist li#qsm_category-' + result.term_id).children('label').children('input').prop('checked', true);
2815
  $('.qsm_category_checklist li#qsm_category-' + result.term_id).parents('li').each(function () {
2816
- console.log($(this).children('label').children('input'));
2817
  $(this).children('label').children('input').prop('checked', true);
2818
  });
2819
  }
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
  });
172
  );
173
  });
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  //Dismiss the welcome panel
176
  jQuery('.qsm-welcome-panel-dismiss').click(function (e) {
177
  e.preventDefault();
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
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');
532
+ jQuery(this).addClass('current');
533
+ jQuery('.quiz_style_tab_content').hide();
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 ){
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);
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();
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
  });
679
  $('#reset-stats-button').on('click', function (event) {
680
  event.preventDefault();
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) {
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');
748
  $('#new-quiz-form').find('.quiz_name').focus();
749
  return;
750
  }
 
751
  $('#new-quiz-form').submit();
752
  });
753
 
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
  }
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) {
1495
  }));
1496
  },
1497
  addQuestionFromQuestionBank: function (questionID) {
1498
+ QSMAdmin.displayAlert('Adding question...', 'info');
1499
  var model = new QSMQuestion.question({
1500
  id: questionID
1501
  });
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 = [];
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 {
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) {
1622
  nonce: qsmQuestionSettings.saveNonce,
1623
  pages: pages,
1624
  qpages: qpages,
1625
+ post_id: post_id,
1626
  };
1627
 
1628
  jQuery.ajax(ajaxurl, {
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;
1695
  count++;
1696
  }
1697
  }
1698
+ $('.save-page-button').trigger('click');
1699
  },
1700
  addQuestionToPage: function (model) {
1701
  var page = model.get('page') + 1;
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'),
1887
  var new_question_title = model.get('question_title');
1888
  if (new_question_title !== '') {
1889
  questionName = $.QSMSanitize(new_question_title);
1890
+ }
1891
+ var category = [];
1892
+ var multicategories = model.get('multicategories');
1893
+ if (multicategories === null || typeof multicategories === "undefined") {
1894
+ //No Action Require
1895
+ } else {
1896
+ $.each(multicategories, function (i, val) {
1897
+ category.push($(".qsm-popup__content #qsm_category-" + val + " label:first-child")[0].textContent);
1898
+ });
1899
+ category = category.filter(item => item);
1900
  }
1901
  $('.question[data-question-id=' + model.id + ']').replaceWith(template({
1902
  id: model.id,
1903
  type: model.get('type'),
1904
+ category: category.join(', '),
1905
  question: questionName
1906
  }));
1907
  setTimeout(function () {
1978
  CurrentElement.parents('.question').next('.questionElements').slideUp('slow');
1979
  $('.questions').sortable('enable');
1980
  $('.page').sortable('enable');
1981
+ CurrentElement.parents('.question').removeClass('opened');
1982
  } else {
1983
+ CurrentElement.parents('.question').addClass('opened');
1984
  CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
1985
  }
1986
  return;
1987
  } else {
1988
+ CurrentElement.parents('.question').addClass('opened');
1989
  $('.questions .questionElements').slideDown('slow');
1990
  $('.questions .questionElements').remove();
1991
  }
2223
 
2224
  $('.questions').on('click', '.new-question-button', function (event) {
2225
  event.preventDefault();
2226
+ if (jQuery('.questionElements').is(':visible')) {
2227
+ $('#save-popup-button').trigger('click');
2228
+ }
2229
  QSMQuestion.createQuestion($(this).parents('.page').index());
 
2230
  });
2231
 
2232
  $('.questions').on('click', '.add-question-bank-button', function (event) {
2233
  event.preventDefault();
2234
+ if (jQuery('.questionElements').is(':visible')) {
2235
+ $('#save-popup-button').trigger('click');
2236
+ }
2237
  QSMQuestion.openQuestionBank($(this).parents('.page').index());
2238
  });
2239
 
2268
  $(document).on('click', '.questions .duplicate-question-button', function (event) {
2269
  event.preventDefault();
2270
  QSMQuestion.duplicateQuestion($(this).parents('.question').data('question-id'));
 
2271
  });
2272
  $('.questions').on('click', '.delete-question-button', function (event) {
2273
  event.preventDefault();
2309
  MicroModal.close('modal-7');
2310
  });
2311
 
2312
+ $(document).on('click', '.delete-page-button', function (event) {
2313
  event.preventDefault();
2314
  if (confirm('Are you sure?')) {
2315
+ var pageID = $(this).parent().siblings('main').children('#edit_page_id').val();
2316
+ $('.page[data-page-id='+pageID+']').remove();
2317
  $('.save-page-button').trigger('click');
2318
  QSMQuestion.countTotal();
2319
+ MicroModal.close('modal-page-1');
2320
  }
2321
  });
2322
  $(document).on('click', '#answers .delete-answer-button', function (event) {
2378
  QSMQuestion.addNewAnswer(answer, 0);
2379
  });
2380
 
2381
+ $(document).on('click', '.qsm-popup-bank .import-button', function (event) {
2382
  event.preventDefault();
2383
  $(this).text('').text('Adding Question');
2384
  import_button = $(this);
 
2385
  $('.import-button').addClass('disable_import');
2386
+ QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
2387
+ MicroModal.close('modal-2');
2388
  });
2389
 
2390
  //Click on selected question button.
2403
  });
2404
  $('.import-button').addClass('disable_import');
2405
  $('#question-bank').find('[name="qsm-question-checkbox[]"]').attr('checked', false);
2406
+ MicroModal.close('modal-2');
2407
  }
2408
  });
2409
  //Delete question from question bank
2442
  });
2443
 
2444
  //Select all button.
2445
+ $(document).on('change', '.qsm-question-checkbox', function (event) {
2446
+ event.preventDefault();
2447
+ if ($('.qsm-question-checkbox:checked').length > 0) {
2448
+ $('.qsm-question-bank-footer').addClass('opened');
2449
+ } else {
2450
+ $('.qsm-question-bank-footer').removeClass('opened');
2451
+ }
2452
+ });
2453
  $(document).on('change', '#qsm_select_all_question', function (event) {
2454
+ event.preventDefault();
2455
  $('.qsm-question-checkbox').prop('checked', jQuery('#qsm_select_all_question').prop('checked'));
2456
+ if ($('.qsm-question-checkbox:checked').length > 0) {
2457
+ $('.qsm-question-bank-footer').addClass('opened');
2458
+ } else {
2459
+ $('.qsm-question-bank-footer').removeClass('opened');
2460
+ }
2461
  });
2462
 
2463
  $('.save-page-button').on('click', function (event) {
2593
  //Hide/show quesion description
2594
  $(document).on('click', '.qsm-show-question-desc-box', function (e) {
2595
  e.preventDefault();
2596
+ $(this).hide();
2597
+ var question_description = wp.editor.getContent('question-text');
2598
+ if (question_description == '' || question_description == null) {
2599
+ var questionElements = $(this).parents('.questionElements');
2600
+ if (6 == questionElements.find('#question_type').val()) {
2601
+ tinyMCE.get('question-text').setContent('');
2602
+ } else {
2603
+ tinyMCE.get('question-text').setContent('Add description here!');
2604
+ }
2605
+ }
2606
+ $(this).next('.qsm-row').show();
2607
+ });
2608
+ $(document).on('click', '.qsm-hide-question-desc-box', function (e) {
2609
+ e.preventDefault();
2610
+ $(this).parents('.qsm-row.qsm-editor-wrap').hide();
2611
+ $('.qsm-show-question-desc-box').show();
 
2612
  });
2613
 
2614
  //Open file upload on feature image
2643
  button.hide().prev().html('Upload image');
2644
  });
2645
 
 
 
 
 
 
 
 
 
 
 
 
2646
  });
2647
  var decodeEntities = (function () {
2648
  //create a new html document (doesn't execute script tags in child elements)
2749
  $(document).on('click', '.add-multiple-category', function (e) {
2750
  e.preventDefault();
2751
  MicroModal.show('modal-9', {
2752
+ onShow: function () {
2753
+ $('#new-category-name').val($('.qsm-category-filter').val());
2754
+ $('.qsm-category-filter').val('').trigger('keyup');
2755
+ },
2756
  onClose: function () {
2757
  $('#modal-9-content .info').html('');
2758
  $('#new-category-name').val('');
2802
  }
2803
  $('.qsm_category_checklist li#qsm_category-' + result.term_id).children('label').children('input').prop('checked', true);
2804
  $('.qsm_category_checklist li#qsm_category-' + result.term_id).parents('li').each(function () {
 
2805
  $(this).children('label').children('input').prop('checked', true);
2806
  });
2807
  }
js/qsm-common.js CHANGED
@@ -11,7 +11,8 @@
11
  }
12
  jQuery(document).on('qsm_after_quiz_submit',function(event,quiz_form_id){
13
  event.preventDefault();
14
- let polarQuestions = jQuery('.question-type-polar-s');
 
15
  if(polarQuestions.length >0){
16
  qsmPolarSlider('answer', polarQuestions);
17
  }
@@ -19,8 +20,8 @@
19
 
20
  function qsmPolarSlider(page , polarQuestions){
21
  polarQuestions.each( function(){
22
- let polarQuestion= jQuery(this).find('.slider-main-wrapper div');
23
- let questionID = polarQuestion.attr('id').replace('slider-','');
24
  qsmPolarSliderEach(polarQuestion,questionID,page);
25
  if ('answer' === page || 'admin' === page){
26
  let heightArray = jQuery(".mlw-qmn-question-result-"+questionID+" >> div").map(
@@ -34,7 +35,6 @@
34
  return jQuery(this).height();
35
  }).get();
36
  let maxHeight = Math.max.apply(null,heightArray);
37
-
38
  jQuery('.question-section-id-'+questionID+' .question-type-polar-s').height(maxHeight);
39
  }
40
  });
11
  }
12
  jQuery(document).on('qsm_after_quiz_submit',function(event,quiz_form_id){
13
  event.preventDefault();
14
+ let parentDivClass = 'qsm-quiz-container-'+quiz_form_id.replace(new RegExp(/[a-zA-Z]/g),'');
15
+ polarQuestions = jQuery('.'+parentDivClass).find('.qmn_question_answer').find('.mlw_qmn_question').find('.question-type-polar-s');
16
  if(polarQuestions.length >0){
17
  qsmPolarSlider('answer', polarQuestions);
18
  }
20
 
21
  function qsmPolarSlider(page , polarQuestions){
22
  polarQuestions.each( function(){
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(
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
  });
js/qsm-quiz.js CHANGED
@@ -9,6 +9,7 @@
9
 
10
  var QSM;
11
  var QSMPageTimer;
 
12
  (function ($) {
13
  QSM = {
14
  /**
@@ -23,24 +24,25 @@ var QSMPageTimer;
23
  _.each(qmn_quiz_data, function (quiz) {
24
  quizID = parseInt(quiz.quiz_id);
25
  QSM.initPagination(quizID);
 
26
 
27
  if (quiz.hasOwnProperty('pagination') || quiz.qpages.hasOwnProperty(2)) {
28
- qsmEndTimeTakenTimer();
29
- jQuery('#timer').val(0);
30
- jQuery("input[name='timer_ms']").val(0);
31
  quizType = 'paginated';
32
  }
33
 
34
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
35
- qsmEndTimeTakenTimer();
36
- jQuery('#timer').val(0);
37
- jQuery("input[name='timer_ms']").val(0);
38
  QSMPageTimer.endPageTimer(quizID, true);
39
  }
40
  if (quiz.hasOwnProperty('timer_limit') && 0 != quiz.timer_limit) {
41
- qsmEndTimeTakenTimer();
42
- jQuery('#timer').val(0);
43
- jQuery("input[name='timer_ms']").val(0);
44
  QSM.initTimer(quizID);
45
  quizType = 'timer';
46
  }
@@ -68,29 +70,29 @@ var QSMPageTimer;
68
  // If there is a first page...
69
  if (qmn_quiz_data[quizID].hasOwnProperty('first_page') && !qmn_quiz_data[quizID].first_page) {
70
  QSM.activateTimer(quizID);
71
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
72
  }
73
  // ...else, we must be using the questions per page option.
74
  } else {
75
  if (qmn_quiz_data[quizID].hasOwnProperty('pagination') && qmn_quiz_data[quizID].first_page) {
76
- $(document).on('click', '.qmn_quiz_container'+ quizID + ' .mlw_next', function (event) {
77
  event.preventDefault();
78
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
79
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
80
- if ($('#quizForm' + quizID).closest('.qmn_quiz_container').find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
81
  QSM.activateTimer(quizID);
82
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
83
  }
84
  } else {
85
  if (!qmn_quiz_data[quizID].timerStatus && (0 == $('.quiz_begin:visible').length || (1 == $('.quiz_begin:visible').length && qmnValidatePage('quizForm' + quizID)))) {
86
  QSM.activateTimer(quizID);
87
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
88
  }
89
  }
90
  });
91
  } else {
92
  QSM.activateTimer(quizID);
93
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
94
  }
95
  }
96
  jQuery(document).trigger('qsm_init_timer_after', [quizID]);
@@ -101,10 +103,10 @@ var QSMPageTimer;
101
  * @param int quizID The ID of the quiz.
102
  */
103
  activateTimer: function (quizID) {
104
- timer_ms = jQuery("input[name='timer_ms']").val();
105
  if (timer_ms == 0) {
106
- qsmTimerInterval = setInterval(qmnTimeTakenTimer, 1000);
107
- jQuery("input[name='timer_ms']").each(function () {
108
  var timems = qsmTimeInMS();
109
  jQuery(this).val(timems);
110
  });
@@ -335,7 +337,7 @@ var QSMPageTimer;
335
  jQuery(document).trigger('qsm_next_button_click_before', [quizID]);
336
  event.preventDefault();
337
  QSM.nextPage(quizID);
338
- var $container = jQuery('#quizForm' + quizID).closest('.qmn_quiz_container');
339
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
340
  qsmScrollTo($container);
341
  }
@@ -345,7 +347,7 @@ var QSMPageTimer;
345
  jQuery(document).trigger('qsm_previous_button_click_before', [quizID]);
346
  event.preventDefault();
347
  QSM.prevPage(quizID);
348
- var $container = jQuery('#quizForm' + quizID).closest('.qmn_quiz_container');
349
  if (qmn_quiz_data[quizID].disable_scroll_next_previous_click != 1) {
350
  qsmScrollTo($container);
351
  }
@@ -440,12 +442,12 @@ var QSMPageTimer;
440
  var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
441
  if ( page == start_timer ) { // check current page
442
  QSM.activateTimer(quizID);
443
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
444
  }
445
  } else {
446
  if (!qmn_quiz_data[quizID].timerStatus ) {
447
  QSM.activateTimer(quizID);
448
- $('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
449
  }
450
  }
451
 
@@ -658,7 +660,35 @@ function isEmail(email) {
658
  return true;
659
  }
660
  }
661
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
 
663
  /**
664
  * Limit multiple response based on question limit
@@ -683,12 +713,12 @@ function qmnDoInit() {
683
  // Call main initialization.
684
  qsminstance = QSM.init();
685
 
686
- jQuery(document).on("click", ".qsm-quiz-container .mlw_next", function () {
687
  if (quizType == 'paginated') {
688
- timer_ms = jQuery("input[name='timer_ms']").val();
689
  if (timer_ms == 0) {
690
- qsmTimerInterval = setInterval(qmnTimeTakenTimer, 1000);
691
- jQuery("input[name='timer_ms']").each(function () {
692
  var timems = qsmTimeInMS();
693
  jQuery(this).val(timems);
694
  });
@@ -697,17 +727,17 @@ function qmnDoInit() {
697
  });
698
  }
699
 
700
- function qmnTimeTakenTimer() {
701
- var x = +jQuery('#timer').val();
702
  if (NaN === x) {
703
  x = 0;
704
  }
705
  x = x + 1;
706
- jQuery('#timer').val(x);
707
  }
708
 
709
- function qsmEndTimeTakenTimer() {
710
- clearInterval(qsmTimerInterval);
711
  }
712
 
713
  function qsmTimeInMS() {
@@ -744,18 +774,50 @@ function qmnValidation(element, quiz_form_id) {
744
  jQuery(document).trigger('qsm_before_validation', [element, quiz_form_id]);
745
  var result = true;
746
  var quiz_id = +jQuery('#' + quiz_form_id).find('.qmn_quiz_id').val();
747
- var email_error = qmn_quiz_data[quiz_id].error_messages.email;
748
- var number_error = qmn_quiz_data[quiz_id].error_messages.number;
749
- var empty_error = qmn_quiz_data[quiz_id].error_messages.empty;
750
- var incorrect_error = qmn_quiz_data[quiz_id].error_messages.incorrect;
751
  qmnResetError(quiz_form_id);
752
  jQuery(element).each(function () {
753
  if (jQuery(this).attr('class')) {
754
- if (jQuery(this).attr('class').indexOf('mlwEmail') !== -1 && this.value !== "") {
755
  // Remove any trailing and preceeding space.
756
- var x = jQuery.trim(this.value);
757
- if (!isEmail(x)) {
758
- qmnDisplayError(email_error, jQuery(this), quiz_form_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  result = false;
760
  }
761
  }
@@ -767,49 +829,49 @@ function qmnValidation(element, quiz_form_id) {
767
  if (localStorage.getItem('mlw_time_quiz' + quiz_id) === null || localStorage.getItem('mlw_time_quiz' + quiz_id) > 0.08 || by_pass === false) {
768
 
769
  if (jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value === "" && +this.value != NaN) {
770
- qmnDisplayError(number_error, jQuery(this), quiz_form_id);
771
  result = false;
772
  }
773
  if (jQuery(this).attr('class').indexOf('mlwRequiredDate') > -1 && this.value === "") {
774
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
775
  result = false;
776
  }
777
  if (jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && jQuery.trim(this.value) === "") {
778
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
779
  result = false;
780
  }
781
  if (jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code) {
782
- qmnDisplayError(incorrect_error, jQuery(this), quiz_form_id);
783
  result = false;
784
  }
785
  if (jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !jQuery(this).prop('checked')) {
786
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
787
  result = false;
788
  }
789
  if (jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1) {
790
  check_val = jQuery(this).find('input:checked').val();
791
  if (check_val == "No Answer Provided" || check_val == "" || check_val == undefined) {
792
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
793
  result = false;
794
  }
795
  }
796
  if (jQuery(this).attr('class').indexOf('mlwRequiredFileUpload') > -1) {
797
  var selected_file = jQuery(this).get(0).files.length;
798
  if (selected_file === 0) {
799
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
800
  result = false;
801
  }
802
  }
803
  if (jQuery(this).attr('class').indexOf('qsmRequiredSelect') > -1) {
804
  check_val = jQuery(this).val();
805
  if (check_val == "No Answer Provided" || check_val == "" || check_val == null) {
806
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
807
  result = false;
808
  }
809
  }
810
  if (jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1) {
811
  if (!jQuery(this).find('input:checked').length) {
812
- qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
813
  result = false;
814
  }
815
  }
@@ -842,15 +904,14 @@ function qmnFormSubmit(quiz_form_id) {
842
  var quiz_id = +jQuery('#' + quiz_form_id).find('.qmn_quiz_id').val();
843
  var $container = jQuery('#' + quiz_form_id).closest('.qmn_quiz_container');
844
  var result = qmnValidation('#' + quiz_form_id + ' *', quiz_form_id);
845
-
846
  if (!result) { return result; }
847
-
848
  /**
849
  * Update Timer in MS
850
  */
851
- var timer_ms = jQuery('#' + quiz_form_id).find("input[name='timer_ms']").val();
852
  var new_timer_ms = qsmTimeInMS();
853
- jQuery('#' + quiz_form_id).find("input[name='timer_ms']").val(Math.abs(new_timer_ms - timer_ms));
854
 
855
  jQuery('.mlw_qmn_quiz input:radio').attr('disabled', false);
856
  jQuery('.mlw_qmn_quiz input:checkbox').attr('disabled', false);
@@ -870,7 +931,7 @@ function qmnFormSubmit(quiz_form_id) {
870
  fd.append("currentuserTimeZone",Intl.DateTimeFormat().resolvedOptions().timeZone);
871
 
872
 
873
- qsmEndTimeTakenTimer();
874
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
875
  QSMPageTimer.endPageTimer(quiz_id);
876
  }
@@ -880,7 +941,6 @@ function qmnFormSubmit(quiz_form_id) {
880
  jQuery(document).trigger('qsm_before_quiz_submit', [quiz_form_id]);
881
  jQuery('#' + quiz_form_id + ' input[type=submit]').attr('disabled', 'disabled');
882
  qsmDisplayLoading($container, quiz_id);
883
- // console.log( 'submitted data:' + unindexed_array );
884
  jQuery.ajax({
885
  url: qmn_ajax_object.ajaxurl,
886
  data: fd,
@@ -904,6 +964,7 @@ function qmnFormSubmit(quiz_form_id) {
904
  qmnDisplayResults(response, quiz_form_id, $container);
905
  jQuery(document).trigger('qsm_after_quiz_submit_load_chart');
906
  jQuery(document).trigger('qsm_after_quiz_submit', [quiz_form_id]);
 
907
  }
908
  }
909
  });
@@ -1002,6 +1063,7 @@ function qmnInit() {
1002
  delete disabledAnswer2[key];
1003
  localStorage.setItem("disable_answer",JSON.stringify(disabledAnswer2)); }
1004
  }
 
1005
  });
1006
  }
1007
 
@@ -1193,7 +1255,7 @@ function qmnUpdatePageNumber(amount, quiz_form_id) {
1193
 
1194
  function qmnInitPagination(quiz_id) {
1195
  var qmn_section_total = +qmn_quiz_data[quiz_id].pagination.total_questions;
1196
- var qmn_total_questions = jQuery('#quizForm' + quiz_id).find('#total_questions').val();
1197
  var qmn_total_pages = Math.ceil(qmn_total_questions / +qmn_quiz_data[quiz_id].pagination.amount);
1198
 
1199
  qmn_total_pages = qmn_total_pages + 1; //quiz begin
@@ -1289,6 +1351,12 @@ function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id
1289
  return false;
1290
  }
1291
 
 
 
 
 
 
 
1292
  jQuery(function () {
1293
  jQuery('.qmn_quiz_container').tooltip();
1294
 
@@ -1573,5 +1641,4 @@ jQuery(document).ready(function() {
1573
  }
1574
  });
1575
 
1576
- var qsmTimerInterval = setInterval(qmnTimeTakenTimer, 1000);
1577
  var quizType = 'default';
9
 
10
  var QSM;
11
  var QSMPageTimer;
12
+ var qsmTimerInterval = [];
13
  (function ($) {
14
  QSM = {
15
  /**
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
  }
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)))) {
88
  QSM.activateTimer(quizID);
89
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
90
  }
91
  }
92
  });
93
  } else {
94
  QSM.activateTimer(quizID);
95
+ $('.qsm-quiz-container-' + quizID).find('.stoptimer-p').show();
96
  }
97
  }
98
  jQuery(document).trigger('qsm_init_timer_after', [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
  });
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
  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
  }
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
 
660
  return true;
661
  }
662
  }
663
+ /**
664
+ * Validates an email ID from specific domains.
665
+ *
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
+ }
681
+ return false;
682
+ }
683
+ /**
684
+ * Validates a URL.
685
+ *
686
+ * @param url URL to validate.
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
  /**
694
  * Limit multiple response based on question limit
713
  // Call main initialization.
714
  qsminstance = QSM.init();
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
  });
727
  });
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) {
740
+ clearInterval(qsmTimerInterval[quiz_id]);
741
  }
742
 
743
  function qsmTimeInMS() {
774
  jQuery(document).trigger('qsm_before_validation', [element, quiz_form_id]);
775
  var result = true;
776
  var quiz_id = +jQuery('#' + quiz_form_id).find('.qmn_quiz_id').val();
777
+ var error_messages = qmn_quiz_data[quiz_id].error_messages;
 
 
 
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
  }
829
  if (localStorage.getItem('mlw_time_quiz' + quiz_id) === null || localStorage.getItem('mlw_time_quiz' + quiz_id) > 0.08 || by_pass === false) {
830
 
831
  if (jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value === "" && +this.value != NaN) {
832
+ qmnDisplayError(error_messages.number_error_text, jQuery(this), quiz_form_id);
833
  result = false;
834
  }
835
  if (jQuery(this).attr('class').indexOf('mlwRequiredDate') > -1 && this.value === "") {
836
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
837
  result = false;
838
  }
839
  if (jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && jQuery.trim(this.value) === "") {
840
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
841
  result = false;
842
  }
843
  if (jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code) {
844
+ qmnDisplayError(error_messages.incorrect_error_text, jQuery(this), quiz_form_id);
845
  result = false;
846
  }
847
  if (jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !jQuery(this).prop('checked')) {
848
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
849
  result = false;
850
  }
851
  if (jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1) {
852
  check_val = jQuery(this).find('input:checked').val();
853
  if (check_val == "No Answer Provided" || check_val == "" || check_val == undefined) {
854
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
855
  result = false;
856
  }
857
  }
858
  if (jQuery(this).attr('class').indexOf('mlwRequiredFileUpload') > -1) {
859
  var selected_file = jQuery(this).get(0).files.length;
860
  if (selected_file === 0) {
861
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
862
  result = false;
863
  }
864
  }
865
  if (jQuery(this).attr('class').indexOf('qsmRequiredSelect') > -1) {
866
  check_val = jQuery(this).val();
867
  if (check_val == "No Answer Provided" || check_val == "" || check_val == null) {
868
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
869
  result = false;
870
  }
871
  }
872
  if (jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1) {
873
  if (!jQuery(this).find('input:checked').length) {
874
+ qmnDisplayError(error_messages.empty_error_text, jQuery(this), quiz_form_id);
875
  result = false;
876
  }
877
  }
904
  var quiz_id = +jQuery('#' + quiz_form_id).find('.qmn_quiz_id').val();
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);
931
  fd.append("currentuserTimeZone",Intl.DateTimeFormat().resolvedOptions().timeZone);
932
 
933
 
934
+ qsmEndTimeTakenTimer(quizID);
935
  if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
936
  QSMPageTimer.endPageTimer(quiz_id);
937
  }
941
  jQuery(document).trigger('qsm_before_quiz_submit', [quiz_form_id]);
942
  jQuery('#' + quiz_form_id + ' input[type=submit]').attr('disabled', 'disabled');
943
  qsmDisplayLoading($container, quiz_id);
 
944
  jQuery.ajax({
945
  url: qmn_ajax_object.ajaxurl,
946
  data: fd,
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
  });
1063
  delete disabledAnswer2[key];
1064
  localStorage.setItem("disable_answer",JSON.stringify(disabledAnswer2)); }
1065
  }
1066
+
1067
  });
1068
  }
1069
 
1255
 
1256
  function qmnInitPagination(quiz_id) {
1257
  var qmn_section_total = +qmn_quiz_data[quiz_id].pagination.total_questions;
1258
+ var qmn_total_questions = jQuery('#quizForm' + quiz_id).find('#qmn_all_questions_count').val();
1259
  var qmn_total_pages = Math.ceil(qmn_total_questions / +qmn_quiz_data[quiz_id].pagination.amount);
1260
 
1261
  qmn_total_pages = qmn_total_pages + 1; //quiz begin
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
+
1360
  jQuery(function () {
1361
  jQuery('.qmn_quiz_container').tooltip();
1362
 
1641
  }
1642
  });
1643
 
 
1644
  var quizType = 'default';
mlw_quizmaster2.php CHANGED
@@ -2,14 +2,14 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 7.3.14
6
  * Author: ExpressTech
7
  * Author URI: https://quizandsurveymaster.com/
8
  * Plugin URI: https://expresstech.io/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author QSM Team
12
- * @version 7.3.14
13
  * @package QSM
14
  */
15
 
@@ -44,7 +44,7 @@ class MLWQuizMasterNext {
44
  * @var string
45
  * @since 4.0.0
46
  */
47
- public $version = '7.3.14';
48
 
49
  /**
50
  * QSM Alert Manager Object
@@ -274,9 +274,11 @@ class MLWQuizMasterNext {
274
  global $mlwQuizMasterNext;
275
  // admin styles
276
  wp_enqueue_style( 'qsm_admin_style', plugins_url( 'css/qsm-admin.css', __FILE__ ), array(), $this->version );
277
- wp_style_add_data( 'qsm_admin_style', 'rtl', 'replace' );
 
 
278
  // dashboard and quiz list pages
279
- if ( 'toplevel_page_qsm_dashboard' === $hook || 'qsm_page_mlw_quiz_list' === $hook ) {
280
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
281
  wp_enqueue_media();
282
  wp_enqueue_style( 'qsm_admin_dashboard_css', QSM_PLUGIN_CSS_URL . '/admin-dashboard.css', array(), $this->version );
@@ -321,11 +323,11 @@ class MLWQuizMasterNext {
321
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
322
  $current_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'questions';
323
  switch ( $current_tab ) {
324
- case 'contact':
325
- wp_enqueue_style( 'qsm_contact_admin_style', QSM_PLUGIN_CSS_URL . '/qsm-admin-contact.css', array(), $this->version );
326
- break;
327
- case 'emails':
328
- case 'results-pages':
329
  wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
330
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
331
  wp_enqueue_editor();
@@ -350,8 +352,6 @@ class MLWQuizMasterNext {
350
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
351
  break;
352
  default:
353
- wp_enqueue_style( 'qsm_admin_question_css', QSM_PLUGIN_CSS_URL . '/qsm-admin-question.css', array(), $this->version );
354
- wp_style_add_data( 'qsm_admin_question_css', 'rtl', 'replace' );
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();
@@ -411,7 +411,7 @@ class MLWQuizMasterNext {
411
  'new_item' => __( 'New Quiz', 'quiz-master-next' ),
412
  'edit_item' => __( 'Edit Quiz', 'quiz-master-next' ),
413
  'view_item' => __( 'View Quiz', 'quiz-master-next' ),
414
- 'all_items' => __( 'All Quizzes', 'quiz-master-next' ),
415
  'search_items' => __( 'Search Quizzes', 'quiz-master-next' ),
416
  'parent_item_colon' => __( 'Parent Quiz:', 'quiz-master-next' ),
417
  'not_found' => __( 'No Quiz Found', 'quiz-master-next' ),
@@ -422,7 +422,7 @@ class MLWQuizMasterNext {
422
  $quiz_args = array(
423
  'public' => true,
424
  'show_ui' => true,
425
- 'show_in_menu' => false,
426
  'show_in_nav_menus' => true,
427
  'labels' => $quiz_labels,
428
  'publicly_queryable' => true,
@@ -472,6 +472,27 @@ class MLWQuizMasterNext {
472
  return $file_name;
473
  }
474
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  /**
476
  * Setup Admin Menu
477
  *
@@ -484,10 +505,9 @@ class MLWQuizMasterNext {
484
  if ( function_exists( 'add_menu_page' ) ) {
485
  global $qsm_quiz_list_page;
486
  $enabled = get_option( 'qsm_multiple_category_enabled' );
487
- $qsm_dashboard_page = add_menu_page( 'Quiz And Survey Master', __( 'QSM', 'quiz-master-next' ), 'edit_posts', 'qsm_dashboard', 'qsm_generate_dashboard_page', 'dashicons-feedback' );
488
- add_submenu_page( 'qsm_dashboard', __( 'Dashboard', 'quiz-master-next' ), __( 'Dashboard', 'quiz-master-next' ), 'edit_posts', 'qsm_dashboard', 'qsm_generate_dashboard_page' );
489
- $qsm_quiz_list_page = add_submenu_page( 'qsm_dashboard', __( 'Quizzes/Surveys', 'quiz-master-next' ), __( 'Quizzes/Surveys', 'quiz-master-next' ), 'edit_posts', 'mlw_quiz_list', 'qsm_generate_quizzes_surveys_page' );
490
- add_action( "load-$qsm_quiz_list_page", 'qsm_generate_quizzes_surveys_page_screen_options' );
491
  if ( $enabled && 'cancelled' !== $enabled ) {
492
  $qsm_taxonomy_menu_hook = add_submenu_page( 'qsm_dashboard', __( 'Question Categories', 'quiz-master-next' ), __( 'Question Categories', 'quiz-master-next' ), 'edit_posts', 'edit-tags.php?taxonomy=qsm_category' );
493
  }
@@ -564,6 +584,16 @@ class MLWQuizMasterNext {
564
  </div>
565
  <?php
566
  }
 
 
 
 
 
 
 
 
 
 
567
  }
568
 
569
 
@@ -580,18 +610,20 @@ register_activation_hook( __FILE__, array( 'QSM_Install', 'install' ) );
580
  * @since 7.3.8
581
  */
582
  function qsm_edit_quiz_admin_option() {
583
- global $wp_admin_bar, $wpdb;
584
- if ( 'qsm_quiz' == get_post_type() ) {
585
- $get_qsm_post_id = get_the_ID();
586
- $get_qsm_quiz_id = $wpdb->get_results( "SELECT meta_value FROM {$wpdb->prefix}postmeta WHERE post_id=$get_qsm_post_id" );
587
- $wp_admin_bar->add_node(
588
- array(
589
- 'id' => 'edit-quiz',
590
- 'title' => '<span class="ab-icon dashicons dashicons-edit"></span><span class="ab-label">' . __( 'Edit Quiz', 'quiz-master-next' ) . '</span>',
591
- 'href' => admin_url() . 'admin.php?page=mlw_quiz_options&quiz_id=' . $get_qsm_quiz_id[0]->meta_value,
592
-
593
- )
594
- );
 
 
595
  }
596
  }
597
 
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 8.0
6
  * Author: ExpressTech
7
  * Author URI: https://quizandsurveymaster.com/
8
  * Plugin URI: https://expresstech.io/
9
  * Text Domain: quiz-master-next
10
  *
11
  * @author QSM Team
12
+ * @version 8.0
13
  * @package QSM
14
  */
15
 
44
  * @var string
45
  * @since 4.0.0
46
  */
47
+ public $version = '8.0';
48
 
49
  /**
50
  * QSM Alert Manager Object
274
  global $mlwQuizMasterNext;
275
  // admin styles
276
  wp_enqueue_style( 'qsm_admin_style', plugins_url( 'css/qsm-admin.css', __FILE__ ), array(), $this->version );
277
+ if ( is_rtl() ) {
278
+ wp_enqueue_style( 'qsm_admin_style_rtl', plugins_url( 'css/qsm-admin-rtl.css', __FILE__ ), array(), $this->version );
279
+ }
280
  // dashboard and quiz list pages
281
+ if ( 'toplevel_page_qsm_dashboard' === $hook || ('edit.php' == $hook && isset( $_REQUEST['post_type'] ) && 'qsm_quiz' == $_REQUEST['post_type']) ) {
282
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
283
  wp_enqueue_media();
284
  wp_enqueue_style( 'qsm_admin_dashboard_css', QSM_PLUGIN_CSS_URL . '/admin-dashboard.css', array(), $this->version );
323
  wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
324
  $current_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'questions';
325
  switch ( $current_tab ) {
326
+ case 'questions':
327
+ wp_enqueue_style( 'qsm_admin_question_css', QSM_PLUGIN_CSS_URL . '/qsm-admin-question.css', array(), $this->version );
328
+ if ( is_rtl() ) {
329
+ wp_enqueue_style( 'qsm_admin_question_css_rtl', plugins_url( 'css/qsm-admin-question-rtl.css', __FILE__ ), array(), $this->version );
330
+ }
331
  wp_enqueue_script( 'math_jax', QSM_PLUGIN_JS_URL . '/mathjax/tex-mml-chtml.js', false, '3.2.0', true );
332
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
333
  wp_enqueue_editor();
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();
411
  'new_item' => __( 'New Quiz', 'quiz-master-next' ),
412
  'edit_item' => __( 'Edit Quiz', 'quiz-master-next' ),
413
  'view_item' => __( 'View Quiz', 'quiz-master-next' ),
414
+ 'all_items' => __( 'Quizzes & Surveys', 'quiz-master-next' ),
415
  'search_items' => __( 'Search Quizzes', 'quiz-master-next' ),
416
  'parent_item_colon' => __( 'Parent Quiz:', 'quiz-master-next' ),
417
  'not_found' => __( 'No Quiz Found', 'quiz-master-next' ),
422
  $quiz_args = array(
423
  'public' => true,
424
  'show_ui' => true,
425
+ 'show_in_menu' => 'qsm_dashboard',
426
  'show_in_nav_menus' => true,
427
  'labels' => $quiz_labels,
428
  'publicly_queryable' => true,
472
  return $file_name;
473
  }
474
 
475
+ /**
476
+ * Setting Menu Position
477
+ */
478
+ public static function get_free_menu_position( $start, $increment = 0.1 ) {
479
+ foreach ( $GLOBALS['menu'] as $key => $menu ) {
480
+ $menus_positions[] = floatval( $key );
481
+ }
482
+ if ( ! in_array( $start, $menus_positions, true ) ) {
483
+ $start = strval( $start );
484
+ return $start;
485
+ } else {
486
+ $start += $increment;
487
+ }
488
+ /* the position is already reserved find the closet one */
489
+ while ( in_array( $start, $menus_positions, true ) ) {
490
+ $start += $increment;
491
+ }
492
+ $start = strval( $start );
493
+ return $start;
494
+ }
495
+
496
  /**
497
  * Setup Admin Menu
498
  *
505
  if ( function_exists( 'add_menu_page' ) ) {
506
  global $qsm_quiz_list_page;
507
  $enabled = get_option( 'qsm_multiple_category_enabled' );
508
+ $menu_position = self::get_free_menu_position(26.1, 0.3);
509
+ $qsm_dashboard_page = add_menu_page( 'Quiz And Survey Master', __( 'QSM', 'quiz-master-next' ), 'edit_posts', 'qsm_dashboard', 'qsm_generate_dashboard_page', 'dashicons-feedback', $menu_position );
510
+ add_submenu_page( 'qsm_dashboard', __( 'Dashboard', 'quiz-master-next' ), __( 'Dashboard', 'quiz-master-next' ), 'edit_posts', 'qsm_dashboard', 'qsm_generate_dashboard_page', 0 );
 
511
  if ( $enabled && 'cancelled' !== $enabled ) {
512
  $qsm_taxonomy_menu_hook = add_submenu_page( 'qsm_dashboard', __( 'Question Categories', 'quiz-master-next' ), __( 'Question Categories', 'quiz-master-next' ), 'edit_posts', 'edit-tags.php?taxonomy=qsm_category' );
513
  }
584
  </div>
585
  <?php
586
  }
587
+
588
+ $settings = (array) get_option( 'qmn-settings' );
589
+ $background_quiz_email_process = isset( $settings['background_quiz_email_process'] ) ? $settings['background_quiz_email_process'] : 1;
590
+ if ( 1 == $background_quiz_email_process && is_plugin_active( 'wpml-string-translation/plugin.php' ) ) {
591
+ ?>
592
+ <div class="notice notice-warning">
593
+ <p><?php esc_html_e( '"Process emails in background" option is enabled. WPML string translation may not work as expected for email templates. Please disable this option to send translated strings in emails.', 'quiz-master-next' ); ?></p>
594
+ </div>
595
+ <?php
596
+ }
597
  }
598
 
599
 
610
  * @since 7.3.8
611
  */
612
  function qsm_edit_quiz_admin_option() {
613
+ global $wp_admin_bar, $pagenow, $wpdb;
614
+ if ( 'qsm_quiz' == get_post_type() && 'edit.php' != $pagenow ) {
615
+ $post_id = get_the_ID();
616
+ $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
617
+ if ( ! empty( $quiz_id ) ) {
618
+ $wp_admin_bar->remove_menu('edit');
619
+ $wp_admin_bar->add_menu(
620
+ array(
621
+ 'id' => 'edit-quiz',
622
+ 'title' => '<span class="ab-icon dashicons dashicons-edit"></span><span class="ab-label">' . __( 'Edit Quiz', 'quiz-master-next' ) . '</span>',
623
+ 'href' => admin_url() . 'admin.php?page=mlw_quiz_options&quiz_id=' . $quiz_id,
624
+ )
625
+ );
626
+ }
627
  }
628
  }
629
 
php/admin/about-page.php CHANGED
@@ -82,8 +82,7 @@ function qsm_generate_about_page() {
82
  } elseif ( 'about' === $active_tab ) {
83
  ?>
84
  <div class="qsm-tab-content tab-3">
85
- <h2 style="text-align: left;margin-bottom: 35px;margin-top: 25px;font-weight: 500;">GitHub Contributors
86
- </h2>
87
  <?php
88
  $contributors = get_transient( 'qmn_contributors' );
89
  if ( false === $contributors ) {
82
  } elseif ( 'about' === $active_tab ) {
83
  ?>
84
  <div class="qsm-tab-content tab-3">
85
+ <h2 class="text-left" style="font-weight: 500;">GitHub Contributors</h2>
 
86
  <?php
87
  $contributors = get_transient( 'qmn_contributors' );
88
  if ( false === $contributors ) {
php/admin/addons-page.php CHANGED
@@ -74,8 +74,13 @@ function qsm_generate_featured_addons() {
74
  <div class="qsm-addon-anchor-left">
75
  <div class="qsm-install-addon">
76
  <a class="active" href="#qsm_installed_addons"><?php esc_html_e( 'Installed Addons', 'quiz-master-next' ); ?></a>
77
- <a href="#qsm_add_addons"><?php esc_html_e( 'Add Addons', 'quiz-master-next' ); ?> <span
78
- class="dashicons dashicons-arrow-right-alt2"></span></a>
 
 
 
 
 
79
  </div>
80
  <div class="qsm-add-addon" style="display: none;">
81
  <a class="active" href="#qsm_popular_addons"><?php esc_html_e( 'Popular', 'quiz-master-next' ); ?></a>
74
  <div class="qsm-addon-anchor-left">
75
  <div class="qsm-install-addon">
76
  <a class="active" href="#qsm_installed_addons"><?php esc_html_e( 'Installed Addons', 'quiz-master-next' ); ?></a>
77
+ <a href="#qsm_add_addons"><?php esc_html_e( 'Add Addons', 'quiz-master-next' ); ?>
78
+ <?php if ( is_rtl() ) : ?>
79
+ <span class="dashicons dashicons-arrow-left-alt2"></span>
80
+ <?php else : ?>
81
+ <span class="dashicons dashicons-arrow-right-alt2"></span>
82
+ <?php endif; ?>
83
+ </a>
84
  </div>
85
  <div class="qsm-add-addon" style="display: none;">
86
  <a class="active" href="#qsm_popular_addons"><?php esc_html_e( 'Popular', 'quiz-master-next' ); ?></a>
php/admin/admin-dashboard.php CHANGED
@@ -125,8 +125,7 @@ function qsm_generate_dashboard_page() {
125
  <a class="button button-primary button-hero load-quiz-wizard hide-if-no-customize"
126
  href="javascript:void(0)"><?php esc_html_e( 'Create New Quiz/Survey', 'quiz-master-next' ); ?></a>
127
  <p class="hide-if-no-customize">
128
- or, <a
129
- href="admin.php?page=mlw_quiz_list"><?php esc_html_e( 'Edit previously created quizzes', 'quiz-master-next' ); ?></a>
130
  </p>
131
  </div>
132
  <div class="welcome-panel-column">
@@ -536,62 +535,65 @@ function qsm_dashboard_latest_blogs( $widget_id ) {
536
  * Generate change log
537
  */
538
  function qsm_dashboard_chagelog( $widget_id ) {
539
- $change_log = qsm_get_widget_data( 'change_log' );
540
- global $mlwQuizMasterNext;
 
 
 
 
 
 
 
 
 
 
 
541
  ?>
542
- <div id="<?php echo esc_attr( $widget_id ); ?>" class="postbox <?php qsm_check_close_hidden_box( $widget_id ); ?>">
543
- <button type="button" class="handlediv" aria-expanded="true">
544
- <span class="screen-reader-text">Toggle panel: <?php esc_html_e( 'Changelog', 'quiz-master-next' ); ?></span>
545
- <span class="toggle-indicator" aria-hidden="true"></span>
546
- </button>
547
- <h2 class="hndle ui-sortable-handle">
548
- <span><?php esc_html_e( 'Changelog', 'quiz-master-next' ); ?> (<?php echo esc_html( $mlwQuizMasterNext->version ); ?>)</span>
549
- </h2>
550
- <div class="inside">
551
- <div class="main">
552
- <?php
553
- if ( $change_log ) {
554
- $change_log_count = count( $change_log );
555
- ?>
556
- <ul class="changelog-ul">
557
- <?php
558
- $i = 0;
559
- foreach ( $change_log as $single_change_log ) {
560
- if ( '' !== $single_change_log ) {
561
- if ( 5 === $i ) {
562
- break;
563
- }
564
- $expload_str = explode( ':', $single_change_log );
565
- $cl_type = isset( $expload_str[1] ) ? $expload_str[0] : '';
566
- $cl_str = isset( $expload_str[1] ) ? $expload_str[1] : $expload_str[0];
567
- if ( empty( $cl_str ) ) {
568
- $cl_str = $cl_type;
569
- $cl_type = '';
 
 
 
 
 
 
570
  }
571
  ?>
572
- <li>
573
- <span class="<?php echo esc_attr( strtolower( $cl_type ) ); ?>"><?php echo esc_html( $cl_type ); ?></span>
574
- <?php echo wp_kses_post( $cl_str ); ?>
575
- </li>
576
- <?php
577
- $i++;
578
- }
579
- }
580
- ?>
581
- </ul>
582
- <?php if ( $change_log_count > 5 ) { ?>
583
- <div class="pa-all-addon" style="border-top: 1px solid #ede8e8;padding-top: 15px;">
584
- <a href="https://wordpress.org/plugins/quiz-master-next/#developers" target="_blank"
585
- rel="noopener"><?php esc_html_e( 'View Complete Changelog', 'quiz-master-next' ); ?></a>
586
  </div>
587
- <?php
588
- }
589
- }
590
- ?>
591
  </div>
592
  </div>
593
- </div>
594
- <?php
595
  }
596
 
597
  /**
@@ -629,8 +631,27 @@ function qsm_create_new_quiz_from_wizard() {
629
  if ( ! empty( $get_saved_value ) && is_array( $get_saved_value ) ) {
630
  $quiz_options = array_replace( $get_saved_value, $quiz_options );
631
  }
632
- $quiz_options = apply_filters( 'qsm_quiz_wizard_settings_option_save', $quiz_options );
633
- $mlwQuizMasterNext->quizCreator->create_quiz( $quiz_name, $theme_id, array( 'quiz_options' => $quiz_options ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
  }
635
  }
636
  add_action( 'admin_init', 'qsm_create_new_quiz_from_wizard' );
125
  <a class="button button-primary button-hero load-quiz-wizard hide-if-no-customize"
126
  href="javascript:void(0)"><?php esc_html_e( 'Create New Quiz/Survey', 'quiz-master-next' ); ?></a>
127
  <p class="hide-if-no-customize">
128
+ or, <a href="edit.php?post_type=qsm_quiz"><?php esc_html_e( 'Edit previously created quizzes', 'quiz-master-next' ); ?></a>
 
129
  </p>
130
  </div>
131
  <div class="welcome-panel-column">
535
  * Generate change log
536
  */
537
  function qsm_dashboard_chagelog( $widget_id ) {
538
+ global $wp_filesystem, $mlwQuizMasterNext;
539
+ require_once ( ABSPATH . '/wp-admin/includes/file.php' );
540
+ WP_Filesystem();
541
+ $change_log = array();
542
+ $readme_file = QSM_PLUGIN_PATH . 'readme.txt';
543
+ if ( $wp_filesystem->exists( $readme_file ) ) {
544
+ $file_content = $wp_filesystem->get_contents( $readme_file );
545
+ if ( $file_content ) {
546
+ $parts = explode( '== Changelog ==', $file_content );
547
+ $last_change_log = mlw_qmn_get_string_between( $parts[1], ' =', '= ' );
548
+ $change_log = array_filter( explode( '* ', trim( $last_change_log ) ) );
549
+ }
550
+ }
551
  ?>
552
+ <div id="<?php echo esc_attr( $widget_id ); ?>" class="postbox <?php qsm_check_close_hidden_box( $widget_id ); ?>">
553
+ <button type="button" class="handlediv" aria-expanded="true">
554
+ <span class="screen-reader-text">Toggle panel: <?php esc_html_e( 'Changelog', 'quiz-master-next' ); ?></span>
555
+ <span class="toggle-indicator" aria-hidden="true"></span>
556
+ </button>
557
+ <h2 class="hndle ui-sortable-handle">
558
+ <span><?php esc_html_e( 'Changelog', 'quiz-master-next' ); ?> (<?php echo esc_html( $mlwQuizMasterNext->version ); ?>)</span>
559
+ </h2>
560
+ <div class="inside">
561
+ <div class="main">
562
+ <?php if ( $change_log ) : ?>
563
+ <ul class="changelog-ul">
564
+ <?php
565
+ $i = 0;
566
+ foreach ( $change_log as $single_change_log ) {
567
+ if ( ! empty( $single_change_log ) ) {
568
+ if ( 5 === $i ) {
569
+ break;
570
+ }
571
+ $expload_str = explode( ':', $single_change_log );
572
+ $cl_type = isset( $expload_str[1] ) ? $expload_str[0] : '';
573
+ $cl_str = isset( $expload_str[1] ) ? $expload_str[1] : $expload_str[0];
574
+ if ( empty( $cl_str ) ) {
575
+ $cl_str = $cl_type;
576
+ $cl_type = '';
577
+ }
578
+ ?>
579
+ <li>
580
+ <span class="<?php echo esc_attr( strtolower( $cl_type ) ); ?>"><?php echo esc_html( $cl_type ); ?></span>
581
+ <?php echo wp_kses_post( $cl_str ); ?>
582
+ </li>
583
+ <?php
584
+ $i ++;
585
+ }
586
  }
587
  ?>
588
+ </ul>
589
+ <?php endif; ?>
590
+ <div class="pa-all-addon" style="border-top: 1px solid #ede8e8;padding-top: 15px;">
591
+ <a href="https://wordpress.org/plugins/quiz-master-next/#developers" target="_blank" rel="noopener"><?php esc_html_e( 'View Complete Changelog', 'quiz-master-next' ); ?></a>
592
+ </div>
 
 
 
 
 
 
 
 
 
593
  </div>
 
 
 
 
594
  </div>
595
  </div>
596
+ <?php
 
597
  }
598
 
599
  /**
631
  if ( ! empty( $get_saved_value ) && is_array( $get_saved_value ) ) {
632
  $quiz_options = array_replace( $get_saved_value, $quiz_options );
633
  }
634
+ /**
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
649
+ */
650
+ $quiz_options = apply_filters( 'qsm_quiz_wizard_settings_option_save', $quiz_options );
651
+ $mlwQuizMasterNext->quizCreator->create_quiz( $quiz_name, $theme_id, array(
652
+ 'quiz_options' => $quiz_options,
653
+ 'contact_form' => $contact_form,
654
+ ) );
655
  }
656
  }
657
  add_action( 'admin_init', 'qsm_create_new_quiz_from_wizard' );
php/admin/admin-results-details-page.php CHANGED
@@ -240,7 +240,7 @@ function qsm_generate_results_details_tab() {
240
  //Response div
241
  $template .= '<div class="response-inner-wrap">';
242
  $template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>Responses</span></h2>';
243
- $template .= '<div class="inside">';
244
  $template .= '%QUESTIONS_ANSWERS%';
245
  $template .= '</div>';
246
  $template .= '</div>';
240
  //Response div
241
  $template .= '<div class="response-inner-wrap">';
242
  $template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>Responses</span></h2>';
243
+ $template .= '<div class="inside check">';
244
  $template .= '%QUESTIONS_ANSWERS%';
245
  $template .= '</div>';
246
  $template .= '</div>';
php/admin/functions.php CHANGED
@@ -1,6 +1,12 @@
1
  <?php
2
  $themes_data = array();
 
 
3
 
 
 
 
 
4
  function qsm_fetch_data_from_xml() {
5
  $file = esc_url( 'https://quizandsurveymaster.com/addons.xml' );
6
  $response = wp_remote_post( $file, array( 'sslverify' => false ) );
@@ -20,8 +26,9 @@ add_action( 'qmn_quiz_created', 'qsm_redirect_to_edit_page', 10, 1 );
20
  */
21
  function qsm_redirect_to_edit_page( $quiz_id ) {
22
  link_featured_image( $quiz_id );
23
- $url = admin_url( 'admin.php?page=mlw_quiz_options&&quiz_id=' . $quiz_id );
24
  wp_safe_redirect( $url );
 
25
  }
26
 
27
  /**
@@ -43,6 +50,7 @@ add_action( 'admin_init', 'qsm_add_author_column_in_db' );
43
  * Insert new column in quiz table
44
  */
45
  function qsm_add_author_column_in_db() {
 
46
  if ( 1 !== intval( get_option( 'qsm_update_db_column', '' ) ) ) {
47
 
48
  global $wpdb;
@@ -91,9 +99,12 @@ function qsm_add_author_column_in_db() {
91
  )
92
  );
93
  if ( empty( $table_result_col_obj ) ) {
94
- $wpdb->query( "ALTER TABLE $result_table_name ADD form_type INT NOT NULL" );
 
 
 
 
95
  }
96
- update_option( 'qsm_update_result_db_column', '1' );
97
  }
98
 
99
  /**
@@ -113,9 +124,12 @@ function qsm_add_author_column_in_db() {
113
  )
114
  );
115
  if ( ! empty( $table_quiz_col_obj ) ) {
116
- $wpdb->query( "ALTER TABLE $quiz_table_name CHANGE `system` `quiz_system` INT(11) NOT NULL;" );
 
 
 
 
117
  }
118
- update_option( 'qsm_update_quiz_db_column', '1' );
119
  }
120
 
121
  /**
@@ -136,9 +150,12 @@ function qsm_add_author_column_in_db() {
136
  ARRAY_A
137
  );
138
  if ( isset( $table_quiz_result_obj['DATA_TYPE'] ) && 'text' === $table_quiz_result_obj['DATA_TYPE'] ) {
139
- $wpdb->query( "ALTER TABLE $result_table_name CHANGE `quiz_results` `quiz_results` LONGTEXT;" );
 
 
 
 
140
  }
141
- update_option( 'qsm_update_result_db_column_datatype', '1' );
142
  }
143
 
144
  /**
@@ -159,10 +176,13 @@ function qsm_add_author_column_in_db() {
159
  )
160
  );
161
  if ( empty( $table_result_col_obj ) ) {
162
- $wpdb->query( "ALTER TABLE $question_table_name ADD deleted_question_bank INT NOT NULL" );
 
 
 
 
 
163
  }
164
- $inc_val = $total_count_val + 1;
165
- update_option( 'qsm_add_new_column_question_table_table', $inc_val );
166
  }
167
  /**
168
  * Add new column in the results table
@@ -181,9 +201,13 @@ function qsm_add_author_column_in_db() {
181
  )
182
  );
183
  if ( empty( $table_result_col_obj ) ) {
184
- $wpdb->query( "ALTER TABLE $result_table_name ADD page_url varchar(255) NOT NULL" );
 
 
 
 
 
185
  }
186
- update_option( 'qsm_update_result_db_column_page_url', '1' );
187
  }
188
 
189
  /**
@@ -203,9 +227,12 @@ function qsm_add_author_column_in_db() {
203
  )
204
  );
205
  if ( empty( $table_result_col_obj ) ) {
206
- $wpdb->query( "ALTER TABLE $result_table_name ADD page_name varchar(255) NOT NULL" );
 
 
 
 
207
  }
208
- update_option( 'qsm_update_result_db_column_page_name', '1' );
209
  }
210
  }
211
 
@@ -265,7 +292,7 @@ function qsm_display_question_option( $key, $single_option ) {
265
  }
266
  if ( isset( $single_option['documentation_link'] ) && '' !== $single_option['documentation_link'] ) {
267
  $document_text .= '<a class="qsm-question-doc" href="' . esc_url( $single_option['documentation_link'] ) . '" target="_blank" title="' . __( 'View Documentation', 'quiz-master-next' ) . '">';
268
- $document_text .= '<span class="dashicons dashicons-media-document"></span>';
269
  $document_text .= '</a>';
270
  }
271
  switch ( $type ) {
@@ -323,9 +350,9 @@ function qsm_display_question_option( $key, $single_option ) {
323
  ?>
324
  <div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
325
  <label>
326
- <?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
327
- <?php echo wp_kses_post( $tooltip ); ?>
328
- <?php echo wp_kses_post( $document_text ); ?>
329
  </label>
330
  <textarea id="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $key ); ?>"><?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?></textarea>
331
  </div>
@@ -356,31 +383,29 @@ function qsm_display_question_option( $key, $single_option ) {
356
 
357
  case 'multi_category':
358
  ?>
359
- <div id="multi_category_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
360
  <label>
361
  <?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
362
  <?php echo wp_kses_post( $tooltip ); ?>
363
  <?php echo wp_kses_post( $document_text ); ?>
364
  </label>
365
- <div id="multi_categories_wrapper" class="categorydiv">
366
- <input type='text' class='qsm-category-filter' placeholder=' <?php esc_html_e( ' Search', 'quiz-master-next' ); ?> '>
367
  <ul id=" multicategories_checklist" class="qsm_category_checklist categorychecklist form-no-clear">
368
  <?php
369
- wp_terms_checklist(
370
- 0,
371
- array(
372
- 'taxonomy' => 'qsm_category',
373
- 'descendants_and_self' => 0,
374
- 'selected_cats' => false,
375
- 'echo' => true,
376
- )
377
- );
378
  ?>
379
  </ul>
380
- <a href='#' class='button button-primary add-multiple-category'>
381
- <?php esc_html_e( '+ Add New Category ', 'quiz-master-next' ); ?>
382
- </a>
383
  </div>
 
384
  </div>
385
  <?php
386
  break;
@@ -438,6 +463,128 @@ function qsm_display_question_option( $key, $single_option ) {
438
 
439
  }
440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  /**
442
  * @since 7.0
443
  * New quiz popup
@@ -600,15 +747,15 @@ function qsm_create_new_quiz_wizard() {
600
  <a data-show="browse_themes" href="javascript:void(0)"><?php esc_html_e( 'Explore Marketplace', 'quiz-master-next' ); ?></a></li>
601
  <?php } ?>
602
  </ul>
 
 
 
603
  <div class="theme-wrap" id="downloaded_theme">
604
  <?php
605
  qsm_get_installed_theme( 0, 'wizard_theme_list' );
606
  qsm_get_default_wizard_themes();
607
  ?>
608
  </div>
609
- <div class="theme-wrap" id="browse_themes" style="display: none;">
610
- <?php qsm_get_market_themes(); ?>
611
- </div>
612
  </div>
613
  </div>
614
  </div>
@@ -807,6 +954,7 @@ function qsm_fetch_theme_data() {
807
 
808
  function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
809
  global $mlwQuizMasterNext;
 
810
  $active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
811
  $folder_name = QSM_THEME_PATH;
812
  $folder_slug = QSM_THEME_SLUG;
@@ -820,30 +968,24 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
820
  }
821
  }
822
  ?>
823
- <div class="theme-wrapper theme
824
- <?php
825
- if ( '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ) {
826
- echo 'active';
827
- }
828
- ?>
829
- ">
830
- <input style="display: none" type="radio" name="quiz_theme_id" value="0"
831
- <?php checked( $saved_quiz_theme, '0', true ); ?>>
832
- <div class="theme-screenshot" id="qsm-theme-screenshot">
833
- <img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ) . '/assets/screenshot-default-theme.png'; ?>">
834
- <div class="downloaded-theme-button">
835
- <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
836
  </div>
837
- </div>
838
- <div class="theme-id-container">
839
- <h2 class="theme-name" id="emarket-name"><?php esc_html_e( 'Default Theme', 'quiz-master-next' ); ?></h2>
840
- <div class="theme-actions">
841
- <?php if ( 'default' !== $saved_quiz_theme ) { ?>
842
- <button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
843
- <?php } ?>
844
  </div>
845
  </div>
846
- </div>
847
  <?php do_action( 'qsm_add_after_default_theme' ); ?>
848
  <?php
849
  if ( $theme_folders ) {
@@ -851,43 +993,40 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
851
  $theme_name = $theme['theme'];
852
  $theme_id = $theme['id'];
853
  ?>
854
- <div class="theme-wrapper theme
855
- <?php
856
- if ( $saved_quiz_theme === $theme_id ) {
857
- echo 'active';
858
- }
859
- ?>
860
- ">
861
- <input style="display: none" type="radio" name="quiz_theme_id" value="<?php echo intval( $theme_id ); ?>"
862
- <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
863
- <div class="theme-screenshot" id="qsm-theme-screenshot">
864
- <img alt="" src="<?php echo esc_url( $folder_slug . $theme_name . '/screenshot.png' ); ?>" />
865
- <div class="downloaded-theme-button">
866
- <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
867
- </div>
868
- </div>
869
- <span class="more-details" style="display: none;"><?php esc_html_e( 'Templates', 'quiz-master-next' ); ?></span>
870
- <div class="theme-id-container">
871
- <h2 class="theme-name" id="emarket-name"><?php echo esc_attr( $theme['theme_name'] ); ?></h2>
872
- <div class="theme-actions">
873
- <?php
874
- if ( $saved_quiz_theme != $theme_id ) {
875
- if ( 'wizard_theme_list' === $wizard_theme_list ) {
876
- ?>
877
- <?php
878
- } else {
879
- ?>
880
- <button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
881
- <?php
882
- }
883
- ?>
884
- <?php } ?>
885
- <?php if ( $saved_quiz_theme === $theme_id ) { ?>
886
- <a class="button button-primary qsm-customize-color-settings" href="javascript:void(0)"><?php esc_html_e( 'Customize', 'quiz-master-next' ); ?></a>
887
- <?php } ?>
888
- </div>
889
- </div>
890
- </div>
891
  <?php
892
  do_action( 'qsm_add_after_themes' );
893
  }
@@ -897,8 +1036,9 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
897
  function qsm_get_default_wizard_themes() {
898
  global $mlwQuizMasterNext;
899
  global $themes_data;
 
900
  $installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
901
- $default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory' );
902
  $default_themes_data = array();
903
  $keys_to_unset = array();
904
  if ( ! empty( $themes_data ) ) {
@@ -938,20 +1078,25 @@ function qsm_get_default_wizard_themes() {
938
  $theme_screenshot = $theme['img'];
939
  $theme_demo = $theme['demo'];
940
  ?>
941
- <div class="theme-wrapper theme market-theme">
942
- <div class="theme-screenshot" id="qsm-theme-screenshot">
943
- <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
944
- <div class="market-theme-url">
945
- <a class="button button-primary" target="_blank" rel="noopener"
946
- href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
947
- <a class="button" target="_blank" rel="noopener"
948
- href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
949
- </div>
950
- </div>
951
- <div class="theme-id-container">
952
- <h2 class="theme-name" id="emarket-name"><?php echo esc_attr( $theme_name ); ?></h2>
953
- </div>
954
- </div>
 
 
 
 
 
955
  <?php
956
  }
957
  }
@@ -959,6 +1104,7 @@ function qsm_get_default_wizard_themes() {
959
 
960
  function qsm_get_market_themes() {
961
  global $themes_data;
 
962
  if ( ! empty( $themes_data ) ) {
963
  foreach ( $themes_data as $key => $theme ) {
964
  $theme_name = $theme['name'];
@@ -968,14 +1114,19 @@ function qsm_get_market_themes() {
968
  ?>
969
  <div class="theme-wrapper theme market-theme">
970
  <div class="theme-screenshot" id="qsm-theme-screenshot">
 
 
 
971
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
972
  <div class="market-theme-url">
973
  <a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
974
- <a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
 
 
975
  </div>
976
  </div>
977
  <div class="theme-id-container">
978
- <h2 class="theme-name" id="emarket-name"><?php echo esc_url( $theme_name ); ?></h2>
979
  </div>
980
  </div>
981
  <?php
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
8
+ * @param
9
+ */
10
  function qsm_fetch_data_from_xml() {
11
  $file = esc_url( 'https://quizandsurveymaster.com/addons.xml' );
12
  $response = wp_remote_post( $file, array( 'sslverify' => false ) );
26
  */
27
  function qsm_redirect_to_edit_page( $quiz_id ) {
28
  link_featured_image( $quiz_id );
29
+ $url = admin_url( 'admin.php?page=mlw_quiz_options&quiz_id=' . $quiz_id );
30
  wp_safe_redirect( $url );
31
+ exit;
32
  }
33
 
34
  /**
50
  * Insert new column in quiz table
51
  */
52
  function qsm_add_author_column_in_db() {
53
+ global $mlwQuizMasterNext;
54
  if ( 1 !== intval( get_option( 'qsm_update_db_column', '' ) ) ) {
55
 
56
  global $wpdb;
99
  )
100
  );
101
  if ( empty( $table_result_col_obj ) ) {
102
+ if ( $wpdb->query( "ALTER TABLE $result_table_name ADD form_type INT NOT NULL" ) ) {
103
+ update_option( 'qsm_update_result_db_column', '1' );
104
+ } else {
105
+ $mlwQuizMasterNext->log_manager->add( 'Error Creating Column form_type in' . $result_table_name, "Tried {$wpdb->last_query} but got {$wpdb->last_error}.", 0, 'error' );
106
+ }
107
  }
 
108
  }
109
 
110
  /**
124
  )
125
  );
126
  if ( ! empty( $table_quiz_col_obj ) ) {
127
+ if ( $wpdb->query( "ALTER TABLE $quiz_table_name CHANGE `system` `quiz_system` INT(11) NOT NULL;" ) ) {
128
+ update_option( 'qsm_update_quiz_db_column', '1' );
129
+ } else {
130
+ $mlwQuizMasterNext->log_manager->add( 'Error Changing Columns system,quiz_system in' . $quiz_table_name, "Tried {$wpdb->last_query} but got {$wpdb->last_error}.", 0, 'error' );
131
+ }
132
  }
 
133
  }
134
 
135
  /**
150
  ARRAY_A
151
  );
152
  if ( isset( $table_quiz_result_obj['DATA_TYPE'] ) && 'text' === $table_quiz_result_obj['DATA_TYPE'] ) {
153
+ if ( $wpdb->query( "ALTER TABLE $result_table_name CHANGE `quiz_results` `quiz_results` LONGTEXT;" ) ) {
154
+ update_option( 'qsm_update_result_db_column_datatype', '1' );
155
+ } else {
156
+ $mlwQuizMasterNext->log_manager->add( 'Error Changing Columns quiz_results in' . $result_table_name, "Tried {$wpdb->last_query} but got {$wpdb->last_error}.", 0, 'error' );
157
+ }
158
  }
 
159
  }
160
 
161
  /**
176
  )
177
  );
178
  if ( empty( $table_result_col_obj ) ) {
179
+ if ( $wpdb->query( "ALTER TABLE $question_table_name ADD deleted_question_bank INT NOT NULL" ) ) {
180
+ $inc_val = $total_count_val + 1;
181
+ update_option( 'qsm_add_new_column_question_table_table', $inc_val );
182
+ } else {
183
+ $mlwQuizMasterNext->log_manager->add( 'Error Creating Columns deleted_question_bank in' . $question_table_name, "Tried {$wpdb->last_query} but got {$wpdb->last_error}.", 0, 'error' );
184
+ }
185
  }
 
 
186
  }
187
  /**
188
  * Add new column in the results table
201
  )
202
  );
203
  if ( empty( $table_result_col_obj ) ) {
204
+ if ( $wpdb->query( "ALTER TABLE $result_table_name ADD page_url varchar(255) NOT NULL" ) ) {
205
+ update_option( 'qsm_update_result_db_column_page_url', '1' );
206
+ } else {
207
+ $error = $wpdb->last_error;
208
+ $mlwQuizMasterNext->log_manager->add( "Error Creating Column page_url in {$result_table_name}", "Tried {$wpdb->last_query} but got {$error}.", 0, 'error' );
209
+ }
210
  }
 
211
  }
212
 
213
  /**
227
  )
228
  );
229
  if ( empty( $table_result_col_obj ) ) {
230
+ if ( $wpdb->query( "ALTER TABLE $result_table_name ADD page_name varchar(255) NOT NULL" ) ) {
231
+ update_option( 'qsm_update_result_db_column_page_name', '1' );
232
+ } else {
233
+ $mlwQuizMasterNext->log_manager->add( 'Error Creating Column page_name in' . $result_table_name, "Tried {$wpdb->last_query} but got {$wpdb->last_error}.", 0, 'error' );
234
+ }
235
  }
 
236
  }
237
  }
238
 
292
  }
293
  if ( isset( $single_option['documentation_link'] ) && '' !== $single_option['documentation_link'] ) {
294
  $document_text .= '<a class="qsm-question-doc" href="' . esc_url( $single_option['documentation_link'] ) . '" target="_blank" title="' . __( 'View Documentation', 'quiz-master-next' ) . '">';
295
+ $document_text .= '<span class="dashicons dashicons-editor-help"></span>';
296
  $document_text .= '</a>';
297
  }
298
  switch ( $type ) {
350
  ?>
351
  <div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
352
  <label>
353
+ <?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
354
+ <?php echo wp_kses_post( $tooltip ); ?>
355
+ <?php echo wp_kses_post( $document_text ); ?>
356
  </label>
357
  <textarea id="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $key ); ?>"><?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?></textarea>
358
  </div>
383
 
384
  case 'multi_category':
385
  ?>
386
+ <div id="multi_category_area" class="qsm-row multi_category_area <?php echo esc_attr( $show_class ); ?>">
387
  <label>
388
  <?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
389
  <?php echo wp_kses_post( $tooltip ); ?>
390
  <?php echo wp_kses_post( $document_text ); ?>
391
  </label>
392
+ <input type='text' class='qsm-category-filter' placeholder=' <?php esc_html_e( ' Search', 'quiz-master-next' ); ?> '>
393
+ <div id="multi_categories_wrapper" class="categorydiv qsm_categories_list">
394
  <ul id=" multicategories_checklist" class="qsm_category_checklist categorychecklist form-no-clear">
395
  <?php
396
+ wp_terms_checklist(
397
+ 0,
398
+ array(
399
+ 'taxonomy' => 'qsm_category',
400
+ 'descendants_and_self' => 0,
401
+ 'selected_cats' => false,
402
+ 'echo' => true,
403
+ )
404
+ );
405
  ?>
406
  </ul>
 
 
 
407
  </div>
408
+ <a href='javascript:void(0)' class='add-multiple-category'><?php esc_html_e( '+ Add New Category ', 'quiz-master-next' ); ?></a>
409
  </div>
410
  <?php
411
  break;
463
 
464
  }
465
 
466
+ /**
467
+ * Generate Question Options
468
+ * @since 8.0
469
+ * @param arr $single_option
470
+ */
471
+ function qsm_generate_question_option( $key, $single_option ) {
472
+ $type = isset( $single_option['type'] ) ? $single_option['type'] : 'text';
473
+ $show = isset( $single_option['show'] ) ? explode( ',', $single_option['show'] ) : array();
474
+ $show_class = '';
475
+ if ( $show ) {
476
+ foreach ( $show as $show_value ) {
477
+ $show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
478
+ }
479
+ $show_class .= ' qsm_hide_for_other';
480
+ }
481
+ $tooltip = '';
482
+ if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
483
+ $tooltip .= '<span class="dashicons dashicons-editor-help qsm-tooltips-icon">';
484
+ $tooltip .= '<span class="qsm-tooltips">' . esc_html( $single_option['tooltip'] ) . '</span>';
485
+ $tooltip .= '</span>';
486
+ }
487
+ ?>
488
+ <div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row qsm-toggle-box <?php echo esc_attr( $show_class ); ?>">
489
+ <label class="qsm-toggle-box-handle">
490
+ <?php echo isset( $single_option['heading'] ) ? wp_kses_post( $single_option['heading'] ) : ''; ?>
491
+ <?php echo wp_kses_post( $tooltip ); ?>
492
+ <span class="toggle-indicator" aria-hidden="true"></span>
493
+ </label>
494
+ <div class="qsm-toggle-box-content qsm-editor-wrap">
495
+ <?php
496
+ switch ( $type ) {
497
+ case 'text':
498
+ if ( isset( $single_option['label'] ) ) {
499
+ ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
500
+ }
501
+ ?>
502
+ <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 ); ?>" />
503
+ <?php
504
+ break;
505
+
506
+ case 'number':
507
+ if ( isset( $single_option['label'] ) ) {
508
+ ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
509
+ }
510
+ ?>
511
+ <input type="number" name="<?php echo esc_attr( $key ); ?>" value="<?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?>" id="<?php echo esc_attr( $key ); ?>" />
512
+ <?php
513
+ break;
514
+
515
+ case 'select':
516
+ if ( isset( $single_option['label'] ) ) {
517
+ ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
518
+ }
519
+ ?>
520
+ <select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>">
521
+ <?php
522
+ $default = isset( $single_option['default'] ) ? $single_option['default'] : '';
523
+ if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
524
+ foreach ( $single_option['options'] as $okey => $value ) {
525
+ ?>
526
+ <option value="<?php echo esc_attr( $okey ); ?>" <?php echo ( $okey === $default ) ? 'selected="selected"' : ''; ?>><?php echo esc_attr( $value ); ?></option>
527
+ <?php
528
+ }
529
+ }
530
+ ?>
531
+ </select>
532
+ <?php
533
+ break;
534
+
535
+ case 'textarea':
536
+ if ( isset( $single_option['label'] ) ) {
537
+ ?><label><?php echo wp_kses_post( $single_option['label'] ); ?></label><?php
538
+ }
539
+ ?>
540
+ <textarea id="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $key ); ?>"><?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?></textarea>
541
+ <?php
542
+ break;
543
+
544
+ case 'multi_checkbox':
545
+ $parent_key = $key;
546
+ $default = isset( $single_option['default'] ) ? $single_option['default'] : '';
547
+ if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
548
+ foreach ( $single_option['options'] as $key => $value ) {
549
+ ?>
550
+ <label>
551
+ <input name="<?php echo esc_attr( $parent_key ); ?>[]" type="checkbox" value="<?php echo esc_attr( $key ); ?>" <?php echo ( $key === $default ) ? 'checked' : ''; ?> />
552
+ <?php echo esc_attr( $value ); ?>
553
+ </label>
554
+ <br />
555
+ <?php
556
+ }
557
+ }
558
+ break;
559
+
560
+ case 'single_checkbox':
561
+ $parent_key = $key;
562
+ $default = isset( $single_option['default'] ) ? $single_option['default'] : '';
563
+ if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
564
+ ?>
565
+ <label>
566
+ <?php
567
+ foreach ( $single_option['options'] as $key => $value ) {
568
+ ?>
569
+ <input name="<?php echo esc_attr( $parent_key ); ?>" id="<?php echo esc_attr( $parent_key ); ?>" type="checkbox"value="<?php echo esc_attr( $key ); ?>" <?php echo ( $key === $default ) ? 'checked' : ''; ?> />
570
+ <?php
571
+ }
572
+ echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : '';
573
+ ?>
574
+ </label>
575
+ <?php
576
+ }
577
+ break;
578
+
579
+ default:
580
+ // Do nothing
581
+ }
582
+ ?>
583
+ </div>
584
+ </div>
585
+ <?php
586
+ }
587
+
588
  /**
589
  * @since 7.0
590
  * New quiz popup
747
  <a data-show="browse_themes" href="javascript:void(0)"><?php esc_html_e( 'Explore Marketplace', 'quiz-master-next' ); ?></a></li>
748
  <?php } ?>
749
  </ul>
750
+ <div class="theme-wrap" id="browse_themes" style="display: none;">
751
+ <?php qsm_get_market_themes(); ?>
752
+ </div>
753
  <div class="theme-wrap" id="downloaded_theme">
754
  <?php
755
  qsm_get_installed_theme( 0, 'wizard_theme_list' );
756
  qsm_get_default_wizard_themes();
757
  ?>
758
  </div>
 
 
 
759
  </div>
760
  </div>
761
  </div>
954
 
955
  function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
956
  global $mlwQuizMasterNext;
957
+ global $pro_themes;
958
  $active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
959
  $folder_name = QSM_THEME_PATH;
960
  $folder_slug = QSM_THEME_SLUG;
968
  }
969
  }
970
  ?>
971
+ <div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
972
+ <input style="display: none" type="radio" name="quiz_theme_id" value="0"
973
+ <?php checked( $saved_quiz_theme, '0', true ); ?>>
974
+ <div class="theme-screenshot" id="qsm-theme-screenshot">
975
+ <img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ) . '/assets/screenshot-default-theme.png'; ?>">
976
+ <div class="downloaded-theme-button">
977
+ <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
978
+ </div>
 
 
 
 
 
979
  </div>
980
+ <div class="theme-id-container">
981
+ <h2 class="theme-name" id="emarket-name"><?php esc_html_e( 'Default Theme', 'quiz-master-next' ); ?></h2>
982
+ <div class="theme-actions">
983
+ <?php if ( 'default' !== $saved_quiz_theme ) { ?>
984
+ <button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
985
+ <?php } ?>
986
+ </div>
987
  </div>
988
  </div>
 
989
  <?php do_action( 'qsm_add_after_default_theme' ); ?>
990
  <?php
991
  if ( $theme_folders ) {
993
  $theme_name = $theme['theme'];
994
  $theme_id = $theme['id'];
995
  ?>
996
+ <div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
997
+ <input style="display: none" type="radio" name="quiz_theme_id" value="<?php echo intval( $theme_id ); ?>"
998
+ <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
999
+ <div class="theme-screenshot" id="qsm-theme-screenshot">
1000
+ <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1001
+ <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1002
+ <?php } ?>
1003
+ <img alt="" src="<?php echo esc_url( $folder_slug . $theme_name . '/screenshot.png' ); ?>" />
1004
+ <div class="downloaded-theme-button">
1005
+ <span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
1006
+ </div>
1007
+ </div>
1008
+ <span class="more-details" style="display: none;"><?php esc_html_e( 'Templates', 'quiz-master-next' ); ?></span>
1009
+ <div class="theme-id-container">
1010
+ <h2 class="theme-name" id="emarket-name"><?php echo esc_attr( $theme['theme_name'] ); ?></h2>
1011
+ <div class="theme-actions">
1012
+ <?php
1013
+ if ( $saved_quiz_theme != $theme_id ) {
1014
+ if ( 'wizard_theme_list' === $wizard_theme_list ) {
1015
+ ?>
1016
+ <?php
1017
+ } else {
1018
+ ?>
1019
+ <button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
1020
+ <?php
1021
+ }
1022
+ ?>
1023
+ <?php } ?>
1024
+ <?php if ( $saved_quiz_theme === $theme_id ) { ?>
1025
+ <a class="button button-primary qsm-customize-color-settings" href="javascript:void(0)"><?php esc_html_e( 'Customize', 'quiz-master-next' ); ?></a>
1026
+ <?php } ?>
1027
+ </div>
1028
+ </div>
1029
+ </div>
 
 
 
1030
  <?php
1031
  do_action( 'qsm_add_after_themes' );
1032
  }
1036
  function qsm_get_default_wizard_themes() {
1037
  global $mlwQuizMasterNext;
1038
  global $themes_data;
1039
+ global $pro_themes;
1040
  $installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
1041
+ $default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Companion', 'Serene', 'Sigma' );
1042
  $default_themes_data = array();
1043
  $keys_to_unset = array();
1044
  if ( ! empty( $themes_data ) ) {
1078
  $theme_screenshot = $theme['img'];
1079
  $theme_demo = $theme['demo'];
1080
  ?>
1081
+ <div class="theme-wrapper theme market-theme">
1082
+ <div class="theme-screenshot" id="qsm-theme-screenshot">
1083
+ <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1084
+ <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1085
+ <?php } ?>
1086
+ <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1087
+ <div class="market-theme-url">
1088
+ <a class="button button-primary" target="_blank" rel="noopener"
1089
+ href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1090
+ <a class="button" target="_blank" rel="noopener"
1091
+ href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1092
+ <?php echo in_array( $theme_name, $pro_themes , true) ? __( 'Buy Now', 'quiz-master-next' ) : __( 'Download', 'quiz-master-next' ) ; ?>
1093
+ </a>
1094
+ </div>
1095
+ </div>
1096
+ <div class="theme-id-container">
1097
+ <h2 class="theme-name" id="emarket-name"><?php echo esc_attr( $theme_name ); ?></h2>
1098
+ </div>
1099
+ </div>
1100
  <?php
1101
  }
1102
  }
1104
 
1105
  function qsm_get_market_themes() {
1106
  global $themes_data;
1107
+ global $pro_themes;
1108
  if ( ! empty( $themes_data ) ) {
1109
  foreach ( $themes_data as $key => $theme ) {
1110
  $theme_name = $theme['name'];
1114
  ?>
1115
  <div class="theme-wrapper theme market-theme">
1116
  <div class="theme-screenshot" id="qsm-theme-screenshot">
1117
+ <?php if ( in_array( $theme_name, $pro_themes , true) ) { ?>
1118
+ <span class="qsm-badge"><?php echo __('Pro', 'quiz-master-next'); ?></span>
1119
+ <?php } ?>
1120
  <img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
1121
  <div class="market-theme-url">
1122
  <a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
1123
+ <a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
1124
+ <?php echo in_array( $theme_name, $pro_themes , true) ? __( 'Buy Now', 'quiz-master-next' ) : __( 'Download', 'quiz-master-next' ) ; ?>
1125
+ </a>
1126
  </div>
1127
  </div>
1128
  <div class="theme-id-container">
1129
+ <h2 class="theme-name" id="emarket-name"><?php echo esc_html( $theme_name ); ?></h2>
1130
  </div>
1131
  </div>
1132
  <?php
php/admin/options-page-contact-tab.php CHANGED
@@ -1,50 +1,81 @@
1
  <?php
2
 
3
  // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
 
5
 
6
  /**
7
- * This function adds the contact tab using our API.
8
- *
9
- * @return type description
10
- * @since 4.7.0
11
- */
12
  function qsm_settings_contact_tab() {
13
  global $mlwQuizMasterNext;
14
  $mlwQuizMasterNext->pluginHelper->register_quiz_settings_tabs( __( "Contact", 'quiz-master-next' ), 'qsm_options_contact_tab_content', 'contact' );
15
  }
16
- add_action("plugins_loaded", 'qsm_settings_contact_tab', 5);
 
17
 
18
  /**
19
- * Adds the content for the options for contact tab.
20
- *
21
- * @return void
22
- * @since 4.7.0
23
- */
24
  function qsm_options_contact_tab_content() {
25
- global $wpdb;
26
- global $mlwQuizMasterNext;
27
-
28
- $quiz_id = isset( $_GET["quiz_id"] ) ? intval( $_GET["quiz_id"] ) : 0;
29
- $user_id = get_current_user_id();
30
- $contact_form = QSM_Contact_Manager::load_fields();
 
31
  wp_localize_script( 'qsm_admin_js', 'qsmContactObject', array(
32
  'contactForm' => $contact_form,
33
  'quizID' => $quiz_id,
34
  'saveNonce' => wp_create_nonce( 'ajax-nonce-contact-save-' . $quiz_id . '-' . $user_id ),
35
  ) );
36
  ?>
37
- <h2 style="display: none;"><?php esc_html_e( 'Contact', 'quiz-master-next' ); ?></h2>
38
- <p style="text-align: right;"><a href="https://quizandsurveymaster.com/docs/v7/contact-tab/" target="_blank" rel="noopener"><?php esc_html_e( 'View Documentation', 'quiz-master-next' ); ?></a></p>
39
  <div class="contact-message"></div>
40
- <a class="save-contact button-primary"><?php esc_html_e( 'Save Contact Fields', 'quiz-master-next' ); ?></a>
41
- <div class="contact-form"></div>
42
- <a class="add-contact-field button-primary"><?php esc_html_e( 'Add New Field', 'quiz-master-next' ); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  <?php
 
44
  }
45
 
46
  add_action( 'wp_ajax_qsm_save_contact', 'qsm_contact_form_admin_ajax' );
47
-
48
  /**
49
  * Saves the contact form from the quiz settings tab
50
  *
@@ -52,19 +83,32 @@ add_action( 'wp_ajax_qsm_save_contact', 'qsm_contact_form_admin_ajax' );
52
  * @return void
53
  */
54
  function qsm_contact_form_admin_ajax() {
 
55
  $quiz_id = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
 
56
  $user_id = get_current_user_id();
57
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'ajax-nonce-contact-save-' . $quiz_id . '-' . $user_id ) ) {
58
- die ( 'Busted!');
59
  }
60
 
61
- global $wpdb;
62
- global $mlwQuizMasterNext;
63
-
64
- $results = $data = array();
65
  if ( isset( $_POST['contact_form'] ) ) {
66
  $data = qsm_sanitize_rec_array( wp_unslash( $_POST['contact_form'] ), true ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  // Sends posted form data to Contact Manager to sanitize and save.
70
  $results['status'] = QSM_Contact_Manager::save_fields( $quiz_id, $data );
@@ -72,4 +116,76 @@ function qsm_contact_form_admin_ajax() {
72
  die();
73
  }
74
 
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
  // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) )
5
+ exit;
6
 
7
  /**
8
+ * This function adds the contact tab using our API.
9
+ *
10
+ * @return type description
11
+ * @since 4.7.0
12
+ */
13
  function qsm_settings_contact_tab() {
14
  global $mlwQuizMasterNext;
15
  $mlwQuizMasterNext->pluginHelper->register_quiz_settings_tabs( __( "Contact", 'quiz-master-next' ), 'qsm_options_contact_tab_content', 'contact' );
16
  }
17
+
18
+ add_action( "plugins_loaded", 'qsm_settings_contact_tab', 5 );
19
 
20
  /**
21
+ * Adds the content for the options for contact tab.
22
+ *
23
+ * @return void
24
+ * @since 4.7.0
25
+ */
26
  function qsm_options_contact_tab_content() {
27
+ global $wpdb, $mlwQuizMasterNext;
28
+ $quiz_id = isset( $_GET["quiz_id"] ) ? intval( $_GET["quiz_id"] ) : 0;
29
+ $user_id = get_current_user_id();
30
+ $show_fields = get_user_meta( $user_id, 'qsm_show_disabled_contact_fields', true );
31
+ $show_fields = empty( $show_fields ) ? true : $show_fields;
32
+ $contact_form = QSM_Contact_Manager::load_fields( 'edit' );
33
+ $quiz_options = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_options' );
34
  wp_localize_script( 'qsm_admin_js', 'qsmContactObject', array(
35
  'contactForm' => $contact_form,
36
  'quizID' => $quiz_id,
37
  'saveNonce' => wp_create_nonce( 'ajax-nonce-contact-save-' . $quiz_id . '-' . $user_id ),
38
  ) );
39
  ?>
 
 
40
  <div class="contact-message"></div>
41
+ <h2 class="qsm-page-subheading" style="font-weight: 500;"><?php esc_html_e( 'Setup Contact Form', 'quiz-master-next' ); ?></h2>
42
+ <div id="poststuff" class="contact-form-builder-wrap">
43
+ <div class="contact-tab-content">
44
+ <label class="hide-control">
45
+ <input type="checkbox" class="show-disabled-fields" <?php echo ('true' == $show_fields && true == $show_fields) ? 'checked' : ''; ?> >
46
+ <span><?php esc_html_e( 'Show Disabled Fields', 'quiz-master-next' ); ?></span>
47
+ </label>
48
+ <div class="contact-form"></div>
49
+ <a class="add-contact-field qsm-dashed-btn qsm-block-btn">+ <?php esc_html_e( 'Add New Field', 'quiz-master-next' ); ?></a>
50
+ </div>
51
+ <div class="contact-tab-sidebar">
52
+ <div id="contactformsettings" class="postbox ">
53
+ <div class="postbox-header">
54
+ <h2 class="hndle"><?php esc_html_e( 'Form Options', 'quiz-master-next' ); ?></h2>
55
+ </div>
56
+ <div class="inside">
57
+ <div class="inside-row">
58
+ <label><input type="checkbox" name="contact_info_location" value="1" <?php checked( $quiz_options['contact_info_location'], '1', true )?>><span><?php esc_html_e('Show contact form after the quiz', 'quiz-master-next');?></span></label>
59
+ </div>
60
+ <div class="inside-row">
61
+ <label><input type="checkbox" name="loggedin_user_contact" value="0" <?php checked( $quiz_options['loggedin_user_contact'], 0, true )?>><span><?php esc_html_e('Show contact form to logged in users', 'quiz-master-next');?></span></label>
62
+ </div>
63
+ <div class="inside-row">
64
+ <label><input type="checkbox" name="disable_first_page" value="1" <?php checked( $quiz_options['disable_first_page'], '1', true )?>><span><?php esc_html_e('Disable first page of quiz', 'quiz-master-next');?></span></label>
65
+ </div>
66
+ <div class="inside-row">
67
+ <label><input type="checkbox" name="contact_disable_autofill" value="1" <?php checked( $quiz_options['contact_disable_autofill'], '1', true )?>><span><?php esc_html_e('Disable autofill entries', 'quiz-master-next');?></span></label>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <a class="save-contact button-primary qsm-block-btn" style="padding: 4px;"><?php esc_html_e( 'Save Form', 'quiz-master-next' ); ?></a>
72
+ </div>
73
+ </div>
74
  <?php
75
+ add_action( 'admin_footer', 'qsm_options_contact_tab_template' );
76
  }
77
 
78
  add_action( 'wp_ajax_qsm_save_contact', 'qsm_contact_form_admin_ajax' );
 
79
  /**
80
  * Saves the contact form from the quiz settings tab
81
  *
83
  * @return void
84
  */
85
  function qsm_contact_form_admin_ajax() {
86
+ global $wpdb, $mlwQuizMasterNext;
87
  $quiz_id = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
88
+ $mlwQuizMasterNext->pluginHelper->prepare_quiz( intval( $quiz_id ) );
89
  $user_id = get_current_user_id();
90
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'ajax-nonce-contact-save-' . $quiz_id . '-' . $user_id ) ) {
91
+ die( 'Busted!' );
92
  }
93
 
94
+ $results = $data = array();
 
 
 
95
  if ( isset( $_POST['contact_form'] ) ) {
96
  $data = qsm_sanitize_rec_array( wp_unslash( $_POST['contact_form'] ), true ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
97
  }
98
+ /**
99
+ * Store contact form related quiz options.
100
+ */
101
+ if ( isset( $_POST['settings'] ) ) {
102
+ $quiz_options = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_options' );
103
+ $settings = qsm_sanitize_rec_array( wp_unslash( $_POST['settings'] ), true ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
104
+ foreach ( $settings as $key => $val ) {
105
+ $quiz_options[ $key ] = $val;
106
+ }
107
+ if ( isset($settings['loggedin_user_contact']) ) {
108
+ $quiz_options['loggedin_user_contact'] = (1 == $settings['loggedin_user_contact']) ? 0 : 1;
109
+ }
110
+ $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'quiz_options', $quiz_options );
111
+ }
112
 
113
  // Sends posted form data to Contact Manager to sanitize and save.
114
  $results['status'] = QSM_Contact_Manager::save_fields( $quiz_id, $data );
116
  die();
117
  }
118
 
119
+ add_action( 'wp_ajax_qsm_show_disabled_contact_fields', 'qsm_show_disabled_contact_fields' );
120
+ function qsm_show_disabled_contact_fields() {
121
+ global $wpdb, $mlwQuizMasterNext;
122
+ $user_id = get_current_user_id();
123
+ if ( isset( $_POST['show'] ) ) {
124
+ update_user_meta( $user_id, 'qsm_show_disabled_contact_fields', sanitize_text_field( wp_unslash( $_POST['show'] ) ) );
125
+ }
126
+ // Sends posted form data to Contact Manager to sanitize and save.
127
+ echo '1';
128
+ die();
129
+ }
130
+
131
+ function qsm_options_contact_tab_template() {
132
+ ?>
133
+ <!-- View for question in question bank -->
134
+ <script type="text/template" id="tmpl-contact-form-field">
135
+ <div class="contact-form-field new">
136
+ <div class="field-required-flag">*</div>
137
+ <div class="contact-form-group sortable-handle">
138
+ <a href="javascript:void(0)" class="move-field" title="<?php esc_html_e('Move', 'quiz-master-next');?>"><span class="dashicons dashicons-move"></span></a>
139
+ </div>
140
+ <div class="contact-form-group contact-form-inputs">
141
+ <label class="contact-form-label"><?php esc_html_e('Type', 'quiz-master-next');?></label>
142
+ <select class="contact-form-control type-control" <# if ( "true" == data.is_default || true == data.is_default ) { #>disabled<# } #>>
143
+ <option value="none" <# if (data.type == '') { #>selected<# } #> ><?php esc_html_e('Select a type...', 'quiz-master-next');?></option>
144
+ <option value="text" <# if (data.type == 'text') { #>selected<# } #> ><?php esc_html_e('Text', 'quiz-master-next');?></option>
145
+ <option value="email" <# if (data.type == 'email') { #>selected<# } #> ><?php esc_html_e('Email', 'quiz-master-next');?></option>
146
+ <option value="url" <# if (data.type == 'url') { #>selected<# } #> ><?php esc_html_e('URL', 'quiz-master-next');?></option>
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">
153
+ <label class="contact-form-label"><?php esc_html_e('Label', 'quiz-master-next');?></label>
154
+ <input type="text" class="contact-form-control label-control" value="{{data.label}}">
155
+ <input type="hidden" class="use-control" value="{{data.use}}">
156
+ </div>
157
+ <div class="contact-form-group contact-form-actions">
158
+ <div class="qsm-actions-link-box contact-form-actions-box">
159
+ <a href="javascript:void(0)" class="settings-field" title="<?php esc_html_e('Settings', 'quiz-master-next');?>"><span class="dashicons dashicons-admin-generic"></span></a>
160
+ <a href="javascript:void(0)" class="copy-field" title="<?php esc_html_e('Duplicate', 'quiz-master-next');?>"><span class="dashicons dashicons-admin-page"></span></a>
161
+ <a href="javascript:void(0)" class="delete-field <# if ( "true" == data.is_default || true == data.is_default ) { #>disabled<# } #>" title="<?php esc_html_e('Delete', 'quiz-master-next');?>"><span class="dashicons dashicons-trash"></span></a>
162
+ </div>
163
+ </div>
164
+ <div class="contact-form-group contact-form-switch">
165
+ <label class="qsm-switch" title="<?php esc_html_e('Enable / Disable Field', 'quiz-master-next');?>"><input type="checkbox" class="enable-control" <# if ( "true" == data.enable || true == data.enable ) { #>checked<# } #> ><span class="switch-slider"></span></label>
166
+ </div>
167
+ <div class="contact-form-field-settings arrow-left" style="display:none;">
168
+ <h3><?php esc_html_e('Settings', 'quiz-master-next');?></h3>
169
+ <div class="contact-form-group required-option">
170
+ <label class="contact-form-label"><input type="checkbox" name="required" class="required-control" <# if ( "true" == data.required || true == data.required ) { #>checked<# } #> ><span><?php esc_html_e('Required?', 'quiz-master-next');?></span></label>
171
+ </div>
172
+ <div class="contact-form-group min-max-option">
173
+ <label class="contact-form-label"><?php esc_html_e('Min Length', 'quiz-master-next');?></label>
174
+ <input type="number" class="contact-form-control" name="minlength" value="{{data.minlength}}">
175
+ </div>
176
+ <div class="contact-form-group min-max-option">
177
+ <label class="contact-form-label"><?php esc_html_e('Max Length', 'quiz-master-next');?></label>
178
+ <input type="number" class="contact-form-control" name="maxlength" value="{{data.maxlength}}">
179
+ </div>
180
+ <div class="contact-form-group email-option">
181
+ <label class="contact-form-label"><?php esc_html_e('Allow Domains', 'quiz-master-next');?></label>
182
+ <textarea class="contact-form-control" name="allowdomains">{{data.allowdomains}}</textarea>
183
+ <em><?php esc_html_e('Leave blank to allow all domains. ', 'quiz-master-next');?></em><br/>
184
+ <em><?php esc_html_e('Comma separated list of domains. (i.e. example.com,abc.com)', 'quiz-master-next');?></em>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </script>
189
+ <?php
190
+ }
191
+
php/admin/options-page-email-tab.php CHANGED
@@ -46,10 +46,7 @@ function qsm_options_emails_tab_content() {
46
  <section class="qsm-quiz-email-tab" style="margin-top: 15px;">
47
  <button class="save-emails button-primary"><?php esc_html_e( 'Save Emails', 'quiz-master-next' ); ?></button>
48
  <button class="add-new-email button"><?php esc_html_e( 'Add New Email', 'quiz-master-next' ); ?></button>
49
- <a style="float: right;" class="qsm-show-all-variable-text" href="javascript:void(0)"><?php esc_html_e( 'Insert Template Variables', 'quiz-master-next' ); ?> <span
50
- class="dashicons dashicons-upload"></span></a>
51
- <a style="margin: 0 10px; float: right;" href="https://quizandsurveymaster.com/docs/v7/emails-tab/" target="_blank"
52
- rel="noopener"><?php esc_html_e( 'View Documentation', 'quiz-master-next' ); ?></a>
53
  <div id="qsm_emails">
54
  <div style="margin-bottom: 30px;margin-top: 35px;" class="qsm-spinner-loader"></div>
55
  </div>
46
  <section class="qsm-quiz-email-tab" style="margin-top: 15px;">
47
  <button class="save-emails button-primary"><?php esc_html_e( 'Save Emails', 'quiz-master-next' ); ?></button>
48
  <button class="add-new-email button"><?php esc_html_e( 'Add New Email', 'quiz-master-next' ); ?></button>
49
+ <a class="qsm-show-all-variable-text" href="javascript:void(0)"><?php esc_html_e( 'Insert Template Variables', 'quiz-master-next' ); ?> <span class="dashicons dashicons-upload"></span></a>
 
 
 
50
  <div id="qsm_emails">
51
  <div style="margin-bottom: 30px;margin-top: 35px;" class="qsm-spinner-loader"></div>
52
  </div>
php/admin/options-page-option-tab.php CHANGED
@@ -22,11 +22,6 @@ add_action( 'plugins_loaded', 'qsm_settings_options_tab', 5 );
22
  * @since 6.2.0
23
  */
24
  function qsm_options_option_tab_content() {
25
- global $wpdb;
26
- global $mlwQuizMasterNext;
27
- ?>
28
- <p style="text-align: right;"><a href="https://quizandsurveymaster.com/docs/v7/options-tab/" target="_blank"><?php esc_html_e( 'View Documentation', 'quiz-master-next' ); ?></a></p>
29
- <?php
30
  $mlwQuizMasterNext->pluginHelper->generate_settings_section( 'quiz_options' );
31
  }
32
- ?>
22
  * @since 6.2.0
23
  */
24
  function qsm_options_option_tab_content() {
25
+ global $wpdb, $mlwQuizMasterNext;
 
 
 
 
26
  $mlwQuizMasterNext->pluginHelper->generate_settings_section( 'quiz_options' );
27
  }
 
php/admin/options-page-questions-tab.php CHANGED
@@ -50,15 +50,14 @@ function qsm_options_questions_tab_content() {
50
  );
51
  }
52
  }
53
-
54
- $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
55
- $user_id = get_current_user_id();
56
- $form_type = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'form_type' );
57
- $quiz_system = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'system' );
58
  $default_answers = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'default_answers' );
59
- $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
60
- $db_qpages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'qpages', array() );
61
- $qpages = array();
62
  if ( ! empty( $pages ) ) {
63
  $defaultQPage = array(
64
  'id' => 1,
@@ -72,7 +71,8 @@ function qsm_options_questions_tab_content() {
72
  $qpage['id'] = $k + 1;
73
  $qpage['pagekey'] = ( isset( $qpage['pagekey'] ) && ! empty( $qpage['pagekey'] ) ) ? $qpage['pagekey'] : uniqid();
74
  $qpage['hide_prevbtn'] = ( isset( $qpage['hide_prevbtn'] ) && ! empty( $qpage['hide_prevbtn'] ) ) ? $qpage['hide_prevbtn'] : 0;
75
- $qpage['questions'] = $val;
 
76
  $qpages[] = $qpage;
77
  }
78
  } else {
@@ -87,24 +87,20 @@ function qsm_options_questions_tab_content() {
87
  }
88
  $qpages = apply_filters( 'qsm_filter_quiz_page_attributes', $qpages, $pages );
89
  $json_data = array(
90
- 'quizID' => $quiz_id,
91
- 'answerText' => __( 'Answer', 'quiz-master-next' ),
92
- 'nonce' => wp_create_nonce( 'wp_rest' ),
93
- 'pages' => $pages,
94
- 'qpages' => $qpages,
95
- 'qsm_user_ve' => get_user_meta( $user_id, 'rich_editing', true ),
96
- 'saveNonce' => wp_create_nonce( 'ajax-nonce-sandy-page' ),
97
- 'categories' => $question_categories,
98
- 'form_type' => $form_type,
99
- 'quiz_system' => $quiz_system,
100
- // 'multiple_categories' => $multiple_categories,
101
- 'hide_desc_text' => __( 'Less Description', 'quiz-master-next' ),
102
- 'show_desc_text' => __( 'Add Description', 'quiz-master-next' ),
103
- 'show_correct_info_text' => __( 'Add Correct Answer Info', 'quiz-master-next' ),
104
- 'question_bank_nonce' => wp_create_nonce( 'delete_question_question_bank_nonce' ),
105
- 'single_question_nonce' => wp_create_nonce( 'delete_question_from_database' ),
106
- 'rest_user_nonce' => wp_create_nonce( 'wp_rest_nonce_' . $quiz_id . '_' . get_current_user_id() ),
107
- 'default_answers' => $default_answers,
108
  );
109
  wp_localize_script( 'qsm_admin_js', 'qsmQuestionSettings', $json_data );
110
 
@@ -117,8 +113,7 @@ function qsm_options_questions_tab_content() {
117
  if ( 0 != $pagination ) {
118
  ?>
119
  <div class="notice notice-warning">
120
- <p><?php esc_html_e( 'This quiz has the "How many questions per page would you like?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to 0.', 'quiz-master-next' ); ?>
121
- </p>
122
  </div>
123
  <?php
124
  }
@@ -126,8 +121,7 @@ function qsm_options_questions_tab_content() {
126
  if ( 0 != $from_total ) {
127
  ?>
128
  <div class="notice notice-warning">
129
- <p><?php esc_html_e( 'This quiz has the "How many questions should be loaded for quiz?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to 0.', 'quiz-master-next' ); ?>
130
- </p>
131
  </div>
132
  <?php
133
  }
@@ -135,16 +129,11 @@ function qsm_options_questions_tab_content() {
135
  if ( 0 != $randomness ) {
136
  ?>
137
  <div class="notice notice-warning">
138
- <p><?php esc_html_e( 'This quiz has the "Are the questions random?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to "No".', 'quiz-master-next' ); ?>
139
- </p>
140
  </div>
141
  <?php
142
  }
143
  ?>
144
- <h3 style="display: none;">Questions</h3>
145
- <p style="text-align: right;"><a href="https://quizandsurveymaster.com/docs/v7/questions-tab/" rel="noopener"
146
- target="_blank">View
147
- Documentation</a></p>
148
  <div class="question-controls">
149
  <span><b><?php esc_html_e( 'Total Questions:', 'quiz-master-next' ); ?></b> <span id="total-questions"></span></span>
150
  <p class="search-box">
@@ -167,22 +156,31 @@ function qsm_options_questions_tab_content() {
167
  </div>
168
  </div>
169
  <!-- Popup for question bank -->
170
- <div class="qsm-popup qsm-popup-slide qsm-popup-bank" id="modal-2" aria-hidden="true">
171
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
172
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
173
  <header class="qsm-popup__header qsm-question-bank-header">
174
- <h2 class="qsm-popup__title" id="modal-2-title">
175
- <?php esc_html_e( 'Question Bank', 'quiz-master-next' ); ?></h2>
176
- <div class="qsm-question-bank-search"></div>
177
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
178
  </header>
179
  <main class="qsm-popup__content" id="modal-2-content">
180
  <input type="hidden" name="add-question-bank-page" id="add-question-bank-page" value="">
 
 
 
 
 
 
 
 
 
 
 
181
  <div id="question-bank"></div>
182
  </main>
183
- <footer class="qsm-popup__footer">
184
- <button class="qsm-popup__btn" data-micromodal-close
185
- aria-label="Close this dialog window">Close</button>
186
  </footer>
187
  </div>
188
  </div>
@@ -210,14 +208,11 @@ function qsm_options_questions_tab_content() {
210
  value=""
211
  placeholder="<?php esc_attr_e( 'Type your question here', 'quiz-master-next' ); ?>">
212
  </div>
213
- <a href="javascript:void(0)" class="qsm-show-question-desc-box button button-default"><span
214
- class="dashicons dashicons-plus-alt2"></span>
215
- <?php esc_html_e( 'Add Description', 'quiz-master-next' ); ?></a>
216
- <div class="qsm-row" style="display: none;">
217
- <textarea placeholder="<?php esc_attr_e( 'Add your description here', 'quiz-master-next' ); ?>"
218
- id="question-text"></textarea>
219
  </div>
220
- <hr />
221
  <div class="qsm-row" style="margin-bottom: 0;">
222
  <?php
223
  $description_arr = array(
@@ -294,62 +289,144 @@ function qsm_options_questions_tab_content() {
294
  if ( $description_arr ) {
295
  foreach ( $description_arr as $value ) {
296
  $question_type_id = $value['question_type_id'];
297
- ?>
298
- <p id="question_type_<?php echo esc_attr( $question_type_id ); ?>_description"
299
- class="question-type-description"><?php echo esc_attr( $value['description'] ); ?></p>
300
- <?php
301
  }
302
  }
303
  ?>
304
  </div>
305
  <div id="qsm_optoins_wrapper" class="qsm-row qsm_hide_for_other qsm_show_question_type_0 qsm_show_question_type_1 qsm_show_question_type_2 qsm_show_question_type_3 qsm_show_question_type_4 qsm_show_question_type_5 qsm_show_question_type_7 qsm_show_question_type_10 qsm_show_question_type_12 qsm_show_question_type_14 <?php echo apply_filters('qsm_polar_class',esc_attr( $polar_class . $show_answer_option )); ?>">
306
- <label class="answer-header">
307
- <?php esc_html_e( 'Answers', 'quiz-master-next' ); ?>
308
- <a class="qsm-question-doc" rel="noopener"
309
- href="https://quizandsurveymaster.com/docs/v7/questions-tab/#Answers"
310
- target="_blank" title="View Documentation">
311
- <span class="dashicons dashicons-media-document"></span>
312
- </a>
313
- </label>
314
  <div class="correct-header"><?php esc_html_e( 'Correct', 'quiz-master-next' ); ?></div>
315
  <div class="answers" id="answers">
316
 
317
  </div>
318
  <div class="new-answer-button">
319
- <a href="javascript:void(0)" class="button" id="new-answer-button"><span
320
- class="dashicons dashicons-plus"></span>
321
- <?php esc_html_e( 'Add New Answer!', 'quiz-master-next' ); ?></a>
322
  </div>
323
  <?php do_action('qsm_after_options'); ?>
324
  </div>
325
- <hr style="margin-bottom:25px;">
326
- <a href="javascript:void(0)" class="qsm-show-correct-info-box button button-default"><span
327
- class="dashicons dashicons-plus-alt2"></span>
328
- <?php esc_html_e( 'Add Correct Answer Info', 'quiz-master-next' ); ?></a>
329
- <div class="qsm-row" style="display: none;">
330
  <?php
331
  $show_correct_answer_info = '';
 
 
 
 
 
332
  foreach ( $question_types as $type ) {
333
  if ( isset( $type['options']['show_correct_answer_info'] ) && $type['options']['show_correct_answer_info'] ) {
334
  $show_correct_answer_info .= ',' . $type['slug'];
335
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  }
337
- $answer_area_option = array(
338
  'correct_answer_info' => array(
339
- 'label' => __( 'Correct Answer Info', 'quiz-master-next' ),
340
- 'type' => 'textarea',
341
- 'default' => '',
342
- 'show' => '0,1,2,3,4,5,7,10,12,14' . $polar_question_use . $show_correct_answer_info,
 
343
  'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Correct-Answer-Info',
344
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  );
346
- $answer_area_option = apply_filters( 'qsm_question_advanced_option', $answer_area_option );
347
- foreach ( $answer_area_option as $qo_key => $single_answer_option ) {
348
- qsm_display_question_option( $qo_key, $single_answer_option );
 
 
349
  }
 
 
350
  ?>
351
  </div>
352
- <?php do_action( 'qsm_question_form_fields', $quiz_id ); ?>
353
  </div>
354
  <div id="postbox-container-1" class="postbox-container">
355
  <div id="side-sortables" class="meta-box-sortables ui-sortable" style="">
@@ -366,7 +443,7 @@ function qsm_options_questions_tab_content() {
366
  <?php esc_html_e( 'Question Type', 'quiz-master-next' ); ?>
367
  <?php
368
  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' ) . '">';
369
- echo '<span class="dashicons dashicons-media-document"></span>';
370
  echo '</a>';
371
  ?>
372
  </label>
@@ -420,16 +497,6 @@ function qsm_options_questions_tab_content() {
420
  // 'tooltip' => __('You can use text and rich answer for question answers.', 'quiz-master-next'),.
421
  'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Answer-Type',
422
  ),
423
- 'required' => array(
424
- 'label' => __( 'Required?', 'quiz-master-next' ),
425
- 'type' => 'single_checkbox',
426
- 'priority' => '2',
427
- 'options' => array(
428
- // '1' => __( 'No', 'quiz-master-next' ),
429
- '0' => __( 'Yes', 'quiz-master-next' ),
430
- ),
431
- 'default' => '0',
432
- ),
433
  'match-answer' => array(
434
  'label' => __( 'Match Answer', 'quiz-master-next' ),
435
  'type' => 'select',
@@ -441,6 +508,15 @@ function qsm_options_questions_tab_content() {
441
  'default' => 'random',
442
  'show' => '14' . $show_match_answer,
443
  ),
 
 
 
 
 
 
 
 
 
444
  );
445
  $simple_question_option = apply_filters( 'qsm_question_format_option', $simple_question_option );
446
  $keys = array_column( $simple_question_option, 'priority' );
@@ -449,17 +525,13 @@ function qsm_options_questions_tab_content() {
449
  qsm_display_question_option( $qo_key, $single_option );
450
  }
451
  ?>
452
- </div>
453
- <div id="major-publishing-actions">
454
- <div id="delete-action">
455
- <a class="submitdelete deletion" data-micromodal-close
456
- aria-label="Close this">Cancel</a>
457
- </div>
458
  <div id="publishing-action">
459
- <span class="spinner" id="save-edit-question-spinner"
460
- style="float: none;"></span>
461
- <button id="save-popup-button" class="button button-primary">Save
462
- Question</button>
 
463
  </div>
464
  </div>
465
  </div>
@@ -468,10 +540,7 @@ function qsm_options_questions_tab_content() {
468
  <div id="categorydiv" class="postbox">
469
  <h2 class="hndle ui-sortable-handle">
470
  <span><?php esc_html_e( 'Select Category', 'quiz-master-next' ); ?></span>
471
- <a class="qsm-question-doc" rel="noopener"
472
- href="https://quizandsurveymaster.com/docs/v7/questions-tab/#Category"
473
- target="_blank" title="View Documentation"><span
474
- class="dashicons dashicons-media-document"></span></a>
475
  </h2>
476
  <div class="inside">
477
  <?php
@@ -507,10 +576,7 @@ function qsm_options_questions_tab_content() {
507
  </div>
508
  <div id="featureImagediv" class="postbox">
509
  <h2 class="hndle ui-sortable-handle">
510
- <span><?php esc_html_e( 'Feature Image', 'quiz-master-next' ); ?></span>
511
- <a class="qsm-question-doc" href="javascript:void(0)" rel="noopener" target="_blank"
512
- title="View Documentation"><span
513
- class="dashicons dashicons-media-document"></span></a>
514
  </h2>
515
  <div class="inside">
516
  <?php
@@ -518,130 +584,9 @@ function qsm_options_questions_tab_content() {
518
  <a href="javascript:void(0)" class="qsm-feature-image-rmv" style="display:none">' . esc_html__( 'Remove Image', 'quiz-master-next' ) . '</a>'
519
  . '<input type="hidden" name="qsm-feature-image-id" class="qsm-feature-image-id" value="">'
520
  . '<input type="hidden" name="qsm-feature-image-src" class="qsm-feature-image-src" value="">';
521
-
522
  ?>
523
  </div>
524
  </div>
525
- <div id="advanceddiv" class="postbox">
526
- <h2 class="hndle ui-sortable-handle">
527
- <span><?php esc_html_e( 'Advanced Option', 'quiz-master-next' ); ?></span>
528
- </h2>
529
- <div class="inside">
530
- <div class="advanced-content">
531
- <?php
532
- $show_autofill = '';
533
- foreach ( $question_types as $type ) {
534
- if ( isset( $type['options']['show_autofill'] ) && $type['options']['show_autofill'] ) {
535
- $show_autofill .= ',' . $type['slug'];
536
- }
537
- }
538
- $show_limit_text = '';
539
- foreach ( $question_types as $type ) {
540
- if ( isset( $type['options']['show_limit_text'] ) && $type['options']['show_limit_text'] ) {
541
- $show_limit_text .= ',' . $type['slug'];
542
- }
543
- }
544
- $show_limit_multiple_response = '';
545
- foreach ( $question_types as $type ) {
546
- if ( isset( $type['options']['show_limit_multiple_response'] ) && $type['options']['show_limit_multiple_response'] ) {
547
- $show_limit_multiple_response .= ',' . $type['slug'];
548
- }
549
- }
550
- $show_file_upload_type = '';
551
- foreach ( $question_types as $type ) {
552
- if ( isset( $type['options']['show_file_upload_type'] ) && $type['options']['show_file_upload_type'] ) {
553
- $show_file_upload_type .= ',' . $type['slug'];
554
- }
555
- }
556
- $show_file_upload_limit = '';
557
- foreach ( $question_types as $type ) {
558
- if ( isset( $type['options']['show_file_upload_limit'] ) && $type['options']['show_file_upload_limit'] ) {
559
- $show_file_upload_limit .= ',' . $type['slug'];
560
- }
561
- }
562
- $advanced_question_option = array(
563
- 'comments' => array(
564
- 'label' => __( 'Comment Field', 'quiz-master-next' ),
565
- 'type' => 'select',
566
- 'priority' => '3',
567
- 'options' => array(
568
- '0' => __( 'Small Text Field', 'quiz-master-next' ),
569
- '2' => __( 'Large Text Field', 'quiz-master-next' ),
570
- '1' => __( 'None', 'quiz-master-next' ),
571
- ),
572
- 'default' => '1',
573
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Comment-Field',
574
- ),
575
- 'hint' => array(
576
- 'label' => __( 'Hint', 'quiz-master-next' ),
577
- 'type' => 'text',
578
- 'default' => '',
579
- 'priority' => '4',
580
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/questions-tab/#Hints',
581
- ),
582
- 'autofill' => array(
583
- 'label' => __( 'Hide Autofill?', 'quiz-master-next' ),
584
- 'type' => 'select',
585
- 'priority' => '6',
586
- 'options' => array(
587
- '0' => __( 'No', 'quiz-master-next' ),
588
- '1' => __( 'Yes', 'quiz-master-next' ),
589
- ),
590
- 'default' => '0',
591
- 'show' => '3, 14' . $show_autofill,
592
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Hide-Autofill',
593
- ),
594
- 'limit_text' => array(
595
- 'label' => __( 'Limit Text', 'quiz-master-next' ),
596
- 'type' => 'text',
597
- 'priority' => '7',
598
- 'default' => '',
599
- 'show' => '3, 5, 7, 14' . $show_limit_text,
600
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Limit-Text',
601
- ),
602
- 'limit_multiple_response' => array(
603
- 'label' => __( 'Limit Multiple choice', 'quiz-master-next' ),
604
- 'type' => 'text',
605
- 'priority' => '8',
606
- 'default' => '',
607
- 'show' => '4,10' . $show_limit_multiple_response,
608
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Limit-Multiple-Choice',
609
- ),
610
- 'file_upload_type' => array(
611
- 'label' => __( 'Allow File type', 'quiz-master-next' ),
612
- 'type' => 'multi_checkbox',
613
- 'priority' => '10',
614
- 'options' => array(
615
- 'text/plain' => __( 'Text File', 'quiz-master-next' ),
616
- 'image' => __( 'Image', 'quiz-master-next' ),
617
- 'application/pdf' => __( 'PDF File', 'quiz-master-next' ),
618
- 'doc' => __( 'Doc File', 'quiz-master-next' ),
619
- 'excel' => __( 'Excel File', 'quiz-master-next' ),
620
- 'video/mp4' => __( 'Video', 'quiz-master-next' ),
621
- ),
622
- 'default' => 'image',
623
- 'show' => '11' . $show_file_upload_type,
624
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#Allow-File-Type',
625
- ),
626
- 'file_upload_limit' => array(
627
- 'label' => __( 'File upload limit ( in MB )', 'quiz-master-next' ),
628
- 'type' => 'number',
629
- 'priority' => '9',
630
- 'default' => '',
631
- 'show' => '11' . $show_file_upload_limit,
632
- 'documentation_link' => 'https://quizandsurveymaster.com/docs/v7/advanced-options/#File-Upload-Limit',
633
- ),
634
- );
635
- $advanced_question_option = apply_filters( 'qsm_question_advanced_option', $advanced_question_option );
636
- $keys = array_column( $advanced_question_option, 'priority' );
637
- array_multisort( $keys, SORT_ASC, $advanced_question_option );
638
- foreach ( $advanced_question_option as $qo_key => $single_option ) {
639
- qsm_display_question_option( $qo_key, $single_option );
640
- }
641
- ?>
642
- </div>
643
- </div>
644
- </div>
645
  <?php do_action( 'qsm_question_form_fields_side', $quiz_id ); ?>
646
  </div>
647
  </div>
@@ -654,8 +599,8 @@ function qsm_options_questions_tab_content() {
654
 
655
  <!--Views-->
656
 
657
- <!-- Popup for question bank -->
658
- <div class="qsm-popup qsm-popup-slide qsm-popup-bank" id="modal-page-1" aria-hidden="true">
659
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
660
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
661
  <header class="qsm-popup__header">
@@ -681,9 +626,8 @@ function qsm_options_questions_tab_content() {
681
  </div>
682
  </main>
683
  <footer class="qsm-popup__footer">
684
- <button id="save-page-popup-button" class="qsm-popup__btn qsm-popup__btn-primary">Save Page</button>
685
- <button class="qsm-popup__btn" data-micromodal-close
686
- aria-label="Close this dialog window">Close</button>
687
  </footer>
688
  </div>
689
  </div>
@@ -691,15 +635,13 @@ function qsm_options_questions_tab_content() {
691
 
692
  <?php add_action( 'admin_footer', 'qsm_options_questions_tab_template' ); ?>
693
 
694
- <div class="qsm-popup qsm-popup-slide" id="modal-7" aria-hidden="false">
695
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
696
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-7-title">
697
  <header class="qsm-popup__header">
698
- <h3 class="qsm-popup__title" id="modal-7-title"><?php esc_html_e( 'Delete Options', 'quiz-master-next' ); ?>
699
- </h3>
700
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
701
  </header>
702
- <hr />
703
  <main class="qsm-popup__content" id="modal-7-content">
704
  <form action='' method='post' id="delete-question-form">
705
  <table class="modal-7-table">
@@ -715,14 +657,9 @@ function qsm_options_questions_tab_content() {
715
  </table>
716
  </form>
717
  </main>
718
- <hr />
719
  <footer class="qsm-popup__footer">
720
- <button id="unlink-question-button" class="qsm-popup__btn qsm-popup__btn-primary"><span
721
- class="dashicons dashicons-trash"></span><?php esc_html_e( 'Unlink', 'quiz-master-next' ); ?></button>
722
- <button id="delete-question-button" class="qsm-popup__btn qsm-popup__btn-primary"><span
723
- class="dashicons dashicons-warning"></span><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
724
- <button id="cancel-button" class="qsm-popup__btn" data-micromodal-close=""
725
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
726
  </footer>
727
  </div>
728
  </div>
@@ -750,25 +687,22 @@ function qsm_options_questions_tab_content() {
750
  </div>
751
  </div>
752
 
753
- <div class="qsm-popup qsm-popup-slide" id="modal-9" aria-hidden="false">
754
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
755
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-9-title">
756
  <header class="qsm-popup__header">
757
- <h3 class="qsm-popup__title" id="modal-9-title"><?php esc_html_e( 'Add New Category', 'quiz-master-next' ); ?>
758
- </h3>
759
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
760
  </header>
761
- <hr />
762
  <main class="qsm-popup__content" id="modal-9-content">
763
  <table class="modal-9-table">
764
  <tr>
765
  <td><?php esc_html_e( 'Category Name', 'quiz-master-next' ); ?>
766
  </td>
767
  <td><input type="text" id="new-category-name" /></td>
 
768
  <tr>
769
- <tr>
770
- <td><?php esc_html_e( 'Parent Category', 'quiz-master-next' ); ?>
771
- </td>
772
  <td>
773
  <?php
774
  wp_dropdown_categories(
@@ -791,12 +725,8 @@ function qsm_options_questions_tab_content() {
791
  </table>
792
  <div class="info"></div>
793
  </main>
794
- <hr />
795
  <footer class="qsm-popup__footer">
796
- <button id="save-multi-category-button"
797
- class="qsm-popup__btn qsm-popup__btn-primary"></span><?php esc_html_e( 'Save', 'quiz-master-next' ); ?></button>
798
- <button id="cancel-button" class="qsm-popup__btn" data-micromodal-close=""
799
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
800
  </footer>
801
  </div>
802
  </div>
@@ -807,7 +737,6 @@ function qsm_options_questions_tab_content() {
807
 
808
  add_action( 'wp_ajax_qsm_save_pages', 'qsm_ajax_save_pages' );
809
 
810
-
811
  /**
812
  * Saves the pages and order from the Questions tab
813
  *
@@ -819,19 +748,42 @@ function qsm_ajax_save_pages() {
819
  }
820
 
821
  global $mlwQuizMasterNext;
822
- $json = array(
823
  'status' => 'error',
824
  );
825
-
826
- $quiz_id = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
827
  $mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
828
-
829
  $pages = isset( $_POST['pages'] ) ? qsm_sanitize_rec_array( wp_unslash( $_POST['pages'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
830
  $qpages = isset( $_POST['qpages'] ) ? qsm_sanitize_rec_array( wp_unslash( $_POST['qpages'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
831
- $response_qpages = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'qpages', $qpages );
832
- $response = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'pages', $pages );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833
  if ( $response ) {
834
  $json['status'] = 'success';
 
 
 
 
 
 
 
835
  }
836
  echo wp_json_encode( $json );
837
  wp_die();
@@ -1053,56 +1005,62 @@ function qsm_options_questions_tab_template() {
1053
  <!-- View for Page -->
1054
  <script type="text/template" id="tmpl-page">
1055
  <div class="page page-new" data-page-id="{{data.id }}">
1056
- <div class="page-header">
1057
- <div><span class="dashicons dashicons-move"></span> <a href="javascript:void(0)" class="edit-page-button" title="Edit Page"><span class="dashicons dashicons-admin-generic"></span></a> <span class="page-number"></span></div>
1058
- <div><a href="javascript:void(0)" class="delete-page-button" title="Delete Page"><span class="dashicons dashicons-trash"></span></a></div>
1059
- </div>
1060
- <div class="page-footer">
1061
- <div class="page-header-buttons">
1062
- <a href="javascript:void(0)" class="new-question-button button"><span class="dashicons dashicons-plus"></span> <?php esc_html_e( 'Create New Question', 'quiz-master-next' ); ?></a>
1063
- <a href="javascript:void(0)" class="add-question-bank-button button"><span class="dashicons dashicons-plus"></span> <?php esc_html_e( 'Add Question From Question Bank', 'quiz-master-next' ); ?></a>
1064
- </div>
1065
  </div>
1066
  </div>
1067
- </script>
 
1068
 
1069
  <!-- View for Question -->
1070
  <script type="text/template" id="tmpl-question">
1071
  <div class="question question-new" data-question-id="{{data.id }}">
1072
- <div class="question-content">
1073
- <div><span class="dashicons dashicons-move"></span></div>
1074
- <div><a href="javascript:void(0)" title="Edit Question" class="edit-question-button"><span class="dashicons dashicons-edit"></span></a></div>
1075
- <div><a href="javascript:void(0)" title="Clone Question" class="duplicate-question-button"><span class="dashicons dashicons-admin-page"></span></a></div>
1076
- <div><a href="javascript:void(0)" title="Delete Question" class="delete-question-button" data-question-iid="{{data.id }}"><span class="dashicons dashicons-trash"></span></a></div>
1077
  <div class="question-content-text">{{{data.question}}}</div>
1078
  <div class="question-category"><# if ( 0 !== data.category.length ) { #> <?php esc_html_e( 'Category:', 'quiz-master-next' ); ?> {{data.category}} <# } #></div>
1079
  </div>
 
 
 
 
 
 
 
1080
  </div>
1081
- </script>
 
1082
 
1083
  <!-- View for question in question bank -->
1084
  <script type="text/template" id="tmpl-single-question-bank-question">
1085
  <div class="question-bank-question" data-question-id="{{data.id}}" data-category-name="{{data.category}}">
1086
- <div class="question-bank-selection">
1087
- <input type="checkbox" name="qsm-question-checkbox[]" class="qsm-question-checkbox" />
1088
- </div>
1089
- <div><p>{{{data.question}}}</p><p style="font-size: 12px;color: gray;font-style: italic;"><b>Quiz Name:</b> {{data.quiz_name}} <# if ( data.category != '' ) { #> <b>Category:</b> {{data.category}} <# } #></p></div>
1090
- <div><a href="javascript:void(0)" class="import-button button"><?php esc_html_e( 'Add Question', 'quiz-master-next' ); ?></a></div>
1091
  </div>
1092
- </script>
 
 
 
1093
 
1094
  <!-- View for single category -->
1095
  <script type="text/template" id="tmpl-single-category">
1096
  <div class="category">
1097
- <label><input type="radio" name="category" class="category-radio" value="{{data.category}}">{{data.category}}</label>
1098
- </div>
1099
- </script>
1100
 
1101
  <!-- View for single answer -->
1102
  <script type="text/template" id="tmpl-single-answer">
1103
  <div class="answers-single">
1104
- <div><a href="javascript:void(0)" class="delete-answer-button"><span class="dashicons dashicons-trash"></span></a></div>
1105
- <div class="answer-text-div">
1106
  <# if ( 'rich' == data.answerType ) { #>
1107
  <textarea id="answer-{{data.question_id}}-{{data.count}}"></textarea>
1108
  <# } else if ( 'image' == data.answerType ) { #>
@@ -1118,15 +1076,14 @@ function qsm_options_questions_tab_template() {
1118
  <div><input type="text" class="answer-points" value="{{data.points}}" placeholder="Points"/></div>
1119
  <# } #>
1120
  <# if ( 0 == data.quiz_system || 3 == data.quiz_system ) { #>
1121
- <div><label class="correct-answer"><input type="checkbox" class="answer-correct" value="1" <# if ( 1 == data.correct ) { #> checked="checked" <# } #>/> <?php esc_html_e( 'Correct', 'quiz-master-next' ); ?></label></div>
1122
  <# } #>
1123
  <# } else { #>
1124
  <div><input type="text" class="answer-points" value="{{data.points}}" placeholder="Points"/></div>
1125
  <# } #>
1126
- <?php do_action( 'qsm_admin_single_answer_option_fields' ); ?>
1127
  </div>
1128
  </script>
1129
  <?php
1130
  do_action( 'qsm_admin_after_single_answer_template' );
1131
  }
1132
- ?>
50
  );
51
  }
52
  }
53
+ $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
54
+ $user_id = get_current_user_id();
55
+ $form_type = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'form_type' );
56
+ $quiz_system = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'system' );
 
57
  $default_answers = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'default_answers' );
58
+ $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
59
+ $db_qpages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'qpages', array() );
60
+ $qpages = array();
61
  if ( ! empty( $pages ) ) {
62
  $defaultQPage = array(
63
  'id' => 1,
71
  $qpage['id'] = $k + 1;
72
  $qpage['pagekey'] = ( isset( $qpage['pagekey'] ) && ! empty( $qpage['pagekey'] ) ) ? $qpage['pagekey'] : uniqid();
73
  $qpage['hide_prevbtn'] = ( isset( $qpage['hide_prevbtn'] ) && ! empty( $qpage['hide_prevbtn'] ) ) ? $qpage['hide_prevbtn'] : 0;
74
+ $pages[ $k ] = array_values( $val );
75
+ $qpage['questions'] = array_values( $val );
76
  $qpages[] = $qpage;
77
  }
78
  } else {
87
  }
88
  $qpages = apply_filters( 'qsm_filter_quiz_page_attributes', $qpages, $pages );
89
  $json_data = array(
90
+ 'quizID' => $quiz_id,
91
+ 'answerText' => __( 'Answer', 'quiz-master-next' ),
92
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
93
+ 'pages' => $pages,
94
+ 'qpages' => $qpages,
95
+ 'qsm_user_ve' => get_user_meta( $user_id, 'rich_editing', true ),
96
+ 'saveNonce' => wp_create_nonce( 'ajax-nonce-sandy-page' ),
97
+ 'categories' => $question_categories,
98
+ 'form_type' => $form_type,
99
+ 'quiz_system' => $quiz_system,
100
+ 'question_bank_nonce' => wp_create_nonce( 'delete_question_question_bank_nonce' ),
101
+ 'single_question_nonce' => wp_create_nonce( 'delete_question_from_database' ),
102
+ 'rest_user_nonce' => wp_create_nonce( 'wp_rest_nonce_' . $quiz_id . '_' . get_current_user_id() ),
103
+ 'default_answers' => $default_answers,
 
 
 
 
104
  );
105
  wp_localize_script( 'qsm_admin_js', 'qsmQuestionSettings', $json_data );
106
 
113
  if ( 0 != $pagination ) {
114
  ?>
115
  <div class="notice notice-warning">
116
+ <p><?php esc_html_e( 'This quiz has the "How many questions per page would you like?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to 0.', 'quiz-master-next' ); ?></p>
 
117
  </div>
118
  <?php
119
  }
121
  if ( 0 != $from_total ) {
122
  ?>
123
  <div class="notice notice-warning">
124
+ <p><?php esc_html_e( 'This quiz has the "How many questions should be loaded for quiz?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to 0.', 'quiz-master-next' ); ?></p>
 
125
  </div>
126
  <?php
127
  }
129
  if ( 0 != $randomness ) {
130
  ?>
131
  <div class="notice notice-warning">
132
+ <p><?php esc_html_e( 'This quiz has the "Are the questions random?" option enabled. The pages below will not be used while that option is enabled. To turn off, go to the "Options" tab and set that option to "No".', 'quiz-master-next' ); ?></p>
 
133
  </div>
134
  <?php
135
  }
136
  ?>
 
 
 
 
137
  <div class="question-controls">
138
  <span><b><?php esc_html_e( 'Total Questions:', 'quiz-master-next' ); ?></b> <span id="total-questions"></span></span>
139
  <p class="search-box">
156
  </div>
157
  </div>
158
  <!-- Popup for question bank -->
159
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup qsm-popup-bank" id="modal-2" aria-hidden="true">
160
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
161
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
162
  <header class="qsm-popup__header qsm-question-bank-header">
163
+ <h2 class="qsm-popup__title" id="modal-2-title"><?php esc_html_e( 'Question Bank', 'quiz-master-next' ); ?></h2>
 
 
164
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
165
  </header>
166
  <main class="qsm-popup__content" id="modal-2-content">
167
  <input type="hidden" name="add-question-bank-page" id="add-question-bank-page" value="">
168
+ <div class="qsm-question-bank-filters">
169
+ <div class="qsm-question-bank-select">
170
+ <label class="qsm-select-all-label"><input type="checkbox" id="qsm_select_all_question" /> <?php esc_html_e( 'Select All Question', 'quiz-master-next' ); ?></label>
171
+ </div>
172
+ <div class="qsm-question-bank-search">
173
+ <form action="" method="post" id="question-bank-search-form"><input type="search" name="search" value="" id="question-bank-search-input" placeholder="<?php esc_html_e( 'Search questions', 'quiz-master-next' ); ?>"></form>
174
+ <select name="question-bank-cat" id="question-bank-cat">
175
+ <option value=""><?php esc_html_e( 'All Categories', 'quiz-master-next' ); ?></option>
176
+ </select>
177
+ </div>
178
+ </div>
179
  <div id="question-bank"></div>
180
  </main>
181
+ <footer class="qsm-popup__footer qsm-question-bank-footer">
182
+ <a href="javascript:void(0)" class="qsm-action-link-delete" id="qsm-delete-selected-question"><?php esc_html_e( 'Delete from Question Bank', 'quiz-master-next' ); ?></a>
183
+ <button class="button button-primary" id="qsm-import-selected-question"><?php esc_html_e( 'Add Questions', 'quiz-master-next' ); ?></button>
184
  </footer>
185
  </div>
186
  </div>
208
  value=""
209
  placeholder="<?php esc_attr_e( 'Type your question here', 'quiz-master-next' ); ?>">
210
  </div>
211
+ <a href="javascript:void(0)" class="qsm-show-question-desc-box">+ <?php esc_html_e( 'Edit description', 'quiz-master-next' ); ?></a>
212
+ <div class="qsm-row qsm-editor-wrap" style="display: none;">
213
+ <a href="javascript:void(0)" class="qsm-hide-question-desc-box">- <?php esc_html_e( 'Hide description', 'quiz-master-next' ); ?></a>
214
+ <textarea placeholder="<?php esc_attr_e( 'Add your description here', 'quiz-master-next' ); ?>" id="question-text"></textarea>
 
 
215
  </div>
 
216
  <div class="qsm-row" style="margin-bottom: 0;">
217
  <?php
218
  $description_arr = array(
289
  if ( $description_arr ) {
290
  foreach ( $description_arr as $value ) {
291
  $question_type_id = $value['question_type_id'];
292
+ ?><p id="question_type_<?php echo esc_attr( $question_type_id ); ?>_description" class="question-type-description"><?php echo esc_attr( $value['description'] ); ?></p><?php
 
 
 
293
  }
294
  }
295
  ?>
296
  </div>
297
  <div id="qsm_optoins_wrapper" class="qsm-row qsm_hide_for_other qsm_show_question_type_0 qsm_show_question_type_1 qsm_show_question_type_2 qsm_show_question_type_3 qsm_show_question_type_4 qsm_show_question_type_5 qsm_show_question_type_7 qsm_show_question_type_10 qsm_show_question_type_12 qsm_show_question_type_14 <?php echo apply_filters('qsm_polar_class',esc_attr( $polar_class . $show_answer_option )); ?>">
 
 
 
 
 
 
 
 
298
  <div class="correct-header"><?php esc_html_e( 'Correct', 'quiz-master-next' ); ?></div>
299
  <div class="answers" id="answers">
300
 
301
  </div>
302
  <div class="new-answer-button">
303
+ <a href="javascript:void(0)" class="qsm-dashed-btn qsm-block-btn" id="new-answer-button">+ <?php esc_html_e( 'Add New Answer!', 'quiz-master-next' ); ?></a>
 
 
304
  </div>
305
  <?php do_action('qsm_after_options'); ?>
306
  </div>
307
+ <div class="qsm-question-misc-options">
 
 
 
 
308
  <?php
309
  $show_correct_answer_info = '';
310
+ $show_autofill = '';
311
+ $show_limit_text = '';
312
+ $show_limit_multiple_response = '';
313
+ $show_file_upload_type = '';
314
+ $show_file_upload_limit = '';
315
  foreach ( $question_types as $type ) {
316
  if ( isset( $type['options']['show_correct_answer_info'] ) && $type['options']['show_correct_answer_info'] ) {
317
  $show_correct_answer_info .= ',' . $type['slug'];
318
  }
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
+ }
325
+ if ( isset( $type['options']['show_limit_multiple_response'] ) && $type['options']['show_limit_multiple_response'] ) {
326
+ $show_limit_multiple_response .= ',' . $type['slug'];
327
+ }
328
+ if ( isset( $type['options']['show_file_upload_type'] ) && $type['options']['show_file_upload_type'] ) {
329
+ $show_file_upload_type .= ',' . $type['slug'];
330
+ }
331
+ if ( isset( $type['options']['show_file_upload_limit'] ) && $type['options']['show_file_upload_limit'] ) {
332
+ $show_file_upload_limit .= ',' . $type['slug'];
333
+ }
334
  }
335
+ $advanced_question_option = array(
336
  'correct_answer_info' => array(
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' ),
346
+ 'label' => __( 'Field Type', 'quiz-master-next' ),
347
+ 'type' => 'select',
348
+ 'priority' => '3',
349
+ 'options' => array(
350
+ '0' => __( 'Small Text Field', 'quiz-master-next' ),
351
+ '2' => __( 'Large Text Field', 'quiz-master-next' ),
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' ),
359
+ 'label' => __( 'Hint Text', 'quiz-master-next' ),
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' ),
367
+ 'label' => __( 'Hide Autofill?', 'quiz-master-next' ),
368
+ 'type' => 'single_checkbox',
369
+ 'priority' => '6',
370
+ 'options' => array(
371
+ '1' => __( 'Yes', 'quiz-master-next' ),
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' ),
379
+ 'label' => __( 'Maximum number of characters allowed', 'quiz-master-next' ),
380
+ 'type' => 'text',
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' ),
388
+ 'label' => __( 'Maximum number of choice selection allowed', 'quiz-master-next' ),
389
+ 'type' => 'text',
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' ),
397
+ 'type' => 'number',
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' ),
405
+ 'type' => 'multi_checkbox',
406
+ 'priority' => '10',
407
+ 'options' => array(
408
+ 'text/plain' => __( 'Text File', 'quiz-master-next' ),
409
+ 'image' => __( 'Image', 'quiz-master-next' ),
410
+ 'application/pdf' => __( 'PDF File', 'quiz-master-next' ),
411
+ 'doc' => __( 'Doc File', 'quiz-master-next' ),
412
+ 'excel' => __( 'Excel File', 'quiz-master-next' ),
413
+ 'video/mp4' => __( 'Video', 'quiz-master-next' ),
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 );
421
+ $keys = array_column( $advanced_question_option, 'priority' );
422
+ array_multisort( $keys, SORT_ASC, $advanced_question_option );
423
+ foreach ( $advanced_question_option as $qo_key => $single_option ) {
424
+ qsm_generate_question_option( $qo_key, $single_option );
425
  }
426
+
427
+ do_action( 'qsm_question_form_fields', $quiz_id );
428
  ?>
429
  </div>
 
430
  </div>
431
  <div id="postbox-container-1" class="postbox-container">
432
  <div id="side-sortables" class="meta-box-sortables ui-sortable" style="">
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
  ?>
449
  </label>
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' ),
502
  'type' => 'select',
508
  'default' => 'random',
509
  'show' => '14' . $show_match_answer,
510
  ),
511
+ 'required' => array(
512
+ 'label' => __( 'Required?', 'quiz-master-next' ),
513
+ 'type' => 'single_checkbox',
514
+ 'priority' => '2',
515
+ 'options' => array(
516
+ '0' => __( 'Yes', 'quiz-master-next' ),
517
+ ),
518
+ 'default' => '0',
519
+ ),
520
  );
521
  $simple_question_option = apply_filters( 'qsm_question_format_option', $simple_question_option );
522
  $keys = array_column( $simple_question_option, 'priority' );
525
  qsm_display_question_option( $qo_key, $single_option );
526
  }
527
  ?>
528
+ <div class="clear clearfix"></div>
 
 
 
 
 
529
  <div id="publishing-action">
530
+ <span class="spinner" id="save-edit-question-spinner" style="float: none;"></span>
531
+ <button id="save-popup-button" class="button button-primary">Save Question</button>
532
+ </div>
533
+ <div id="delete-action" style="float: none;">
534
+ <a class="submitdelete deletion" data-micromodal-close aria-label="Close this">Cancel</a>
535
  </div>
536
  </div>
537
  </div>
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
576
  </div>
577
  <div id="featureImagediv" class="postbox">
578
  <h2 class="hndle ui-sortable-handle">
579
+ <span><?php esc_html_e( 'Featured image', 'quiz-master-next' ); ?></span>
 
 
 
580
  </h2>
581
  <div class="inside">
582
  <?php
584
  <a href="javascript:void(0)" class="qsm-feature-image-rmv" style="display:none">' . esc_html__( 'Remove Image', 'quiz-master-next' ) . '</a>'
585
  . '<input type="hidden" name="qsm-feature-image-id" class="qsm-feature-image-id" value="">'
586
  . '<input type="hidden" name="qsm-feature-image-src" class="qsm-feature-image-src" value="">';
 
587
  ?>
588
  </div>
589
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  <?php do_action( 'qsm_question_form_fields_side', $quiz_id ); ?>
591
  </div>
592
  </div>
599
 
600
  <!--Views-->
601
 
602
+ <!-- Popup for page settings -->
603
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-page-1" aria-hidden="true">
604
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
605
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
606
  <header class="qsm-popup__header">
626
  </div>
627
  </main>
628
  <footer class="qsm-popup__footer">
629
+ <button id="delete-page-popup-button" class="delete-page-button"><?php esc_html_e( 'Delete Page', 'quiz-master-next' ); ?></button>
630
+ <button id="save-page-popup-button" class="button button-primary"><?php esc_html_e( 'Save Page', 'quiz-master-next' ); ?></button>
 
631
  </footer>
632
  </div>
633
  </div>
635
 
636
  <?php add_action( 'admin_footer', 'qsm_options_questions_tab_template' ); ?>
637
 
638
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-7" aria-hidden="false">
639
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
640
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-7-title">
641
  <header class="qsm-popup__header">
642
+ <h2 class="qsm-popup__title" id="modal-7-title"><?php esc_html_e( 'Delete Options', 'quiz-master-next' ); ?></h2>
 
643
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
644
  </header>
 
645
  <main class="qsm-popup__content" id="modal-7-content">
646
  <form action='' method='post' id="delete-question-form">
647
  <table class="modal-7-table">
657
  </table>
658
  </form>
659
  </main>
 
660
  <footer class="qsm-popup__footer">
661
+ <button id="unlink-question-button" class="qsm-popup__btn qsm-popup__btn-primary"><span class="dashicons dashicons-trash"></span><?php esc_html_e( 'Unlink', 'quiz-master-next' ); ?></button>
662
+ <button id="delete-question-button" class="qsm-popup__btn qsm-popup__btn-primary"><span class="dashicons dashicons-warning"></span><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
 
 
 
 
663
  </footer>
664
  </div>
665
  </div>
687
  </div>
688
  </div>
689
 
690
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-9" aria-hidden="false">
691
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
692
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-9-title">
693
  <header class="qsm-popup__header">
694
+ <h2 class="qsm-popup__title" id="modal-9-title"><?php esc_html_e( 'Add New Category', 'quiz-master-next' ); ?></h2>
 
695
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
696
  </header>
 
697
  <main class="qsm-popup__content" id="modal-9-content">
698
  <table class="modal-9-table">
699
  <tr>
700
  <td><?php esc_html_e( 'Category Name', 'quiz-master-next' ); ?>
701
  </td>
702
  <td><input type="text" id="new-category-name" /></td>
703
+ </tr>
704
  <tr>
705
+ <td><?php esc_html_e( 'Parent Category', 'quiz-master-next' ); ?></td>
 
 
706
  <td>
707
  <?php
708
  wp_dropdown_categories(
725
  </table>
726
  <div class="info"></div>
727
  </main>
 
728
  <footer class="qsm-popup__footer">
729
+ <button id="save-multi-category-button" class="qsm-popup__btn qsm-popup__btn-primary"></span><?php esc_html_e( 'Save', 'quiz-master-next' ); ?></button>
 
 
 
730
  </footer>
731
  </div>
732
  </div>
737
 
738
  add_action( 'wp_ajax_qsm_save_pages', 'qsm_ajax_save_pages' );
739
 
 
740
  /**
741
  * Saves the pages and order from the Questions tab
742
  *
748
  }
749
 
750
  global $mlwQuizMasterNext;
751
+ $json = array(
752
  'status' => 'error',
753
  );
754
+ $quiz_id = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
755
+ $post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
756
  $mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
 
757
  $pages = isset( $_POST['pages'] ) ? qsm_sanitize_rec_array( wp_unslash( $_POST['pages'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
758
  $qpages = isset( $_POST['qpages'] ) ? qsm_sanitize_rec_array( wp_unslash( $_POST['qpages'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
759
+ $all_questions = array();
760
+ //merge duplicate questions
761
+ foreach ( $pages as $page_key => $questions ) {
762
+ $page_questions = array();
763
+ $questions = array_unique( $questions );
764
+ foreach ( $questions as $id ) {
765
+ if ( ! in_array( $id, $all_questions, true ) ) {
766
+ $page_questions[] = $id;
767
+ }
768
+ }
769
+ $all_questions = array_merge( $all_questions, $questions );
770
+ $pages[ $page_key ] = $page_questions;
771
+ if ( isset( $qpages[ $page_key ] ) ) {
772
+ $qpages[ $page_key ]['questions'] = $page_questions;
773
+ }
774
+ }
775
+
776
+ $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'qpages', $qpages );
777
+ $response = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'pages', $pages );
778
  if ( $response ) {
779
  $json['status'] = 'success';
780
+ // update post_modified
781
+ $datetime = current_time( 'Y-m-d H:i:s', 0 );
782
+ $update = array(
783
+ 'ID' => $post_id,
784
+ 'post_modified' => $datetime,
785
+ );
786
+ wp_update_post( $update );
787
  }
788
  echo wp_json_encode( $json );
789
  wp_die();
1005
  <!-- View for Page -->
1006
  <script type="text/template" id="tmpl-page">
1007
  <div class="page page-new" data-page-id="{{data.id }}">
1008
+ <div class="page-header">
1009
+ <div><span class="dashicons dashicons-move"></span> <span class="page-number"></span></div>
1010
+ <div><a href="javascript:void(0)" class="edit-page-button" title="Edit Page"><span class="dashicons dashicons-admin-generic"></span></a></div>
1011
+ </div>
1012
+ <div class="page-footer">
1013
+ <div class="page-header-buttons">
1014
+ <a href="javascript:void(0)" class="add-question-bank-button qsm-dashed-btn"><span class="dashicons dashicons-plus"></span> <?php esc_html_e( 'Add Question From Question Bank', 'quiz-master-next' ); ?></a>
1015
+ <a href="javascript:void(0)" class="new-question-button qsm-dashed-btn"><span class="dashicons dashicons-plus"></span> <?php esc_html_e( 'Create New Question', 'quiz-master-next' ); ?></a>
 
1016
  </div>
1017
  </div>
1018
+ </div>
1019
+ </script>
1020
 
1021
  <!-- View for Question -->
1022
  <script type="text/template" id="tmpl-question">
1023
  <div class="question question-new" data-question-id="{{data.id }}">
1024
+ <div class="question-content">
1025
+ <div><span class="dashicons dashicons-move"></span></div>
1026
+ <div class="question-content-title-box">
 
 
1027
  <div class="question-content-text">{{{data.question}}}</div>
1028
  <div class="question-category"><# if ( 0 !== data.category.length ) { #> <?php esc_html_e( 'Category:', 'quiz-master-next' ); ?> {{data.category}} <# } #></div>
1029
  </div>
1030
+ <div class="form-actions">
1031
+ <div class="qsm-actions-link-box">
1032
+ <a href="#" title="Edit Question" class="edit-question-button"><span class="dashicons dashicons-edit"></span></a>
1033
+ <a href="#" title="Clone Question" class="duplicate-question-button"><span class="dashicons dashicons-admin-page"></span></a>
1034
+ <a href="#" title="Delete Question" class="delete-question-button" data-question-iid="{{data.id }}"><span class="dashicons dashicons-trash"></span></a>
1035
+ </div>
1036
+ </div>
1037
  </div>
1038
+ </div>
1039
+ </script>
1040
 
1041
  <!-- View for question in question bank -->
1042
  <script type="text/template" id="tmpl-single-question-bank-question">
1043
  <div class="question-bank-question" data-question-id="{{data.id}}" data-category-name="{{data.category}}">
1044
+ <div class="question-bank-selection">
1045
+ <input type="checkbox" name="qsm-question-checkbox[]" class="qsm-question-checkbox" />
 
 
 
1046
  </div>
1047
+ <div><p>{{{data.question}}}</p><p style="font-size: 12px;color: gray;font-style: italic;"><b>Quiz Name:</b> {{data.quiz_name}} <# if ( data.category != '' ) { #> <b>Category:</b> {{data.category}} <# } #></p></div>
1048
+ <div><a href="javascript:void(0)" class="button import-button" data-question-id="{{data.id}}"><?php esc_html_e( 'Add Question', 'quiz-master-next' ); ?></a></div>
1049
+ </div>
1050
+ </script>
1051
 
1052
  <!-- View for single category -->
1053
  <script type="text/template" id="tmpl-single-category">
1054
  <div class="category">
1055
+ <label><input type="radio" name="category" class="category-radio" value="{{data.category}}">{{data.category}}</label>
1056
+ </div>
1057
+ </script>
1058
 
1059
  <!-- View for single answer -->
1060
  <script type="text/template" id="tmpl-single-answer">
1061
  <div class="answers-single">
1062
+ <div class="remove-answer-icon"><a href="javascript:void(0)" class="delete-answer-button"><span class="dashicons dashicons-remove"></span></a></div>
1063
+ <div class="answer-text-div qsm-editor-wrap">
1064
  <# if ( 'rich' == data.answerType ) { #>
1065
  <textarea id="answer-{{data.question_id}}-{{data.count}}"></textarea>
1066
  <# } else if ( 'image' == data.answerType ) { #>
1076
  <div><input type="text" class="answer-points" value="{{data.points}}" placeholder="Points"/></div>
1077
  <# } #>
1078
  <# if ( 0 == data.quiz_system || 3 == data.quiz_system ) { #>
1079
+ <div><label class="correct-answer"><input type="checkbox" class="answer-correct" value="1" <# if ( 1 == data.correct ) { #> checked="checked" <# } #>/><?php esc_html_e( 'Correct', 'quiz-master-next' ); ?></label></div>
1080
  <# } #>
1081
  <# } else { #>
1082
  <div><input type="text" class="answer-points" value="{{data.points}}" placeholder="Points"/></div>
1083
  <# } #>
1084
+ <?php do_action( 'qsm_admin_single_answer_option_fields' ); ?>
1085
  </div>
1086
  </script>
1087
  <?php
1088
  do_action( 'qsm_admin_after_single_answer_template' );
1089
  }
 
php/admin/options-page-results-page-tab.php CHANGED
@@ -42,11 +42,7 @@ function qsm_options_results_tab_content() {
42
  <section class="qsm-quiz-result-tab" style="margin-top: 15px;">
43
  <button class="save-pages button-primary"><?php esc_html_e( 'Save Results Pages', 'quiz-master-next' ); ?></button>
44
  <button class="add-new-page button"><?php esc_html_e( 'Add New Results Page', 'quiz-master-next' ); ?></button>
45
- <a style="float: right;" class="qsm-show-all-variable-text"
46
- href="javascript:void(0)"><?php esc_html_e( 'Insert Template Variables', 'quiz-master-next' ); ?> <span
47
- class="dashicons dashicons-upload"></span></a>
48
- <a style="margin: 0 10px; float: right;" href="https://quizandsurveymaster.com/docs/v7/results-pages-tab/"
49
- target="_blank" rel="noopener">View Documentation</a>
50
  <div id="results-pages">
51
  <div style="margin-bottom: 30px;margin-top: 35px;" class="qsm-spinner-loader"></div>
52
  </div>
42
  <section class="qsm-quiz-result-tab" style="margin-top: 15px;">
43
  <button class="save-pages button-primary"><?php esc_html_e( 'Save Results Pages', 'quiz-master-next' ); ?></button>
44
  <button class="add-new-page button"><?php esc_html_e( 'Add New Results Page', 'quiz-master-next' ); ?></button>
45
+ <a class="qsm-show-all-variable-text" href="javascript:void(0)"><?php esc_html_e( 'Insert Template Variables', 'quiz-master-next' ); ?> <span class="dashicons dashicons-upload"></span></a>
 
 
 
 
46
  <div id="results-pages">
47
  <div style="margin-bottom: 30px;margin-top: 35px;" class="qsm-spinner-loader"></div>
48
  </div>
php/admin/options-page-text-tab.php CHANGED
@@ -27,7 +27,6 @@ function mlw_options_text_tab_content() {
27
  $variable_list = qsm_text_template_variable_list();
28
  ?>
29
  <div class="qsm-text-main-wrap">
30
- <p style="text-align: right;"><a href="https://quizandsurveymaster.com/docs/v7/text-tab/" target="_blank"><?php esc_html_e( 'View Documentation', 'quiz-master-next' ); ?></a></p>
31
  <div id="poststuff">
32
  <div id="post-body" class="metabox-holder columns-2">
33
  <div class="qsm-question-text-tab" id="post-body-content" style="position: relative;">
@@ -74,8 +73,10 @@ function mlw_options_text_tab_content() {
74
  </div>
75
  <div id="postbox-container-1" class="postbox-container">
76
  <div class="qsm-text-header">
77
- <h5><?php esc_html_e('Allowed Variables', 'quiz-master-next'); ?></h5>
78
- <span class="description"><?php esc_html_e('click to insert the variable', 'quiz-master-next'); ?></span>
 
 
79
  </div>
80
  <div class="qsm-text-conent qsm-text-allowed-variables">
81
  <div class="qsm-text-tab-message-loader" style="display: none;"><div class="qsm-spinner-loader"></div></div>
@@ -98,9 +99,6 @@ function mlw_options_text_tab_content() {
98
  }
99
  ?>
100
  </div>
101
- <div style="display: none;" class="qsm-all-variable-wrap">
102
- <a class="qsm-show-all-variable-text" href="javascript:void(0)"><?php esc_html_e( 'Show all Variables', 'quiz-master-next' ); ?></a>
103
- </div>
104
  </div>
105
  </div>
106
  </div>
@@ -110,6 +108,7 @@ function mlw_options_text_tab_content() {
110
  <div class="qsm-text-label-wrapper">
111
  <h2><?php esc_html_e("Customize Labels", 'quiz-master-next'); ?></h2>
112
  <?php
 
113
  $mlwQuizMasterNext->pluginHelper->generate_settings_section( 'quiz_text', $text_text_arr );
114
  ?>
115
  </div>
@@ -170,12 +169,14 @@ add_action( 'wp_ajax_qsm_get_question_text_message', 'qsm_get_question_text_mess
170
  */
171
  function qsm_update_text_message(){
172
  global $mlwQuizMasterNext;
 
173
  $text_id = isset( $_POST['text_id'] ) ? sanitize_text_field( wp_unslash( $_POST['text_id'] ) ) : '';
174
  $message = isset( $_POST['message'] ) ? wp_kses_post( wp_unslash( $_POST['message'] ) ) : '';
175
  $settings = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_text' );
176
  $settings[ $text_id ] = $message;
177
  $results = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'quiz_text', $settings );
178
  if ( false !== $results ) {
 
179
  $results = array(
180
  'success' => true,
181
  );
@@ -189,4 +190,3 @@ function qsm_update_text_message(){
189
  exit;
190
  }
191
  add_action( 'wp_ajax_qsm_update_text_message', 'qsm_update_text_message' );
192
- ?>
27
  $variable_list = qsm_text_template_variable_list();
28
  ?>
29
  <div class="qsm-text-main-wrap">
 
30
  <div id="poststuff">
31
  <div id="post-body" class="metabox-holder columns-2">
32
  <div class="qsm-question-text-tab" id="post-body-content" style="position: relative;">
73
  </div>
74
  <div id="postbox-container-1" class="postbox-container">
75
  <div class="qsm-text-header">
76
+ <h5>
77
+ <?php esc_html_e('Allowed Variables', 'quiz-master-next'); ?>
78
+ <span class="description"><?php esc_html_e('click to insert the variable', 'quiz-master-next'); ?></span>
79
+ </h5>
80
  </div>
81
  <div class="qsm-text-conent qsm-text-allowed-variables">
82
  <div class="qsm-text-tab-message-loader" style="display: none;"><div class="qsm-spinner-loader"></div></div>
99
  }
100
  ?>
101
  </div>
 
 
 
102
  </div>
103
  </div>
104
  </div>
108
  <div class="qsm-text-label-wrapper">
109
  <h2><?php esc_html_e("Customize Labels", 'quiz-master-next'); ?></h2>
110
  <?php
111
+
112
  $mlwQuizMasterNext->pluginHelper->generate_settings_section( 'quiz_text', $text_text_arr );
113
  ?>
114
  </div>
169
  */
170
  function qsm_update_text_message(){
171
  global $mlwQuizMasterNext;
172
+ $quiz_id = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
173
  $text_id = isset( $_POST['text_id'] ) ? sanitize_text_field( wp_unslash( $_POST['text_id'] ) ) : '';
174
  $message = isset( $_POST['message'] ) ? wp_kses_post( wp_unslash( $_POST['message'] ) ) : '';
175
  $settings = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_text' );
176
  $settings[ $text_id ] = $message;
177
  $results = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'quiz_text', $settings );
178
  if ( false !== $results ) {
179
+ do_action( 'qsm_saved_text_message', $quiz_id, $text_id, $message );
180
  $results = array(
181
  'success' => true,
182
  );
190
  exit;
191
  }
192
  add_action( 'wp_ajax_qsm_update_text_message', 'qsm_update_text_message' );
 
php/admin/quiz-options-page.php CHANGED
@@ -24,12 +24,12 @@ function qsm_generate_quiz_options() {
24
  global $wpdb;
25
  global $mlwQuizMasterNext;
26
 
27
- //Check user capability
28
  $user = wp_get_current_user();
29
  if ( in_array( 'author', (array) $user->roles, true ) ) {
30
- $user_id = sanitize_text_field( $user->ID );
31
- $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
32
- $quiz_author_id = $wpdb->get_var( $wpdb->prepare( "SELECT quiz_author_id FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d AND quiz_author_id=%d LIMIT 1", $quiz_id, $user_id ) );
33
  if ( ! $quiz_author_id ) {
34
  wp_die( 'You are not allow to edit this quiz, You need higher permission!' );
35
  }
@@ -38,8 +38,8 @@ function qsm_generate_quiz_options() {
38
  $quiz_name = '';
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;
@@ -49,29 +49,29 @@ function qsm_generate_quiz_options() {
49
  }
50
  wp_localize_script( 'qsm_admin_js', 'qsmTextTabObject', array( 'quiz_id' => $quiz_id ) );
51
  // Edit Quiz Name.
52
- if ( isset( $_POST['qsm_edit_name_quiz_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_edit_name_quiz_nonce'] ) ) , 'qsm_edit_name_quiz' ) ) {
53
- //$quiz_id = intval( $_POST['edit_quiz_id'] );
54
  $quiz_name = isset( $_POST['edit_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['edit_quiz_name'] ) ) : '';
55
- $mlwQuizMasterNext->quizCreator->edit_quiz_name( $quiz_id, $quiz_name );
 
56
  }
57
- //Update post status
58
  if ( isset( $_POST['qsm_update_quiz_status_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_update_quiz_status_nonce'] ) ), 'qsm_update_quiz_status' ) ) {
59
- $quiz_post_id = isset( $_POST['quiz_post_id'] ) ? intval( $_POST['quiz_post_id'] ) : 0;
60
- $arg_post_arr = array(
61
  'ID' => $quiz_post_id,
62
  'post_status' => 'publish',
63
  );
64
- $update_status = wp_update_post( $arg_post_arr );
65
  if ( false !== $update_status ) {
66
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Quiz status has been updated successfully to publish.', 'quiz-master-next' ), 'success' );
67
- $mlwQuizMasterNext->audit_manager->new_audit( "Quiz/Survey Status Has Been Updated", $quiz_id,"" );
68
  } else {
69
  $mlwQuizMasterNext->alertManager->newAlert( __( 'An error occurred while trying to update the status of your quiz or survey. Please try again.', 'quiz-master-next' ), 'error' );
70
- $mlwQuizMasterNext->log_manager->add( 'Error when updating quiz status', "", 0, 'error' );
71
  }
72
  }
73
  // Get quiz post based on quiz id
74
- $args = array(
75
  'posts_per_page' => 1,
76
  'post_type' => 'qsm_quiz',
77
  'meta_query' => array(
@@ -82,59 +82,116 @@ function qsm_generate_quiz_options() {
82
  ),
83
  ),
84
  );
85
- $the_query = new WP_Query( $args );
86
 
87
  // The Loop
88
- $post_status = $post_id = $post_permalink = $edit_link = '';
89
  if ( $the_query->have_posts() ) {
90
  while ( $the_query->have_posts() ) {
91
  $the_query->the_post();
92
- $post_permalink = get_the_permalink( get_the_ID() );
93
- $post_status = get_post_status( get_the_ID() );
94
- $edit_link = get_edit_post_link( get_the_ID() );
95
- $post_id = get_the_ID();
96
  }
97
  /* Restore original Post Data */
98
  wp_reset_postdata();
99
  }
 
 
 
100
  ?>
101
  <div class="wrap" id="mlw_quiz_wrap">
102
  <div class='mlw_quiz_options' id="mlw_quiz_options">
103
- <h1 id="qsm_title_quiz" style="margin-bottom: 10px;">
104
- <?php echo wp_kses_post( $quiz_name ); ?>
105
- <?php if ( 'draft' === $post_status ) : ?>
106
- <form method="POST" action="">
107
- <?php wp_nonce_field( 'qsm_update_quiz_status', 'qsm_update_quiz_status_nonce' ); ?>
108
- <input type="hidden" name="quiz_post_id" value="<?php echo esc_attr( $post_id ); ?>" />
109
- <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Publish Quiz', 'quiz-master-next' ); ?>" />
110
- </form>
111
- <?php endif; ?>
112
- <a href="javascript:void(0)" title="Edit Name" class="edit-quiz-name">
113
- <span class="dashicons dashicons-edit"></span>
114
- </a>
115
- <a class="button button-default qsm-btn-quiz-edit" rel="noopener" target="_blank" href="<?php echo esc_url( $post_permalink ); ?>">
116
- <span class="dashicons dashicons-welcome-view-site"></span>
117
- </a>
118
- <a class="button button-default qsm-btn-quiz-edit" href="<?php echo esc_url( $edit_link ); ?>">
119
- <span class="dashicons dashicons-admin-settings"></span>
120
- </a>
121
- </h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  <div class="qsm-alerts-placeholder"></div>
123
  <!-- Shows warnings, alerts then tab content -->
 
124
  <?php $mlwQuizMasterNext->alertManager->showWarnings(); ?>
125
  <div class="qsm-alerts">
126
  <?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
127
  </div>
128
- <?php if ( $quiz_id ) { ?>
 
 
129
  <nav class="nav-tab-wrapper">
130
  <?php
131
  // Cycles through registered tabs to create navigation.
132
  foreach ( $tab_array as $tab ) {
133
- $active_class = '';
134
- if ( $active_tab === $tab['slug'] ) {
135
- $active_class = 'nav-tab-active';
 
 
 
 
 
 
 
 
136
  }
137
- ?><a href="?page=mlw_quiz_options&quiz_id=<?php echo esc_attr( $quiz_id ); ?>&tab=<?php echo esc_attr( $tab['slug'] ); ?>" class="nav-tab <?php echo esc_attr( $active_class ); ?>"><?php echo wp_kses_post( $tab['title'] ); ?></a><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
  ?>
140
  </nav>
@@ -163,18 +220,19 @@ function qsm_generate_quiz_options() {
163
  qsm_show_adverts();
164
  ?>
165
  </div>
166
- <div class="qsm-popup qsm-popup-slide" id="modal-3" aria-hidden="false">
167
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
168
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-3-title">
169
  <header class="qsm-popup__header">
170
- <h2 class="qsm-popup__title" id="modal-3-title">Edit Name</h2>
171
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
172
  </header>
173
  <main class="qsm-popup__content" id="modal-3-content">
174
  <form action='' method='post' id="edit-name-form">
175
  <label><?php esc_html_e( 'Name', 'quiz-master-next' ); ?></label>
176
- <input type="text" id="edit_quiz_name" name="edit_quiz_name" value="<?php echo esc_attr( $quiz_name ); ?>" />
177
  <input type="hidden" id="edit_quiz_id" name="edit_quiz_id" value="<?php echo isset( $_GET['quiz_id'] ) && is_int( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : '0'; ?>" />
 
178
  <?php wp_nonce_field( 'qsm_edit_name_quiz', 'qsm_edit_name_quiz_nonce' ); ?>
179
  </form>
180
  </main>
@@ -185,6 +243,31 @@ function qsm_generate_quiz_options() {
185
  </div>
186
  </div>
187
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  </div><!-- Backbone Views -->
189
  <script type="text/javascript">jQuery(document).ready(function(){jQuery(".qsm-alerts-placeholder").length>0&&jQuery(".qsm-alerts").length>0&&jQuery(".qsm-alerts-placeholder").replaceWith(jQuery(".qsm-alerts"))});</script>
190
  <?php
@@ -196,7 +279,7 @@ function qsm_generate_quiz_options() {
196
  *
197
  * @since 7.3.5
198
  */
199
- function qsm_quiz_options_notice_template(){
200
  ?>
201
  <!-- View for Notices -->
202
  <script type="text/template" id="tmpl-notice">
@@ -206,4 +289,4 @@ function qsm_quiz_options_notice_template(){
206
  </script>
207
  <?php
208
  }
209
- ?>
24
  global $wpdb;
25
  global $mlwQuizMasterNext;
26
 
27
+ // Check user capability
28
  $user = wp_get_current_user();
29
  if ( in_array( 'author', (array) $user->roles, true ) ) {
30
+ $user_id = sanitize_text_field( $user->ID );
31
+ $quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
32
+ $quiz_author_id = $wpdb->get_var( $wpdb->prepare( "SELECT quiz_author_id FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id=%d AND quiz_author_id=%d LIMIT 1", $quiz_id, $user_id ) );
33
  if ( ! $quiz_author_id ) {
34
  wp_die( 'You are not allow to edit this quiz, You need higher permission!' );
35
  }
38
  $quiz_name = '';
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;
49
  }
50
  wp_localize_script( 'qsm_admin_js', 'qsmTextTabObject', array( 'quiz_id' => $quiz_id ) );
51
  // Edit Quiz Name.
52
+ if ( isset( $_POST['qsm_edit_name_quiz_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_edit_name_quiz_nonce'] ) ), 'qsm_edit_name_quiz' ) ) {
 
53
  $quiz_name = isset( $_POST['edit_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['edit_quiz_name'] ) ) : '';
54
+ $post_id = isset( $_POST['edit_quiz_post_id'] ) ? sanitize_text_field( wp_unslash( $_POST['edit_quiz_post_id'] ) ) : '';
55
+ $mlwQuizMasterNext->quizCreator->edit_quiz_name( $quiz_id, $quiz_name, $post_id );
56
  }
57
+ // Update post status
58
  if ( isset( $_POST['qsm_update_quiz_status_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_update_quiz_status_nonce'] ) ), 'qsm_update_quiz_status' ) ) {
59
+ $quiz_post_id = isset( $_POST['quiz_post_id'] ) ? intval( $_POST['quiz_post_id'] ) : 0;
60
+ $arg_post_arr = array(
61
  'ID' => $quiz_post_id,
62
  'post_status' => 'publish',
63
  );
64
+ $update_status = wp_update_post( $arg_post_arr );
65
  if ( false !== $update_status ) {
66
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Quiz status has been updated successfully to publish.', 'quiz-master-next' ), 'success' );
67
+ $mlwQuizMasterNext->audit_manager->new_audit( 'Quiz/Survey Status Has Been Updated', $quiz_id, '' );
68
  } else {
69
  $mlwQuizMasterNext->alertManager->newAlert( __( 'An error occurred while trying to update the status of your quiz or survey. Please try again.', 'quiz-master-next' ), 'error' );
70
+ $mlwQuizMasterNext->log_manager->add( 'Error when updating quiz status', '', 0, 'error' );
71
  }
72
  }
73
  // Get quiz post based on quiz id
74
+ $args = array(
75
  'posts_per_page' => 1,
76
  'post_type' => 'qsm_quiz',
77
  'meta_query' => array(
82
  ),
83
  ),
84
  );
85
+ $the_query = new WP_Query( $args );
86
 
87
  // The Loop
88
+ $post_status = $post_id = $post_permalink = $edit_link = '';
89
  if ( $the_query->have_posts() ) {
90
  while ( $the_query->have_posts() ) {
91
  $the_query->the_post();
92
+ $post_permalink = get_the_permalink( get_the_ID() );
93
+ $post_status = get_post_status( get_the_ID() );
94
+ $edit_link = get_edit_post_link( get_the_ID() );
95
+ $post_id = get_the_ID();
96
  }
97
  /* Restore original Post Data */
98
  wp_reset_postdata();
99
  }
100
+
101
+ $qsm_core_tabs = array( 'questions', 'contact', 'text', 'options', 'emails', 'results-pages', 'style' );
102
+ $addon_tabs = '';
103
  ?>
104
  <div class="wrap" id="mlw_quiz_wrap">
105
  <div class='mlw_quiz_options' id="mlw_quiz_options">
106
+ <div class="qsm-quiz-nav-bar">
107
+ <div class="qsm-quiz-heading">
108
+ <span id="qsm_quiz_title" class="qsm_quiz_title"><?php echo wp_kses_post( $quiz_name ); ?></span>
109
+ <a href="javascript:void(0)" title="Edit Name" class="edit-quiz-name">
110
+ <span class="dashicons dashicons-edit"></span>
111
+ </a>
112
+ <?php if ( 'draft' === $post_status ) : ?>
113
+ <form method="POST" action="">
114
+ <?php wp_nonce_field( 'qsm_update_quiz_status', 'qsm_update_quiz_status_nonce' ); ?>
115
+ <input type="hidden" name="quiz_post_id" value="<?php echo esc_attr( $post_id ); ?>" />
116
+ <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Publish Quiz', 'quiz-master-next' ); ?>" />
117
+ </form>
118
+ <?php endif; ?>
119
+ </div>
120
+ <div class="qsm-quiz-top-nav-links">
121
+ <a class="qsm-btn-quiz-edit" rel="noopener" target="_blank" href="<?php echo esc_url( $post_permalink ); ?>">
122
+ <span class="dashicons dashicons-external"></span><?php esc_html_e( 'View Quiz', 'quiz-master-next' ); ?>
123
+ </a>
124
+ <a class="qsm-btn-quiz-edit" href="<?php echo esc_url( $edit_link ); ?>">
125
+ <span class="dashicons dashicons-admin-settings"></span><?php esc_html_e( 'Settings', 'quiz-master-next' ); ?>
126
+ </a>
127
+ <a href="javascript:void(0)" class="qsm-btn-quiz-edit qsm-help-tab-handle" rel="noopener">
128
+ <span class="dashicons dashicons-editor-help"></span><?php esc_html_e( 'Help', 'quiz-master-next' ); ?>
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>
143
  <div class="qsm-alerts-placeholder"></div>
144
  <!-- Shows warnings, alerts then tab content -->
145
+ <h1 style="display: none;"><?php echo wp_kses_post( $quiz_name ); ?></h1><!-- Do Not Remove this H1. This is required to display notices. -->
146
  <?php $mlwQuizMasterNext->alertManager->showWarnings(); ?>
147
  <div class="qsm-alerts">
148
  <?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
149
  </div>
150
+ <?php if ( $quiz_id ) {
151
+ $active_class_aadon = true;
152
+ ?>
153
  <nav class="nav-tab-wrapper">
154
  <?php
155
  // Cycles through registered tabs to create navigation.
156
  foreach ( $tab_array as $tab ) {
157
+ if ( in_array( $tab['slug'], $qsm_core_tabs, true ) ) {
158
+ $active_class = '';
159
+ if ( $active_tab === $tab['slug'] ) {
160
+ $active_class = 'nav-tab-active';
161
+ $active_class_aadon = false;
162
+ }
163
+ ?>
164
+ <a href="?page=mlw_quiz_options&quiz_id=<?php echo esc_attr( $quiz_id ); ?>&tab=<?php echo esc_attr( $tab['slug'] ); ?>" class="nav-tab <?php echo esc_attr( $active_class ); ?>"><?php echo wp_kses_post( $tab['title'] ); ?></a>
165
+ <?php
166
+ } else {
167
+ $addon_tabs++;
168
  }
169
+ }
170
+ if ( 0 < $addon_tabs ) {
171
+ ?>
172
+ <div class="qsm-option-tab-dropdown">
173
+ <a href="javascript:void(0)" class="nav-tab <?php echo $active_class_aadon ? 'nav-tab-active' : ''; ?>">
174
+ <!--<img class="qsm-tab-icon" alt="" src="<?php echo esc_url( QSM_PLUGIN_URL.'assets/Puzzle.svg' ); ?>">-->
175
+ <?php esc_html_e( 'Add-ons', 'quiz-master-next' ); ?>
176
+ <span class="dashicons dashicons-arrow-down"></span>
177
+ </a>
178
+ <div class="qsm-option-tab-dropdown-list">
179
+ <?php
180
+ foreach ( $tab_array as $tab ) {
181
+ if ( ! in_array( $tab['slug'], $qsm_core_tabs, true ) ) {
182
+ $active_class = '';
183
+ if ( $active_tab === $tab['slug'] ) {
184
+ $active_class = 'nav-tab-active';
185
+ }
186
+ ?>
187
+ <a href="?page=mlw_quiz_options&quiz_id=<?php echo esc_attr( $quiz_id ); ?>&tab=<?php echo esc_attr( $tab['slug'] ); ?>" class="nav-tab qsm-option-tab-dropdown-item <?php echo esc_attr( $active_class ); ?>"><?php echo wp_kses_post( $tab['title'] ); ?></a>
188
+ <?php
189
+ }
190
+ }
191
+ ?>
192
+ </div>
193
+ </div>
194
+ <?php
195
  }
196
  ?>
197
  </nav>
220
  qsm_show_adverts();
221
  ?>
222
  </div>
223
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-3" aria-hidden="false">
224
  <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">
225
  <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-3-title">
226
  <header class="qsm-popup__header">
227
+ <h2 class="qsm-popup__title" id="modal-3-title"><?php esc_html_e( 'Edit Name', 'quiz-master-next' ); ?></h2>
228
  <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close=""></a>
229
  </header>
230
  <main class="qsm-popup__content" id="modal-3-content">
231
  <form action='' method='post' id="edit-name-form">
232
  <label><?php esc_html_e( 'Name', 'quiz-master-next' ); ?></label>
233
+ <input type="text" id="edit_quiz_name" class="regular-text" name="edit_quiz_name" value="<?php echo esc_attr( $quiz_name ); ?>" />
234
  <input type="hidden" id="edit_quiz_id" name="edit_quiz_id" value="<?php echo isset( $_GET['quiz_id'] ) && is_int( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : '0'; ?>" />
235
+ <input type="hidden" id="edit_quiz_post_id" name="edit_quiz_post_id" value="<?php echo get_the_ID(); ?>" />
236
  <?php wp_nonce_field( 'qsm_edit_name_quiz', 'qsm_edit_name_quiz_nonce' ); ?>
237
  </form>
238
  </main>
243
  </div>
244
  </div>
245
  </div>
246
+ <!-- set global setting popup start -->
247
+ <div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="qsm-global-default-popup" aria-hidden="true">
248
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
249
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
250
+ <header class="qsm-popup__header">
251
+ <h2 class="qsm-popup__title" id="modal-1-title"><?php esc_html_e( 'Are you sure?', 'quiz-master-next' ); ?></h2>
252
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
253
+ </header>
254
+ <main class="qsm-popup__content" id="qsm-global-default-popup-content">
255
+ <p>
256
+ <?php esc_html_e( 'Do you want to continue and reset all the settings as per', 'quiz-master-next' ); ?>
257
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=qmn_global_settings&tab=quiz-default-options' ) );?>" target="_blank"><?php esc_html_e( 'global defaults', 'quiz-master-next' ); ?></a> ?
258
+ </p>
259
+ </main>
260
+ <footer class="qsm-popup__footer">
261
+ <button class="qsm-popup__btn" data-micromodal-close="" aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
262
+ <form action="" method="post">
263
+ <?php wp_nonce_field( 'set_global_default_settings','save_global_default_ettings_nonce' ); ?>
264
+ <button name="global_setting" class="button button-primary" type="submit"><?php esc_html_e( 'Continue', 'quiz-master-next' ); ?></button>
265
+ </form>
266
+ </footer>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ <!-- set global setting popup end -->
271
  </div><!-- Backbone Views -->
272
  <script type="text/javascript">jQuery(document).ready(function(){jQuery(".qsm-alerts-placeholder").length>0&&jQuery(".qsm-alerts").length>0&&jQuery(".qsm-alerts-placeholder").replaceWith(jQuery(".qsm-alerts"))});</script>
273
  <?php
279
  *
280
  * @since 7.3.5
281
  */
282
+ function qsm_quiz_options_notice_template() {
283
  ?>
284
  <!-- View for Notices -->
285
  <script type="text/template" id="tmpl-notice">
289
  </script>
290
  <?php
291
  }
292
+ ?>
php/admin/quizzes-page.php CHANGED
@@ -8,769 +8,499 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
10
 
11
- /**
12
- * Generates the quizzes and surveys page
13
- *
14
- * @since 5.0
15
- */
16
- function qsm_generate_quizzes_surveys_page() {
17
 
18
- // Only let admins and editors see this page.
19
- if ( ! current_user_can( 'edit_posts' ) ) {
20
- return;
21
- }
22
-
23
- // Retrieve our globals.
24
- global $wpdb;
25
- global $mlwQuizMasterNext;
 
 
 
 
 
 
 
 
 
26
 
27
- // Delete quiz.
28
- if ( isset( $_POST['qsm_delete_quiz_nonce'], $_POST['delete_quiz_id'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_delete_quiz_nonce'] ) ), 'qsm_delete_quiz' ) ) {
29
- $quiz_id = sanitize_text_field( wp_unslash( $_POST['delete_quiz_id'] ) );
30
- $quiz_id = intval( str_replace( 'QID', '', $quiz_id ) );
31
- do_action( 'qsm_before_delete_quiz', $quiz_id );
32
- $quiz_name = isset( $_POST['delete_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['delete_quiz_name'] ) ) : '';
33
- $mlwQuizMasterNext->quizCreator->delete_quiz( $quiz_id, $quiz_name );
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- // Duplicate Quiz.
37
- if ( isset( $_POST['qsm_duplicate_quiz_nonce'], $_POST['duplicate_quiz_id'], $_POST['duplicate_new_quiz_name'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_duplicate_quiz_nonce'] ) ), 'qsm_duplicate_quiz' ) ) {
38
- $quiz_id = sanitize_text_field( wp_unslash( $_POST['duplicate_quiz_id'] ) );
39
- $quiz_id = intval( str_replace( 'QID', '', $quiz_id ) );
40
- $quiz_name = isset( $_POST['duplicate_new_quiz_name'] ) ? htmlspecialchars( sanitize_text_field( wp_unslash( $_POST['duplicate_new_quiz_name'] ) ), ENT_QUOTES ) : '';
41
- $mlwQuizMasterNext->quizCreator->duplicate_quiz( $quiz_id, $quiz_name, isset( $_POST['duplicate_questions'] ) ? sanitize_text_field( wp_unslash( $_POST['duplicate_questions'] ) ) : 0 );
42
- }
 
 
43
 
44
- // Resets stats for a quiz.
45
- if ( isset( $_POST['qsm_reset_stats_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_reset_stats_nonce'] ) ), 'qsm_reset_stats' ) ) {
46
- $quiz_id = isset( $_POST['reset_quiz_id'] ) ? intval( $_POST['reset_quiz_id'] ) : '';
47
- $quiz_post_id = $wpdb->get_var( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'quiz_id' AND meta_value = '$quiz_id'" );
48
- if ( empty( $quiz_post_id ) || ! current_user_can( 'edit_post', $quiz_post_id ) ) {
49
- $mlwQuizMasterNext->alertManager->newAlert( __( 'Sorry, you are not allowed to reset this quiz.', 'quiz-master-next' ), 'error' );
50
- } else {
51
- $results = $wpdb->update(
52
- $wpdb->prefix . 'mlw_quizzes',
53
- array(
54
- 'quiz_views' => 0,
55
- 'quiz_taken' => 0,
56
- 'last_activity' => gmdate( 'Y-m-d H:i:s' ),
57
- ),
58
- array( 'quiz_id' => $quiz_id ),
59
- array(
60
- '%d',
61
- '%d',
62
- '%s',
63
- ),
64
- array( '%d' )
65
- );
66
- if ( false !== $results ) {
67
- $mlwQuizMasterNext->alertManager->newAlert( __( 'The stats has been reset successfully.', 'quiz-master-next' ), 'success' );
68
- $mlwQuizMasterNext->audit_manager->new_audit( 'Quiz Stats Have Been Reset', $quiz_id, '' );
69
- } else {
70
- $mlwQuizMasterNext->alertManager->newAlert( __( 'Error trying to reset stats. Please try again.', 'quiz-master-next' ), 'error' );
71
- $mlwQuizMasterNext->log_manager->add( 'Error resetting stats', $wpdb->last_error . ' from ' . $wpdb->last_query, 0, 'error' );
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
74
- }
75
-
76
- // Pagination.
77
- $paged = filter_input( INPUT_GET, 'paged' ) ? absint( filter_input( INPUT_GET, 'paged' ) ) : 1;
78
- $limit = 10; // number of rows in page.
79
 
80
- $current_user = get_current_user_id();
81
- $screen = get_current_screen();
82
- $screen_option = $screen->get_option( 'per_page', 'option' );
83
- $limit = get_user_meta( $current_user, $screen_option, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- if ( empty( $limit ) || $limit < 1 ) {
86
- // get the default value if none is set
87
- $limit = $screen->get_option( 'per_page', 'default' );
88
- }
89
- $offset = ( $paged - 1 ) * $limit;
90
- $where = '';
91
- $search = '';
92
- if ( isset( $_REQUEST['s'] ) && '' !== $_REQUEST['s'] ) {
93
- $search = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) );
94
- $where = " quiz_name LIKE '%$search%'";
95
- }
96
 
97
- // Multiple Delete quiz.
98
- if ( isset( $_POST['qsm_search_multiple_delete_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_search_multiple_delete_nonce'] ) ), 'qsm_search_multiple_delete' ) ) {
99
- if ( ( isset( $_POST['qsm-ql-action-top'] ) && 'delete_pr' === sanitize_text_field( wp_unslash( $_POST['qsm-ql-action-top'] ) ) ) || ( isset( $_POST['qsm-ql-action-bottom'] ) && 'delete_pr' === sanitize_text_field( wp_unslash( $_POST['qsm-ql-action-bottom'] ) ) ) ) {
100
- if ( isset( $_POST['chk_remove_all'] ) ) {
101
- $c_all = array_map( 'sanitize_text_field', wp_unslash( $_POST['chk_remove_all'] ) );
102
- foreach ( $c_all as $quiz_id ) {
103
- $mlwQuizMasterNext->quizCreator->delete_quiz( intval( $quiz_id ), intval( $quiz_id ) );
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
  }
 
106
  }
107
- }
108
- /*Set Request To Post as form method is Post.(AA)*/
109
- if ( isset( $_POST['btnSearchQuiz'] ) && isset( $_POST['s'] ) && ! empty( $_POST['s'] ) ) {
110
- $search = htmlspecialchars( sanitize_text_field( wp_unslash( $_POST['s'] ) ), ENT_QUOTES );
111
- $condition = " WHERE deleted=0 AND quiz_name LIKE '%$search%'";
112
- $qry = stripslashes( $wpdb->prepare( "SELECT COUNT('quiz_id') FROM {$wpdb->prefix}mlw_quizzes%1s", $condition ) );
113
- $total = $wpdb->get_var( $qry );
114
- $num_of_pages = ceil( $total / $limit );
115
- } else {
116
- $condition = ' WHERE deleted=0';
117
- $condition = apply_filters( 'quiz_query_condition_clause', $condition );
118
- $total = $wpdb->get_var( stripslashes( $wpdb->prepare( "SELECT COUNT(`quiz_id`) FROM {$wpdb->prefix}mlw_quizzes %1s", $condition ) ) );
119
- $num_of_pages = ceil( $total / $limit );
120
- }
121
-
122
- // Next and previous page.
123
- $next_page = (int) $paged + 1;
124
-
125
- if ( $next_page > $num_of_pages ) {
126
- $next_page = $num_of_pages;
127
- }
128
-
129
- $prev_page = (int) $paged - 1;
130
 
131
- if ( $prev_page < 1 ) {
132
- $prev_page = 1;
133
- }
134
-
135
- // Check user role and fetch the quiz
136
- $user = wp_get_current_user();
137
- if ( in_array( 'author', (array) $user->roles, true ) ) {
138
- $post_arr['author__in'] = array( $user->ID );
139
- }
140
- if ( isset( $_GET['order'] ) && 'asc' === sanitize_text_field( wp_unslash( $_GET['order'] ) ) ) {
141
- $post_arr['orderby'] = isset( $_GET['orderby'] ) && 'title' === sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) ? 'title' : 'last_activity';
142
- $post_arr['order'] = 'ASC';
143
- // Load our quizzes.
144
- $quizzes = $mlwQuizMasterNext->pluginHelper->get_quizzes( false, $post_arr['orderby'], 'ASC', (array) $user->roles, $user->ID, $limit, $offset, $where );
145
- } elseif ( isset( $_GET['order'] ) && 'desc' === sanitize_text_field( wp_unslash( $_GET['order'] ) ) ) {
146
- $post_arr['orderby'] = isset( $_GET['orderby'] ) && 'title' === sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) ? 'title' : 'last_activity';
147
- $post_arr['order'] = 'DESC';
148
- // Load our quizzes.
149
- $quizzes = $mlwQuizMasterNext->pluginHelper->get_quizzes( false, $post_arr['orderby'], 'DESC', (array) $user->roles, $user->ID, $limit, $offset, $where );
150
- } else {
151
- // Load our quizzes.
152
- $quizzes = $mlwQuizMasterNext->pluginHelper->get_quizzes( false, '', '', (array) $user->roles, $user->ID, $limit, $offset, $where );
153
- }
154
- /*Written to get results form search.(AA)*/
155
- if ( isset( $_POST['btnSearchQuiz'] ) && isset( $_POST['s'] ) && ! empty( $_POST['s'] ) ) {
156
- $search_quiz = htmlspecialchars( sanitize_text_field( wp_unslash( $_POST['s'] ) ), ENT_QUOTES );
157
- $condition = " WHERE deleted=0 AND quiz_name LIKE '%$search_quiz%'";
158
- $condition = apply_filters( 'quiz_query_condition_clause', $condition );
159
- $qry = stripslashes( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_quizzes%1s", $condition ) );
160
- $quizzes = $wpdb->get_results( $qry );
161
-
162
- }
163
-
164
- // Load quiz posts.
165
- $post_to_quiz_array = array();
166
- // Query for post
167
- $post_arr = array(
168
- 'post_type' => 'qsm_quiz',
169
- 'paged' => $paged,
170
- 'posts_per_page' => -1,
171
- 'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private' ),
172
- );
173
- $my_query = new WP_Query( $post_arr );
174
- if ( $my_query->have_posts() ) {
175
- while ( $my_query->have_posts() ) {
176
- $my_query->the_post();
177
- $post_to_quiz_array[ get_post_meta( get_the_ID(), 'quiz_id', true ) ] = array(
178
- 'link' => get_the_permalink( get_the_ID() ),
179
- 'id' => get_the_ID(),
180
- 'post_status' => get_post_status( get_the_ID() ),
181
- );
182
  }
183
- }
184
- wp_reset_postdata();
185
- $quiz_json_array = array();
186
- foreach ( $quizzes as $quiz ) {
187
- if ( ! isset( $post_to_quiz_array[ $quiz->quiz_id ] ) ) {
188
- $current_user = wp_get_current_user();
189
- $quiz_post = array(
190
- 'post_title' => $quiz->quiz_name,
191
- 'post_content' => "[qsm quiz={$quiz->quiz_id}]",
192
- // 'post_status' => 'publish',
193
- 'post_author' => $current_user->ID,
194
- 'post_type' => 'qsm_quiz',
195
- );
196
- $quiz_post_id = wp_insert_post( $quiz_post );
197
- add_post_meta( $quiz_post_id, 'quiz_id', $quiz->quiz_id );
198
- $post_to_quiz_array[ $quiz->quiz_id ] = array(
199
- 'link' => get_permalink( $quiz_post_id ),
200
- 'id' => $quiz_post_id,
201
- 'post_status' => get_post_status( $quiz_post_id ),
202
- );
 
 
 
 
203
  }
204
 
205
- $quiz_results_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(result_id) FROM {$wpdb->prefix}mlw_results WHERE `deleted`= 0 AND `quiz_id`= %d", $quiz->quiz_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
- $activity_date = gmdate( get_option( 'date_format' ), strtotime( $quiz->last_activity ) );
208
- $activity_time = gmdate( 'h:i:s A', strtotime( $quiz->last_activity ) );
 
 
 
 
 
209
 
210
- $quiz_json_array[] = array(
211
- 'id' => $quiz->quiz_id,
212
- 'name' => $quiz->quiz_name,
213
- 'link' => $post_to_quiz_array[ $quiz->quiz_id ]['link'],
214
- 'postID' => $post_to_quiz_array[ $quiz->quiz_id ]['id'],
215
- 'views' => $quiz->quiz_views,
216
- 'taken' => $quiz_results_count,
217
- 'lastActivity' => $activity_date,
218
- 'lastActivityDateTime' => $activity_date . ' ' . $activity_time,
219
- 'post_status' => $post_to_quiz_array[ $quiz->quiz_id ]['post_status'],
220
- );
221
- }
222
- $total_count = count( $quiz_json_array );
223
- wp_localize_script( 'qsm_admin_js', 'qsmQuizObject', $quiz_json_array );
224
- ?>
225
- <div class="wrap qsm-quizes-page">
226
- <h1>
227
- <?php esc_html_e( 'Quizzes/Surveys', 'quiz-master-next' ); ?>
228
- <a id="new_quiz_button" href="javascript:void(0)" class="add-new-h2"><?php esc_html_e( 'Add New', 'quiz-master-next' ); ?></a>
229
- </h1>
230
- <?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
231
- <?php
232
- if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
233
- ?>
234
- <div class="qsm-info-box">
235
- <p><?php esc_html_e( 'Your site is using PHP version', 'quiz-master-next' ); ?>
236
- <?php echo esc_html( PHP_VERSION ); ?>!
237
- <?php esc_html_e( 'Starting in QSM 6.0, your version of PHP will no longer be supported.', 'quiz-master-next' ); ?>
238
- <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"
239
- rel="noopener"><?php esc_html_e( "Click here to learn more about QSM's minimum PHP version change.", 'quiz-master-next' ); ?></a>
240
- </p>
241
- </div>
242
- <?php
243
  }
244
- ?>
245
- <form method="POST" id="posts-filter">
246
- <?php wp_nonce_field( 'qsm_search_multiple_delete', 'qsm_search_multiple_delete_nonce' ); ?>
247
- <div class="qsm-quizzes-page-content">
248
- <div class="
249
- <?php
250
- if ( 'false' !== get_option( 'mlw_advert_shows' ) ) {
251
- echo 'qsm-quiz-page-wrapper-with-ads';
 
252
  } else {
253
- echo 'qsm-quiz-page-wrapper';
254
  }
 
 
 
 
 
 
 
 
 
 
 
 
255
  ?>
256
- ">
257
- <p class="search-box">
258
- <label class="screen-reader-text"
259
- for="quiz_search"><?php esc_html_e( 'Search', 'quiz-master-next' ); ?></label>
260
- <!-- Changed Request to Post -->
261
- <input type="search" id="quiz_search" name="s"
262
- value="<?php echo isset( $_POST['s'] ) && '' !== $_POST['s'] ? esc_attr( sanitize_text_field( wp_unslash( $_POST['s'] ) ) ) : ''; ?>">
263
- <input id="search-submit" class="button" type="submit" name="btnSearchQuiz" value="Search Quiz">
264
- <?php if ( class_exists( 'QSM_Export_Import' ) ) { ?>
265
- <a class="button button-primary"
266
- href="<?php echo esc_url( admin_url() . 'admin.php?page=qmn_addons&tab=export-and-import' ); ?>"
267
- target="_blank" rel="noopener"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a>
268
- <?php } else { ?>
269
- <a id="show_import_export_popup" href="javascript:void(0)" style="position: relative;top: 0px;"
270
- class="add-new-h2 button-primary"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a>
271
- <?php } ?>
272
- </p>
273
- <div class="tablenav top">
274
- <div class="alignleft actions bulkactions">
275
- <select id="bulk-action-top" name="qsm-ql-action-top">
276
- <option selected="selected" value="none"><?php esc_html_e( 'Bulk Actions', 'quiz-master-next' ); ?>
277
- </option>
278
- <option value="delete_pr"><?php esc_html_e( 'Delete Permanently', 'quiz-master-next' ); ?></option>
279
- </select>
280
- <input id="bulk-submit" name="bulk-submit-top" class="button" type="button"
281
- value="<?php esc_attr_e( 'Apply', 'quiz-master-next' ); ?>">
282
- </div>
283
- <div class="tablenav-pages">
284
- <span
285
- class="displaying-num"><?php echo esc_html( number_format_i18n( $total ) . ' ' . sprintf( _n( 'item', 'items', $total, 'quiz-master-next' ), number_format_i18n( $total ) ) ); ?></span>
286
- <span class="pagination-links"
287
- <?php
288
- if ( (int) $num_of_pages <= 1 ) {
289
- echo 'style="display:none;"';
290
- }
291
- ?>
292
- >
293
- <?php if ( '1' == $paged ) { ?>
294
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&laquo;</span>
295
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&lsaquo;</span>
296
- <?php } else { ?>
297
- <a class="first-page button"
298
- href="<?php echo '?page=mlw_quiz_list&paged=1&s=' . esc_attr( $search ); ?>"
299
- title="<?php esc_attr_e( 'Go to the first page', 'quiz-master-next' ); ?>">&laquo;</a>
300
- <a class="prev-page button"
301
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $prev_page ) . '&s=' . esc_attr( $search ); ?>"
302
- title="<?php esc_attr_e( 'Go to the previous page', 'quiz-master-next' ); ?>">&lsaquo;</a>
303
- <?php } ?>
304
- <span class="paging-input">
305
- <span class="total-pages"><?php echo esc_html( $paged ); ?></span>
306
- <?php esc_html_e( 'of', 'quiz-master-next' ); ?>
307
- <span class="total-pages"><?php echo esc_html( $num_of_pages ); ?></span>
308
- </span>
309
- <?php if ( $paged === $num_of_pages ) { ?>
310
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>
311
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&raquo;</span>
312
- <?php } else { ?>
313
- <a class="next-page button"
314
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $next_page ) . '&s=' . esc_attr( $search ); ?>"
315
- title="<?php esc_attr_e( 'Go to the next page', 'quiz-master-next' ); ?>">&rsaquo;</a>
316
- <a class="last-page button"
317
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $num_of_pages ) . '&s=' . esc_attr( $search ); ?>"
318
- title="<?php esc_attr_e( 'Go to the last page', 'quiz-master-next' ); ?>">&raquo;</a>
319
- <?php } ?>
320
- </span>
321
- </div>
322
- </div>
323
- <table class="widefat">
324
- <?php
325
- $orderby_slug = '&orderby=title&order=asc';
326
- $orderby_date_slug = '&orderby=date&order=asc';
327
- $orderby_class = $orderby_date_class = 'sortable desc';
328
- // Title order
329
- if ( isset( $_GET['orderby'] ) && sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) === 'title' ) {
330
- if ( isset( $_GET['order'] ) && sanitize_text_field( wp_unslash( $_GET['order'] ) ) === 'asc' ) {
331
- $orderby_slug = '&orderby=title&order=desc';
332
- $orderby_class = 'sorted asc';
333
- } elseif ( isset( $_GET['order'] ) && sanitize_text_field( wp_unslash( $_GET['order'] ) ) === 'desc' ) {
334
- $orderby_slug = '&orderby=title&order=asc';
335
- $orderby_class = 'sorted desc';
336
- }
337
- } elseif ( isset( $_GET['orderby'] ) && sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) === 'date' ) {
338
- if ( isset( $_GET['order'] ) && sanitize_text_field( wp_unslash( $_GET['order'] ) ) === 'asc' ) {
339
- $orderby_date_slug = '&orderby=date&order=desc';
340
- $orderby_date_class = 'sorted asc';
341
- } elseif ( isset( $_GET['order'] ) && sanitize_text_field( wp_unslash( $_GET['order'] ) ) === 'desc' ) {
342
- $orderby_date_slug = '&orderby=date&order=asc';
343
- $orderby_date_class = 'sorted desc';
344
- }
345
- }
346
  ?>
347
- <thead>
348
- <tr>
349
- <td class="manage-column column-cb check-column" id="cb"><input type="checkbox"
350
- name="delete-all-shortcodes-1" id="delete-all-shortcodes-1" value="0"></td>
351
- <th class="<?php echo esc_attr( $orderby_class ); ?>">
352
- <?php
353
- $paged_slug = isset( $_GET['paged'] ) && '' !== $_GET['paged'] ? '&paged=' . sanitize_text_field( wp_unslash( $_GET['paged'] ) ) : '';
354
- $searched_slug = isset( $_GET['s'] ) && '' !== $_GET['s'] ? '&s=' . sanitize_text_field( wp_unslash( $_GET['s'] ) ) : '';
355
- $sorting_url = '?page=mlw_quiz_list' . $paged_slug . $searched_slug;
356
- ?>
357
- <a href="<?php echo esc_url( $sorting_url . $orderby_slug ); ?>">
358
- <span><?php esc_html_e( 'Title', 'quiz-master-next' ); ?></span>
359
- <span class="sorting-indicator"></span>
360
- </a>
361
- </th>
362
- <th><?php esc_html_e( 'Shortcode', 'quiz-master-next' ); ?></th>
363
- <th><?php esc_html_e( 'Views', 'quiz-master-next' ); ?></th>
364
- <th><?php esc_html_e( 'Participants', 'quiz-master-next' ); ?></th>
365
- <th class="<?php echo esc_attr( $orderby_date_class ); ?>">
366
- <a href="<?php echo esc_url( $sorting_url . $orderby_date_slug ); ?>">
367
- <span><?php esc_html_e( 'Last Modified', 'quiz-master-next' ); ?></span>
368
- <span class="sorting-indicator"></span>
369
- </a>
370
- </th>
371
- </tr>
372
- </thead>
373
- <tbody id="the-list">
374
- <?php
375
- if ( $quiz_json_array ) {
376
- foreach ( $quiz_json_array as $key => $single_arr ) {
377
- ?>
378
- <tr class="qsm-quiz-row" data-id="<?php echo esc_attr( $single_arr['id'] ); ?>">
379
- <th class="check-column">
380
- <input type="checkbox" class="chk_remove_all" name="chk_remove_all[]"
381
- id="chk_remove_all" value="<?php echo esc_attr( $single_arr['id'] ); ?>">
382
- </th>
383
- <td class="post-title column-title">
384
- <a class="row-title" href="admin.php?page=mlw_quiz_options&&quiz_id=<?php echo esc_attr( $single_arr['id'] ); ?>" aria-label="<?php echo esc_attr( $single_arr['name'] ); ?>"><?php echo esc_html( $single_arr['name'] ); ?> <strong style="color: #222; text-transform: capitalize;"><?php echo esc_html( 'publish' !== $single_arr['post_status'] ? '— ' . $single_arr['post_status'] : '' ); ?></strong>
385
- </a>
386
- <div class="row-actions">
387
- <a class="qsm-action-link" href="admin.php?page=mlw_quiz_options&&quiz_id=<?php echo esc_attr( $single_arr['id'] ); ?>"><?php esc_html_e( 'Edit', 'quiz-master-next' ); ?></a> |
388
- <a class="qsm-action-link qsm-action-link-duplicate" href="javascript:void(0)"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></a> |
389
- <a class="qsm-action-link qsm-action-link-delete" href="javascript:void(0)"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></a> |
390
- <a class="qsm-action-link" href="admin.php?page=mlw_quiz_results&quiz_id=<?php echo esc_attr( $single_arr['id'] ); ?>"><?php esc_html_e( 'View Results', 'quiz-master-next' ); ?></a> |
391
- <a class="qsm-action-link" target="_blank" rel="noopener" href="<?php echo esc_url( $single_arr['link'] ); ?>"><?php esc_html_e( 'Preview', 'quiz-master-next' ); ?></a>
392
- </div>
393
- </td>
394
- <td>
395
- <a href="javascript:void(0)" class="qsm-list-shortcode-view">
396
- <span class="dashicons dashicons-welcome-view-site"></span>
397
- </a>
398
- <div class="sc-content sc-embed">[qsm quiz=<?php echo esc_attr( $single_arr['id'] ); ?>]</div>
399
- <div class="sc-content sc-link">[qsm_link id=<?php echo esc_attr( $single_arr['id'] ); ?>]<?php esc_html_e( 'Click here', 'quiz-master-next' ); ?>[/qsm_link]
400
- </div>
401
- </td>
402
- <td>
403
- <?php echo esc_html( $single_arr['views'] ); ?>
404
- <div class="row-actions">
405
- <a class="qsm-action-link qsm-action-link-reset"
406
- href="javascript:void(0)"><?php esc_html_e( 'Reset', 'quiz-master-next' ); ?></a>
407
- </div>
408
- </td>
409
- <td class="comments column-comments" style="text-align: left;">
410
- <span class="post-com-count post-com-count-approved">
411
- <span class="comment-count-approved" aria-hidden="true"><?php echo esc_html( $single_arr['taken'] ); ?></span>
412
- <span class="screen-reader-text"><?php echo esc_html( $single_arr['taken'] . __( 'Participants', 'quiz-master-next' ) ); ?></span>
413
- </span>
414
- </td>
415
- <td>
416
- <abbr title="<?php echo esc_html( $single_arr['lastActivityDateTime'] ); ?>"><?php echo esc_html( $single_arr['lastActivity'] ); ?></abbr>
417
- </td>
418
- </tr>
419
- <?php
420
- }
421
- } else {
422
- ?>
423
- <tr>
424
- <td colspan="6" style="text-align: center;">
425
- <?php esc_html_e( 'No Quiz found!', 'quiz-master-next' ); ?>
426
- </td>
427
- </tr>
428
- <?php
429
- }
430
- ?>
431
- </tbody>
432
- <tfoot>
433
- <tr>
434
- <td class="manage-column column-cb check-column" id="cb"><input type="checkbox"
435
- name="delete-all-shortcodes-2" id="delete-all-shortcodes-2" value="0"></td>
436
- <th class="<?php echo esc_attr( $orderby_class ); ?>" scope="col">
437
- <a href="<?php echo esc_url( $sorting_url . $orderby_slug ); ?>">
438
- <span><?php esc_html_e( 'Title', 'quiz-master-next' ); ?></span>
439
- <span class="sorting-indicator"></span>
440
- </a>
441
- </th>
442
- <th><?php esc_html_e( 'Shortcode', 'quiz-master-next' ); ?></th>
443
- <th><?php esc_html_e( 'Views', 'quiz-master-next' ); ?></th>
444
- <th><?php esc_html_e( 'Participants', 'quiz-master-next' ); ?></th>
445
- <th class="<?php echo esc_attr( $orderby_date_class ); ?>" scope="col">
446
- <a href="<?php echo esc_url( $sorting_url . $orderby_date_slug ); ?>">
447
- <span><?php esc_html_e( 'Last Modified', 'quiz-master-next' ); ?></span>
448
- <span class="sorting-indicator"></span>
449
- </a>
450
- </th>
451
- </tr>
452
- </tfoot>
453
- </table>
454
- <div class="tablenav bottom">
455
- <select id="bulk-action-bottom" name="qsm-ql-action-bottom">
456
- <option selected="selected" value="none"><?php esc_html_e( 'Bulk Actions', 'quiz-master-next' ); ?>
457
- </option>
458
- <option value="delete_pr"><?php esc_html_e( 'Delete Permanently', 'quiz-master-next' ); ?></option>
459
- </select>
460
- <input id="bulk-submit" name="bulk-submit-bottom" class="button" type="button"
461
- value="<?php esc_attr_e( 'Apply', 'quiz-master-next' ); ?>">
462
- <div class="tablenav-pages">
463
- <span
464
- class="displaying-num"><?php echo esc_html( number_format_i18n( $total ) . ' ' . sprintf( _n( 'item', 'items', $total, 'quiz-master-next' ), number_format_i18n( $total ) ) ); ?></span>
465
- <span class="pagination-links"
466
- <?php
467
- if ( (int) $num_of_pages <= 1 ) {
468
- echo 'style="display:none;"';
469
- }
470
- ?>
471
- >
472
- <?php if ( '1' == $paged ) { ?>
473
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&laquo;</span>
474
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&lsaquo;</span>
475
- <?php } else { ?>
476
- <a class="first-page button"
477
- href="<?php echo '?page=mlw_quiz_list&paged=1&s=' . esc_attr( $search ); ?>"
478
- title="<?php esc_attr_e( 'Go to the first page', 'quiz-master-next' ); ?>">&laquo;</a>
479
- <a class="prev-page button"
480
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $prev_page ) . '&s=' . esc_attr( $search ); ?>"
481
- title="<?php esc_attr_e( 'Go to the previous page', 'quiz-master-next' ); ?>">&lsaquo;</a>
482
- <?php } ?>
483
- <span class="paging-input">
484
- <span class="total-pages"><?php echo esc_html( $paged ); ?></span>
485
- <?php esc_html_e( 'of', 'quiz-master-next' ); ?>
486
- <span class="total-pages"><?php echo esc_html( $num_of_pages ); ?></span>
487
- </span>
488
- <?php if ( $paged === $num_of_pages ) { ?>
489
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>
490
- <span class="tablenav-pages-navspan button disabled" aria-hidden="true">&raquo;</span>
491
- <?php } else { ?>
492
- <a class="next-page button"
493
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $next_page ) . '&s=' . esc_attr( $search ); ?>"
494
- title="<?php esc_attr_e( 'Go to the next page', 'quiz-master-next' ); ?>">&rsaquo;</a>
495
- <a class="last-page button"
496
- href="<?php echo '?page=mlw_quiz_list&paged=' . esc_attr( $num_of_pages ) . '&s=' . esc_attr( $search ); ?>"
497
- title="<?php esc_attr_e( 'Go to the last page', 'quiz-master-next' ); ?>">&raquo;</a>
498
- <?php } ?>
499
- </span>
500
  </div>
501
- </div>
502
- </div>
503
- </div>
504
- </form>
505
-
506
- <!-- Popup for resetting stats -->
507
- <div class="qsm-popup qsm-popup-slide" id="modal-1" aria-hidden="true">
508
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
509
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
510
- <header class="qsm-popup__header">
511
- <h2 class="qsm-popup__title" id="modal-1-title">
512
- <?php esc_html_e( 'Reset stats for this quiz?', 'quiz-master-next' ); ?></h2>
513
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
514
- </header>
515
- <main class="qsm-popup__content" id="modal-1-content">
516
- <p><?php esc_html_e( 'Are you sure you want to reset the stats to 0? All views and taken stats for this quiz will be reset. This is permanent and cannot be undone.', 'quiz-master-next' ); ?>
517
- </p>
518
- <form action="" method="post" id="reset_quiz_form">
519
- <?php wp_nonce_field( 'qsm_reset_stats', 'qsm_reset_stats_nonce' ); ?>
520
- <input type="hidden" id="reset_quiz_id" name="reset_quiz_id" value="0" />
521
- </form>
522
- </main>
523
- <footer class="qsm-popup__footer">
524
- <button id="reset-stats-button"
525
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Reset All Stats For Quiz', 'quiz-master-next' ); ?></button>
526
- <button class="qsm-popup__btn" data-micromodal-close
527
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
528
- </footer>
529
  </div>
530
- </div>
531
- </div>
532
-
533
- <!-- Popup for new quiz -->
534
- <?php qsm_create_new_quiz_wizard(); ?>
535
 
536
- <!-- Popup for duplicate quiz -->
537
- <div class="qsm-popup qsm-popup-slide" id="modal-4" aria-hidden="true">
538
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
539
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-4-title">
540
- <header class="qsm-popup__header">
541
- <h2 class="qsm-popup__title" id="modal-4-title"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></h2>
542
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
543
- </header>
544
- <main class="qsm-popup__content" id="modal-4-content">
545
- <form action='' method='post' id="duplicate-quiz-form">
546
- <label
547
- for="duplicate_questions"><?php esc_html_e( 'Duplicate questions also?', 'quiz-master-next' ); ?></label><input
548
- type="checkbox" name="duplicate_questions" id="duplicate_questions" /><br />
549
- <br />
550
- <label
551
- for="duplicate_new_quiz_name"><?php esc_html_e( 'Name Of New Quiz Or Survey:', 'quiz-master-next' ); ?></label><input
552
- type="text" id="duplicate_new_quiz_name" name="duplicate_new_quiz_name" />
553
- <input type="hidden" id="duplicate_quiz_id" name="duplicate_quiz_id" />
554
- <?php wp_nonce_field( 'qsm_duplicate_quiz', 'qsm_duplicate_quiz_nonce' ); ?>
555
- </form>
556
- </main>
557
- <footer class="qsm-popup__footer">
558
- <button id="duplicate-quiz-button"
559
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></button>
560
- <button class="qsm-popup__btn" data-micromodal-close
561
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
562
- </footer>
 
 
 
 
 
 
563
  </div>
564
- </div>
565
- </div>
566
-
567
- <!-- Popup for delete quiz -->
568
- <div class="qsm-popup qsm-popup-slide" id="modal-5" aria-hidden="true">
569
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
570
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
571
- <header class="qsm-popup__header">
572
- <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></h2>
573
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
574
- </header>
575
- <main class="qsm-popup__content" id="modal-5-content">
576
- <form action='' method='post' id="delete-quiz-form" style="display:flex; flex-direction:column;">
577
- <h3><b><?php esc_html_e( 'Are you sure you want to delete this quiz or survey?', 'quiz-master-next' ); ?></b>
578
- </h3>
579
- <label>
580
- <input type="checkbox" value="1" name="qsm_delete_question_from_qb" />
581
- <?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
582
- </label>
583
- <label>
584
- <input type="checkbox" name="qsm_delete_from_db" value="1"/>
585
- <?php esc_html_e( 'Delete items from database?', 'quiz-master-next' ); ?>
586
- </label>
587
- <?php wp_nonce_field( 'qsm_delete_quiz', 'qsm_delete_quiz_nonce' ); ?>
588
- <input type='hidden' id='delete_quiz_id' name='delete_quiz_id' value='' />
589
- <input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
590
- </form>
591
- </main>
592
- <footer class="qsm-popup__footer">
593
- <button id="delete-quiz-button"
594
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
595
- <button class="qsm-popup__btn" data-micromodal-close
596
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
597
- </footer>
598
  </div>
599
- </div>
600
- </div>
601
- <!-- Popup for bulk delete quiz -->
602
- <div class="qsm-popup qsm-popup-slide" id="modal-bulk-delete" aria-hidden="true">
603
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
604
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
605
- <header class="qsm-popup__header">
606
- <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Bulk Delete', 'quiz-master-next' ); ?></h2>
607
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
608
- </header>
609
- <main class="qsm-popup__content" id="modal-5-content">
610
- <form action='' method='post' id="bult-delete-quiz-form" style="display:flex; flex-direction:column;">
611
- <h3><b><?php esc_html_e( 'Are you sure you want to delete selected quiz or survey?', 'quiz-master-next' ); ?></b>
612
- </h3>
613
- <label>
614
- <input type="checkbox" name="qsm_delete_question_from_qb" checked="checked" />
615
- <?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
616
- </label>
617
- <label>
618
- <input type="checkbox" name="qsm_delete_from_db" />
619
- <?php esc_html_e( 'Delete items from database?', 'quiz-master-next' ); ?>
620
- </label>
621
- </form>
622
- </main>
623
- <footer class="qsm-popup__footer">
624
- <button id="bulk-delete-quiz-button"
625
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
626
- <button class="qsm-popup__btn" data-micromodal-close
627
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
628
- </footer>
 
 
 
629
  </div>
630
- </div>
631
- </div>
632
-
633
-
634
- <!-- Popup for export import upsell -->
635
- <div class="qsm-popup qsm-popup-slide" id="modal-export-import" aria-hidden="true">
636
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
637
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
638
- <header class="qsm-popup__header">
639
- <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Extend QSM', 'quiz-master-next' ); ?>
640
- </h2>
641
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
642
- </header>
643
- <main class="qsm-popup__content" id="modal-5-content">
644
- <h3><b><?php esc_html_e( 'Export functionality is provided as Premium addon.', 'quiz-master-next' ); ?></b>
645
- </h3>
646
- </main>
647
- <footer class="qsm-popup__footer">
648
- <a style="color: white; text-decoration: none;"
649
- href="https://quizandsurveymaster.com/downloads/export-import/" target="_blank"
650
- class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
651
- <button class="qsm-popup__btn" data-micromodal-close
652
- aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
653
- </footer>
 
 
 
 
 
 
654
  </div>
655
- </div>
656
- </div>
657
-
658
- <!-- Popup for delete quiz -->
659
- <div class="qsm-popup qsm-popup-slide" id="modal-6" aria-hidden="true">
660
- <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
661
- <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
662
- <header class="qsm-popup__header">
663
- <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Shortcode', 'quiz-master-next' ); ?></h2>
664
- <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
665
- </header>
666
- <main class="qsm-popup__content" id="modal-5-content">
667
- <div class="qsm-row" style="margin-bottom: 30px;">
668
- <lable><?php esc_html_e( 'Embed Shortcode', 'quiz-master-next' ); ?></lable>
669
- <input type="text" value="" id="sc-shortcode-model-text" style="width: 72%;padding: 5px;">
670
- <button class="button button-primary" id="sc-copy-shortcode"><span
671
- class="dashicons dashicons-admin-page"></span></button>
 
 
 
672
  </div>
673
- <div class="qsm-row">
674
- <lable><?php esc_html_e( 'Link Shortcode', 'quiz-master-next' ); ?></lable>
675
- <input type="text" value="" id="sc-shortcode-model-text-link" style="width: 72%;padding: 5px;">
676
- <button class="button button-primary" id="sc-copy-shortcode-link"><span
677
- class="dashicons dashicons-admin-page"></span></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
678
  </div>
679
- </main>
680
  </div>
681
- </div>
682
- </div>
683
- </div>
684
- <?php
685
- add_action( 'admin_footer', 'qsm_generate_quizzes_surveys_page_template' );
686
- }
687
-
688
- /**
689
- * @since 7.0
690
- * add per page option in screen option in Quiz list
691
- * @global string $qsm_quiz_list_page
692
- */
693
- function qsm_generate_quizzes_surveys_page_screen_options() {
694
- global $qsm_quiz_list_page;
695
- $screen = get_current_screen();
696
 
697
- // get out of here if we are not on our settings page
698
- if ( ! is_object( $screen ) || $screen->id !== $qsm_quiz_list_page ) {
699
- return;
700
- }
701
-
702
- $args = array(
703
- 'label' => __( 'Number of items per page:', 'quiz-master-next' ),
704
- 'default' => 10,
705
- 'option' => 'qsm_per_page',
706
- );
707
- add_screen_option( 'per_page', $args );
708
- }
 
 
 
 
709
 
710
- add_filter( 'set-screen-option', 'qsm_set_screen_option', 10, 3 );
711
- add_filter( 'set_screen_option_qsm_per_page', 'qsm_set_screen_option', 10, 3 );
712
- /**
713
- * @since 7.0
714
- * @param str $status
715
- * @param arr $option
716
- * @param str $value
717
- * @return str Save screen option value
718
- */
719
- function qsm_set_screen_option( $status, $option, $value ) {
720
- if ( 'qsm_per_page' === $option ) {
721
- return $value;
722
  }
723
- }
724
-
725
- /**
726
- * Generates the quizzes and surveys page templates
727
- *
728
- * @since 7.3.5
729
- */
730
- function qsm_generate_quizzes_surveys_page_template() {
731
- ?>
732
- <!-- Templates -->
733
- <script type="text/template" id="tmpl-no-quiz">
734
- <div class="qsm-no-quiz-wrapper">
735
- <span class="dashicons dashicons-format-chat"></span>
736
- <h2><?php esc_html_e( 'You do not have any quizzes or surveys yet', 'quiz-master-next' ); ?></h2>
737
- <div class="buttons">
738
- <a class="button button-primary button-hero qsm-wizard-noquiz" href="javascript:void(0)"><?php esc_html_e( 'Create New Quiz/Survey', 'quiz-master-next' ); ?></a>
739
- <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>
740
- </div>
741
- <h3><?php esc_html_e( 'or watch the below video to get started', 'quiz-master-next' ); ?></h3>
742
- <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>
743
- </div>
744
- </script>
745
 
746
- <script type="text/template" id="tmpl-quiz-row">
747
- <tr class="qsm-quiz-row" data-id="{{ data.id }}">
748
- <td class="post-title column-title">
749
- <a class="row-title" href="admin.php?page=mlw_quiz_options&&quiz_id={{ data.id }}" aria-label="{{ data.name }}">{{ data.name }} <b style="color: #222; text-transform: capitalize;">{{ data.post_status }}</b></a><a target="_blank" class="quiz-preview-link" href="{{ data.link }}"><span class="dashicons dashicons-external"></span></a>
750
- <div class="row-actions">
751
- <a class="qsm-action-link" href="admin.php?page=mlw_quiz_options&&quiz_id={{ data.id }}"><?php esc_html_e( 'Edit', 'quiz-master-next' ); ?></a> |
752
- <a class="qsm-action-link" href="post.php?post={{ data.postID }}&action=edit"><?php esc_html_e( 'Post Settings', 'quiz-master-next' ); ?></a> |
753
- <a class="qsm-action-link qsm-action-link-duplicate" href="javascript:void(0)"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></a> |
754
- <a class="qsm-action-link qsm-action-link-delete" href="javascript:void(0)"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></a> |
755
- <a class="qsm-action-link" target="_blank" href="{{ data.link }}"><?php esc_html_e( 'Preview', 'quiz-master-next' ); ?></a>
756
- </div>
757
- </td>
758
- <td>
759
- <p class="sc-opener"><span class="dashicons dashicons-editor-contract"></span> Embed</p>
760
- <div class="sc-content">[qsm quiz={{ data.id }}]</div>
761
- <p class="sc-opener"><span class="dashicons dashicons-admin-links"></span> Link</p>
762
- <div class="sc-content">[qsm_link id={{ data.id }}]<?php esc_html_e( 'Click here', 'quiz-master-next' ); ?>[/qsm_link]</div>
763
- </td>
764
- <td>
765
- {{ data.views }}/{{ data.taken }}
766
- <div class="row-actions">
767
- <a class="qsm-action-link qsm-action-link-reset" href="javascript:void(0)"><?php esc_html_e( 'Reset', 'quiz-master-next' ); ?></a> |
768
- <a class="qsm-action-link" href="admin.php?page=mlw_quiz_results&&quiz_id={{ data.id }}"><?php esc_html_e( 'Results', 'quiz-master-next' ); ?></a>
769
- </div>
770
- </td>
771
- <td><abbr title="{{ data.lastActivityDateTime }}">{{ data.lastActivity }}</abbr></td>
772
- </tr>
773
- </script>
774
- <?php
775
  }
776
- ?>
 
8
  exit;
9
  }
10
 
 
 
 
 
 
 
11
 
12
+ if ( ! class_exists( 'QSMQuizList' ) ) {
13
+
14
+ class QSMQuizList {
15
+
16
+ /**
17
+ * Main Construct Function
18
+ *
19
+ * Call functions within class
20
+ *
21
+ * @since 3.6.1
22
+ * @uses MLWQuizMasterNext::load_dependencies() Loads required filed
23
+ * @uses MLWQuizMasterNext::add_hooks() Adds actions to hooks and filters
24
+ * @return void
25
+ */
26
+ public function __construct() {
27
+ $this->add_hooks();
28
+ }
29
 
30
+ /**
31
+ * Add Hooks
32
+ *
33
+ * Adds functions to relavent hooks and filters
34
+ *
35
+ * @since 3.6.1
36
+ * @return void
37
+ */
38
+ private function add_hooks() {
39
+ add_action( 'admin_notices', array( $this, 'qsm_quiz_list_header' ), 0 );
40
+ add_action( 'load-edit.php', array( $this, 'qsm_process_post_row_actions' ), -99 );
41
+ add_filter( 'get_edit_post_link', array( $this, 'qsm_get_edit_post_link' ), 10, 2 );
42
+ add_filter( 'views_edit-qsm_quiz', array( $this, 'qsm_quiz_list_views_edit' ) );
43
+ add_filter( 'manage_qsm_quiz_posts_columns', array( $this, 'qsm_set_custom_edit_qsm_quiz_columns' ) );
44
+ add_action( 'manage_qsm_quiz_posts_custom_column', array( $this, 'qsm_custom_qsm_quiz_columns' ), 99, 2 );
45
+ add_filter( 'post_row_actions', array( $this, 'qsm_post_row_actions' ), 10, 2 );
46
+ add_filter( 'bulk_actions-edit-qsm_quiz', array( $this, 'qsm_quiz_edit_bulk_actions' ), 9999, 1 );
47
+ add_filter( 'handle_bulk_actions-edit-qsm_quiz', array( $this, 'qsm_quiz_bulk_action_handler' ), 10, 3 );
48
+ add_action( 'manage_posts_extra_tablenav', array( $this, 'qsm_manage_posts_extra_tablenav' ), 99, 1 );
49
+ add_action( 'admin_footer', array( $this, 'qsm_admin_footer_text' ) );
50
+ }
51
 
52
+ /**
53
+ * Filter views links for quiz post type
54
+ * @param type $views
55
+ * @return type
56
+ */
57
+ public function qsm_quiz_list_views_edit( $views ) {
58
+ unset( $views['trash'] );
59
+ return $views;
60
+ }
61
 
62
+ /**
63
+ * Add the custom columns to the quiz post type:
64
+ * @param array $columns
65
+ * @return type
66
+ */
67
+ public function qsm_set_custom_edit_qsm_quiz_columns( $columns ) {
68
+ if ( isset( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] ) {
69
+ return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
+ $sort_link = admin_url('edit.php?post_type=qsm_quiz&orderby=post_modified&order=asc');
72
+ if ( isset( $_GET['orderby'] ) && isset( $_GET['order'] ) && "post_modified" === $_GET['orderby'] && "asc" === $_GET['order'] ) {
73
+ $sort_link = admin_url('edit.php?post_type=qsm_quiz&orderby=post_modified&order=desc');
74
+ }
75
+ unset( $columns['author'] );
76
+ unset( $columns['comments'] );
77
+ unset( $columns['date'] );
78
+ $columns['shortcode'] = __( 'Shortcode', 'quiz-master-next' );
79
+ $columns['total_questions'] = __( 'No. of Questions', 'quiz-master-next' );
80
+ $columns['views'] = __( 'Views', 'quiz-master-next' );
81
+ $columns['participants'] = __( 'Participants', 'quiz-master-next' );
82
+ $columns['post_modified'] = "<a href='" . $sort_link . "'>" . __( 'Last Modified', 'quiz-master-next') . "</a>";
83
+ return $columns;
84
  }
 
 
 
 
 
85
 
86
+ /**
87
+ * Add the data to the custom columns for the quiz post type:
88
+ * @param type $column
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':
96
+ $shortcode_links = '<a href="#" class="qsm-list-shortcode-view"><span class="dashicons dashicons-welcome-view-site"></span></a>';
97
+ $shortcode_links .= '<div class="sc-content sc-embed">[qsm quiz=' . $quiz_id . ']</div>';
98
+ $shortcode_links .= '<div class="sc-content sc-link">[qsm_link id=' . $quiz_id . ']' . __( 'Click here', 'quiz-master-next' ) . '[/qsm_link]</div>';
99
+ echo wp_kses_post( $shortcode_links );
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':
108
+ $quiz_views = $wpdb->get_var( "SELECT `quiz_views` FROM `{$wpdb->prefix}mlw_quizzes` WHERE `quiz_id` = '{$quiz_id}'" );
109
+ $views_html = $quiz_views;
110
+ $views_html .= '<div class="row-actions">';
111
+ $views_html .= '<a class="qsm-action-link qsm-action-link-reset" href="#" data-id="' . esc_attr( $quiz_id ) . '">' . __( 'Reset', 'quiz-master-next' ) . '</a>';
112
+ $views_html .= '</div>';
113
+ echo wp_kses_post( $views_html );
114
+ break;
115
+
116
+ case 'participants':
117
+ $quiz_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM `{$wpdb->prefix}mlw_results` WHERE `deleted`= 0 AND `quiz_id`= '{$quiz_id}'" );
118
+ $participants = '<span class="column-comments">';
119
+ $participants .= '<span class="post-com-count post-com-count-approved">';
120
+ $participants .= '<span class="comment-count-approved" aria-hidden="true">' . $quiz_results_count . '</span>';
121
+ $participants .= '<span class="screen-reader-text">' . $quiz_results_count . __( 'Participants', 'quiz-master-next' ) . '</span>';
122
+ $participants .= '</span>';
123
+ $participants .= '</span>';
124
+ echo wp_kses_post( $participants );
125
+ break;
126
+
127
+ case 'post_modified':
128
+ $activity_date = get_the_modified_date( get_option( 'date_format' ),$post_id );
129
+ $activity_time = get_the_modified_date( 'h:i:s A', $post_id );
130
+ echo wp_kses_post( '<abbr title="' . $activity_date . ' ' . $activity_time . '">' . $activity_date . '<br/> ' . $activity_time . '</abbr>' );
131
+ break;
132
+ default:
133
+ break;
134
+ }
135
+ }
136
 
137
+ public function qsm_get_edit_post_link( $link, $post_id ) {
138
+ global $wpdb, $pagenow, $mlwQuizMasterNext;
139
+ if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'qsm_quiz' == $_GET['post_type'] ) {
140
+ $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
141
+ $link = admin_url( 'admin.php?page=mlw_quiz_options&quiz_id=' . $quiz_id );
142
+ }
143
+ return $link;
144
+ }
 
 
 
145
 
146
+ /**
147
+ * Add action links for each quiz post type
148
+ * @param array $actions
149
+ * @param type $post
150
+ * @return string
151
+ */
152
+ public function qsm_post_row_actions( $actions, $post ) {
153
+ $post_status = isset( $_REQUEST['post_status'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['post_status'] ) ) : 'all';
154
+ if ( 'qsm_quiz' == $post->post_type && 'trash' != $post_status ) {
155
+ $quiz_id = get_post_meta( $post->ID, 'quiz_id', true );
156
+ if ( ! empty( $quiz_id ) ) {
157
+ $actions = array(
158
+ 'edit' => '<a class="qsm-action-link" href="admin.php?page=mlw_quiz_options&quiz_id=' . esc_attr( $quiz_id ) . '">' . esc_html__( 'Edit', 'quiz-master-next' ) . '</a>',
159
+ 'duplicate' => '<a class="qsm-action-link qsm-action-link-duplicate" href="#" data-id="' . esc_attr( $quiz_id ) . '">' . esc_html__( 'Duplicate', 'quiz-master-next' ) . '</a>',
160
+ 'delete' => '<a class="qsm-action-link qsm-action-link-delete" href="#" data-id="' . esc_attr( $quiz_id ) . '" data-name="' . esc_attr( $post->post_title ) . '">' . esc_html__( 'Delete', 'quiz-master-next' ) . '</a>',
161
+ 'view_results' => '<a class="qsm-action-link" href="admin.php?page=mlw_quiz_results&quiz_id=' . esc_attr( $quiz_id ) . '">' . esc_html__( 'View Results', 'quiz-master-next' ) . '</a>',
162
+ 'view' => '<a class="qsm-action-link" target="_blank" rel="noopener" href="' . esc_url( get_permalink( $post->ID ) ) . '">' . esc_html__( 'Preview', 'quiz-master-next' ) . '</a>',
163
+ );
164
  }
165
  }
166
+ return $actions;
167
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
+ public function qsm_quiz_edit_bulk_actions( $bulk_actions ) {
170
+ unset( $bulk_actions['edit'] );
171
+ unset( $bulk_actions['trash'] );
172
+ $bulk_actions['delete_pr'] = __( 'Delete Permanently', 'quiz-master-next' );
173
+ return $bulk_actions;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  }
175
+
176
+ /**
177
+ * Delete Bulk Quiz
178
+ * @param type $redirect_to
179
+ * @param type $doaction
180
+ * @param type $post_ids
181
+ * @return type
182
+ */
183
+ public function qsm_quiz_bulk_action_handler( $redirect_to, $doaction, $post_ids ) {
184
+ global $mlwQuizMasterNext;
185
+ if ( 'delete_pr' == $doaction && ! empty( $post_ids ) ) {
186
+ $_POST['qsm_delete_from_db'] = isset( $_REQUEST['qsm_delete_from_db'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['qsm_delete_from_db'] ) ) : 0;
187
+ $_POST['qsm_delete_question_from_qb'] = isset( $_REQUEST['qsm_delete_question_from_qb'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['qsm_delete_question_from_qb'] ) ) : 0;
188
+ foreach ( $post_ids as $post_id ) {
189
+ $quiz_id = get_post_meta( $post_id, 'quiz_id', true );
190
+ do_action( 'qsm_before_delete_quiz', $quiz_id );
191
+ $quiz_name = get_the_title( $post_id );
192
+ $mlwQuizMasterNext->quizCreator->delete_quiz( $quiz_id, $quiz_name );
193
+ }
194
+ $QSMAlertManager = $mlwQuizMasterNext->alertManager->alerts;
195
+ setcookie( 'QSMAlertManager', wp_json_encode( $QSMAlertManager ), time() + 86400, COOKIEPATH, COOKIE_DOMAIN );
196
+ $redirect_to = add_query_arg( 'quiz_bulk_delete', count( $post_ids ), $redirect_to );
197
+ }
198
+ return $redirect_to;
199
  }
200
 
201
+ /**
202
+ * Handle custom link actions.
203
+ * @global type $wpdb
204
+ * @global type $mlwQuizMasterNext
205
+ */
206
+ public function qsm_process_post_row_actions() {
207
+ global $wpdb, $pagenow, $mlwQuizMasterNext;
208
+ if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'qsm_quiz' == $_GET['post_type'] ) {
209
+ // Delete quiz.
210
+ if ( isset( $_POST['qsm_delete_quiz_nonce'], $_POST['delete_quiz_id'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_delete_quiz_nonce'] ) ), 'qsm_delete_quiz' ) ) {
211
+ $quiz_id = sanitize_text_field( wp_unslash( $_POST['delete_quiz_id'] ) );
212
+ $quiz_id = intval( str_replace( 'QID', '', $quiz_id ) );
213
+ do_action( 'qsm_before_delete_quiz', $quiz_id );
214
+ $quiz_name = isset( $_POST['delete_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['delete_quiz_name'] ) ) : '';
215
+ $mlwQuizMasterNext->quizCreator->delete_quiz( $quiz_id, $quiz_name );
216
+ }
217
 
218
+ // Duplicate Quiz.
219
+ if ( isset( $_POST['qsm_duplicate_quiz_nonce'], $_POST['duplicate_quiz_id'], $_POST['duplicate_new_quiz_name'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_duplicate_quiz_nonce'] ) ), 'qsm_duplicate_quiz' ) ) {
220
+ $quiz_id = sanitize_text_field( wp_unslash( $_POST['duplicate_quiz_id'] ) );
221
+ $quiz_id = intval( str_replace( 'QID', '', $quiz_id ) );
222
+ $quiz_name = isset( $_POST['duplicate_new_quiz_name'] ) ? htmlspecialchars( sanitize_text_field( wp_unslash( $_POST['duplicate_new_quiz_name'] ) ), ENT_QUOTES ) : '';
223
+ $mlwQuizMasterNext->quizCreator->duplicate_quiz( $quiz_id, $quiz_name, isset( $_POST['duplicate_questions'] ) ? sanitize_text_field( wp_unslash( $_POST['duplicate_questions'] ) ) : 0 );
224
+ }
225
 
226
+ // Resets stats for a quiz.
227
+ if ( isset( $_POST['qsm_reset_stats_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['qsm_reset_stats_nonce'] ) ), 'qsm_reset_stats' ) ) {
228
+ $quiz_id = isset( $_POST['reset_quiz_id'] ) ? intval( $_POST['reset_quiz_id'] ) : '';
229
+ $quiz_post_id = $wpdb->get_var( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'quiz_id' AND meta_value = '$quiz_id'" );
230
+ if ( empty( $quiz_post_id ) || ! current_user_can( 'edit_post', $quiz_post_id ) ) {
231
+ $mlwQuizMasterNext->alertManager->newAlert( __( 'Sorry, you are not allowed to reset this quiz.', 'quiz-master-next' ), 'error' );
232
+ } else {
233
+ $results = $wpdb->update( $wpdb->prefix . 'mlw_quizzes', array(
234
+ 'quiz_views' => 0,
235
+ 'quiz_taken' => 0,
236
+ 'last_activity' => gmdate( 'Y-m-d H:i:s' ),
237
+ ), array( 'quiz_id' => $quiz_id ), array( '%d', '%d', '%s' ), array( '%d' )
238
+ );
239
+ if ( false !== $results ) {
240
+ $mlwQuizMasterNext->alertManager->newAlert( __( 'The stats has been reset successfully.', 'quiz-master-next' ), 'success' );
241
+ $mlwQuizMasterNext->audit_manager->new_audit( 'Quiz Stats Have Been Reset', $quiz_id, '' );
242
+ } else {
243
+ $mlwQuizMasterNext->alertManager->newAlert( __( 'Error trying to reset stats. Please try again.', 'quiz-master-next' ), 'error' );
244
+ $mlwQuizMasterNext->log_manager->add( 'Error resetting stats', $wpdb->last_error . ' from ' . $wpdb->last_query, 0, 'error' );
245
+ }
246
+ }
247
+ }
248
+ $QSMAlertManager = $mlwQuizMasterNext->alertManager->alerts;
249
+ setcookie( 'QSMAlertManager', wp_json_encode( $QSMAlertManager ), time() + 86400, COOKIEPATH, COOKIE_DOMAIN );
250
+ }
 
 
 
 
 
 
 
 
251
  }
252
+
253
+ public function qsm_manage_posts_extra_tablenav( $which ) {
254
+ global $wpdb, $pagenow, $mlwQuizMasterNext;
255
+ if ( 'top' != $which ) {
256
+ return;
257
+ }
258
+ if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'qsm_quiz' == $_GET['post_type'] ) {
259
+ if ( class_exists( 'QSM_Export_Import' ) ) {
260
+ ?><a class="button button-primary" href="<?php echo esc_url( admin_url() . 'admin.php?page=qmn_addons&tab=export-and-import' ); ?>" style="position: relative;top: 0px;" target="_blank" rel="noopener"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a><?php
261
  } else {
262
+ ?><a id="show_import_export_popup" href="#" style="position: relative;top: 0px;" class="add-new-h2 button-primary"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a><?php
263
  }
264
+ }
265
+ }
266
+
267
+ /**
268
+ * Add List Page Title row
269
+ * @global type $wpdb
270
+ * @global type $pagenow
271
+ * @global type $mlwQuizMasterNext
272
+ */
273
+ public function qsm_quiz_list_header() {
274
+ global $wpdb, $pagenow, $mlwQuizMasterNext;
275
+ if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'qsm_quiz' == $_GET['post_type'] ) {
276
  ?>
277
+ <div class="wrap qsm-quizes-page">
278
+ <h1>
279
+ <?php esc_html_e( 'Quizzes & Surveys', 'quiz-master-next' ); ?>
280
+ <a id="new_quiz_button" href="#" class="add-new-h2"><?php esc_html_e( 'Add New', 'quiz-master-next' ); ?></a>
281
+ </h1>
282
+ <?php
283
+ if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  ?>
285
+ <div class="qsm-info-box">
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
293
+ }
294
+ if ( isset( $_COOKIE['QSMAlertManager'] ) && ! empty( $_COOKIE['QSMAlertManager'] ) ) {
295
+ $mlwQuizMasterNext->alertManager->alerts = json_decode( sanitize_text_field( wp_unslash( $_COOKIE['QSMAlertManager'] ) ), true );
296
+ unset( $_COOKIE['QSMAlertManager'] );
297
+ }
298
+ $mlwQuizMasterNext->alertManager->showAlerts();
299
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  </div>
301
+ <div class="clear"></div>
302
+ <style type="text/css">.post-type-qsm_quiz .wrap .wp-heading-inline, .post-type-qsm_quiz .wrap .wp-heading-inline+.page-title-action {display: none !important;}</style>
303
+ <?php
304
+ }
305
+ }
306
 
307
+ /**
308
+ * Add popups in admin footer
309
+ * @global type $mlwQuizMasterNext
310
+ */
311
+ public function qsm_admin_footer_text() {
312
+ global $mlwQuizMasterNext;
313
+ if ( isset( $_REQUEST['post_type'] ) && 'qsm_quiz' == $_REQUEST['post_type'] ) {
314
+ ?>
315
+ <!-- Popup for resetting stats -->
316
+ <div class="qsm-popup qsm-popup-slide" id="modal-1" aria-hidden="true">
317
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
318
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
319
+ <header class="qsm-popup__header">
320
+ <h2 class="qsm-popup__title" id="modal-1-title">
321
+ <?php esc_html_e( 'Reset stats for this quiz?', 'quiz-master-next' ); ?></h2>
322
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
323
+ </header>
324
+ <main class="qsm-popup__content" id="modal-1-content">
325
+ <p><?php esc_html_e( 'Are you sure you want to reset the stats to 0? All views and taken stats for this quiz will be reset. This is permanent and cannot be undone.', 'quiz-master-next' ); ?>
326
+ </p>
327
+ <form action="" method="post" id="reset_quiz_form">
328
+ <?php wp_nonce_field( 'qsm_reset_stats', 'qsm_reset_stats_nonce' ); ?>
329
+ <input type="hidden" id="reset_quiz_id" name="reset_quiz_id" value="0" />
330
+ </form>
331
+ </main>
332
+ <footer class="qsm-popup__footer">
333
+ <button id="reset-stats-button"
334
+ class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Reset All Stats For Quiz', 'quiz-master-next' ); ?></button>
335
+ <button class="qsm-popup__btn" data-micromodal-close
336
+ aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
337
+ </footer>
338
+ </div>
339
+ </div>
340
  </div>
341
+ <!-- Popup for new quiz -->
342
+ <?php qsm_create_new_quiz_wizard(); ?>
343
+ <!-- Popup for duplicate quiz -->
344
+ <div class="qsm-popup qsm-popup-slide" id="modal-4" aria-hidden="true">
345
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
346
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-4-title">
347
+ <header class="qsm-popup__header">
348
+ <h2 class="qsm-popup__title" id="modal-4-title"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></h2>
349
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
350
+ </header>
351
+ <main class="qsm-popup__content" id="modal-4-content">
352
+ <form action='' method='post' id="duplicate-quiz-form">
353
+ <label for="duplicate_questions"><?php esc_html_e( 'Duplicate questions also?', 'quiz-master-next' ); ?></label>
354
+ <input type="checkbox" name="duplicate_questions" id="duplicate_questions" /><br />
355
+ <br />
356
+ <label for="duplicate_new_quiz_name"><?php esc_html_e( 'Name Of New Quiz Or Survey:', 'quiz-master-next' ); ?></label>
357
+ <input type="text" id="duplicate_new_quiz_name" name="duplicate_new_quiz_name" />
358
+ <input type="hidden" id="duplicate_quiz_id" name="duplicate_quiz_id" />
359
+ <?php wp_nonce_field( 'qsm_duplicate_quiz', 'qsm_duplicate_quiz_nonce' ); ?>
360
+ </form>
361
+ </main>
362
+ <footer class="qsm-popup__footer">
363
+ <button id="duplicate-quiz-button"
364
+ class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></button>
365
+ <button class="qsm-popup__btn" data-micromodal-close
366
+ aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
367
+ </footer>
368
+ </div>
369
+ </div>
 
 
 
 
 
370
  </div>
371
+ <!-- Popup for delete quiz -->
372
+ <div class="qsm-popup qsm-popup-slide" id="modal-5" aria-hidden="true">
373
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
374
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
375
+ <header class="qsm-popup__header">
376
+ <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></h2>
377
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
378
+ </header>
379
+ <main class="qsm-popup__content" id="modal-5-content">
380
+ <form action='' method='post' id="delete-quiz-form" style="display:flex; flex-direction:column;">
381
+ <h3><strong><?php esc_html_e( 'Are you sure you want to delete this quiz or survey?', 'quiz-master-next' ); ?></strong>
382
+ </h3>
383
+ <label>
384
+ <input type="checkbox" value="1" name="qsm_delete_question_from_qb" />
385
+ <?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
386
+ </label>
387
+ <label>
388
+ <input type="checkbox" name="qsm_delete_from_db" value="1"/>
389
+ <?php esc_html_e( 'Delete items from database?', 'quiz-master-next' ); ?>
390
+ </label>
391
+ <?php wp_nonce_field( 'qsm_delete_quiz', 'qsm_delete_quiz_nonce' ); ?>
392
+ <input type='hidden' id='delete_quiz_id' name='delete_quiz_id' value='' />
393
+ <input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
394
+ </form>
395
+ </main>
396
+ <footer class="qsm-popup__footer">
397
+ <button id="delete-quiz-button"
398
+ class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
399
+ <button class="qsm-popup__btn" data-micromodal-close
400
+ aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
401
+ </footer>
402
+ </div>
403
+ </div>
404
  </div>
405
+ <!-- Popup for bulk delete quiz -->
406
+ <div class="qsm-popup qsm-popup-slide" id="modal-bulk-delete" aria-hidden="true">
407
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
408
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
409
+ <header class="qsm-popup__header">
410
+ <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Bulk Delete', 'quiz-master-next' ); ?></h2>
411
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
412
+ </header>
413
+ <main class="qsm-popup__content" id="modal-5-content">
414
+ <form action='' method='post' id="bult-delete-quiz-form" style="display:flex; flex-direction:column;">
415
+ <h3><strong><?php esc_html_e( 'Are you sure you want to delete selected quiz or survey?', 'quiz-master-next' ); ?></strong>
416
+ </h3>
417
+ <label>
418
+ <input type="checkbox" name="qsm_delete_question_from_qb" />
419
+ <?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
420
+ </label>
421
+ <label>
422
+ <input type="checkbox" name="qsm_delete_from_db" />
423
+ <?php esc_html_e( 'Delete items from database?', 'quiz-master-next' ); ?>
424
+ </label>
425
+ </form>
426
+ </main>
427
+ <footer class="qsm-popup__footer">
428
+ <button id="bulk-delete-quiz-button"
429
+ class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
430
+ <button class="qsm-popup__btn" data-micromodal-close
431
+ aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
432
+ </footer>
433
+ </div>
434
+ </div>
435
  </div>
436
+ <!-- Popup for export import upsell -->
437
+ <div class="qsm-popup qsm-popup-slide" id="modal-export-import" aria-hidden="true">
438
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
439
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
440
+ <header class="qsm-popup__header">
441
+ <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Extend QSM', 'quiz-master-next' ); ?>
442
+ </h2>
443
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
444
+ </header>
445
+ <main class="qsm-popup__content" id="modal-5-content">
446
+ <h3><strong><?php esc_html_e( 'Export functionality is provided as Premium addon.', 'quiz-master-next' ); ?></strong>
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>
458
+ </div>
459
+ <!-- Popup for delete quiz -->
460
+ <div class="qsm-popup qsm-popup-slide" id="modal-6" aria-hidden="true">
461
+ <div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
462
+ <div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
463
+ <header class="qsm-popup__header">
464
+ <h2 class="qsm-popup__title" id="modal-5-title"><?php esc_html_e( 'Shortcode', 'quiz-master-next' ); ?></h2>
465
+ <a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
466
+ </header>
467
+ <main class="qsm-popup__content" id="modal-5-content">
468
+ <div class="qsm-row" style="margin-bottom: 30px;">
469
+ <lable><?php esc_html_e( 'Embed Shortcode', 'quiz-master-next' ); ?></lable>
470
+ <input type="text" value="" id="sc-shortcode-model-text" style="width: 72%;padding: 5px;">
471
+ <button class="button button-primary" id="sc-copy-shortcode"><span
472
+ class="dashicons dashicons-admin-page"></span></button>
473
+ </div>
474
+ <div class="qsm-row">
475
+ <lable><?php esc_html_e( 'Link Shortcode', 'quiz-master-next' ); ?></lable>
476
+ <input type="text" value="" id="sc-shortcode-model-text-link" style="width: 72%;padding: 5px;">
477
+ <button class="button button-primary" id="sc-copy-shortcode-link"><span
478
+ class="dashicons dashicons-admin-page"></span></button>
479
+ </div>
480
+ </main>
481
  </div>
482
+ </div>
483
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
484
 
485
+ <!-- Templates -->
486
+ <script type="text/template" id="tmpl-no-quiz">
487
+ <div class="qsm-no-quiz-wrapper">
488
+ <span class="dashicons dashicons-format-chat"></span>
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>
496
+ </div>
497
+ </script>
498
+ <?php
499
+ }
500
+ }
501
 
 
 
 
 
 
 
 
 
 
 
 
 
502
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  }
505
+ global $QSMQuizList;
506
+ $QSMQuizList = new QSMQuizList();
php/admin/settings-page.php CHANGED
@@ -112,6 +112,7 @@ class QMNGlobalSettingsPage {
112
  'loggedin_user_contact' => 0,
113
  'comment_section' => 0,
114
  'question_numbering' => 0,
 
115
  'store_responses' => 1,
116
  'disable_answer_onselect' => 0,
117
  'ajax_show_correct' => 0,
@@ -135,6 +136,7 @@ class QMNGlobalSettingsPage {
135
  'not_allow_after_expired_time' => 0,
136
  'preferred_date_format' => 'F j, Y',
137
  'default_answers' => 1,
 
138
  );
139
  }
140
 
@@ -146,46 +148,51 @@ class QMNGlobalSettingsPage {
146
  */
147
  public function quiz_default_global_option_init() {
148
  register_setting( 'qsm-quiz-settings-group', 'qsm-quiz-settings' );
149
- add_settings_section( 'qmn-global-section', __( 'Quiz Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qsm_default_global_option' );
150
- add_settings_field( 'quiz-type', __( 'Quiz Type', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_type' ), 'qsm_default_global_option', 'qmn-global-section' );
151
- add_settings_field( 'grading-system', __( 'Grading System', 'quiz-master-next' ), array( $this, 'qsm_global_grading_system' ), 'qsm_default_global_option', 'qmn-global-section' );
152
- add_settings_field( 'default_answers', __( 'Default Number of Answers', 'quiz-master-next' ), array( $this, 'default_answers' ), 'qsm_default_global_option', 'qmn-global-section' );
153
- add_settings_field( 'allow-score-round-off', __( 'Allow Score Round-off', 'quiz-master-next' ), array( $this, 'qsm_global_score_roundoff' ), 'qsm_default_global_option', 'qmn-global-section' );
154
- add_settings_field( 'show-progress-bar', __( 'Show progress bar', 'quiz-master-next' ), array( $this, 'qsm_global_show_progress_bar' ), 'qsm_default_global_option', 'qmn-global-section' );
155
- add_settings_field( 'require-user-login', __( 'Require User Login', 'quiz-master-next' ), array( $this, 'qsm_global_require_user_login' ), 'qsm_default_global_option', 'qmn-global-section' );
156
- add_settings_field( 'questions-per-page', __( 'Questions Per Page', 'quiz-master-next' ), array( $this, 'qsm_global_questions_per_page' ), 'qsm_default_global_option', 'qmn-global-section' );
157
- add_settings_field( 'time-limit-in-minutes', __( 'Time Limit (in minutes)', 'quiz-master-next' ), array( $this, 'qsm_global_time_limit_in_minutes' ), 'qsm_default_global_option', 'qmn-global-section' );
158
- add_settings_field( 'force-submit-after-timer-expiry', __( 'Force submit after timer expiry', 'quiz-master-next' ), array( $this, 'qsm_global_force_submit_after_timer_expiry' ), 'qsm_default_global_option', 'qmn-global-section' );
159
- add_settings_field( 'skip-validations-when-time-expire', __( 'Skip validations when time expire', 'quiz-master-next' ), array( $this, 'qsm_global_skip_validations_when_time_expire' ), 'qsm_default_global_option', 'qmn-global-section' );
160
- add_settings_field( 'limit-attempts', __( 'Limit Attempts', 'quiz-master-next' ), array( $this, 'qsm_global_limit_attempts' ), 'qsm_default_global_option', 'qmn-global-section' );
161
- add_settings_field( 'limit-entries', __( 'Limit Entries', 'quiz-master-next' ), array( $this, 'qsm_global_limit_entries' ), 'qsm_default_global_option', 'qmn-global-section' );
162
- add_settings_field( 'limit-number-of-questions', __( 'Limit number of Questions', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions' ), 'qsm_default_global_option', 'qmn-global-section' );
163
- add_settings_field( 'limit-number-of-questions-per-category', __( 'Limit number of Questions Per Category', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions_per_category' ), 'qsm_default_global_option', 'qmn-global-section' );
164
- add_settings_field( 'quiz-dates', __( 'Quiz Dates', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_dates' ), 'qsm_default_global_option', 'qmn-global-section' );
165
- add_settings_field( 'can-submit-after-end-date', __( 'Do not allow quiz submission after the end date/time', 'quiz-master-next' ), array( $this, 'qsm_global_do_not_allow_quiz_submission_after_the_end_datetime' ), 'qsm_default_global_option', 'qmn-global-section' );
166
- add_settings_field( 'random-questions', __( 'Random Questions', 'quiz-master-next' ), array( $this, 'qsm_global_random_questions' ), 'qsm_default_global_option', 'qmn-global-section' );
167
- add_settings_field( 'contact-form-position', __( 'Contact form position', 'quiz-master-next' ), array( $this, 'qsm_global_contact_form_position' ), 'qsm_default_global_option', 'qmn-global-section' );
168
- add_settings_field( 'show-contact-form-to-logged-in-users', __( 'Show contact form to logged in users', 'quiz-master-next' ), array( $this, 'qsm_global_show_contact_form_to_logged_in_users' ), 'qsm_default_global_option', 'qmn-global-section' );
169
- add_settings_field( 'enable-comments', __( 'Enable comments', 'quiz-master-next' ), array( $this, 'qsm_global_enable_comments' ), 'qsm_default_global_option', 'qmn-global-section' );
170
- add_settings_field( 'show-question-numbers', __( 'Show question numbers', 'quiz-master-next' ), array( $this, 'qsm_global_show_question_numbers' ), 'qsm_default_global_option', 'qmn-global-section' );
171
- add_settings_field( 'save-responses', __( 'Save Responses', 'quiz-master-next' ), array( $this, 'qsm_global_save_responses' ), 'qsm_default_global_option', 'qmn-global-section' );
172
- 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', 'qmn-global-section' );
173
- 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', 'qmn-global-section' );
174
- 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', 'qmn-global-section' );
175
- add_settings_field( 'disable-auto-fill-for-quiz-input', __( 'Disable auto fill for Quiz input', 'quiz-master-next' ), array( $this, 'qsm_global_disable_auto_fill_for_quiz_input' ), 'qsm_default_global_option', 'qmn-global-section' );
176
- add_settings_field( 'display-category-name-on-front-end', __( 'Display category name on front end', 'quiz-master-next' ), array( $this, 'qsm_global_display_category_name_on_front_end' ), 'qsm_default_global_option', 'qmn-global-section' );
177
- add_settings_field( 'show-results-inline', __( 'Show results inline', 'quiz-master-next' ), array( $this, 'qsm_global_show_results_inline' ), 'qsm_default_global_option', 'qmn-global-section' );
178
- add_settings_field( 'end-quiz-if-there-is-wrong-answer', __( 'End quiz if there is wrong answer', 'quiz-master-next' ), array( $this, 'qsm_global_end_quiz_if_there_is_wrong_answer' ), 'qsm_default_global_option', 'qmn-global-section' );
179
- add_settings_field( 'show-correct-answer-inline', __( 'Show correct answer inline', 'quiz-master-next' ), array( $this, 'qsm_global_show_correct_answer_inline' ), 'qsm_default_global_option', 'qmn-global-section' );
180
- add_settings_field( 'retake-quiz', __( 'Retake Quiz', 'quiz-master-next' ), array( $this, 'qsm_global_retake_quiz' ), 'qsm_default_global_option', 'qmn-global-section' );
181
- 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', 'qmn-global-section' );
182
- add_settings_field( 'deselect-answer', __( 'Deselect Answer', 'quiz-master-next' ), array( $this, 'qsm_global_deselect_answer' ), 'qsm_default_global_option', 'qmn-global-section' );
183
- 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', 'qmn-global-section' );
184
- 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', 'qmn-global-section' );
185
- 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', 'qmn-global-section' );
186
- add_settings_field( 'quiz-animation', __( 'Quiz Animation', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_animation' ), 'qsm_default_global_option', 'qmn-global-section' );
187
- add_settings_field( 'logo-url', __( 'Logo URL', 'quiz-master-next' ), array( $this, 'qsm_global_logo_url' ), 'qsm_default_global_option', 'qmn-global-section' );
188
- add_settings_field( 'preferred_date_format', __( 'Preferred Date Format', 'quiz-master-next' ), array( $this, 'preferred_date_format' ), 'qsm_default_global_option', 'qmn-global-section' );
 
 
 
 
 
189
  global $globalQuizsetting;
190
  $get_default_value = self::default_settings();
191
  $get_saved_value = get_option( 'qsm-quiz-settings' );
@@ -208,31 +215,25 @@ class QMNGlobalSettingsPage {
208
  */
209
  public function global_section() {
210
  esc_html_e( 'These settings are applied to the entire plugin and all quizzes.', 'quiz-master-next' );
211
- if ( isset( $_GET['settings-updated'] ) ) {
212
- flush_rewrite_rules( true );
213
- echo '<div class="updated" style="padding: 10px;">';
214
- echo '<span>' . esc_html__( ' Settings have been updated!', 'quiz-master-next' ) . '</span>';
215
- echo '</div>';
216
- }
217
  $enabled = get_option( 'qsm_multiple_category_enabled' );
218
  if ( 'cancelled' === $enabled ) {
219
  ?>
220
- <div class="notice notice-info multiple-category-notice">
221
- <h3>
222
- <?php esc_html_e( 'Database update required', 'quiz-master-next' ); ?>
223
- </h3>
224
- <p>
225
- <?php esc_html_e( 'QSM has been updated!', 'quiz-master-next' ); ?><br/>
226
- <?php esc_html_e( 'We need to upgrade your database so that you can enjoy the latest features.', 'quiz-master-next' ); ?><br/>
227
- <?php
228
- /* translators: %s: HTML tag */
229
- echo sprintf( esc_html__( 'Please note that this action %1$s can not be %2$s rolled back. We recommend you to take a backup of your current site before proceeding.', 'quiz-master-next' ), '<b>', '</b>' );
230
- ?>
231
- </p>
232
- <p class="category-action">
233
- <a href="javascript:void(0)" class="button button-primary enable-multiple-category"><?php esc_html_e( 'Update Database', 'quiz-master-next' ); ?></a>
234
- </p>
235
- </div>
236
  <?php
237
  }
238
  }
@@ -511,14 +512,14 @@ class QMNGlobalSettingsPage {
511
  if ( sanitize_text_field( wp_unslash( $_GET['tab'] ) ) == 'qmn_global_settings' ) {
512
  $active_tab = 'qmn_global_settings';
513
  } else {
514
- $active_tab = 'quiz-default-qptions';
515
  }
516
  }
517
  $g_class = $d_class = '';
518
  if ( 'qmn_global_settings' === $active_tab ) {
519
  $g_class = 'nav-tab-active';
520
  }
521
- if ( 'quiz-default-qptions' === $active_tab ) {
522
  $d_class = 'nav-tab-active';
523
  }
524
  ?>
@@ -527,19 +528,60 @@ class QMNGlobalSettingsPage {
527
  <h2 class="nav-tab-wrapper">
528
  <!-- when tab buttons are clicked we jump back to the same page but with a new parameter that represents the clicked tab. accordingly we make it active -->
529
  <a href="?page=qmn_global_settings&tab=qmn_global_settings" class="nav-tab <?php echo esc_attr( $g_class ); ?> "><?php esc_html_e( 'Main Settings', 'quiz-master-next' ); ?></a>
530
- <a href="?page=qmn_global_settings&tab=quiz-default-qptions" class="nav-tab <?php echo esc_attr( $d_class ); ?>"><?php esc_html_e( 'Quiz Default Options', 'quiz-master-next' ); ?></a>
531
  </h2>
532
  <form action="options.php" method="POST" class="qsm_global_settings">
533
  <?php
 
 
 
 
 
 
534
  if ( 'qmn_global_settings' === $active_tab ) {
535
  settings_fields( 'qmn-settings-group' );
536
  do_settings_sections( 'qmn_global_settings' );
537
  }
538
- ?>
539
- <?php
540
- if ( 'quiz-default-qptions' === $active_tab ) {
541
  settings_fields( 'qsm-quiz-settings-group' );
542
- do_settings_sections( 'qsm_default_global_option' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  }
544
  ?>
545
  <?php submit_button(); ?>
@@ -1238,6 +1280,40 @@ class QMNGlobalSettingsPage {
1238
  echo '<span class="qsm-opt-desc">Adds number of answer fields.</span>';
1239
  }
1240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1241
  }
1242
 
1243
  $qmnGlobalSettingsPage = new QMNGlobalSettingsPage();
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,
136
  'not_allow_after_expired_time' => 0,
137
  'preferred_date_format' => 'F j, Y',
138
  'default_answers' => 1,
139
+ 'correct_answer_logic' => 0,
140
  );
141
  }
142
 
148
  */
149
  public function quiz_default_global_option_init() {
150
  register_setting( 'qsm-quiz-settings-group', 'qsm-quiz-settings' );
151
+ add_settings_section( 'qmn-global-section', __( 'Quiz Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qsm_default_global_option_general' );
152
+ add_settings_section( 'qmn-global-section', __( 'Quiz Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qsm_default_global_option_quiz_submission' );
153
+ add_settings_section( 'qmn-global-section', __( 'Quiz Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qsm_default_global_option_display' );
154
+ add_settings_section( 'qmn-global-section', __( 'Quiz Settings', 'quiz-master-next' ), array( $this, 'global_section' ), 'qsm_default_global_option_contact' );
155
+ add_settings_field( 'quiz-type', __( 'Quiz Type', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_type' ), 'qsm_default_global_option_general', 'qmn-global-section' );
156
+ add_settings_field( 'grading-system', __( 'Grading System', 'quiz-master-next' ), array( $this, 'qsm_global_grading_system' ), 'qsm_default_global_option_general', 'qmn-global-section' );
157
+ add_settings_field( 'correct_answer_logic', __( 'Correct Answer Logic', 'quiz-master-next' ), array( $this, 'correct_answer_logic' ), 'qsm_default_global_option_general', 'qmn-global-section' );
158
+ add_settings_field( 'default_answers', __( 'Default Number of Answers', 'quiz-master-next' ), array( $this, 'default_answers' ), 'qsm_default_global_option_general', 'qmn-global-section' );
159
+ add_settings_field( 'allow-score-round-off', __( 'Allow Score Round-off', 'quiz-master-next' ), array( $this, 'qsm_global_score_roundoff' ), 'qsm_default_global_option_general', 'qmn-global-section' );
160
+ add_settings_field( 'show-progress-bar', __( 'Show progress bar', 'quiz-master-next' ), array( $this, 'qsm_global_show_progress_bar' ), 'qsm_default_global_option_display', 'qmn-global-section' );
161
+ add_settings_field( 'require-user-login', __( 'Require User Login', 'quiz-master-next' ), array( $this, 'qsm_global_require_user_login' ), 'qsm_default_global_option_general', 'qmn-global-section' );
162
+ add_settings_field( 'questions-per-page', __( 'Questions Per Page', 'quiz-master-next' ), array( $this, 'qsm_global_questions_per_page' ), 'qsm_default_global_option_display', 'qmn-global-section' );
163
+ add_settings_field( 'time-limit-in-minutes', __( 'Time Limit (in minutes)', 'quiz-master-next' ), array( $this, 'qsm_global_time_limit_in_minutes' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
164
+ add_settings_field( 'force-submit-after-timer-expiry', __( 'Force submit after timer expiry', 'quiz-master-next' ), array( $this, 'qsm_global_force_submit_after_timer_expiry' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
165
+ add_settings_field( 'skip-validations-when-time-expire', __( 'Skip validations when time expire', 'quiz-master-next' ), array( $this, 'qsm_global_skip_validations_when_time_expire' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
166
+ add_settings_field( 'limit-attempts', __( 'Limit Attempts', 'quiz-master-next' ), array( $this, 'qsm_global_limit_attempts' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
167
+ add_settings_field( 'limit-entries', __( 'Limit Entries', 'quiz-master-next' ), array( $this, 'qsm_global_limit_entries' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
168
+ add_settings_field( 'limit-number-of-questions', __( 'Limit number of Questions', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
169
+ add_settings_field( 'limit-number-of-questions-per-category', __( 'Limit number of Questions Per Category', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions_per_category' ), 'qsm_default_global_option_general', 'qmn-global-section' );
170
+ add_settings_field( 'quiz-dates', __( 'Quiz Dates', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_dates' ), 'qsm_default_global_option_general', 'qmn-global-section' );
171
+ add_settings_field( 'can-submit-after-end-date', __( 'Do not allow quiz submission after the end date/time', 'quiz-master-next' ), array( $this, 'qsm_global_do_not_allow_quiz_submission_after_the_end_datetime' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
172
+ add_settings_field( 'random-questions', __( 'Random Questions', 'quiz-master-next' ), array( $this, 'qsm_global_random_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
173
+ add_settings_field( 'contact-form-position', __( 'Contact form position', 'quiz-master-next' ), array( $this, 'qsm_global_contact_form_position' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
174
+ add_settings_field( 'show-contact-form-to-logged-in-users', __( 'Show contact form to logged in users', 'quiz-master-next' ), array( $this, 'qsm_global_show_contact_form_to_logged_in_users' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
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' );
182
+ add_settings_field( 'disable-auto-fill-for-quiz-input', __( 'Disable auto fill for Quiz input', 'quiz-master-next' ), array( $this, 'qsm_global_disable_auto_fill_for_quiz_input' ), 'qsm_default_global_option_display', 'qmn-global-section' );
183
+ add_settings_field( 'display-category-name-on-front-end', __( 'Display category name on front end', 'quiz-master-next' ), array( $this, 'qsm_global_display_category_name_on_front_end' ), 'qsm_default_global_option_display', 'qmn-global-section' );
184
+ add_settings_field( 'show-results-inline', __( 'Show results inline', 'quiz-master-next' ), array( $this, 'qsm_global_show_results_inline' ), 'qsm_default_global_option_display', 'qmn-global-section' );
185
+ add_settings_field( 'end-quiz-if-there-is-wrong-answer', __( 'End quiz if there is wrong answer', 'quiz-master-next' ), array( $this, 'qsm_global_end_quiz_if_there_is_wrong_answer' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
186
+ add_settings_field( 'show-correct-answer-inline', __( 'Show correct answer inline', 'quiz-master-next' ), array( $this, 'qsm_global_show_correct_answer_inline' ), 'qsm_default_global_option_display', 'qmn-global-section' );
187
+ add_settings_field( 'retake-quiz', __( 'Retake Quiz', 'quiz-master-next' ), array( $this, 'qsm_global_retake_quiz' ), 'qsm_default_global_option_quiz_submission', 'qmn-global-section' );
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' );
194
+ add_settings_field( 'logo-url', __( 'Logo URL', 'quiz-master-next' ), array( $this, 'qsm_global_logo_url' ), 'qsm_default_global_option_display', 'qmn-global-section' );
195
+ add_settings_field( 'preferred_date_format', __( 'Preferred Date Format', 'quiz-master-next' ), array( $this, 'preferred_date_format' ), 'qsm_default_global_option_display', 'qmn-global-section' );
196
  global $globalQuizsetting;
197
  $get_default_value = self::default_settings();
198
  $get_saved_value = get_option( 'qsm-quiz-settings' );
215
  */
216
  public function global_section() {
217
  esc_html_e( 'These settings are applied to the entire plugin and all quizzes.', 'quiz-master-next' );
 
 
 
 
 
 
218
  $enabled = get_option( 'qsm_multiple_category_enabled' );
219
  if ( 'cancelled' === $enabled ) {
220
  ?>
221
+ <div class="notice notice-info multiple-category-notice">
222
+ <h3>
223
+ <?php esc_html_e( 'Database update required', 'quiz-master-next' ); ?>
224
+ </h3>
225
+ <p>
226
+ <?php esc_html_e( 'QSM has been updated!', 'quiz-master-next' ); ?><br/>
227
+ <?php esc_html_e( 'We need to upgrade your database so that you can enjoy the latest features.', 'quiz-master-next' ); ?><br/>
228
+ <?php
229
+ /* translators: %s: HTML tag */
230
+ echo sprintf( esc_html__( 'Please note that this action %1$s can not be %2$s rolled back. We recommend you to take a backup of your current site before proceeding.', 'quiz-master-next' ), '<b>', '</b>' );
231
+ ?>
232
+ </p>
233
+ <p class="category-action">
234
+ <a href="javascript:void(0)" class="button button-primary enable-multiple-category"><?php esc_html_e( 'Update Database', 'quiz-master-next' ); ?></a>
235
+ </p>
236
+ </div>
237
  <?php
238
  }
239
  }
512
  if ( sanitize_text_field( wp_unslash( $_GET['tab'] ) ) == 'qmn_global_settings' ) {
513
  $active_tab = 'qmn_global_settings';
514
  } else {
515
+ $active_tab = 'quiz-default-options';
516
  }
517
  }
518
  $g_class = $d_class = '';
519
  if ( 'qmn_global_settings' === $active_tab ) {
520
  $g_class = 'nav-tab-active';
521
  }
522
+ if ( 'quiz-default-options' === $active_tab ) {
523
  $d_class = 'nav-tab-active';
524
  }
525
  ?>
528
  <h2 class="nav-tab-wrapper">
529
  <!-- when tab buttons are clicked we jump back to the same page but with a new parameter that represents the clicked tab. accordingly we make it active -->
530
  <a href="?page=qmn_global_settings&tab=qmn_global_settings" class="nav-tab <?php echo esc_attr( $g_class ); ?> "><?php esc_html_e( 'Main Settings', 'quiz-master-next' ); ?></a>
531
+ <a href="?page=qmn_global_settings&tab=quiz-default-options" class="nav-tab <?php echo esc_attr( $d_class ); ?>"><?php esc_html_e( 'Quiz Default Options', 'quiz-master-next' ); ?></a>
532
  </h2>
533
  <form action="options.php" method="POST" class="qsm_global_settings">
534
  <?php
535
+ if ( isset( $_GET['settings-updated'] ) ) {
536
+ flush_rewrite_rules( true );
537
+ echo '<div class="updated" style="padding: 10px;">';
538
+ echo '<span>' . esc_html__( ' Settings have been updated!', 'quiz-master-next' ) . '</span>';
539
+ echo '</div>';
540
+ }
541
  if ( 'qmn_global_settings' === $active_tab ) {
542
  settings_fields( 'qmn-settings-group' );
543
  do_settings_sections( 'qmn_global_settings' );
544
  }
545
+ if ( 'quiz-default-options' === $active_tab ) {
 
 
546
  settings_fields( 'qsm-quiz-settings-group' );
547
+ ?>
548
+ <div class="qsm-sub-tab-menu" style="display: inline-block;width: 100%;">
549
+ <ul class="subsubsub">
550
+ <li>
551
+ <a href="javascript:void(0)" data-id="qsm_general" class="current quiz_style_tab">
552
+ <?php esc_html_e( 'General', 'quiz-master-next' ); ?></a> |
553
+ </li>
554
+ <li>
555
+ <a href="javascript:void(0)" data-id="quiz_submission" class="quiz_style_tab">
556
+ <?php esc_html_e( 'Quiz submission', 'quiz-master-next' ); ?>
557
+ </a> |
558
+ </li>
559
+ <li>
560
+ <a href="javascript:void(0)" data-id="display" class="quiz_style_tab">
561
+ <?php esc_html_e( 'Display', 'quiz-master-next' ); ?>
562
+ </a> |
563
+ </li>
564
+ <li>
565
+ <a href="javascript:void(0)" data-id="contact_form" class="quiz_style_tab">
566
+ <?php esc_html_e( 'Contact form', 'quiz-master-next' ); ?>
567
+ </a>
568
+ </li>
569
+ </ul>
570
+ </div>
571
+
572
+ <div id="qsm_general" class="quiz_style_tab_content">
573
+ <?php do_settings_sections( 'qsm_default_global_option_general' ); ?>
574
+ </div>
575
+ <div id="quiz_submission" class="quiz_style_tab_content" style="display:none">
576
+ <?php do_settings_sections( 'qsm_default_global_option_quiz_submission' ); ?>
577
+ </div>
578
+ <div id="display" class="quiz_style_tab_content" style="display:none">
579
+ <?php do_settings_sections( 'qsm_default_global_option_display' ); ?>
580
+ </div>
581
+ <div id="contact_form" class="quiz_style_tab_content" style="display:none">
582
+ <?php do_settings_sections( 'qsm_default_global_option_contact' ); ?>
583
+ </div>
584
+ <?php
585
  }
586
  ?>
587
  <?php submit_button(); ?>
1280
  echo '<span class="qsm-opt-desc">Adds number of answer fields.</span>';
1281
  }
1282
 
1283
+ /**
1284
+ * Generates quiz global field for correct answers logic field
1285
+ *
1286
+ * @since 7.3.15
1287
+ * @return void
1288
+ */
1289
+ public function correct_answer_logic(){
1290
+ global $globalQuizsetting;
1291
+ $qsm_all_correct_selected = ( isset( $globalQuizsetting['correct_answer_logic'] ) && '' !== $globalQuizsetting['correct_answer_logic'] ? $globalQuizsetting['correct_answer_logic'] : '' );
1292
+
1293
+ echo '<fieldset class="buttonset buttonset-hide" >
1294
+ <input type="radio" id="correct_answer_logic-1" name="qsm-quiz-settings[correct_answer_logic]" value="1" ' . checked( $qsm_all_correct_selected, '1', false ) . '>
1295
+ <label for="correct_answer_logic-1">All correct answers</label><br>
1296
+ <input type="radio" id="correct_answer_logic-0" name="qsm-quiz-settings[correct_answer_logic]" value="0" ' . checked( $qsm_all_correct_selected, '0', false ) . '>
1297
+ <label for="correct_answer_logic-0">Any correct answer</label><br>
1298
+ </fieldset>';
1299
+ }
1300
+ /**
1301
+ * Generates quiz global field to check if want to show opt-in type answers to user
1302
+ *
1303
+ * @since 7.3.15
1304
+ * @return void
1305
+ */
1306
+ public function qsm_global_show_optin_answers() {
1307
+ global $globalQuizsetting;
1308
+ $qsm_question_show_optin_default = ( isset( $globalQuizsetting['show_optin'] ) && '' !== $globalQuizsetting['show_optin'] ? $globalQuizsetting['show_optin'] : '0' );
1309
+ echo '<fieldset class="buttonset buttonset-hide" >
1310
+ <input type="radio" id="show_optin-1" name="qsm-quiz-settings[show_optin]" value="1" ' . checked( $qsm_question_show_optin_default, '1', false ) . '>
1311
+ <label for="show_optin-1">Yes</label><br>
1312
+ <input type="radio" id="show_optin-0" name="qsm-quiz-settings[show_optin]" value="0" ' . checked( $qsm_question_show_optin_default, '0', false ) . '>
1313
+ <label for="show_optin-0">No</label><br>
1314
+ </fieldset>';
1315
+ }
1316
+
1317
  }
1318
 
1319
  $qmnGlobalSettingsPage = new QMNGlobalSettingsPage();
php/admin/tools-page.php CHANGED
@@ -21,22 +21,10 @@ function qsm_generate_quiz_tools() {
21
  add_meta_box( 'qsm_restore_box', 'Restore Quiz', 'qsm_restore_function', 'quiz_wpss' );
22
  add_meta_box( 'qsm_audit_box', 'Audit Trail', 'qsm_audit_box', 'quiz_wpss' );
23
  ?>
24
- <style type="text/css">
25
- #qsm_restore_box .hndle,
26
- #qsm_audit_box .hndle{
27
- padding-left: 15px;
28
- padding-bottom: 0;
29
- }
30
- .qsm-tools-page .handle-order-higher,
31
- .qsm-tools-page .handle-order-lower,
32
- .qsm-tools-page .handle-actions{
33
- display: none;
34
- }
35
- </style>
36
  <div class="wrap qsm-tools-page">
37
  <h2><?php esc_html_e( 'Tools', 'quiz-master-next' ); ?></h2>
38
 
39
- <div style="float:left; width:100%;" class="inner-sidebar1">
40
  <?php do_meta_boxes( 'quiz_wpss', 'advanced', null ); ?>
41
  </div>
42
 
@@ -82,9 +70,10 @@ function qsm_restore_function() {
82
  // Restores the quiz post type for the quiz.
83
  $my_query = new WP_Query(
84
  array(
85
- 'post_type' => 'qsm_quiz',
86
- 'meta_key' => 'quiz_id',
87
- 'meta_value' => intval( $_POST['restore_quiz'] ),
 
88
  )
89
  );
90
  if ( $my_query->have_posts() ) {
21
  add_meta_box( 'qsm_restore_box', 'Restore Quiz', 'qsm_restore_function', 'quiz_wpss' );
22
  add_meta_box( 'qsm_audit_box', 'Audit Trail', 'qsm_audit_box', 'quiz_wpss' );
23
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
24
  <div class="wrap qsm-tools-page">
25
  <h2><?php esc_html_e( 'Tools', 'quiz-master-next' ); ?></h2>
26
 
27
+ <div style="width:100%;" class="inner-sidebar1">
28
  <?php do_meta_boxes( 'quiz_wpss', 'advanced', null ); ?>
29
  </div>
30
 
70
  // Restores the quiz post type for the quiz.
71
  $my_query = new WP_Query(
72
  array(
73
+ 'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'trash' ),
74
+ 'post_type' => 'qsm_quiz',
75
+ 'meta_key' => 'quiz_id',
76
+ 'meta_value' => intval( $_POST['restore_quiz'] ),
77
  )
78
  );
79
  if ( $my_query->have_posts() ) {
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
- $qmn_array_for_variables = isset( $_POST['variables'] ) ? qsm_sanitize_rec_array( wp_unslash( $_POST['variables'] ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
38
  try {
39
  $this->really_long_running_task();
40
- QSM_Emails::send_emails($qmn_array_for_variables);
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
+ $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
php/classes/class-qmn-log-manager.php CHANGED
@@ -99,7 +99,10 @@ class QMN_Log_Manager
99
  'post_parent' => $parent,
100
  'log_type' => $type,
101
  );
102
- return $this->insert_log( $log_data );
 
 
 
103
  }
104
 
105
  /**
99
  'post_parent' => $parent,
100
  'log_type' => $type,
101
  );
102
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
103
+ return $this->insert_log( $log_data );
104
+ }
105
+ return false;
106
  }
107
 
108
  /**
php/classes/class-qmn-plugin-helper.php CHANGED
@@ -2,6 +2,7 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
 
5
 
6
  /**
7
  * This class is a helper class to be used for extending the plugin
@@ -78,6 +79,13 @@ class QMNPluginHelper {
78
  */
79
  public function __construct() {
80
  add_action( 'wp_ajax_qmn_question_type_change', array( $this, 'get_question_type_edit_content' ) );
 
 
 
 
 
 
 
81
  }
82
 
83
  /**
@@ -384,7 +392,7 @@ class QMNPluginHelper {
384
  */
385
  public function display_question( $slug, $question_id, $quiz_options ) {
386
  global $wpdb;
387
- global $qmn_total_questions;
388
  $question = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'mlw_questions WHERE question_id=%d', intval( $question_id ) ) );
389
  $answers = array();
390
  if ( is_serialized( $question->answer_array ) && is_array( maybe_unserialize( $question->answer_array ) ) ) {
@@ -403,7 +411,7 @@ class QMNPluginHelper {
403
  }
404
  $answers_original = $answers;
405
  if ( 2 === intval( $quiz_options->randomness_order ) || 3 === intval( $quiz_options->randomness_order ) ) {
406
- $answers = $this->qsm_shuffle_assoc( $answers );
407
  update_post_meta( $question_id, 'qsm_random_quetion_answer', $answers );
408
  }
409
 
@@ -420,9 +428,9 @@ class QMNPluginHelper {
420
  * Filter Answers of specific question before display
421
  */
422
  $answers = apply_filters( 'qsm_single_question_answers', $answers, $question, $quiz_options );
423
-
424
  foreach ( $this->question_types as $type ) {
425
  if ( strtolower( str_replace( ' ', '-', $slug ) ) === $type['slug'] ) {
 
426
  if ( $type['graded'] ) {
427
  $qmn_total_questions += 1;
428
  if ( 1 === intval( $quiz_options->question_numbering ) ) { ?>
@@ -452,19 +460,182 @@ class QMNPluginHelper {
452
  * @param array $list An array
453
  * @return array
454
  */
455
- public function qsm_shuffle_assoc( $list ) {
456
  if ( ! is_array( $list ) ) {
457
  return $list;
458
  }
459
- $keys = array_keys( $list );
460
  shuffle( $keys );
461
- $random = array();
462
  foreach ( $keys as $key ) {
463
  $random[ $key ] = $list[ $key ];
464
  }
465
  return $random;
466
  }
467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
 
469
  /**
470
  * Calculates Score For Question
@@ -689,11 +860,11 @@ class QMNPluginHelper {
689
  return apply_filters( 'qmn_quiz_setting_tabs', $this->settings_tabs );
690
  }
691
 
692
- /**
693
- * global animatiocv array return
694
- *
695
- * @since 4.7.1
696
- */
697
  public function quiz_animation_effect() {
698
 
699
  return array(
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
6
 
7
  /**
8
  * This class is a helper class to be used for extending the plugin
79
  */
80
  public function __construct() {
81
  add_action( 'wp_ajax_qmn_question_type_change', array( $this, 'get_question_type_edit_content' ) );
82
+ add_action( 'admin_init', array( $this, 'qsm_add_default_translations' ), 9999 );
83
+ add_action( 'qsm_saved_question', array( $this, 'qsm_add_question_translations' ), 10, 2 );
84
+ add_action( 'qsm_saved_text_message', array( $this, 'qsm_add_text_message_translations' ), 10, 3 );
85
+ add_action( 'qsm_saved_quiz_settings', array( $this, 'qsm_add_quiz_settings_translations' ), 10, 3 );
86
+
87
+ add_action( 'qsm_register_language_support', array( $this, 'qsm_register_language_support' ), 10, 3 );
88
+ add_filter( 'qsm_language_support', array( $this, 'qsm_language_support' ), 10, 3 );
89
  }
90
 
91
  /**
392
  */
393
  public function display_question( $slug, $question_id, $quiz_options ) {
394
  global $wpdb;
395
+ global $qmn_total_questions, $qmn_all_questions_count;
396
  $question = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'mlw_questions WHERE question_id=%d', intval( $question_id ) ) );
397
  $answers = array();
398
  if ( is_serialized( $question->answer_array ) && is_array( maybe_unserialize( $question->answer_array ) ) ) {
411
  }
412
  $answers_original = $answers;
413
  if ( 2 === intval( $quiz_options->randomness_order ) || 3 === intval( $quiz_options->randomness_order ) ) {
414
+ $answers = self::qsm_shuffle_assoc( $answers );
415
  update_post_meta( $question_id, 'qsm_random_quetion_answer', $answers );
416
  }
417
 
428
  * Filter Answers of specific question before display
429
  */
430
  $answers = apply_filters( 'qsm_single_question_answers', $answers, $question, $quiz_options );
 
431
  foreach ( $this->question_types as $type ) {
432
  if ( strtolower( str_replace( ' ', '-', $slug ) ) === $type['slug'] ) {
433
+ $qmn_all_questions_count += 1;
434
  if ( $type['graded'] ) {
435
  $qmn_total_questions += 1;
436
  if ( 1 === intval( $quiz_options->question_numbering ) ) { ?>
460
  * @param array $list An array
461
  * @return array
462
  */
463
+ public static function qsm_shuffle_assoc( $list ) {
464
  if ( ! is_array( $list ) ) {
465
  return $list;
466
  }
467
+ $keys = array_keys( $list );
468
  shuffle( $keys );
469
+ $random = array();
470
  foreach ( $keys as $key ) {
471
  $random[ $key ] = $list[ $key ];
472
  }
473
  return $random;
474
  }
475
 
476
+ /**
477
+ * Find the key of the first occurrence of a substring in an array
478
+ */
479
+ public static function qsm_stripos_array( $str, array $arr ) {
480
+ if ( is_array( $arr ) ) {
481
+ foreach ( $arr as $a ) {
482
+ if ( stripos( $str, $a ) !== false ) {
483
+ return $a;
484
+ }
485
+ }
486
+ }
487
+ return false;
488
+ }
489
+
490
+ /**
491
+ * Default strings
492
+ */
493
+ public static function get_default_texts() {
494
+ $defaults = array(
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.',
502
+ 'limit_total_entries_text' => 'Unfortunately, this quiz has a limited amount of entries it can recieve and has already reached that limit.',
503
+ 'scheduled_timeframe_text' => '',
504
+ 'twitter_sharing_text' => 'I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!',
505
+ 'facebook_sharing_text' => 'I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!',
506
+ 'submit_button_text' => 'Submit',
507
+ 'retake_quiz_button_text' => 'Retake Quiz',
508
+ 'previous_button_text' => 'Previous',
509
+ 'next_button_text' => 'Next',
510
+ 'empty_error_text' => 'Please complete all required fields!',
511
+ 'email_error_text' => 'Not a valid e-mail address!',
512
+ 'number_error_text' => 'This field must be a number!',
513
+ 'incorrect_error_text' => 'The entered text is not correct!',
514
+ 'url_error_text' => 'The entered URL is not valid!',
515
+ 'minlength_error_text' => 'Required atleast %minlength% characters.',
516
+ 'maxlength_error_text' => 'Minimum %maxlength% characters allowed.',
517
+ 'comment_field_text' => 'Comments',
518
+ 'hint_text' => 'Hint',
519
+ 'quick_result_correct_answer_text' => 'Correct! You have selected correct answer.',
520
+ 'quick_result_wrong_answer_text' => 'Wrong! You have selected wrong answer.',
521
+ 'quiz_processing_message' => '',
522
+ 'name_field_text' => 'Name',
523
+ 'business_field_text' => 'Business',
524
+ 'email_field_text' => 'Email',
525
+ 'phone_field_text' => 'Phone Number',
526
+ );
527
+ return apply_filters( 'qsm_default_texts', $defaults );
528
+ }
529
+
530
+ /**
531
+ * Register string in WPML for translation
532
+ */
533
+ public static function qsm_register_language_support( $translation_text = '', $translation_slug = '', $domain = 'QSM Meta' ) {
534
+ if ( ! empty( $translation_text ) && is_plugin_active( 'wpml-string-translation/plugin.php' ) ) {
535
+ $translation_slug = sanitize_title( $translation_slug );
536
+ /**
537
+ * Register the string for translation
538
+ */
539
+ do_action( 'wpml_register_single_string', $domain, $translation_slug, $translation_text );
540
+ }
541
+ }
542
+
543
+ /**
544
+ * Translate string before display
545
+ */
546
+ public static function qsm_language_support( $translation_text = '', $translation_slug = '', $domain = 'QSM Meta' ) {
547
+ /**
548
+ * Decode HTML Special characters.
549
+ */
550
+ $translation_text = htmlspecialchars_decode( $translation_text, ENT_QUOTES );
551
+ /**
552
+ * Check if WPML String Translation plugin is activated.
553
+ */
554
+ if ( ! empty( $translation_text ) && is_plugin_active( 'wpml-string-translation/plugin.php' ) ) {
555
+ $translation_slug = sanitize_title( $translation_slug );
556
+ $new_text = apply_filters( 'wpml_translate_single_string', $translation_text, $domain, $translation_slug );
557
+ $new_text = htmlspecialchars_decode( $new_text, ENT_QUOTES );
558
+ /**
559
+ * Return translation for non-default strings.
560
+ */
561
+ if ( "QSM Meta" != $domain ) {
562
+ return $new_text;
563
+ }
564
+ /**
565
+ * Check if translation exist.
566
+ */
567
+ if ( 0 !== strcasecmp( $translation_text, $new_text ) ) {
568
+ return $new_text;
569
+ }
570
+ /**
571
+ * Check if translation exist for default string.
572
+ */
573
+ $default_texts = self::get_default_texts();
574
+ $default_key = self::qsm_stripos_array( $translation_slug, array_keys( $default_texts ) );
575
+ if ( false !== $default_key && 0 === strcasecmp( $translation_text, $default_texts[ $default_key ] ) ) {
576
+ return apply_filters( 'wpml_translate_single_string', $translation_text, 'QSM Defaults', 'quiz_' . $default_key );
577
+ }
578
+ }
579
+ return $translation_text;
580
+ }
581
+
582
+ public function qsm_add_default_translations() {
583
+ $default_texts = self::get_default_texts();
584
+ if ( empty( $default_texts ) ) {
585
+ return;
586
+ }
587
+ if ( is_plugin_active( 'wpml-string-translation/plugin.php' ) ) {
588
+ foreach ( $default_texts as $key => $text ) {
589
+ if ( ! empty( $text ) ) {
590
+ $translation_slug = sanitize_title( 'quiz_' . $key );
591
+ /**
592
+ * Register the string for translation
593
+ */
594
+ do_action( 'wpml_register_single_string', 'QSM Defaults', $translation_slug, $text );
595
+ }
596
+ }
597
+ }
598
+ }
599
+
600
+ public function qsm_add_question_translations( $question_id, $question_data ) {
601
+ $settings = isset( $question_data['question_settings'] ) ? maybe_unserialize( $question_data['question_settings'] ) : array();
602
+ $hints = isset( $question_data['hints'] ) ? $question_data['hints'] : '';
603
+ $answer_info = isset( $question_data['question_answer_info'] ) ? html_entity_decode( $question_data['question_answer_info'] ) : '';
604
+
605
+ $this->qsm_register_language_support( htmlspecialchars_decode( $settings['question_title'], ENT_QUOTES ), "Question-{$question_id}", "QSM Questions" );
606
+ $this->qsm_register_language_support( htmlspecialchars_decode( $question_data['question_name'], ENT_QUOTES ), "question-description-{$question_id}", "QSM Questions" );
607
+ $this->qsm_register_language_support( $hints, "hint-{$question_id}" );
608
+ $this->qsm_register_language_support( $answer_info, "correctanswerinfo-{$question_id}" );
609
+
610
+ $answers = isset( $question_data['answer_array'] ) ? maybe_unserialize( $question_data['answer_array'] ) : array();
611
+ if ( ! empty( $answers ) ) {
612
+ $answerEditor = isset( $settings['answerEditor'] ) ? $settings['answerEditor'] : 'text';
613
+ foreach ( $answers as $ans ) {
614
+ if ( 'image' === $answerEditor ) {
615
+ $caption_text = trim( htmlspecialchars_decode( $ans[3], ENT_QUOTES ) );
616
+ $this->qsm_register_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
617
+ } else {
618
+ $answer_text = trim( htmlspecialchars_decode( $ans[0], ENT_QUOTES ) );
619
+ $this->qsm_register_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
620
+ }
621
+ }
622
+ }
623
+ }
624
+
625
+ public function qsm_add_text_message_translations( $quiz_id, $text_id, $message ) {
626
+ $message = htmlspecialchars_decode( $message, ENT_QUOTES );
627
+ $this->qsm_register_language_support( $message, "quiz_{$text_id}-{$quiz_id}" );
628
+ }
629
+
630
+ public function qsm_add_quiz_settings_translations( $quiz_id, $section, $settings_array ) {
631
+ if ( 'quiz_text' == $section && ! empty( $settings_array ) ) {
632
+ foreach ( $settings_array as $key => $val ) {
633
+ if ( ! empty( $val ) ) {
634
+ $this->qsm_register_language_support( htmlspecialchars_decode( $val, ENT_QUOTES ), "quiz_{$key}-{$quiz_id}" );
635
+ }
636
+ }
637
+ }
638
+ }
639
 
640
  /**
641
  * Calculates Score For Question
860
  return apply_filters( 'qmn_quiz_setting_tabs', $this->settings_tabs );
861
  }
862
 
863
+ /**
864
+ * global animatiocv array return
865
+ *
866
+ * @since 4.7.1
867
+ */
868
  public function quiz_animation_effect() {
869
 
870
  return array(
php/classes/class-qmn-quiz-creator.php CHANGED
@@ -70,27 +70,27 @@ class QMNQuizCreator {
70
  * @return void
71
  */
72
  public function create_quiz( $quiz_name, $theme_id, $quiz_settings = array() ) {
73
- global $mlwQuizMasterNext;
74
- global $wpdb;
75
  $current_user = wp_get_current_user();
 
76
  $results = $wpdb->insert(
77
  $wpdb->prefix . 'mlw_quizzes',
78
  array(
79
  'quiz_name' => $quiz_name,
80
- 'message_before' => __( 'Welcome to your %QUIZ_NAME%', 'quiz-master-next' ),
81
  'message_after' => __( 'Thanks for submitting your response! You can edit this message on the "Results Pages" tab. <br>%CONTACT_ALL% <br>%QUESTIONS_ANSWERS%', 'quiz-master-next' ),
82
- 'message_comment' => __( 'Please fill in the comment box below.', 'quiz-master-next' ),
83
  'message_end_template' => '',
84
  'user_email_template' => '%QUESTIONS_ANSWERS_EMAIL%',
85
  'admin_email_template' => '%QUESTIONS_ANSWERS_EMAIL%',
86
- 'submit_button_text' => __( 'Submit', 'quiz-master-next' ),
87
- 'name_field_text' => __( 'Name', 'quiz-master-next' ),
88
- 'business_field_text' => __( 'Business', 'quiz-master-next' ),
89
- 'email_field_text' => __( 'Email', 'quiz-master-next' ),
90
- 'phone_field_text' => __( 'Phone Number', 'quiz-master-next' ),
91
- 'comment_field_text' => __( 'Comments', 'quiz-master-next' ),
92
  'email_from_text' => 'Wordpress',
93
- 'question_answer_template' => '%QUESTION%<br />%USER_ANSWERS_DEFAULT%',
94
  'leaderboard_template' => '',
95
  'quiz_system' => 0,
96
  'randomness_order' => 0,
@@ -107,12 +107,12 @@ class QMNQuizCreator {
107
  'comment_section' => 1,
108
  'question_from_total' => 0,
109
  'total_user_tries' => 0,
110
- 'total_user_tries_text' => __( 'You have utilized all of your attempts to pass this quiz.', 'quiz-master-next' ),
111
  'certificate_template' => '',
112
  'social_media' => 0,
113
  'social_media_text' => __( 'I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!', 'quiz-master-next' ),
114
  'pagination' => 0,
115
- 'pagination_text' => __( 'Next', 'quiz-master-next' ),
116
  'timer_limit' => 0,
117
  'quiz_stye' => '',
118
  'question_numbering' => 0,
@@ -120,9 +120,9 @@ class QMNQuizCreator {
120
  'theme_selected' => 'primary',
121
  'last_activity' => current_time( 'mysql' ),
122
  'require_log_in' => 0,
123
- 'require_log_in_text' => __( 'This quiz is for logged in users only.', 'quiz-master-next' ),
124
  'limit_total_entries' => 0,
125
- 'limit_total_entries_text' => __( 'Unfortunately, this quiz has a limited amount of entries it can recieve and has already reached that limit.', 'quiz-master-next' ),
126
  'scheduled_timeframe' => '',
127
  'scheduled_timeframe_text' => '',
128
  'quiz_views' => 0,
@@ -204,6 +204,11 @@ class QMNQuizCreator {
204
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your new quiz or survey has been created successfully. To begin editing, click the Edit link.', 'quiz-master-next' ), 'success' );
205
  $mlwQuizMasterNext->audit_manager->new_audit( 'New Quiz/Survey Has Been Created', $new_quiz, '' );
206
 
 
 
 
 
 
207
  // Hook called after new quiz or survey has been created. Passes quiz_id to hook
208
  do_action( 'qmn_quiz_created', $new_quiz );
209
  } else {
@@ -273,7 +278,11 @@ class QMNQuizCreator {
273
  }
274
 
275
  if ( $qsm_delete && ! empty( $quiz_post_id ) ) {
276
- wp_trash_post( $quiz_post_id );
 
 
 
 
277
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your quiz or survey has been deleted successfully.', 'quiz-master-next' ), 'success' );
278
  $mlwQuizMasterNext->audit_manager->new_audit( "Quiz/Survey Has Been Deleted: $quiz_name", $quiz_id, '' );
279
  } else {
@@ -293,7 +302,7 @@ class QMNQuizCreator {
293
  * @param string $quiz_name The new name of the quiz.
294
  * @return void
295
  */
296
- public function edit_quiz_name( $quiz_id, $quiz_name ) {
297
  global $mlwQuizMasterNext;
298
  global $wpdb;
299
  $results = $wpdb->update(
@@ -308,6 +317,12 @@ class QMNQuizCreator {
308
  array( '%d' )
309
  );
310
  if ( false !== $results ) {
 
 
 
 
 
 
311
  $mlwQuizMasterNext->alertManager->newAlert( __( 'The name of your quiz or survey has been updated successfully.', 'quiz-master-next' ), 'success' );
312
  $mlwQuizMasterNext->audit_manager->new_audit( 'Quiz/Survey Name Has Been Edited', $quiz_id, '' );
313
  } else {
@@ -505,6 +520,11 @@ class QMNQuizCreator {
505
  add_post_meta( $quiz_post_id, 'quiz_id', $mlw_new_id );
506
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your quiz or survey has been duplicated successfully.', 'quiz-master-next' ), 'success' );
507
  $mlwQuizMasterNext->audit_manager->new_audit( 'New Quiz/Survey Has Been Created', $mlw_new_id, '' );
 
 
 
 
 
508
  do_action( 'qmn_quiz_duplicated', $quiz_id, $mlw_new_id );
509
  } else {
510
  $mlwQuizMasterNext->alertManager->newAlert( __( 'There has been an error in this action. Please share this with the developer. Error Code: 0011', 'quiz-master-next' ), 'error' );
@@ -668,6 +688,23 @@ class QMNQuizCreator {
668
  }
669
  }
670
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
  /**
672
  * Retrieves setting store in quiz_settings
673
  *
70
  * @return void
71
  */
72
  public function create_quiz( $quiz_name, $theme_id, $quiz_settings = array() ) {
73
+ global $wpdb, $mlwQuizMasterNext;
 
74
  $current_user = wp_get_current_user();
75
+ $default_texts = QMNPluginHelper::get_default_texts();
76
  $results = $wpdb->insert(
77
  $wpdb->prefix . 'mlw_quizzes',
78
  array(
79
  'quiz_name' => $quiz_name,
80
+ 'message_before' => isset( $default_texts['message_before'] ) ? $default_texts['message_before'] : __( 'Welcome to your %QUIZ_NAME%', 'quiz-master-next' ),
81
  'message_after' => __( 'Thanks for submitting your response! You can edit this message on the "Results Pages" tab. <br>%CONTACT_ALL% <br>%QUESTIONS_ANSWERS%', 'quiz-master-next' ),
82
+ 'message_comment' => isset( $default_texts['message_comment'] ) ? $default_texts['message_comment'] : __( 'Please fill in the comment box below.', 'quiz-master-next' ),
83
  'message_end_template' => '',
84
  'user_email_template' => '%QUESTIONS_ANSWERS_EMAIL%',
85
  'admin_email_template' => '%QUESTIONS_ANSWERS_EMAIL%',
86
+ 'submit_button_text' => isset( $default_texts['submit_button_text'] ) ? $default_texts['submit_button_text'] : __( 'Submit', 'quiz-master-next' ),
87
+ 'name_field_text' => isset( $default_texts['name_field_text'] ) ? $default_texts['name_field_text'] : __( 'Name', 'quiz-master-next' ),
88
+ 'business_field_text' => isset( $default_texts['business_field_text'] ) ? $default_texts['business_field_text'] : __( 'Business', 'quiz-master-next' ),
89
+ 'email_field_text' => isset( $default_texts['email_field_text'] ) ? $default_texts['email_field_text'] : __( 'Email', 'quiz-master-next' ),
90
+ 'phone_field_text' => isset( $default_texts['phone_field_text'] ) ? $default_texts['phone_field_text'] : __( 'Phone Number', 'quiz-master-next' ),
91
+ 'comment_field_text' => isset( $default_texts['comment_field_text'] ) ? $default_texts['comment_field_text'] : __( 'Comments', 'quiz-master-next' ),
92
  'email_from_text' => 'Wordpress',
93
+ 'question_answer_template' => isset( $default_texts['question_answer_template'] ) ? $default_texts['question_answer_template'] : '%QUESTION%<br />%USER_ANSWERS_DEFAULT%',
94
  'leaderboard_template' => '',
95
  'quiz_system' => 0,
96
  'randomness_order' => 0,
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' ),
111
  'certificate_template' => '',
112
  'social_media' => 0,
113
  'social_media_text' => __( 'I just scored %CORRECT_SCORE%% on %QUIZ_NAME%!', 'quiz-master-next' ),
114
  'pagination' => 0,
115
+ 'pagination_text' => isset( $default_texts['next_button_text'] ) ? $default_texts['next_button_text'] : __( 'Next', 'quiz-master-next' ),
116
  'timer_limit' => 0,
117
  'quiz_stye' => '',
118
  'question_numbering' => 0,
120
  'theme_selected' => 'primary',
121
  'last_activity' => current_time( 'mysql' ),
122
  'require_log_in' => 0,
123
+ 'require_log_in_text' => isset( $default_texts['require_log_in_text'] ) ? $default_texts['require_log_in_text'] : __( 'This quiz is for logged in users only.', 'quiz-master-next' ),
124
  'limit_total_entries' => 0,
125
+ 'limit_total_entries_text' => isset( $default_texts['limit_total_entries_text'] ) ? $default_texts['limit_total_entries_text'] : __( 'Unfortunately, this quiz has a limited amount of entries it can recieve and has already reached that limit.', 'quiz-master-next' ),
126
  'scheduled_timeframe' => '',
127
  'scheduled_timeframe_text' => '',
128
  'quiz_views' => 0,
204
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your new quiz or survey has been created successfully. To begin editing, click the Edit link.', 'quiz-master-next' ), 'success' );
205
  $mlwQuizMasterNext->audit_manager->new_audit( 'New Quiz/Survey Has Been Created', $new_quiz, '' );
206
 
207
+ /**
208
+ * Prepare quiz result & email templates.
209
+ */
210
+ self::add_quiz_templates($new_quiz);
211
+
212
  // Hook called after new quiz or survey has been created. Passes quiz_id to hook
213
  do_action( 'qmn_quiz_created', $new_quiz );
214
  } else {
278
  }
279
 
280
  if ( $qsm_delete && ! empty( $quiz_post_id ) ) {
281
+ if ( $qsm_delete_from_db ) {
282
+ wp_delete_post( $quiz_post_id, true );
283
+ } else {
284
+ wp_trash_post( $quiz_post_id );
285
+ }
286
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your quiz or survey has been deleted successfully.', 'quiz-master-next' ), 'success' );
287
  $mlwQuizMasterNext->audit_manager->new_audit( "Quiz/Survey Has Been Deleted: $quiz_name", $quiz_id, '' );
288
  } else {
302
  * @param string $quiz_name The new name of the quiz.
303
  * @return void
304
  */
305
+ public function edit_quiz_name( $quiz_id, $quiz_name, $post_id ) {
306
  global $mlwQuizMasterNext;
307
  global $wpdb;
308
  $results = $wpdb->update(
317
  array( '%d' )
318
  );
319
  if ( false !== $results ) {
320
+ $quiz_data = array(
321
+ 'ID' => $post_id,
322
+ 'post_title' => $quiz_name,
323
+ );
324
+ wp_update_post($quiz_data);
325
+
326
  $mlwQuizMasterNext->alertManager->newAlert( __( 'The name of your quiz or survey has been updated successfully.', 'quiz-master-next' ), 'success' );
327
  $mlwQuizMasterNext->audit_manager->new_audit( 'Quiz/Survey Name Has Been Edited', $quiz_id, '' );
328
  } else {
520
  add_post_meta( $quiz_post_id, 'quiz_id', $mlw_new_id );
521
  $mlwQuizMasterNext->alertManager->newAlert( __( 'Your quiz or survey has been duplicated successfully.', 'quiz-master-next' ), 'success' );
522
  $mlwQuizMasterNext->audit_manager->new_audit( 'New Quiz/Survey Has Been Created', $mlw_new_id, '' );
523
+ /**
524
+ * Prepare quiz result & email templates.
525
+ */
526
+ self::add_quiz_templates($mlw_new_id);
527
+
528
  do_action( 'qmn_quiz_duplicated', $quiz_id, $mlw_new_id );
529
  } else {
530
  $mlwQuizMasterNext->alertManager->newAlert( __( 'There has been an error in this action. Please share this with the developer. Error Code: 0011', 'quiz-master-next' ), 'error' );
688
  }
689
  }
690
 
691
+ public static function add_quiz_templates( $quiz_id ) {
692
+ global $mlwQuizMasterNext;
693
+ $pages = QSM_Results_Pages::load_pages( $quiz_id );
694
+ for ( $i = 0; $i < count( $pages ); $i++ ) {
695
+ if ( ! empty($pages[ $i ]['page']) ) {
696
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $pages[ $i ]['page'], "quiz-result-page-{$i}-{$quiz_id}" );
697
+ }
698
+ }
699
+ $emails = QSM_Emails::load_emails( $quiz_id );
700
+ for ( $i = 0; $i < count( $emails ); $i++ ) {
701
+ if ( ! empty($emails[ $i ]['content']) ) {
702
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $emails[ $i ]['subject'], "quiz-email-subject-{$i}-{$quiz_id}" );
703
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $emails[ $i ]['content'], "quiz-email-content-{$i}-{$quiz_id}" );
704
+ }
705
+ }
706
+ }
707
+
708
  /**
709
  * Retrieves setting store in quiz_settings
710
  *
php/classes/class-qmn-quiz-manager.php CHANGED
@@ -215,12 +215,14 @@ class QMNQuizManager {
215
  * Get question quick result
216
  */
217
  public function qsm_get_question_quick_result() {
218
- global $wpdb;
219
  $question_id = isset( $_POST['question_id'] ) ? intval( $_POST['question_id'] ) : 0;
220
  $answer = isset( $_POST['answer'] ) ? sanitize_text_field( wp_unslash( $_POST['answer'] ) ) : '';
221
  $question_array = $wpdb->get_row( $wpdb->prepare( "SELECT answer_array, question_answer_info FROM {$wpdb->prefix}mlw_questions WHERE question_id = (%d)", $question_id ), 'ARRAY_A' );
222
  $answer_array = maybe_unserialize( $question_array['answer_array'] );
223
  $correct_info_text = isset( $question_array['question_answer_info'] ) ? html_entity_decode( $question_array['question_answer_info'] ) : '';
 
 
224
  $show_correct_info = isset( $_POST['show_correct_info'] ) ? sanitize_text_field( wp_unslash( $_POST['show_correct_info'] ) ) : 0;
225
  $got_ans = false;
226
  $correct_answer = false;
@@ -423,9 +425,16 @@ class QMNQuizManager {
423
  if ( ! empty( $qpages_arr ) ) {
424
  foreach ( $qpages_arr as $key => $qpage ) {
425
  unset( $qpage['questions'] );
426
- $qpages[ $qpage['id'] ] = $qpage;
 
 
427
  }
428
  }
 
 
 
 
 
429
  $qmn_json_data = array(
430
  'quiz_id' => $qmn_array_for_variables['quiz_id'],
431
  'quiz_name' => $qmn_array_for_variables['quiz_name'],
@@ -443,9 +452,9 @@ class QMNQuizManager {
443
  'end_quiz_if_wrong' => isset( $qmn_quiz_options->end_quiz_if_wrong ) ? $qmn_quiz_options->end_quiz_if_wrong : '',
444
  'form_disable_autofill' => isset( $qmn_quiz_options->form_disable_autofill ) ? $qmn_quiz_options->form_disable_autofill : '',
445
  'enable_quick_correct_answer_info' => isset( $qmn_quiz_options->enable_quick_correct_answer_info ) ? $qmn_quiz_options->enable_quick_correct_answer_info : 0,
446
- 'quick_result_correct_answer_text' => sanitize_text_field( $qmn_quiz_options->quick_result_correct_answer_text ),
447
- 'quick_result_wrong_answer_text' => sanitize_text_field( $qmn_quiz_options->quick_result_wrong_answer_text ),
448
- 'quiz_processing_message' => $qmn_quiz_options->quiz_processing_message,
449
  'not_allow_after_expired_time' => $qmn_quiz_options->not_allow_after_expired_time,
450
  'scheduled_time_end' => strtotime( $qmn_quiz_options->scheduled_time_end ),
451
  );
@@ -654,6 +663,25 @@ class QMNQuizManager {
654
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
655
  $question_sql = implode( ', ', $question_ids );
656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
  $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE question_id IN (%1s) %2s %3s %4s", $question_sql, $cat_query, $order_by_sql, $limit_sql );
658
  $questions = $wpdb->get_results( stripslashes( $query ) );
659
 
@@ -680,14 +708,7 @@ class QMNQuizManager {
680
  }
681
  $questions = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE quiz_id=%d AND deleted=0 %1s %2s %3s", $quiz_id, $question_sql, $order_by_sql, $limit_sql ) );
682
  }
683
- $questions = apply_filters( 'qsm_load_questions_filter', $questions, $quiz_id, $quiz_options );
684
-
685
- // Create question ids array
686
- $qsm_random_que_ids = array_column( $questions, 'question_id' );
687
- update_option( 'qsm_random_que_ids', $qsm_random_que_ids );
688
-
689
- // Returns an array of all the loaded questions.
690
- return $questions;
691
  }
692
 
693
  /**
@@ -765,10 +786,13 @@ class QMNQuizManager {
765
 
766
  global $qmn_json_data;
767
  $qmn_json_data['error_messages'] = array(
768
- 'email' => sanitize_text_field( $options->email_error_text ),
769
- 'number' => sanitize_text_field( $options->number_error_text ),
770
- 'incorrect' => sanitize_text_field( $options->incorrect_error_text ),
771
- 'empty' => sanitize_text_field( $options->empty_error_text ),
 
 
 
772
  );
773
 
774
  wp_enqueue_script( 'progress-bar', QSM_PLUGIN_JS_URL . '/progressbar.min.js', array(), '1.1.0', true );
@@ -794,8 +818,8 @@ class QMNQuizManager {
794
  );
795
  wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
796
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
797
- global $qmn_total_questions;
798
- $qmn_total_questions = 0;
799
  global $mlw_qmn_section_count;
800
  $mlw_qmn_section_count = 0;
801
  $auto_pagination_class = $options->pagination > 0 ? 'qsm_auto_pagination_enabled' : '';
@@ -855,6 +879,7 @@ class QMNQuizManager {
855
  echo apply_filters( 'qmn_before_error_message', '', $options, $quiz_data );
856
  ?>
857
  <div id="mlw_error_message_bottom" class="qsm-error-message qmn_error_message_section"></div>
 
858
  <input type="hidden" name="total_questions" id="total_questions" value="<?php echo esc_attr( $qmn_total_questions ); ?>" />
859
  <input type="hidden" name="timer" id="timer" value="0" />
860
  <input type="hidden" name="timer_ms" id="timer_ms" value="0"/>
@@ -898,8 +923,8 @@ class QMNQuizManager {
898
 
899
  if ( count( $pages ) > 1 && ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) ) {
900
  $qmn_json_data['first_page'] = true;
901
- $message_before = wpautop( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ) );
902
- $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_before, $quiz_data );
903
  ?>
904
  <section class="qsm-page <?php echo esc_attr( $animation_effect ); ?>">
905
  <div class="quiz_section quiz_begin">
@@ -928,8 +953,8 @@ class QMNQuizManager {
928
  <?php
929
  if ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) {
930
  $qmn_json_data['first_page'] = false;
931
- $message_before = wpautop( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ) );
932
- $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_before, $quiz_data );
933
  ?>
934
  <div class="quiz_section quiz_begin">
935
  <div class='qsm-before-message mlw_qmn_message_before'>
@@ -962,36 +987,36 @@ class QMNQuizManager {
962
  $mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
963
  if ( 0 == $question['comments'] ) {
964
  ?>
965
- <input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" />
966
  <?php
967
  }
968
  if ( 2 == $question['comments'] ) {
969
  ?>
970
- <textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" ></textarea>
971
  <?php
972
  }
973
  // Checks if a hint is entered.
974
  if ( ! empty( $question['hints'] ) ) {
975
- echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip">' . wp_kses_post( $options->hint_text ) . '<span class="qsm_tooltiptext">' . wp_kses_post( $question['hints'] ) . '</span></div>';
976
  }
977
  ?>
978
  </div>
979
  <?php
980
  }
981
  if ( 0 == $options->comment_section ) {
982
- $message_comments = wpautop( htmlspecialchars_decode( $options->message_comment, ENT_QUOTES ) );
983
  ?>
984
  <div class="quiz_section quiz_begin">
985
- <label for='mlwQuizComments' class='qsm-comments-label mlw_qmn_comment_section_text'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_comments, $quiz_data ); ?></label>
986
  <textarea id='mlwQuizComments' name='mlwQuizComments' class='qsm-comments qmn_comment_section'></textarea>
987
  </div>
988
  <?php
989
  }
990
  if ( ! empty( $options->message_end_template ) || ( 1 == $options->contact_info_location && $contact_fields ) ) {
991
- $message_after = wpautop( htmlspecialchars_decode( $options->message_end_template, ENT_QUOTES ) );
992
  ?>
993
  <div class="quiz_section">
994
- <div class='qsm-after-message mlw_qmn_message_end'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_after, $quiz_data ); ?></div>
995
  <?php
996
  if ( 1 == $options->contact_info_location ) {
997
  echo QSM_Contact_Manager::display_fields( $options );
@@ -1017,6 +1042,9 @@ class QMNQuizManager {
1017
  <?php do_action( 'qsm_action_before_page', $qpage_id, $qpage ); ?>
1018
  <?php
1019
  foreach ( $page as $question_id ) {
 
 
 
1020
  $question_list .= $question_id . 'Q';
1021
  $question = $questions[ $question_id ];
1022
  $category_class = '';
@@ -1031,17 +1059,17 @@ class QMNQuizManager {
1031
  $mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
1032
  if ( 0 == $question['comments'] ) {
1033
  ?>
1034
- <input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" />
1035
  <?php
1036
  }
1037
  if ( 2 == $question['comments'] ) {
1038
  ?>
1039
- <textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" ></textarea>
1040
  <?php
1041
  }
1042
  // Checks if a hint is entered.
1043
  if ( ! empty( $question['hints'] ) ) {
1044
- echo '<div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip">' . wp_kses_post( $options->hint_text ) . '<span class="qsm_tooltiptext">' . wp_kses_post( $question['hints'] ) . '</span></div>';
1045
  }
1046
  ?>
1047
  </div>
@@ -1062,22 +1090,22 @@ class QMNQuizManager {
1062
  }
1063
  }
1064
  if ( count( $pages ) > 1 && 0 == $options->comment_section ) {
1065
- $message_comments = wpautop( htmlspecialchars_decode( $options->message_comment, ENT_QUOTES ) );
1066
  ?>
1067
  <section class="qsm-page">
1068
  <div class="quiz_section quiz_begin">
1069
- <label for="mlwQuizComments" class="qsm-comments-label mlw_qmn_comment_section_text"><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_comments, $quiz_data ); ?></label>
1070
  <textarea id="mlwQuizComments" name="mlwQuizComments" class="qsm-comments qmn_comment_section"></textarea>
1071
  </div>
1072
  </section>
1073
  <?php
1074
  }
1075
  if ( count( $pages ) > 1 && ( ! empty( $options->message_end_template ) || ( 1 == $options->contact_info_location && $contact_fields ) ) ) {
1076
- $message_after = wpautop( htmlspecialchars_decode( $options->message_end_template, ENT_QUOTES ) );
1077
  ?>
1078
  <section class="qsm-page" style="display: none;">
1079
  <div class="quiz_section">
1080
- <div class='qsm-after-message mlw_qmn_message_end'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_after, $quiz_data ); ?></div>
1081
  <?php
1082
  if ( 1 == $options->contact_info_location ) {
1083
  echo QSM_Contact_Manager::display_fields( $options );
@@ -1097,15 +1125,14 @@ class QMNQuizManager {
1097
  *
1098
  * @since 7.3.5
1099
  */
1100
-
1101
  $tmpl_pagination = '<div class="qsm-pagination qmn_pagination border margin-bottom">
1102
- <a class="qsm-btn qsm-previous qmn_btn mlw_qmn_quiz_link mlw_previous" href="javascript:void(0)">' . esc_html( $options->previous_button_text ) . '</a>
1103
- <span class="qmn_page_message"></span>
1104
- <div class="qmn_page_counter_message"></div>
1105
- <div class="qsm-progress-bar" style="display:none;"><div class="progressbar-text"></div></div>
1106
- <a class="qsm-btn qsm-next qmn_btn mlw_qmn_quiz_link mlw_next" href="javascript:void(0)">' . esc_html( $options->next_button_text ) . '</a>
1107
- <input type="submit" class="qsm-btn qsm-submit-btn qmn_btn" value=' . esc_attr( $options->submit_button_text ) . ' />
1108
- </div>';
1109
  qsm_add_inline_tmpl( 'qsm_quiz', 'tmpl-qsm-pagination-' . esc_attr( $options->quiz_id ), $tmpl_pagination );
1110
  ?>
1111
  <input type="hidden" name="qmn_question_list" value="<?php echo esc_attr( $question_list ); ?>" />
@@ -1125,7 +1152,7 @@ class QMNQuizManager {
1125
  * @deprecated 5.2.0 Use new page system instead
1126
  */
1127
  public function display_begin_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1128
- global $qmn_json_data, $wp_embed;
1129
  $contact_fields = QSM_Contact_Manager::load_fields();
1130
  if ( ! empty( $qmn_quiz_options->message_before ) || ( 0 == $qmn_quiz_options->contact_info_location && $contact_fields ) ) {
1131
  $qmn_json_data['first_page'] = true;
@@ -1135,8 +1162,8 @@ class QMNQuizManager {
1135
  ?>
1136
  <div class="qsm-auto-page-row quiz_section <?php echo esc_attr( $animation_effect ); ?> quiz_begin">
1137
  <?php
1138
- $message_before = wpautop( htmlspecialchars_decode( $qmn_quiz_options->message_before, ENT_QUOTES ) );
1139
- $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_before, $qmn_array_for_variables );
1140
  $editor_text = $wp_embed->run_shortcode( $message_before );
1141
  $editor_text = preg_replace( '/\s*[\w\/:\.]*youtube.com\/watch\?v=([\w]+)([\w\*\-\?\&\;\%\=\.]*)/i', '<iframe width="420" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $editor_text );
1142
  ?>
@@ -1217,18 +1244,18 @@ class QMNQuizManager {
1217
  $mlwQuizMasterNext->pluginHelper->display_question( $mlw_question->question_type_new, $mlw_question->question_id, $qmn_quiz_options );
1218
  if ( 0 == $mlw_question->comments ) {
1219
  ?>
1220
- <input type="text" class="mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" name="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" placeholder="<?php echo esc_attr( $qmn_quiz_options->comment_field_text ); ?>" onclick="qmnClearField(this)" /><br />
1221
  <?php
1222
  }
1223
  if ( 2 == $mlw_question->comments ) {
1224
  ?>
1225
- <textarea cols="70" rows="5" class="mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" name="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" placeholder="<?php echo esc_attr( $qmn_quiz_options->comment_field_text ); ?>" onclick="qmnClearField(this)"></textarea><br />
1226
  <?php
1227
  }
1228
  // Checks if a hint is entered.
1229
  if ( ! empty( $mlw_question->hints ) ) {
1230
  ?>
1231
- <div class="qsm-hint qsm_hint mlw_qmn_hint_link qsm_tooltip"><?php echo esc_html( $qmn_quiz_options->hint_text ); ?><span class="qsm_tooltiptext"><?php echo wp_kses( preg_replace( '#<script(.*?)>(.*?)</script>#is', '', htmlspecialchars_decode( $mlw_question->hints, ENT_QUOTES ) ), wp_kses_allowed_html( 'post' ) ); ?></span></div><br /><br />
1232
  <?php
1233
  }
1234
  ?>
@@ -1248,7 +1275,7 @@ class QMNQuizManager {
1248
  ?>
1249
  <span class="pages_count" style="display: none;">
1250
  <?php
1251
- $text_c = $current_page_number . esc_html__( ' out of ', 'quiz-master-next' ) . $total_pagination;
1252
  echo apply_filters( 'qsm_total_pages_count', $text_c, $pages_count, $total_pages_count );
1253
  ?>
1254
  </span>
@@ -1271,17 +1298,17 @@ class QMNQuizManager {
1271
  * @deprecated 5.2.0 Use new page system instead
1272
  */
1273
  public function display_comment_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1274
- global $mlw_qmn_section_count;
1275
  if ( 0 == $qmn_quiz_options->comment_section ) {
1276
  $mlw_qmn_section_count = $mlw_qmn_section_count + 1;
1277
  $qsm_d_none = 0 == $qmn_quiz_options->randomness_order ? 'qsm-d-none' : '';
1278
  ?>
1279
  <div class="quiz_section quiz_end qsm-auto-page-row qsm-quiz-comment-section slide <?php echo esc_attr( $mlw_qmn_section_count . ' ' . $qsm_d_none ); ?>" >
1280
  <?php
1281
- $message_comments = wpautop( htmlspecialchars_decode( $qmn_quiz_options->message_comment, ENT_QUOTES ) );
1282
- $message_comments = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_comments, $qmn_array_for_variables );
1283
  ?>
1284
- <label for="mlwQuizComments" class="mlw_qmn_comment_section_text"><?php echo wp_kses( $message_comments, wp_kses_allowed_html( 'post' ) ); ?></label><br />
1285
  <textarea cols="60" rows="10" id="mlwQuizComments" name="mlwQuizComments" class="qmn_comment_section"></textarea>
1286
  </div>
1287
  <?php
@@ -1300,7 +1327,7 @@ class QMNQuizManager {
1300
  * @deprecated 5.2.0 Use new page system instead
1301
  */
1302
  public function display_end_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1303
- global $mlw_qmn_section_count;
1304
  $section_display = '';
1305
  $mlw_qmn_section_count = $mlw_qmn_section_count + 1;
1306
  $pagination_option = $qmn_quiz_options->pagination;
@@ -1317,8 +1344,8 @@ class QMNQuizManager {
1317
  ?>
1318
  <span class='mlw_qmn_message_end'>
1319
  <?php
1320
- $message_end = wpautop( htmlspecialchars_decode( $qmn_quiz_options->message_end_template, ENT_QUOTES ) );
1321
- echo apply_filters( 'mlw_qmn_template_variable_quiz_page', $message_end, $qmn_array_for_variables );
1322
  ?>
1323
  </span>
1324
  <br /><br />
@@ -1328,13 +1355,13 @@ class QMNQuizManager {
1328
  echo QSM_Contact_Manager::display_fields( $qmn_quiz_options );
1329
  }
1330
  ?>
1331
- <input type='submit' class='qsm-btn qsm-submit-btn qmn_btn' value="<?php echo esc_attr( $qmn_quiz_options->submit_button_text ); ?>" />
1332
  </div>
1333
  <?php
1334
  } else {
1335
  ?>
1336
  <div class="qsm-auto-page-row quiz_section quiz_end empty_quiz_end <?php echo esc_attr( $qsm_d_none ); ?>" >
1337
- <input type="submit" class="qsm-btn qsm-submit-btn qmn_btn" value="<?php echo esc_attr( $qmn_quiz_options->submit_button_text ); ?>" />
1338
  </div>
1339
  <?php
1340
  }
@@ -1513,7 +1540,6 @@ class QMNQuizManager {
1513
  }
1514
  $qmn_array_for_variables['hidden_questions'] = $hidden_questions;
1515
  $qmn_array_for_variables = apply_filters( 'qsm_result_variables', $qmn_array_for_variables );
1516
-
1517
  if ( ! isset( $_POST['mlw_code_captcha'] ) || ( isset( $_POST['mlw_code_captcha'], $_POST['mlw_user_captcha'] ) && sanitize_text_field( wp_unslash( $_POST['mlw_user_captcha'] ) ) == sanitize_text_field( wp_unslash( $_POST['mlw_code_captcha'] ) ) ) ) {
1518
  $qsm_check_answers_return = $this->check_answers( $qmn_quiz_options, $qmn_array_for_variables );
1519
  $qmn_array_for_variables = array_merge( $qmn_array_for_variables, $qsm_check_answers_return );
@@ -1616,7 +1642,7 @@ class QMNQuizManager {
1616
  $qmn_array_for_variables['response_saved'] = isset( $results_insert ) ? $results_insert : false;
1617
  $qmn_array_for_variables['result_id'] = $results_id;
1618
  $qmn_array_for_variables['result_unique_id'] = $unique_id;
1619
-
1620
  // Converts date to the preferred format
1621
  global $mlwQuizMasterNext;
1622
  $qmn_array_for_variables = $mlwQuizMasterNext->pluginHelper->convert_to_preferred_date_format( $qmn_array_for_variables );
@@ -1664,13 +1690,13 @@ class QMNQuizManager {
1664
  $this->qsm_background_email->data(
1665
  array(
1666
  'name' => 'send_emails',
1667
- 'variables' => $qmn_array_for_variables,
1668
  )
1669
  )->dispatch();
1670
  } else {
1671
  // Sends the emails.
1672
  $qmn_array_for_variables['email_processed'] = 'yes';
1673
- QSM_Emails::send_emails( $qmn_array_for_variables );
1674
  }
1675
 
1676
  /**
@@ -1725,9 +1751,19 @@ class QMNQuizManager {
1725
  // Load the pages and questions
1726
  $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
1727
  $questions = QSM_Questions::load_questions_by_pages( $options->quiz_id );
1728
-
 
 
 
 
 
 
 
 
 
 
1729
  // Retrieve data from submission
1730
- $total_questions = isset( $_POST['total_questions'] ) ? intval( $_POST['total_questions'] ) : 0;
1731
  $question_list = array();
1732
  if ( isset( $_POST['qmn_question_list'] ) ) {
1733
  $qmn_question_list = sanitize_text_field( wp_unslash( $_POST['qmn_question_list'] ) );
@@ -1921,9 +1957,9 @@ class QMNQuizManager {
1921
  $question_data[] = apply_filters(
1922
  'qmn_answer_array',
1923
  array(
1924
- $question_text,
1925
  htmlspecialchars( $user_answer, ENT_QUOTES ),
1926
- htmlspecialchars( $correct_answer, ENT_QUOTES ),
1927
  $comment,
1928
  'user_answer' => $user_answer_array,
1929
  'correct_answer' => $correct_answer_array,
@@ -1933,7 +1969,7 @@ class QMNQuizManager {
1933
  'category' => $question['category'],
1934
  'multicategories' => $question['multicategories'],
1935
  'question_type' => $question['question_type_new'],
1936
- 'question_title' => isset( $question['settings']['question_title'] ) ? $question['settings']['question_title'] : '',
1937
  'user_compare_text' => $user_compare_text,
1938
  ),
1939
  $options,
@@ -1948,32 +1984,11 @@ class QMNQuizManager {
1948
 
1949
  // Calculate Total Percent Score And Average Points Only If Total Questions Doesn't Equal Zero To Avoid Division By Zero Error
1950
  if ( 0 !== $total_questions ) {
1951
- $total_score = round( ( ( $total_correct / $total_questions ) * 100 ), 2 );
1952
  } else {
1953
  $total_score = 0;
1954
  }
1955
 
1956
- // Get random order
1957
- $qsm_random_que_ids = get_option( 'qsm_random_que_ids' );
1958
-
1959
- if ( ! empty( $qsm_random_que_ids ) && is_array( $qsm_random_que_ids ) ) {
1960
- $qs_ids = array_column( $question_data, 'id' );
1961
- $has_diff = array_diff( $qsm_random_que_ids, $qs_ids );
1962
- // Check random option value has all the questions in previous order
1963
- if ( empty( $has_diff ) ) {
1964
- $new_question_data = array();
1965
- foreach ( $qsm_random_que_ids as $que_id ) {
1966
- $key = array_search( $que_id, $qs_ids, true );
1967
- $new_question_data[] = $question_data[ $key ];
1968
- }
1969
- if ( ! empty( $new_question_data ) ) {
1970
- $question_data = $new_question_data;
1971
- }
1972
- }
1973
- // We no need longer this option
1974
- delete_option( 'qsm_random_que_ids' );
1975
- }
1976
-
1977
  // Return array to be merged with main user response array
1978
  return apply_filters(
1979
  'qsm_check_answers_results',
@@ -2467,15 +2482,15 @@ $qmnQuizManager = new QMNQuizManager();
2467
  add_filter( 'qmn_begin_shortcode', 'qmn_require_login_check', 10, 3 );
2468
 
2469
  function qmn_require_login_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2470
- global $qmn_allowed_visit;
2471
  if ( 1 == $qmn_quiz_options->require_log_in && ! is_user_logged_in() ) {
2472
  $qmn_allowed_visit = false;
 
2473
  if ( isset( $qmn_quiz_options->require_log_in_text ) && '' !== $qmn_quiz_options->require_log_in_text ) {
2474
- $mlw_message = wpautop( htmlspecialchars_decode( $qmn_quiz_options->require_log_in_text, ENT_QUOTES ) );
2475
- } else {
2476
- $mlw_message = wpautop( htmlspecialchars_decode( $qmn_quiz_options->require_log_in_text, ENT_QUOTES ) );
2477
  }
2478
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message, $qmn_array_for_variables );
 
2479
  $mlw_message = str_replace( "\n", '<br>', $mlw_message );
2480
  // $display .= do_shortcode($mlw_message);
2481
  $display .= do_shortcode( $mlw_message );
@@ -2496,7 +2511,7 @@ add_filter( 'qmn_begin_shortcode', 'qsm_scheduled_timeframe_check', 99, 3 );
2496
  * @return HTML This function check the time frame of quiz.
2497
  */
2498
  function qsm_scheduled_timeframe_check( $display, $options, $variable_data ) {
2499
- global $qmn_allowed_visit;
2500
 
2501
  $checked_pass = false;
2502
  // Checks if the start and end dates have data
@@ -2528,10 +2543,10 @@ function qsm_scheduled_timeframe_check( $display, $options, $variable_data ) {
2528
  }
2529
  }
2530
  if ( true == $checked_pass ) {
2531
- $qmn_allowed_visit = false;
2532
- $message = wpautop( htmlspecialchars_decode( $options->scheduled_timeframe_text, ENT_QUOTES ) );
2533
- $message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message, $variable_data );
2534
- $display .= str_replace( "\n", '<br>', $message );
2535
  }
2536
  return $display;
2537
  }
@@ -2548,7 +2563,7 @@ add_filter( 'qmn_begin_shortcode', 'qmn_total_user_tries_check', 10, 3 );
2548
  * @return string The altered HTML display for the quiz
2549
  */
2550
  function qmn_total_user_tries_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2551
- global $qmn_allowed_visit;
2552
  if ( 0 != $qmn_quiz_options->total_user_tries ) {
2553
 
2554
  // Prepares the variables
@@ -2568,8 +2583,8 @@ function qmn_total_user_tries_check( $display, $qmn_quiz_options, $qmn_array_for
2568
 
2569
  // Stops the quiz and prepares entered text
2570
  $qmn_allowed_visit = false;
2571
- $mlw_message = wpautop( htmlspecialchars_decode( $qmn_quiz_options->total_user_tries_text, ENT_QUOTES ) );
2572
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message, $qmn_array_for_variables );
2573
  $display .= $mlw_message;
2574
  }
2575
  }
@@ -2579,13 +2594,13 @@ function qmn_total_user_tries_check( $display, $qmn_quiz_options, $qmn_array_for
2579
  add_filter( 'qmn_begin_quiz', 'qmn_total_tries_check', 10, 3 );
2580
 
2581
  function qmn_total_tries_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2582
- global $qmn_allowed_visit;
2583
  if ( 0 != $qmn_quiz_options->limit_total_entries ) {
2584
  global $wpdb;
2585
  $mlw_qmn_entries_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(quiz_id) FROM {$wpdb->prefix}mlw_results WHERE deleted=0 AND quiz_id=%d", $qmn_array_for_variables['quiz_id'] ) );
2586
  if ( $mlw_qmn_entries_count >= $qmn_quiz_options->limit_total_entries ) {
2587
- $mlw_message = wpautop( htmlspecialchars_decode( $qmn_quiz_options->limit_total_entries_text, ENT_QUOTES ) );
2588
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message, $qmn_array_for_variables );
2589
  $display .= $mlw_message;
2590
  $qmn_allowed_visit = false;
2591
  }
@@ -2597,8 +2612,7 @@ add_filter( 'qmn_begin_quiz', 'qmn_pagination_check', 10, 3 );
2597
 
2598
  function qmn_pagination_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2599
  if ( 0 != $qmn_quiz_options->pagination ) {
2600
- global $wpdb;
2601
- global $qmn_json_data;
2602
  $total_questions = 0;
2603
  if ( 0 != $qmn_quiz_options->question_from_total ) {
2604
  $total_questions = $qmn_quiz_options->question_from_total;
@@ -2611,8 +2625,8 @@ function qmn_pagination_check( $display, $qmn_quiz_options, $qmn_array_for_varia
2611
  'amount' => $qmn_quiz_options->pagination,
2612
  'section_comments' => $qmn_quiz_options->comment_section,
2613
  'total_questions' => $total_questions,
2614
- 'previous_text' => sanitize_text_field( $qmn_quiz_options->previous_button_text ),
2615
- 'next_text' => sanitize_text_field( $qmn_quiz_options->next_button_text ),
2616
  );
2617
  }
2618
  return $display;
215
  * Get question quick result
216
  */
217
  public function qsm_get_question_quick_result() {
218
+ global $wpdb, $mlwQuizMasterNext;
219
  $question_id = isset( $_POST['question_id'] ) ? intval( $_POST['question_id'] ) : 0;
220
  $answer = isset( $_POST['answer'] ) ? sanitize_text_field( wp_unslash( $_POST['answer'] ) ) : '';
221
  $question_array = $wpdb->get_row( $wpdb->prepare( "SELECT answer_array, question_answer_info FROM {$wpdb->prefix}mlw_questions WHERE question_id = (%d)", $question_id ), 'ARRAY_A' );
222
  $answer_array = maybe_unserialize( $question_array['answer_array'] );
223
  $correct_info_text = isset( $question_array['question_answer_info'] ) ? html_entity_decode( $question_array['question_answer_info'] ) : '';
224
+ $correct_info_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $correct_info_text, "correctanswerinfo-{$question_id}" );
225
+
226
  $show_correct_info = isset( $_POST['show_correct_info'] ) ? sanitize_text_field( wp_unslash( $_POST['show_correct_info'] ) ) : 0;
227
  $got_ans = false;
228
  $correct_answer = false;
425
  if ( ! empty( $qpages_arr ) ) {
426
  foreach ( $qpages_arr as $key => $qpage ) {
427
  unset( $qpage['questions'] );
428
+ if ( isset( $qpage['id'] ) ) {
429
+ $qpages[ $qpage['id'] ] = $qpage;
430
+ }
431
  }
432
  }
433
+ $correct_answer_text = sanitize_text_field( $qmn_quiz_options->quick_result_correct_answer_text );
434
+ $correct_answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $correct_answer_text, "quiz_quick_result_correct_answer_text-{$qmn_array_for_variables['quiz_id']}" );
435
+ $wrong_answer_text = sanitize_text_field( $qmn_quiz_options->quick_result_wrong_answer_text );
436
+ $wrong_answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $wrong_answer_text, "quiz_quick_result_wrong_answer_text-{$qmn_array_for_variables['quiz_id']}" );
437
+ $quiz_processing_message = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->quiz_processing_message, "quiz_quiz_processing_message-{$qmn_array_for_variables['quiz_id']}" );
438
  $qmn_json_data = array(
439
  'quiz_id' => $qmn_array_for_variables['quiz_id'],
440
  'quiz_name' => $qmn_array_for_variables['quiz_name'],
452
  'end_quiz_if_wrong' => isset( $qmn_quiz_options->end_quiz_if_wrong ) ? $qmn_quiz_options->end_quiz_if_wrong : '',
453
  'form_disable_autofill' => isset( $qmn_quiz_options->form_disable_autofill ) ? $qmn_quiz_options->form_disable_autofill : '',
454
  'enable_quick_correct_answer_info' => isset( $qmn_quiz_options->enable_quick_correct_answer_info ) ? $qmn_quiz_options->enable_quick_correct_answer_info : 0,
455
+ 'quick_result_correct_answer_text' => $correct_answer_text,
456
+ 'quick_result_wrong_answer_text' => $wrong_answer_text,
457
+ 'quiz_processing_message' => $quiz_processing_message,
458
  'not_allow_after_expired_time' => $qmn_quiz_options->not_allow_after_expired_time,
459
  'scheduled_time_end' => strtotime( $qmn_quiz_options->scheduled_time_end ),
460
  );
663
  $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
664
  $question_sql = implode( ', ', $question_ids );
665
 
666
+ if ( 1 == $quiz_options->randomness_order || 2 == $quiz_options->randomness_order ) {
667
+ if ( isset($_COOKIE[ 'question_ids_'.$quiz_id ]) ) {
668
+ $question_sql = sanitize_text_field( wp_unslash( $_COOKIE[ 'question_ids_'.$quiz_id ] ) );
669
+ }else {
670
+ $question_ids = apply_filters( 'qsm_load_questions_ids', $question_ids, $quiz_id, $quiz_options );
671
+ $question_ids = QMNPluginHelper::qsm_shuffle_assoc( $question_ids );
672
+ $question_sql = implode( ', ', $question_ids );
673
+ ?>
674
+ <script>
675
+ const d = new Date();
676
+ d.setTime(d.getTime() + (365*24*60*60*1000));
677
+ let expires = "expires="+ d.toUTCString();
678
+ document.cookie = "question_ids_<?php echo esc_attr( $quiz_id ); ?> = <?php echo esc_attr( $question_sql ) ?>; "+expires+"; path=/";
679
+ </script>
680
+ <?php
681
+ }
682
+ $order_by_sql = 'ORDER BY FIELD(question_id,'.$question_sql.')';
683
+ }
684
+
685
  $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE question_id IN (%1s) %2s %3s %4s", $question_sql, $cat_query, $order_by_sql, $limit_sql );
686
  $questions = $wpdb->get_results( stripslashes( $query ) );
687
 
708
  }
709
  $questions = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE quiz_id=%d AND deleted=0 %1s %2s %3s", $quiz_id, $question_sql, $order_by_sql, $limit_sql ) );
710
  }
711
+ return apply_filters( 'qsm_load_questions_filter', $questions, $quiz_id, $quiz_options );
 
 
 
 
 
 
 
712
  }
713
 
714
  /**
786
 
787
  global $qmn_json_data;
788
  $qmn_json_data['error_messages'] = array(
789
+ 'email_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->email_error_text, "quiz_email_error_text-{$options->quiz_id}" ),
790
+ 'number_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->number_error_text, "quiz_number_error_text-{$options->quiz_id}" ),
791
+ 'incorrect_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->incorrect_error_text, "quiz_incorrect_error_text-{$options->quiz_id}" ),
792
+ 'empty_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->empty_error_text, "quiz_empty_error_text-{$options->quiz_id}" ),
793
+ 'url_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->url_error_text, "quiz_url_error_text-{$options->quiz_id}" ),
794
+ 'minlength_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->minlength_error_text, "quiz_minlength_error_text-{$options->quiz_id}" ),
795
+ 'maxlength_error_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->maxlength_error_text, "quiz_maxlength_error_text-{$options->quiz_id}" ),
796
  );
797
 
798
  wp_enqueue_script( 'progress-bar', QSM_PLUGIN_JS_URL . '/progressbar.min.js', array(), '1.1.0', true );
818
  );
819
  wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
820
  wp_add_inline_script( 'math_jax', self::$default_MathJax_script, 'before' );
821
+ global $qmn_total_questions, $qmn_all_questions_count;
822
+ $qmn_total_questions = $qmn_all_questions_count = 0;
823
  global $mlw_qmn_section_count;
824
  $mlw_qmn_section_count = 0;
825
  $auto_pagination_class = $options->pagination > 0 ? 'qsm_auto_pagination_enabled' : '';
879
  echo apply_filters( 'qmn_before_error_message', '', $options, $quiz_data );
880
  ?>
881
  <div id="mlw_error_message_bottom" class="qsm-error-message qmn_error_message_section"></div>
882
+ <input type="hidden" name="qmn_all_questions_count" id="qmn_all_questions_count" value="<?php echo esc_attr( $qmn_all_questions_count ); ?>" />
883
  <input type="hidden" name="total_questions" id="total_questions" value="<?php echo esc_attr( $qmn_total_questions ); ?>" />
884
  <input type="hidden" name="timer" id="timer" value="0" />
885
  <input type="hidden" name="timer_ms" id="timer_ms" value="0"/>
923
 
924
  if ( count( $pages ) > 1 && ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) ) {
925
  $qmn_json_data['first_page'] = true;
926
+ $message_before = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ), "quiz_message_before-{$options->quiz_id}" );
927
+ $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_before ), $quiz_data );
928
  ?>
929
  <section class="qsm-page <?php echo esc_attr( $animation_effect ); ?>">
930
  <div class="quiz_section quiz_begin">
953
  <?php
954
  if ( ! empty( $options->message_before ) || ( 0 == $options->contact_info_location && $contact_fields ) ) {
955
  $qmn_json_data['first_page'] = false;
956
+ $message_before = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_before, ENT_QUOTES ), "quiz_message_before-{$options->quiz_id}" );
957
+ $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_before ), $quiz_data );
958
  ?>
959
  <div class="quiz_section quiz_begin">
960
  <div class='qsm-before-message mlw_qmn_message_before'>
987
  $mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
988
  if ( 0 == $question['comments'] ) {
989
  ?>
990
+ <input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->comment_field_text, "quiz_comment_field_text-{$options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)" />
991
  <?php
992
  }
993
  if ( 2 == $question['comments'] ) {
994
  ?>
995
+ <textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->comment_field_text, "quiz_comment_field_text-{$options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)" ></textarea>
996
  <?php
997
  }
998
  // Checks if a hint is entered.
999
  if ( ! empty( $question['hints'] ) ) {
1000
+ 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>';
1001
  }
1002
  ?>
1003
  </div>
1004
  <?php
1005
  }
1006
  if ( 0 == $options->comment_section ) {
1007
+ $message_comments = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_comment, ENT_QUOTES ), "quiz_message_comment-{$options->quiz_id}" );
1008
  ?>
1009
  <div class="quiz_section quiz_begin">
1010
+ <label for='mlwQuizComments' class='qsm-comments-label mlw_qmn_comment_section_text'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_comments ), $quiz_data ); ?></label>
1011
  <textarea id='mlwQuizComments' name='mlwQuizComments' class='qsm-comments qmn_comment_section'></textarea>
1012
  </div>
1013
  <?php
1014
  }
1015
  if ( ! empty( $options->message_end_template ) || ( 1 == $options->contact_info_location && $contact_fields ) ) {
1016
+ $message_after = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_end_template, ENT_QUOTES ), "quiz_message_end_template-{$options->quiz_id}" );
1017
  ?>
1018
  <div class="quiz_section">
1019
+ <div class='qsm-after-message mlw_qmn_message_end'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_after ), $quiz_data ); ?></div>
1020
  <?php
1021
  if ( 1 == $options->contact_info_location ) {
1022
  echo QSM_Contact_Manager::display_fields( $options );
1042
  <?php do_action( 'qsm_action_before_page', $qpage_id, $qpage ); ?>
1043
  <?php
1044
  foreach ( $page as $question_id ) {
1045
+ if ( ! isset( $questions[ $question_id ] ) ) {
1046
+ continue;
1047
+ }
1048
  $question_list .= $question_id . 'Q';
1049
  $question = $questions[ $question_id ];
1050
  $category_class = '';
1059
  $mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
1060
  if ( 0 == $question['comments'] ) {
1061
  ?>
1062
+ <input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->comment_field_text, "quiz_comment_field_text-{$options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)" />
1063
  <?php
1064
  }
1065
  if ( 2 == $question['comments'] ) {
1066
  ?>
1067
+ <textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->comment_field_text, "quiz_comment_field_text-{$options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)" ></textarea>
1068
  <?php
1069
  }
1070
  // Checks if a hint is entered.
1071
  if ( ! empty( $question['hints'] ) ) {
1072
+ 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>';
1073
  }
1074
  ?>
1075
  </div>
1090
  }
1091
  }
1092
  if ( count( $pages ) > 1 && 0 == $options->comment_section ) {
1093
+ $message_comments = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_comment, ENT_QUOTES ), "quiz_message_comment-{$options->quiz_id}" );
1094
  ?>
1095
  <section class="qsm-page">
1096
  <div class="quiz_section quiz_begin">
1097
+ <label for="mlwQuizComments" class="qsm-comments-label mlw_qmn_comment_section_text"><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_comments ), $quiz_data ); ?></label>
1098
  <textarea id="mlwQuizComments" name="mlwQuizComments" class="qsm-comments qmn_comment_section"></textarea>
1099
  </div>
1100
  </section>
1101
  <?php
1102
  }
1103
  if ( count( $pages ) > 1 && ( ! empty( $options->message_end_template ) || ( 1 == $options->contact_info_location && $contact_fields ) ) ) {
1104
+ $message_after = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->message_end_template, ENT_QUOTES ), "quiz_message_end_template-{$options->quiz_id}" );
1105
  ?>
1106
  <section class="qsm-page" style="display: none;">
1107
  <div class="quiz_section">
1108
+ <div class='qsm-after-message mlw_qmn_message_end'><?php echo apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_after ), $quiz_data ); ?></div>
1109
  <?php
1110
  if ( 1 == $options->contact_info_location ) {
1111
  echo QSM_Contact_Manager::display_fields( $options );
1125
  *
1126
  * @since 7.3.5
1127
  */
 
1128
  $tmpl_pagination = '<div class="qsm-pagination qmn_pagination border margin-bottom">
1129
+ <a class="qsm-btn qsm-previous qmn_btn mlw_qmn_quiz_link mlw_previous" href="javascript:void(0)">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->previous_button_text, "quiz_previous_button_text-{$options->quiz_id}" ) ) . '</a>
1130
+ <span class="qmn_page_message"></span>
1131
+ <div class="qmn_page_counter_message"></div>
1132
+ <div class="qsm-progress-bar" style="display:none;"><div class="progressbar-text"></div></div>
1133
+ <a class="qsm-btn qsm-next qmn_btn mlw_qmn_quiz_link mlw_next" href="javascript:void(0)">' . esc_html( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->next_button_text, "quiz_next_button_text-{$options->quiz_id}" ) ) . '</a>
1134
+ <input type="submit" class="qsm-btn qsm-submit-btn qmn_btn" value="' . esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->submit_button_text, "quiz_submit_button_text-{$options->quiz_id}" ) ) . '" />
1135
+ </div>';
1136
  qsm_add_inline_tmpl( 'qsm_quiz', 'tmpl-qsm-pagination-' . esc_attr( $options->quiz_id ), $tmpl_pagination );
1137
  ?>
1138
  <input type="hidden" name="qmn_question_list" value="<?php echo esc_attr( $question_list ); ?>" />
1152
  * @deprecated 5.2.0 Use new page system instead
1153
  */
1154
  public function display_begin_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1155
+ global $mlwQuizMasterNext, $qmn_json_data, $wp_embed;
1156
  $contact_fields = QSM_Contact_Manager::load_fields();
1157
  if ( ! empty( $qmn_quiz_options->message_before ) || ( 0 == $qmn_quiz_options->contact_info_location && $contact_fields ) ) {
1158
  $qmn_json_data['first_page'] = true;
1162
  ?>
1163
  <div class="qsm-auto-page-row quiz_section <?php echo esc_attr( $animation_effect ); ?> quiz_begin">
1164
  <?php
1165
+ $message_before = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->message_before, ENT_QUOTES ), "quiz_message_before-{$qmn_quiz_options->quiz_id}" );
1166
+ $message_before = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_before ), $qmn_array_for_variables );
1167
  $editor_text = $wp_embed->run_shortcode( $message_before );
1168
  $editor_text = preg_replace( '/\s*[\w\/:\.]*youtube.com\/watch\?v=([\w]+)([\w\*\-\?\&\;\%\=\.]*)/i', '<iframe width="420" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $editor_text );
1169
  ?>
1244
  $mlwQuizMasterNext->pluginHelper->display_question( $mlw_question->question_type_new, $mlw_question->question_id, $qmn_quiz_options );
1245
  if ( 0 == $mlw_question->comments ) {
1246
  ?>
1247
+ <input type="text" class="mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" name="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->comment_field_text, "quiz_comment_field_text-{$qmn_quiz_options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)" /><br />
1248
  <?php
1249
  }
1250
  if ( 2 == $mlw_question->comments ) {
1251
  ?>
1252
+ <textarea cols="70" rows="5" class="mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" name="mlwComment<?php echo esc_attr( $mlw_question->question_id ); ?>" placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->comment_field_text, "quiz_comment_field_text-{$qmn_quiz_options->quiz_id}" ) ); ?>" onclick="qmnClearField(this)"></textarea><br />
1253
  <?php
1254
  }
1255
  // Checks if a hint is entered.
1256
  if ( ! empty( $mlw_question->hints ) ) {
1257
  ?>
1258
+ <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 />
1259
  <?php
1260
  }
1261
  ?>
1275
  ?>
1276
  <span class="pages_count" style="display: none;">
1277
  <?php
1278
+ $text_c = esc_html__( '1 out of ', 'quiz-master-next' ) . $total_pagination;
1279
  echo apply_filters( 'qsm_total_pages_count', $text_c, $pages_count, $total_pages_count );
1280
  ?>
1281
  </span>
1298
  * @deprecated 5.2.0 Use new page system instead
1299
  */
1300
  public function display_comment_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1301
+ global $mlwQuizMasterNext, $mlw_qmn_section_count;
1302
  if ( 0 == $qmn_quiz_options->comment_section ) {
1303
  $mlw_qmn_section_count = $mlw_qmn_section_count + 1;
1304
  $qsm_d_none = 0 == $qmn_quiz_options->randomness_order ? 'qsm-d-none' : '';
1305
  ?>
1306
  <div class="quiz_section quiz_end qsm-auto-page-row qsm-quiz-comment-section slide <?php echo esc_attr( $mlw_qmn_section_count . ' ' . $qsm_d_none ); ?>" >
1307
  <?php
1308
+ $message_comments = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->message_comment, ENT_QUOTES ), "quiz_message_comment-{$qmn_quiz_options->quiz_id}" );
1309
+ $message_comments = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_comments ), $qmn_array_for_variables );
1310
  ?>
1311
+ <label for="mlwQuizComments" class="mlw_qmn_comment_section_text"><?php echo wp_kses_post( $message_comments ); ?></label><br />
1312
  <textarea cols="60" rows="10" id="mlwQuizComments" name="mlwQuizComments" class="qmn_comment_section"></textarea>
1313
  </div>
1314
  <?php
1327
  * @deprecated 5.2.0 Use new page system instead
1328
  */
1329
  public function display_end_section( $qmn_quiz_options, $qmn_array_for_variables ) {
1330
+ global $mlwQuizMasterNext, $mlw_qmn_section_count;
1331
  $section_display = '';
1332
  $mlw_qmn_section_count = $mlw_qmn_section_count + 1;
1333
  $pagination_option = $qmn_quiz_options->pagination;
1344
  ?>
1345
  <span class='mlw_qmn_message_end'>
1346
  <?php
1347
+ $message_end = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->message_end_template, ENT_QUOTES ), "quiz_message_end_template-{$qmn_quiz_options->quiz_id}" );
1348
+ echo apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message_end ), $qmn_array_for_variables );
1349
  ?>
1350
  </span>
1351
  <br /><br />
1355
  echo QSM_Contact_Manager::display_fields( $qmn_quiz_options );
1356
  }
1357
  ?>
1358
+ <input type='submit' class='qsm-btn qsm-submit-btn qmn_btn' value="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->submit_button_text, "quiz_submit_button_text-{$qmn_quiz_options->quiz_id}" ) ); ?>" />
1359
  </div>
1360
  <?php
1361
  } else {
1362
  ?>
1363
  <div class="qsm-auto-page-row quiz_section quiz_end empty_quiz_end <?php echo esc_attr( $qsm_d_none ); ?>" >
1364
+ <input type="submit" class="qsm-btn qsm-submit-btn qmn_btn" value="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->submit_button_text, "quiz_submit_button_text-{$qmn_quiz_options->quiz_id}" ) ); ?>" />
1365
  </div>
1366
  <?php
1367
  }
1540
  }
1541
  $qmn_array_for_variables['hidden_questions'] = $hidden_questions;
1542
  $qmn_array_for_variables = apply_filters( 'qsm_result_variables', $qmn_array_for_variables );
 
1543
  if ( ! isset( $_POST['mlw_code_captcha'] ) || ( isset( $_POST['mlw_code_captcha'], $_POST['mlw_user_captcha'] ) && sanitize_text_field( wp_unslash( $_POST['mlw_user_captcha'] ) ) == sanitize_text_field( wp_unslash( $_POST['mlw_code_captcha'] ) ) ) ) {
1544
  $qsm_check_answers_return = $this->check_answers( $qmn_quiz_options, $qmn_array_for_variables );
1545
  $qmn_array_for_variables = array_merge( $qmn_array_for_variables, $qsm_check_answers_return );
1642
  $qmn_array_for_variables['response_saved'] = isset( $results_insert ) ? $results_insert : false;
1643
  $qmn_array_for_variables['result_id'] = $results_id;
1644
  $qmn_array_for_variables['result_unique_id'] = $unique_id;
1645
+ setcookie("question_ids_".$qmn_array_for_variables['quiz_id'], "", time() - 36000, "/");
1646
  // Converts date to the preferred format
1647
  global $mlwQuizMasterNext;
1648
  $qmn_array_for_variables = $mlwQuizMasterNext->pluginHelper->convert_to_preferred_date_format( $qmn_array_for_variables );
1690
  $this->qsm_background_email->data(
1691
  array(
1692
  'name' => 'send_emails',
1693
+ 'result_id' => $results_id,
1694
  )
1695
  )->dispatch();
1696
  } else {
1697
  // Sends the emails.
1698
  $qmn_array_for_variables['email_processed'] = 'yes';
1699
+ QSM_Emails::send_emails( $results_id );
1700
  }
1701
 
1702
  /**
1751
  // Load the pages and questions
1752
  $pages = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() );
1753
  $questions = QSM_Questions::load_questions_by_pages( $options->quiz_id );
1754
+ if ( ( 1 == $options->randomness_order || 2 == $options->randomness_order ) && isset($_COOKIE[ 'question_ids_'.$options->quiz_id ]) ) {
1755
+ $question_sql = sanitize_text_field( wp_unslash( $_COOKIE[ 'question_ids_'.$options->quiz_id ] ) );
1756
+ $question_array = explode(", ",$question_sql);
1757
+ foreach ( $question_array as $key ) {
1758
+ if ( isset( $questions[ $key ] ) ) {
1759
+ $new_questions[ $key ] = $questions[ $key ];
1760
+ }
1761
+ }
1762
+ $questions = $new_questions;
1763
+ $pages = array( $question_array );
1764
+ }
1765
  // Retrieve data from submission
1766
+ $total_questions = isset( $_POST['total_questions'] ) ? intval( $_POST['total_questions'] ) : 0;
1767
  $question_list = array();
1768
  if ( isset( $_POST['qmn_question_list'] ) ) {
1769
  $qmn_question_list = sanitize_text_field( wp_unslash( $_POST['qmn_question_list'] ) );
1957
  $question_data[] = apply_filters(
1958
  'qmn_answer_array',
1959
  array(
1960
+ $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question_text, "question-description-{$question_id}", "QSM Questions" ),
1961
  htmlspecialchars( $user_answer, ENT_QUOTES ),
1962
+ $mlwQuizMasterNext->pluginHelper->qsm_language_support( $correct_answer, 'answer-' . $correct_answer, 'QSM Answers' ),
1963
  $comment,
1964
  'user_answer' => $user_answer_array,
1965
  'correct_answer' => $correct_answer_array,
1969
  'category' => $question['category'],
1970
  'multicategories' => $question['multicategories'],
1971
  'question_type' => $question['question_type_new'],
1972
+ 'question_title' => isset( $question['settings']['question_title'] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question['settings']['question_title'], "Question-{$question_id}", "QSM Questions") : '',
1973
  'user_compare_text' => $user_compare_text,
1974
  ),
1975
  $options,
1984
 
1985
  // Calculate Total Percent Score And Average Points Only If Total Questions Doesn't Equal Zero To Avoid Division By Zero Error
1986
  if ( 0 !== $total_questions ) {
1987
+ $total_score = round( ( ( $total_correct / ( $total_questions - count( $hidden_questions ) ) ) * 100 ), 2 );
1988
  } else {
1989
  $total_score = 0;
1990
  }
1991
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1992
  // Return array to be merged with main user response array
1993
  return apply_filters(
1994
  'qsm_check_answers_results',
2482
  add_filter( 'qmn_begin_shortcode', 'qmn_require_login_check', 10, 3 );
2483
 
2484
  function qmn_require_login_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2485
+ global $mlwQuizMasterNext, $qmn_allowed_visit;
2486
  if ( 1 == $qmn_quiz_options->require_log_in && ! is_user_logged_in() ) {
2487
  $qmn_allowed_visit = false;
2488
+ $mlw_message = '';
2489
  if ( isset( $qmn_quiz_options->require_log_in_text ) && '' !== $qmn_quiz_options->require_log_in_text ) {
2490
+ $mlw_message = htmlspecialchars_decode( $qmn_quiz_options->require_log_in_text, ENT_QUOTES );
 
 
2491
  }
2492
+ $mlw_message = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $mlw_message, "quiz_require_log_in_text-{$qmn_quiz_options->quiz_id}" );
2493
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $mlw_message ), $qmn_array_for_variables );
2494
  $mlw_message = str_replace( "\n", '<br>', $mlw_message );
2495
  // $display .= do_shortcode($mlw_message);
2496
  $display .= do_shortcode( $mlw_message );
2511
  * @return HTML This function check the time frame of quiz.
2512
  */
2513
  function qsm_scheduled_timeframe_check( $display, $options, $variable_data ) {
2514
+ global $mlwQuizMasterNext, $qmn_allowed_visit;
2515
 
2516
  $checked_pass = false;
2517
  // Checks if the start and end dates have data
2543
  }
2544
  }
2545
  if ( true == $checked_pass ) {
2546
+ $qmn_allowed_visit = false;
2547
+ $message = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $options->scheduled_timeframe_text, ENT_QUOTES ), "quiz_scheduled_timeframe_text-{$options->quiz_id}" );
2548
+ $message = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $message ), $variable_data );
2549
+ $display .= str_replace( "\n", '<br>', $message );
2550
  }
2551
  return $display;
2552
  }
2563
  * @return string The altered HTML display for the quiz
2564
  */
2565
  function qmn_total_user_tries_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2566
+ global $mlwQuizMasterNext, $qmn_allowed_visit;
2567
  if ( 0 != $qmn_quiz_options->total_user_tries ) {
2568
 
2569
  // Prepares the variables
2583
 
2584
  // Stops the quiz and prepares entered text
2585
  $qmn_allowed_visit = false;
2586
+ $mlw_message = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->total_user_tries_text, ENT_QUOTES ), "quiz_total_user_tries_text-{$qmn_quiz_options->quiz_id}" );
2587
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $mlw_message ), $qmn_array_for_variables );
2588
  $display .= $mlw_message;
2589
  }
2590
  }
2594
  add_filter( 'qmn_begin_quiz', 'qmn_total_tries_check', 10, 3 );
2595
 
2596
  function qmn_total_tries_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2597
+ global $mlwQuizMasterNext, $qmn_allowed_visit;
2598
  if ( 0 != $qmn_quiz_options->limit_total_entries ) {
2599
  global $wpdb;
2600
  $mlw_qmn_entries_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(quiz_id) FROM {$wpdb->prefix}mlw_results WHERE deleted=0 AND quiz_id=%d", $qmn_array_for_variables['quiz_id'] ) );
2601
  if ( $mlw_qmn_entries_count >= $qmn_quiz_options->limit_total_entries ) {
2602
+ $mlw_message = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $qmn_quiz_options->limit_total_entries_text, ENT_QUOTES ), "quiz_limit_total_entries_text-{$qmn_quiz_options->quiz_id}" );
2603
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', wpautop( $mlw_message ), $qmn_array_for_variables );
2604
  $display .= $mlw_message;
2605
  $qmn_allowed_visit = false;
2606
  }
2612
 
2613
  function qmn_pagination_check( $display, $qmn_quiz_options, $qmn_array_for_variables ) {
2614
  if ( 0 != $qmn_quiz_options->pagination ) {
2615
+ global $wpdb, $mlwQuizMasterNext, $qmn_json_data;
 
2616
  $total_questions = 0;
2617
  if ( 0 != $qmn_quiz_options->question_from_total ) {
2618
  $total_questions = $qmn_quiz_options->question_from_total;
2625
  'amount' => $qmn_quiz_options->pagination,
2626
  'section_comments' => $qmn_quiz_options->comment_section,
2627
  'total_questions' => $total_questions,
2628
+ 'previous_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->previous_button_text, "quiz_previous_button_text-{$qmn_quiz_options->quiz_id}" ),
2629
+ 'next_text' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_quiz_options->next_button_text, "quiz_next_button_text-{$qmn_quiz_options->quiz_id}" ),
2630
  );
2631
  }
2632
  return $display;
php/classes/class-qsm-contact-manager.php CHANGED
@@ -13,6 +13,48 @@ class QSM_Contact_Manager {
13
  /** @var array The fields loaded for the quiz. */
14
  private static $fields = array();
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  /**
18
  * Displays the contact fields during form
@@ -23,6 +65,7 @@ class QSM_Contact_Manager {
23
  */
24
  public static function display_fields( $options ) {
25
 
 
26
  $fields_hidden = false;
27
  $name = '';
28
  $email = '';
@@ -59,8 +102,8 @@ class QSM_Contact_Manager {
59
  $class = 'mlwRequiredText qsm_required_text';
60
  }
61
  ?>
62
- <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $options->name_field_text ); ?></span>
63
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='<?php echo esc_attr( $class ); ?>' name='mlwUserName' placeholder="<?php echo esc_attr( $options->name_field_text ); ?>" value='<?php echo esc_attr( $name ); ?>' />
64
  <?php
65
  }
66
 
@@ -71,8 +114,8 @@ class QSM_Contact_Manager {
71
  $class = 'mlwRequiredText qsm_required_text';
72
  }
73
  ?>
74
- <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $options->business_field_text ); ?></span>
75
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='<?php echo esc_attr( $class ); ?>' name='mlwUserComp' placeholder="<?php echo esc_attr( $options->business_field_text ); ?>" value='' />
76
  <?php
77
  }
78
 
@@ -83,8 +126,8 @@ class QSM_Contact_Manager {
83
  $class = 'mlwRequiredText qsm_required_text';
84
  }
85
  ?>
86
- <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $options->email_field_text ); ?></span>
87
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='email' class='mlwEmail <?php echo esc_attr( $class ); ?>' name='mlwUserEmail' placeholder="<?php echo esc_attr( $options->email_field_text ); ?>" value='<?php echo esc_attr( $email ); ?>' />
88
  <?php
89
  }
90
 
@@ -95,8 +138,8 @@ class QSM_Contact_Manager {
95
  $class = 'mlwRequiredText qsm_required_text';
96
  }
97
  ?>
98
- <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $options->phone_field_text ); ?></span>
99
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='number' class='<?php echo esc_attr( $class ); ?>' name='mlwUserPhone' placeholder="<?php echo esc_attr( $options->phone_field_text ); ?>" value='' />
100
  <?php
101
  }
102
  } elseif ( ! empty( $fields ) && is_array( $fields ) ) {
@@ -105,75 +148,22 @@ class QSM_Contact_Manager {
105
  $total_fields = count( $fields );
106
  for ( $i = 0; $i < $total_fields; $i++ ) {
107
 
108
- $class = '';
109
- $value = '';
110
- ?>
111
- <div class="qsm_contact_div qsm-contact-type-<?php echo esc_attr( $fields[ $i ]['type'] ); ?>">
 
 
 
 
 
 
 
 
 
 
112
  <?php
113
- if ( 'name' === $fields[ $i ]['use'] ) {
114
- $value = $name;
115
- }
116
- if ( 'email' === $fields[ $i ]['use'] ) {
117
- $value = $email;
118
- }
119
-
120
- // Switch for contact field type.
121
- switch ( $fields[ $i ]['type'] ) {
122
- case 'text':
123
- if ( ( 'true' === $fields[ $i ]["required"] || true === $fields[ $i ]["required"] ) && ! $fields_hidden ) {
124
- $class = 'mlwRequiredText qsm_required_text';
125
- }
126
- if ( 'phone' === $fields[ $i ]['use'] ) {
127
- $class = 'mlwPhoneNumber';
128
- }
129
- if ( 'phone' === $fields[ $i ]['use'] && 'true' === $fields[ $i ]["required"] || true === $fields[ $i ]["required"] ) {
130
- $class = 'mlwPhoneNumber mlwRequiredNumber qsm_required_text';
131
- }
132
- // Filer Value
133
- $value = apply_filters('qsm_contact_text_filed_value',$value,$fields[ $i ]['use']);
134
- ?>
135
- <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $fields[ $i ]['label'] ); ?></span>
136
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='<?php echo esc_attr( 'phone' === $fields[ $i ]['use'] ? 'text' : 'text' ); ?>' <?php if ( 'phone' === $fields[ $i ]['use'] ) { ?> onkeydown="return event.keyCode !== 69 " <?php } ?> class='<?php echo esc_attr( $class ); ?>' name='contact_field_<?php echo esc_attr( $i ); ?>' value='<?php if ( empty($contact_disable_autofill) ) {echo esc_attr( $value );} ?>' placeholder="<?php echo esc_attr( wp_strip_all_tags( $fields[ $i ]['label'] ) ); ?>" />
137
- <?php
138
- break;
139
-
140
- case 'email':
141
- if ( ( 'true' === $fields[ $i ]["required"] || true === $fields[ $i ]["required"] ) && ! $fields_hidden ) {
142
- $class = 'mlwRequiredText qsm_required_text';
143
- }
144
- ?>
145
- <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $fields[ $i ]['label'] ); ?></span>
146
- <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='mlwEmail <?php echo esc_attr( $class ); ?>' name='contact_field_<?php echo esc_attr( $i ); ?>' value='<?php if ( empty($contact_disable_autofill) ) { echo esc_attr( $value ); } ?>' placeholder="<?php echo esc_attr( wp_strip_all_tags( $fields[ $i ]['label'] ) ); ?>" />
147
- <?php
148
- break;
149
-
150
- case 'checkbox':
151
- if ( ( 'true' === $fields[ $i ]["required"] || true === $fields[ $i ]["required"] ) && ! $fields_hidden ) {
152
- $class = 'mlwRequiredAccept qsm_required_accept';
153
- }
154
- ?>
155
- <input type='checkbox' id='contact_field_<?php echo esc_attr( $i ); ?>' class='<?php echo esc_attr( $class ); ?>' name='contact_field_<?php echo esc_attr( $i ); ?>' value='checked' />
156
- <label class='mlw_qmn_question qsm_question' for='contact_field_<?php echo esc_attr( $i ); ?>'><?php echo wp_kses_post( $fields[ $i ]['label'] ); ?></label>
157
- <?php
158
- break;
159
-
160
- case 'date':
161
- if ( ( 'true' === $fields[ $i ]["required"] || true === $fields[ $i ]["required"] ) && ! $fields_hidden ) {
162
- $class = 'mlwRequiredDate qsm_required_date';
163
- }
164
- ?>
165
- <span class='mlw_qmn_question qsm_question'><?php echo esc_attr( $fields[ $i ]['label'] ); ?></span>
166
- <input type='date' id='contact_field_<?php echo esc_attr( $i ); ?>' class='<?php echo esc_attr( $class ); ?>' name='contact_field_<?php echo esc_attr( $i ); ?>' value='' />
167
- <?php
168
- break;
169
-
170
- default:
171
- do_action('qsm_extra_contact_filed' ,$fields, $options);
172
- break;
173
- }
174
- ?>
175
- </div>
176
- <?php
177
  }
178
  }
179
 
@@ -199,7 +189,7 @@ class QSM_Contact_Manager {
199
  * @return array An array of all labels and values for the contact fields
200
  */
201
  public static function process_fields( $options ) {
202
-
203
  $responses = array();
204
 
205
  // Loads the fields for the quiz.
@@ -208,30 +198,31 @@ class QSM_Contact_Manager {
208
  // If fields are empty, check for backwards compatibility.
209
  if ( ( empty( $fields ) || ! is_array( $fields ) ) && ( 2 !== intval( $options->user_name ) || 2 !== intval( $options->user_comp ) || 2 !== intval( $options->user_email ) || 2 !== intval( $options->user_phone ) ) ) {
210
  $responses[] = array(
211
- 'label' => 'Name',
212
  'value' => isset( $_POST["mlwUserName"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserName"] ) ) : 'None',
213
  'use' => 'name',
214
  );
215
  $responses[] = array(
216
- 'label' => 'Business',
217
  'value' => isset( $_POST["mlwUserComp"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserComp"] ) ) : 'None',
218
  'use' => 'comp',
219
  );
220
  $responses[] = array(
221
- 'label' => 'Email',
222
  'value' => isset( $_POST["mlwUserEmail"] ) ? sanitize_email( wp_unslash( $_POST["mlwUserEmail"] ) ) : 'None',
223
  'use' => 'email',
224
  );
225
  $responses[] = array(
226
- 'label' => 'Phone',
227
  'value' => isset( $_POST["mlwUserPhone"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserPhone"] ) ) : 'None',
228
  'use' => 'phone',
229
  );
230
  } elseif ( ! empty( $fields ) && is_array( $fields ) ) {
231
  $total_fields = count( $fields );
232
  for ( $i = 0; $i < $total_fields; $i++ ) {
 
233
  $field_array = array(
234
- 'label' => $fields[ $i ]['label'],
235
  'value' => isset( $_POST[ "contact_field_$i" ] ) ? htmlentities( sanitize_text_field( wp_unslash( $_POST[ "contact_field_$i" ] ) ) ) : 'None',
236
  );
237
  if ( isset( $fields[ $i ]['use'] ) ) {
@@ -277,9 +268,49 @@ class QSM_Contact_Manager {
277
  * @uses QMNPluginHelper::get_quiz_setting
278
  * @return array The array of contact fields
279
  */
280
- public static function load_fields() {
281
  global $mlwQuizMasterNext;
282
- $fields = maybe_unserialize( $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'contact_form' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  return $fields;
284
  }
285
 
@@ -293,6 +324,7 @@ class QSM_Contact_Manager {
293
  * @param array $fields The fields for the quiz.
294
  */
295
  public static function save_fields( $quiz_id, $fields ) {
 
296
  if ( self::load_fields() === $fields ) {
297
  return true;
298
  }
@@ -317,20 +349,167 @@ class QSM_Contact_Manager {
317
 
318
  if ( ! empty( $fields ) ) {
319
  $total_fields = count( $fields );
320
- for ( $i = 0; $i < $total_fields; $i++ ) {
321
- $label = wp_kses( wp_unslash( $fields[ $i ]['label'] ), $allowed_html );
322
- $fields[ $i ] = array(
323
- 'label' => $is_not_allow_html ? $fields[ $i ]['label'] : $label,
324
- 'use' => $fields[ $i ]['use'],
325
- 'type' => $fields[ $i ]['type'],
326
- 'required' => $fields[ $i ]['required'],
327
- );
328
  }
329
  }
330
 
331
- global $mlwQuizMasterNext;
332
  $mlwQuizMasterNext->pluginHelper->prepare_quiz( intval( $quiz_id ) );
333
  return $mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'contact_form', $fields );
334
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  }
336
- ?>
13
  /** @var array The fields loaded for the quiz. */
14
  private static $fields = array();
15
 
16
+ /**
17
+ * Get the default fields
18
+ *
19
+ * @since 8.0
20
+ * @return array The array of default contact fields
21
+ */
22
+ public static function default_fields() {
23
+ return array(
24
+ 'name' => array(
25
+ 'label' => 'Name',
26
+ 'type' => 'text',
27
+ 'use' => 'name',
28
+ 'required' => 'false',
29
+ 'enable' => 'false',
30
+ 'is_default' => 'true',
31
+ ),
32
+ 'email' => array(
33
+ 'label' => 'Email',
34
+ 'type' => 'email',
35
+ 'use' => 'email',
36
+ 'required' => 'false',
37
+ 'enable' => 'false',
38
+ 'is_default' => 'true',
39
+ ),
40
+ 'comp' => array(
41
+ 'label' => 'Business',
42
+ 'type' => 'text',
43
+ 'use' => 'comp',
44
+ 'required' => 'false',
45
+ 'enable' => 'false',
46
+ 'is_default' => 'true',
47
+ ),
48
+ 'phone' => array(
49
+ 'label' => 'Phone',
50
+ 'type' => 'text',
51
+ 'use' => 'phone',
52
+ 'required' => 'false',
53
+ 'enable' => 'false',
54
+ 'is_default' => 'true',
55
+ ),
56
+ );
57
+ }
58
 
59
  /**
60
  * Displays the contact fields during form
65
  */
66
  public static function display_fields( $options ) {
67
 
68
+ global $mlwQuizMasterNext;
69
  $fields_hidden = false;
70
  $name = '';
71
  $email = '';
102
  $class = 'mlwRequiredText qsm_required_text';
103
  }
104
  ?>
105
+ <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->name_field_text, "quiz_name_field_text-{$options->quiz_id}" ) ); ?></span>
106
+ <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='<?php echo esc_attr( $class ); ?>' name='mlwUserName' placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->name_field_text, "quiz_name_field_text-{$options->quiz_id}" ) ); ?>" value='<?php echo esc_attr( $name ); ?>' />
107
  <?php
108
  }
109
 
114
  $class = 'mlwRequiredText qsm_required_text';
115
  }
116
  ?>
117
+ <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->business_field_text, "quiz_business_field_text-{$options->quiz_id}" ) ); ?></span>
118
+ <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='<?php echo esc_attr( $class ); ?>' name='mlwUserComp' placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->business_field_text, "quiz_business_field_text-{$options->quiz_id}" ) ); ?>" value='' />
119
  <?php
120
  }
121
 
126
  $class = 'mlwRequiredText qsm_required_text';
127
  }
128
  ?>
129
+ <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->email_field_text, "quiz_email_field_text-{$options->quiz_id}" ) ); ?></span>
130
+ <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='email' class='mlwEmail <?php echo esc_attr( $class ); ?>' name='mlwUserEmail' placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->email_field_text, "quiz_email_field_text-{$options->quiz_id}" ) ); ?>" value='<?php echo esc_attr( $email ); ?>' />
131
  <?php
132
  }
133
 
138
  $class = 'mlwRequiredText qsm_required_text';
139
  }
140
  ?>
141
+ <span class='mlw_qmn_question qsm_question'><?php echo wp_kses_post( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->phone_field_text, "quiz_phone_field_text-{$options->quiz_id}" ) ); ?></span>
142
+ <input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='number' class='<?php echo esc_attr( $class ); ?>' name='mlwUserPhone' placeholder="<?php echo esc_attr( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->phone_field_text, "quiz_phone_field_text-{$options->quiz_id}" ) ); ?>" value='' />
143
  <?php
144
  }
145
  } elseif ( ! empty( $fields ) && is_array( $fields ) ) {
148
  $total_fields = count( $fields );
149
  for ( $i = 0; $i < $total_fields; $i++ ) {
150
 
151
+ if ( 'true' === $fields[ $i ]["enable"] || true === $fields[ $i ]["enable"] ) {
152
+ $value = '';
153
+ ?>
154
+ <div class="qsm_contact_div qsm-contact-type-<?php echo esc_attr( $fields[ $i ]['type'] ); ?>">
155
+ <?php
156
+ if ( 'name' === $fields[ $i ]['use'] ) {
157
+ $value = $name;
158
+ }
159
+ if ( 'email' === $fields[ $i ]['use'] ) {
160
+ $value = $email;
161
+ }
162
+ self::generate_contact_field($fields[ $i ], $i, $options, $value);
163
+ ?>
164
+ </div>
165
  <?php
166
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  }
168
  }
169
 
189
  * @return array An array of all labels and values for the contact fields
190
  */
191
  public static function process_fields( $options ) {
192
+ global $mlwQuizMasterNext;
193
  $responses = array();
194
 
195
  // Loads the fields for the quiz.
198
  // If fields are empty, check for backwards compatibility.
199
  if ( ( empty( $fields ) || ! is_array( $fields ) ) && ( 2 !== intval( $options->user_name ) || 2 !== intval( $options->user_comp ) || 2 !== intval( $options->user_email ) || 2 !== intval( $options->user_phone ) ) ) {
200
  $responses[] = array(
201
+ 'label' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->name_field_text, "quiz_name_field_text-{$options->quiz_id}" ),
202
  'value' => isset( $_POST["mlwUserName"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserName"] ) ) : 'None',
203
  'use' => 'name',
204
  );
205
  $responses[] = array(
206
+ 'label' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->business_field_text, "quiz_business_field_text-{$options->quiz_id}" ),
207
  'value' => isset( $_POST["mlwUserComp"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserComp"] ) ) : 'None',
208
  'use' => 'comp',
209
  );
210
  $responses[] = array(
211
+ 'label' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->email_field_text, "quiz_email_field_text-{$options->quiz_id}" ),
212
  'value' => isset( $_POST["mlwUserEmail"] ) ? sanitize_email( wp_unslash( $_POST["mlwUserEmail"] ) ) : 'None',
213
  'use' => 'email',
214
  );
215
  $responses[] = array(
216
+ 'label' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->phone_field_text, "quiz_phone_field_text-{$options->quiz_id}" ),
217
  'value' => isset( $_POST["mlwUserPhone"] ) ? sanitize_text_field( wp_unslash( $_POST["mlwUserPhone"] ) ) : 'None',
218
  'use' => 'phone',
219
  );
220
  } elseif ( ! empty( $fields ) && is_array( $fields ) ) {
221
  $total_fields = count( $fields );
222
  for ( $i = 0; $i < $total_fields; $i++ ) {
223
+ $field_label = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $fields[ $i ]['label'], "quiz_contact_field_text-{$i}-{$options->quiz_id}" );
224
  $field_array = array(
225
+ 'label' => $field_label,
226
  'value' => isset( $_POST[ "contact_field_$i" ] ) ? htmlentities( sanitize_text_field( wp_unslash( $_POST[ "contact_field_$i" ] ) ) ) : 'None',
227
  );
228
  if ( isset( $fields[ $i ]['use'] ) ) {
268
  * @uses QMNPluginHelper::get_quiz_setting
269
  * @return array The array of contact fields
270
  */
271
+ public static function load_fields( $type = 'display' ) {
272
  global $mlwQuizMasterNext;
273
+ $default_fields = self::default_fields();
274
+ $fields = maybe_unserialize( $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'contact_form' ) );
275
+ if ( ! empty( $fields ) ) {
276
+ $used_keys = array();
277
+ foreach ( $fields as $index => $field ) {
278
+ /**
279
+ * For backward compatibility, Set enable to true for existing fields.
280
+ */
281
+ if ( ! isset( $field['enable'] ) ) {
282
+ $fields[ $index ]['enable'] = 'true';
283
+ }
284
+ if ( isset( $field['use'] ) && array_key_exists( $field['use'], $default_fields ) ) {
285
+ $fields[ $index ]['is_default'] = 'true';
286
+ $used_keys[] = $field['use'];
287
+ }
288
+ }
289
+
290
+ /**
291
+ * Add missing default fields for edit screen
292
+ */
293
+ if ( 'edit' == $type ) {
294
+ /**
295
+ * Find out missing fields.
296
+ */
297
+ $missing = array_diff( array_keys( $default_fields ), $used_keys );
298
+ foreach ( $default_fields as $key => $field ) {
299
+ if ( in_array( $key, $missing, true ) ) {
300
+ $fields[] = $field;
301
+ }
302
+ }
303
+ }
304
+ }
305
+
306
+ /**
307
+ * If $field is empty, Return default fields for edit screen.
308
+ */
309
+ if ( empty( $fields ) && 'edit' == $type ) {
310
+ foreach ( $default_fields as $key => $field ) {
311
+ $fields[] = $field;
312
+ }
313
+ }
314
  return $fields;
315
  }
316
 
324
  * @param array $fields The fields for the quiz.
325
  */
326
  public static function save_fields( $quiz_id, $fields ) {
327
+ global $mlwQuizMasterNext;
328
  if ( self::load_fields() === $fields ) {
329
  return true;
330
  }
349
 
350
  if ( ! empty( $fields ) ) {
351
  $total_fields = count( $fields );
352
+ for ( $i = 0; $i < $total_fields; $i ++ ) {
353
+ $label = $is_not_allow_html ? $fields[ $i ]['label'] : wp_kses( wp_unslash( $fields[ $i ]['label'] ), $allowed_html );
354
+ $fields[ $i ]['label'] = $label;
355
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $label, "quiz_contact_field_text-{$i}-{$quiz_id}" );
 
 
 
 
356
  }
357
  }
358
 
 
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
366
+ * @param type $quiz_options
367
+ * @param type $default_value
368
+ */
369
+ public static function generate_contact_field( $field, $index, $quiz_options, $default_value = '' ) {
370
+ global $mlwQuizMasterNext;
371
+ $fields_hidden = false;
372
+ $contact_disable_autofill = $quiz_options->contact_disable_autofill;
373
+ if ( is_user_logged_in() && 1 === intval( $quiz_options->loggedin_user_contact ) ) {
374
+ $fields_hidden = true;
375
+ }
376
+ $field_label = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $field['label'], "quiz_contact_field_text-{$index}-{$quiz_options->quiz_id}" );
377
+ $fieldAttr = " name='contact_field_" . esc_attr( $index ) . "' id='contact_field_" . esc_attr( $index ) . "' ";
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' ";
393
+ }
394
+ /**
395
+ * Add Phone validation
396
+ */
397
+ if ( 'phone' === $field['use'] ) {
398
+ $fieldAttr .= " onkeydown='return event.keyCode !== 69' ";
399
+ }
400
+ /**
401
+ * Add minimum length validation
402
+ */
403
+ if ( isset( $field['minlength'] ) && 0 < intval( $field['minlength'] ) ) {
404
+ $fieldAttr .= " minlength='" . intval( $field['minlength'] ) . "' ";
405
+ $class .= ' mlwMinLength ';
406
+ }
407
+ /**
408
+ * Add maximum length validation
409
+ */
410
+ if ( isset( $field['maxlength'] ) && 0 < intval( $field['maxlength'] ) ) {
411
+ $fieldAttr .= " maxlength='" . intval( $field['maxlength'] ) . "' ";
412
+ $class .= ' mlwMaxLength ';
413
+ }
414
+
415
+ $fieldAttr .= " placeholder='" . esc_attr( wp_strip_all_tags( $field_label ) ) . "' ";
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' ";
430
+ }
431
+ if ( isset( $field['allowdomains'] ) && ! empty( $field['allowdomains'] ) ) {
432
+ $allowdomains = array_map( 'trim', explode( ',', $field['allowdomains'] ) );
433
+ $fieldAttr .= " data-domains='" . implode( ',', array_filter( $allowdomains ) ) . "' ";
434
+ }
435
+ $class = apply_filters( 'qsm_contact_email_field_class', $class, $field['use'] );
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' ";
458
+ }
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' ";
473
+ }
474
+ $class = apply_filters( 'qsm_contact_url_field_class', $class, $field['use'] );
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' ";
489
+ }
490
+ /**
491
+ * Add minimum length validation
492
+ */
493
+ if ( isset( $field['minlength'] ) && 0 < intval( $field['minlength'] ) ) {
494
+ $fieldAttr .= " minlength='" . intval( $field['minlength'] ) . "' ";
495
+ $class .= ' mlwMinLength ';
496
+ }
497
+ /**
498
+ * Add maximum length validation
499
+ */
500
+ if ( isset( $field['maxlength'] ) && 0 < intval( $field['maxlength'] ) ) {
501
+ $class .= ' mlwMaxLength ';
502
+ }
503
+ $class = apply_filters( 'qsm_contact_number_field_class', $class, $field['use'] );
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
+ }
515
  }
 
php/classes/class-qsm-emails.php CHANGED
@@ -20,9 +20,43 @@ class QSM_Emails {
20
  * Sends the emails for the quiz.
21
  *
22
  * @since 6.2.0
23
- * @param array $response_data The data for the user's submission.
24
  */
25
- public static function send_emails( $response_data ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  $emails = self::load_emails( $response_data['quiz_id'] );
27
 
28
  if ( ! is_array( $emails ) || empty( $emails ) ) {
@@ -32,8 +66,10 @@ class QSM_Emails {
32
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
33
 
34
  // Cycles through each possible email.
35
- foreach ( $emails as $email ) {
36
 
 
 
37
  // Checks if any conditions are present. Else, send it always.
38
  if ( ! empty( $email['conditions'] ) ) {
39
  /**
@@ -129,10 +165,10 @@ class QSM_Emails {
129
  }
130
 
131
  if ( $show ) {
132
- self::send_results_email( $response_data, $email['to'], $email['subject'], $email['content'], $email['replyTo'] );
133
  }
134
  } else {
135
- self::send_results_email( $response_data, $email['to'], $email['subject'], $email['content'], $email['replyTo'] );
136
  }
137
  }
138
 
@@ -176,6 +212,7 @@ class QSM_Emails {
176
  $content = apply_filters( 'mlw_qmn_template_variable_results_page', $content, $response_data );
177
  $content = apply_filters( 'qmn_email_template_variable_results', $content, $response_data );
178
  // convert css classes to inline.
 
179
  $content = $mlwQuizMasterNext->pluginHelper->qsm_results_css_inliner( $content );
180
  $content = html_entity_decode( $content );
181
 
@@ -434,6 +471,7 @@ class QSM_Emails {
434
  * @return bool True or false depending on success.
435
  */
436
  public static function save_emails( $quiz_id, $emails ) {
 
437
  if ( ! is_array( $emails ) ) {
438
  return false;
439
  }
@@ -469,9 +507,10 @@ class QSM_Emails {
469
  } else {
470
  $emails[ $i ]['replyTo'] = false;
471
  }
 
 
472
  }
473
 
474
- global $wpdb;
475
  $results = $wpdb->update(
476
  $wpdb->prefix . 'mlw_quizzes',
477
  array( 'user_email_template' => maybe_serialize( $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
+ 'user_ip' => $result_data['user_ip'],
38
+ 'user_name' => $result_data['name'],
39
+ 'user_business' => $result_data['business'],
40
+ 'user_email' => $result_data['email'],
41
+ 'user_phone' => $result_data['phone'],
42
+ 'user_id' => $result_data['user'],
43
+ 'timer' => $quiz_result[0],
44
+ 'timer_ms' => $quiz_result['timer_ms'],
45
+ 'time_taken' => $result_data['time_taken'],
46
+ 'contact' => $quiz_result['contact'],
47
+ 'hidden_questions' => $quiz_result['hidden_questions'],
48
+ 'total_points' => $result_data['point_score'],
49
+ 'total_score' => $result_data['correct_score'],
50
+ 'total_correct' => $result_data['correct'],
51
+ 'total_questions' => $result_data['total'],
52
+ 'question_answers_display' => '', // Kept for backwards compatibility
53
+ 'question_answers_array' => $quiz_result[1],
54
+ 'total_possible_points' => $quiz_result['total_possible_points'],
55
+ 'total_attempted_questions' => $quiz_result['total_attempted_questions'],
56
+ 'minimum_possible_points' => $quiz_result['minimum_possible_points'],
57
+ 'comments' => $quiz_result[2],
58
+ 'result_id' => $result_id,
59
+ );
60
  $emails = self::load_emails( $response_data['quiz_id'] );
61
 
62
  if ( ! is_array( $emails ) || empty( $emails ) ) {
66
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
67
 
68
  // Cycles through each possible email.
69
+ foreach ( $emails as $index => $email ) {
70
 
71
+ $email_subject = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $email['subject'], "quiz-email-subject-{$index}-{$response_data['quiz_id']}" );
72
+ $email_content = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $email['content'], "quiz-email-content-{$index}-{$response_data['quiz_id']}" );
73
  // Checks if any conditions are present. Else, send it always.
74
  if ( ! empty( $email['conditions'] ) ) {
75
  /**
165
  }
166
 
167
  if ( $show ) {
168
+ self::send_results_email( $response_data, $email['to'], $email_subject, $email_content, $email['replyTo'] );
169
  }
170
  } else {
171
+ self::send_results_email( $response_data, $email['to'], $email_subject, $email_content, $email['replyTo'] );
172
  }
173
  }
174
 
212
  $content = apply_filters( 'mlw_qmn_template_variable_results_page', $content, $response_data );
213
  $content = apply_filters( 'qmn_email_template_variable_results', $content, $response_data );
214
  // convert css classes to inline.
215
+ $content = apply_filters( 'qsm_results_css_inliner', $content );
216
  $content = $mlwQuizMasterNext->pluginHelper->qsm_results_css_inliner( $content );
217
  $content = html_entity_decode( $content );
218
 
471
  * @return bool True or false depending on success.
472
  */
473
  public static function save_emails( $quiz_id, $emails ) {
474
+ global $wpdb, $mlwQuizMasterNext;
475
  if ( ! is_array( $emails ) ) {
476
  return false;
477
  }
507
  } else {
508
  $emails[ $i ]['replyTo'] = false;
509
  }
510
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $emails[ $i ]['subject'], "quiz-email-subject-{$i}-{$quiz_id}" );
511
+ $mlwQuizMasterNext->pluginHelper->qsm_register_language_support( $emails[ $i ]['content'], "quiz-email-content-{$i}-{$quiz_id}" );
512
  }
513
 
 
514
  $results = $wpdb->update(
515
  $wpdb->prefix . 'mlw_quizzes',
516
  array( 'user_email_template' => maybe_serialize( $emails ) ),
php/classes/class-qsm-fields.php CHANGED
@@ -23,7 +23,7 @@ class QSM_Fields {
23
  $settings_array_before_update = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( $section );
24
 
25
  // If nonce is correct, save settings
26
- if ( isset( $_POST["save_settings_nonce"] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['save_settings_nonce'] ) ), 'save_settings' ) ) {
27
  // Cycle through fields to retrieve all posted values
28
  $settings_array = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( $section );
29
  foreach ( $fields as $field ) {
@@ -64,10 +64,18 @@ class QSM_Fields {
64
  // Update the settings and show alert based on outcome
65
  $results = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( $section, $settings_array );
66
  if ( false !== $results ) {
 
67
  $get_updated_setting_data = array_diff_assoc($settings_array, $settings_array_before_update);
68
  $json_updated_setting_data = wp_json_encode($get_updated_setting_data);
69
  $mlwQuizMasterNext->alertManager->newAlert( __( 'The settings has been updated successfully.', 'quiz-master-next' ), 'success' );
70
  $mlwQuizMasterNext->audit_manager->new_audit( 'Settings Have Been Edited', $quiz_id, $json_updated_setting_data );
 
 
 
 
 
 
 
71
  } else {
72
  $mlwQuizMasterNext->alertManager->newAlert( __( 'There was an error when updating the settings. Please try again.', 'quiz-master-next' ), 'error');
73
  }
@@ -82,39 +90,190 @@ class QSM_Fields {
82
  }
83
  ?>
84
  <form action="" method="post">
85
- <?php wp_nonce_field( 'save_settings','save_settings_nonce' ); ?>
86
- <button class="button-primary"><?php esc_html_e('Save Changes', 'quiz-master-next'); ?></button>
87
- <table class="form-table" style="width: 100%;">
88
- <?php
89
- $array_before_legacy = array();
90
- foreach ( $fields as $key => $field ) {
91
- if ( isset( $field['legacy_option'] ) && 0 == $field['legacy_option'] ) {
92
- $array_before_legacy[] = $field;
93
- unset( $fields[ $key ] );
94
- }
95
- }
96
- $key = array_search('legacy_options', array_column($fields, 'id'), true);
97
- if ( isset( $fields[ $key ] ) && ! empty( $array_before_legacy ) ) {
98
- $i = 1;
99
- $array_before_legacy = array_reverse($array_before_legacy);
100
- foreach ( $array_before_legacy as $bl_value ) {
101
- $fields = array_slice($fields, 0, $key, true) +
102
- array( 'lo_' . $i => $bl_value ) +
103
- array_slice($fields, $key, count($fields) - $key, true);
104
- $i++;
105
- }
106
- }
107
- // Cycles through each field
108
- foreach ( $fields as $field ) {
109
- // Generate the field
110
- QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
111
- }
112
- ?>
113
- </table>
114
- <?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' ) {?>
115
- <button class="button" name="global_setting" type="submit"><?php esc_html_e('Set Global Defaults', 'quiz-master-next'); ?></button>
116
- <?php } ?>
117
- <button class="button-primary"><?php esc_html_e('Save Changes', 'quiz-master-next'); ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  </form>
119
  <?php
120
  }
@@ -559,6 +718,11 @@ class QSM_Fields {
559
  <tr valign="top" class="<?php echo esc_attr( $class ); ?>">
560
  <th scope="row" class="qsm-opt-tr">
561
  <label for="<?php echo esc_attr( $field["id"] ); ?>"><?php echo wp_kses_post( $field['label'] ); ?></label>
 
 
 
 
 
562
  </th>
563
  <td>
564
  <fieldset class="buttonset buttonset-hide" data-hide='1'>
23
  $settings_array_before_update = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( $section );
24
 
25
  // If nonce is correct, save settings
26
+ if ( ( isset( $_POST["save_settings_nonce"] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['save_settings_nonce'] ) ), 'save_settings' ) ) || ( isset( $_POST["save_global_default_ettings_nonce"] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['save_global_default_ettings_nonce'] ) ), 'set_global_default_settings' ) ) ) {
27
  // Cycle through fields to retrieve all posted values
28
  $settings_array = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( $section );
29
  foreach ( $fields as $field ) {
64
  // Update the settings and show alert based on outcome
65
  $results = $mlwQuizMasterNext->pluginHelper->update_quiz_setting( $section, $settings_array );
66
  if ( false !== $results ) {
67
+ do_action( 'qsm_saved_quiz_settings', $quiz_id, $section, $settings_array );
68
  $get_updated_setting_data = array_diff_assoc($settings_array, $settings_array_before_update);
69
  $json_updated_setting_data = wp_json_encode($get_updated_setting_data);
70
  $mlwQuizMasterNext->alertManager->newAlert( __( 'The settings has been updated successfully.', 'quiz-master-next' ), 'success' );
71
  $mlwQuizMasterNext->audit_manager->new_audit( 'Settings Have Been Edited', $quiz_id, $json_updated_setting_data );
72
+ // update post_modified
73
+ $datetime = current_time( 'Y-m-d H:i:s', 0 );
74
+ $update = array(
75
+ 'ID' => get_the_ID(),
76
+ 'post_modified' => $datetime,
77
+ );
78
+ wp_update_post( $update );
79
  } else {
80
  $mlwQuizMasterNext->alertManager->newAlert( __( 'There was an error when updating the settings. Please try again.', 'quiz-master-next' ), 'error');
81
  }
90
  }
91
  ?>
92
  <form action="" method="post">
93
+ <?php wp_nonce_field( 'save_settings','save_settings_nonce' );
94
+ $current_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
95
+ if ( 'options' === $current_tab ) :
96
+ ?>
97
+ <div class="qsm-sub-tab-menu" style="display: inline-block;width: 100%;">
98
+ <ul class="subsubsub">
99
+ <li>
100
+ <a href="javascript:void(0)" data-id="qsm_general" class="current quiz_style_tab">
101
+ <?php esc_html_e( 'General', 'quiz-master-next' ); ?></a> |
102
+ </li>
103
+ <li>
104
+ <a href="javascript:void(0)" data-id="quiz_submission" class="quiz_style_tab">
105
+ <?php esc_html_e( 'Quiz submission', 'quiz-master-next' ); ?>
106
+ </a> |
107
+ </li>
108
+ <li>
109
+ <a href="javascript:void(0)" data-id="display" class="quiz_style_tab">
110
+ <?php esc_html_e( 'Display', 'quiz-master-next' ); ?>
111
+ </a> |
112
+ </li>
113
+ <li>
114
+ <a href="javascript:void(0)" data-id="contact_form" class="quiz_style_tab">
115
+ <?php esc_html_e( 'Contact form', 'quiz-master-next' ); ?>
116
+ </a> |
117
+ </li>
118
+ <li>
119
+ <a href="javascript:void(0)" data-id="legacy" class="quiz_style_tab">
120
+ <?php esc_html_e( 'Legacy', 'quiz-master-next' ); ?>
121
+ </a>
122
+ </li>
123
+ </ul>
124
+ </div>
125
+ <div id="qsm_general" class="quiz_style_tab_content">
126
+ <table class="form-table" style="width: 100%;">
127
+ <?php
128
+ // Cycles through each field
129
+ foreach ( $fields as $field ) {
130
+ // Generate the field
131
+ if ( isset( $field['option_tab'] ) && 'general' === $field['option_tab'] ) {
132
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
133
+ }
134
+ }
135
+ ?>
136
+ </table>
137
+ </div>
138
+ <div id="quiz_submission" class="quiz_style_tab_content" style="display:none">
139
+ <table class="form-table" style="width: 100%;">
140
+ <?php
141
+ // Cycles through each field
142
+ foreach ( $fields as $field ) {
143
+ // Generate the field
144
+ if ( isset( $field['option_tab'] ) && 'quiz_submission' === $field['option_tab'] ) {
145
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
146
+ }
147
+ }
148
+ ?>
149
+ </table>
150
+ </div>
151
+ <div id="display" class="quiz_style_tab_content" style="display:none">
152
+ <table class="form-table" style="width: 100%;">
153
+ <?php
154
+ // Cycles through each field
155
+ foreach ( $fields as $field ) {
156
+ // Generate the field
157
+ if ( isset( $field['option_tab'] ) && 'display' === $field['option_tab'] ) {
158
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
159
+ }
160
+ }
161
+ ?>
162
+ </table>
163
+ </div>
164
+ <div id="contact_form" class="quiz_style_tab_content" style="display:none">
165
+ <table class="form-table" style="width: 100%;">
166
+ <?php
167
+ // Cycles through each field
168
+ foreach ( $fields as $field ) {
169
+ // Generate the field
170
+ if ( isset( $field['option_tab'] ) && 'contact_form' === $field['option_tab'] ) {
171
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
172
+ }
173
+ }
174
+ ?>
175
+ </table>
176
+ </div>
177
+ <div id="legacy" class="quiz_style_tab_content" style="display:none">
178
+ <p><?php esc_html_e( 'All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next' ); ?></p>
179
+ <table class="form-table" style="width: 100%;">
180
+ <?php
181
+ // Cycles through each field
182
+ foreach ( $fields as $field ) {
183
+ // Generate the field
184
+ if ( isset( $field['option_tab'] ) && 'legacy' === $field['option_tab'] ) {
185
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
186
+ }
187
+ }
188
+ ?>
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>
197
+ <a href="javascript:void(0)" data-id="text-button" class="current quiz_style_tab">
198
+ <?php esc_html_e( 'Buttons', 'quiz-master-next' ); ?></a> |
199
+ </li>
200
+ <li>
201
+ <a href="javascript:void(0)" data-id="text-validation-messages" class="quiz_style_tab">
202
+ <?php esc_html_e( 'Validation Messages', 'quiz-master-next' ); ?>
203
+ </a> |
204
+ </li>
205
+ <li>
206
+ <a href="javascript:void(0)" data-id="text-other" class="quiz_style_tab">
207
+ <?php esc_html_e( 'Other', 'quiz-master-next' ); ?>
208
+ </a> |
209
+ </li>
210
+ <li>
211
+ <a href="javascript:void(0)" data-id="text-legacy" class="quiz_style_tab">
212
+ <?php esc_html_e( 'Legacy', 'quiz-master-next' ); ?>
213
+ </a>
214
+ </li>
215
+ </ul>
216
+ </div>
217
+ <div id="text-button" class="quiz_style_tab_content">
218
+ <table class="form-table" style="width: 100%;">
219
+ <?php
220
+ // Cycles through each field
221
+ foreach ( $fields as $field ) {
222
+ // Generate the field
223
+ if ( isset( $field['option_tab'] ) && 'text-button' === $field['option_tab'] ) {
224
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
225
+ }
226
+ }
227
+ ?>
228
+ </table>
229
+ </div>
230
+ <div id="text-validation-messages" class="quiz_style_tab_content" style="display:none">
231
+ <table class="form-table" style="width: 100%;">
232
+ <?php
233
+ // Cycles through each field
234
+ foreach ( $fields as $field ) {
235
+ // Generate the field
236
+ if ( isset( $field['option_tab'] ) && 'text-validation-messages' === $field['option_tab'] ) {
237
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
238
+ }
239
+ }
240
+ ?>
241
+ </table>
242
+ </div>
243
+ <div id="text-other" class="quiz_style_tab_content" style="display:none">
244
+ <table class="form-table" style="width: 100%;">
245
+ <?php
246
+ // Cycles through each field
247
+ foreach ( $fields as $field ) {
248
+ // Generate the field
249
+ if ( isset( $field['option_tab'] ) && 'text-other' === $field['option_tab'] ) {
250
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
251
+ }
252
+ }
253
+ ?>
254
+ </table>
255
+ </div>
256
+ <div id="text-legacy" class="quiz_style_tab_content" style="display:none">
257
+ <p><?php esc_html_e( 'All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next' ); ?></p>
258
+ <table class="form-table" style="width: 100%;">
259
+ <?php
260
+ // Cycles through each field
261
+ foreach ( $fields as $field ) {
262
+ // Generate the field
263
+ if ( isset( $field['option_tab'] ) && 'text-legacy' === $field['option_tab'] ) {
264
+ QSM_Fields::generate_field( $field, $settings[ $field["id"] ] );
265
+ }
266
+ }
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' ) {?>
274
+ <a id="qsm-blobal-settings" href="javascript:void(0)" ><?php esc_html_e('Reset to Defaults', 'quiz-master-next'); ?></a>
275
+ <?php } ?>
276
+ </div>
277
  </form>
278
  <?php
279
  }
718
  <tr valign="top" class="<?php echo esc_attr( $class ); ?>">
719
  <th scope="row" class="qsm-opt-tr">
720
  <label for="<?php echo esc_attr( $field["id"] ); ?>"><?php echo wp_kses_post( $field['label'] ); ?></label>
721
+ <?php if ( isset($field['tooltip']) && '' !== $field['tooltip'] ) { ?>
722
+ <span class="dashicons dashicons-editor-help qsm-tooltips-icon">
723
+ <span class="qsm-tooltips"><?php echo wp_kses_post( $field['tooltip'] ); ?></span>
724
+ </span>
725
+ <?php } ?>
726
  </th>
727
  <td>
728
  <fieldset class="buttonset buttonset-hide" data-hide='1'>
php/classes/class-qsm-install.php CHANGED
@@ -44,10 +44,10 @@ class QSM_Install {
44
 
45
  // Registers system setting
46
  $field_array = array(
47
- 'id' => 'form_type',
48
- 'label' => __( 'Quiz Type', 'quiz-master-next' ),
49
- 'type' => 'select',
50
- 'options' => array(
51
  array(
52
  'label' => __( 'Quiz', 'quiz-master-next' ),
53
  'value' => 0,
@@ -61,7 +61,8 @@ class QSM_Install {
61
  'value' => 2,
62
  ),
63
  ),
64
- 'default' => 0,
 
65
  );
66
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
67
 
@@ -88,17 +89,40 @@ class QSM_Install {
88
  'help' => __( 'Select the system for grading the quiz.', 'quiz-master-next' ),
89
  '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>',
90
  'show_option' => 'form_type_0',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  );
92
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
93
 
94
  // Registers default number of answers field
95
  $field_array = array(
96
- 'id' => 'default_answers',
97
- 'label' => __( 'Default Number of Answers', 'quiz-master-next' ),
98
- 'type' => 'number',
99
- 'options' => array(),
100
- 'default' => 1,
101
- 'help' => __( 'Adds number of answer fields', 'quiz-master-next' ),
 
102
  );
103
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
104
 
@@ -114,15 +138,16 @@ class QSM_Install {
114
  ),
115
  'default' => 0,
116
  'show_option' => 'form_type_0',
 
117
  );
118
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
119
 
120
  // Registers progress_bar setting
121
  $field_array = array(
122
- 'id' => 'progress_bar',
123
- 'label' => __( 'Show progress bar', 'quiz-master-next' ),
124
- 'type' => 'radio',
125
- 'options' => array(
126
  array(
127
  'label' => __( 'Yes', 'quiz-master-next' ),
128
  'value' => 1,
@@ -132,16 +157,17 @@ class QSM_Install {
132
  'value' => 0,
133
  ),
134
  ),
135
- 'default' => 0,
 
136
  );
137
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
138
 
139
  // Registers require_log_in setting
140
  $field_array = array(
141
- 'id' => 'require_log_in',
142
- 'label' => __( 'Require User Login', 'quiz-master-next' ),
143
- 'type' => 'radio',
144
- 'options' => array(
145
  array(
146
  'label' => __( 'Yes', 'quiz-master-next' ),
147
  'value' => 1,
@@ -151,39 +177,43 @@ class QSM_Install {
151
  'value' => 0,
152
  ),
153
  ),
154
- 'default' => 0,
155
- 'help' => __( 'Enabling this allows only logged in users to take the quiz', 'quiz-master-next' ),
 
156
  );
157
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
158
 
159
  // Registers pagination setting
160
  $field_array = array(
161
- 'id' => 'pagination',
162
- 'label' => __( 'Questions Per Page', 'quiz-master-next' ),
163
- 'type' => 'number',
164
- 'options' => array(),
165
- 'default' => 0,
166
- 'help' => __( 'Override the default pagination created on questions tab', 'quiz-master-next' ),
 
 
167
  );
168
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
169
 
170
  // Registers timer_limit setting
171
  $field_array = array(
172
- 'id' => 'timer_limit',
173
- 'label' => __( 'Time Limit (in minutes)', 'quiz-master-next' ),
174
- 'type' => 'number',
175
- 'options' => array(),
176
- 'default' => 0,
177
- 'help' => __( 'Leave 0 for no time limit', 'quiz-master-next' ),
 
178
  );
179
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
180
 
181
  // Settings for quick result
182
  $field_array = array(
183
- 'id' => 'enable_result_after_timer_end',
184
- 'label' => __( 'Force submit after timer expiry', 'quiz-master-next' ),
185
- 'type' => 'radio',
186
- 'options' => array(
187
  array(
188
  'label' => __( 'Yes', 'quiz-master-next' ),
189
  'value' => 1,
@@ -193,15 +223,16 @@ class QSM_Install {
193
  'value' => 0,
194
  ),
195
  ),
196
- 'default' => 0,
 
197
  );
198
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
199
 
200
  $field_array = array(
201
- 'id' => 'skip_validation_time_expire',
202
- 'label' => __( 'Skip validations when time expire', 'quiz-master-next' ),
203
- 'type' => 'radio',
204
- 'options' => array(
205
  array(
206
  'label' => __( 'Yes', 'quiz-master-next' ),
207
  'value' => 1,
@@ -211,75 +242,81 @@ class QSM_Install {
211
  'value' => 0,
212
  ),
213
  ),
214
- 'default' => 1,
 
215
  );
216
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
217
 
218
  // Registers total_user_tries setting
219
  $field_array = array(
220
- 'id' => 'total_user_tries',
221
- 'label' => __( 'Limit Attempts', 'quiz-master-next' ),
222
- 'type' => 'number',
223
- 'options' => array(),
224
- 'default' => 0,
225
- 'help' => __( 'Leave 0 for unlimited attempts', 'quiz-master-next' ),
226
- 'tooltip' => __( 'Limits how many times a user can take the quiz', 'quiz-master-next' ),
 
227
  );
228
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
229
 
230
  // Registers limit_total_entries setting
231
  $field_array = array(
232
- 'id' => 'limit_total_entries',
233
- 'label' => __( 'Limit Entries', 'quiz-master-next' ),
234
- 'type' => 'number',
235
- 'options' => array(),
236
- 'default' => 0,
237
- 'help' => __( 'Leave 0 for unlimited entries', 'quiz-master-next' ),
238
- 'tooltip' => __( 'Limits how many users can take the quiz.', 'quiz-master-next' ),
 
239
  );
240
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
241
 
242
  // Registers question_from_total setting
243
  $field_array = array(
244
- 'id' => 'question_from_total',
245
- 'label' => __( 'Limit number of Questions', 'quiz-master-next' ),
246
- 'type' => 'number',
247
- 'options' => array(),
248
- 'default' => 0,
249
- 'help' => __( 'Leave 0 to load all questions', 'quiz-master-next' ),
250
- 'tooltip' => __( 'Show only limited number of questions from your quiz.', 'quiz-master-next' ),
 
251
  );
252
 
253
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
254
 
255
  // Registers question_per_category setting
256
  $field_array = array(
257
- 'id' => 'question_per_category',
258
- 'label' => __( 'Limit number of Questions Per Category ', 'quiz-master-next' ),
259
- 'type' => 'number',
260
- 'options' => array(),
261
- 'default' => 0,
262
- 'help' => __( 'Leave 0 to load all questions. You also need to set Limit Number of questions, as well as select Question Categories', 'quiz-master-next' ),
263
- 'tooltip' => __( 'Show only limited number of category questions from your quiz.You also need to set Limit Number of questions.', 'quiz-master-next' ),
 
264
  );
265
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
266
 
267
  // Registers category setting
268
  $field_array = array(
269
- 'id' => 'randon_category',
270
- 'label' => __( 'Questions Categories', 'quiz-master-next' ),
271
- 'type' => 'category',
272
- 'default' => '',
273
- 'help' => __( 'Questions will load only from selected categories.', 'quiz-master-next' ),
 
274
  );
275
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
276
 
277
  // Registers randomness_order setting
278
  $field_array = array(
279
- 'id' => 'randomness_order',
280
- 'label' => __( 'Random Questions', 'quiz-master-next' ),
281
- 'type' => 'select',
282
- 'options' => array(
283
  array(
284
  'label' => __( 'Random Questions', 'quiz-master-next' ),
285
  'value' => 1,
@@ -297,56 +334,60 @@ class QSM_Install {
297
  'value' => 0,
298
  ),
299
  ),
300
- 'default' => 0,
301
- 'tooltip' => __( 'Randomize the order of questions or answers every time a quiz loads', 'quiz-master-next' ),
 
302
  );
303
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
304
 
305
  // Registers scheduled_time_start setting
306
  $field_array = array(
307
- 'id' => 'scheduled_time_start',
308
- 'label' => __( 'Quiz Dates', 'quiz-master-next' ),
309
- 'type' => 'date',
310
- 'options' => array(),
311
- 'default' => '',
312
- 'help' => '',
313
- 'ph_text' => __( 'Start Date', 'quiz-master-next' ),
314
- 'help' => __( 'If set, Quiz will be accessible only after this date', 'quiz-master-next' ),
315
- 'tooltip' => __( 'Leave blank for no date limit', 'quiz-master-next' ),
 
316
  );
317
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
318
 
319
  // Registers scheduled_time_end setting
320
  $field_array = array(
321
- 'id' => 'scheduled_time_end',
322
- 'label' => '',
323
- 'type' => 'date',
324
- 'options' => array(),
325
- 'default' => '',
326
- 'help' => __( ' If set, Quiz will not be accessible after this date', 'quiz-master-next' ),
327
- 'ph_text' => __( 'End Date', 'quiz-master-next' ),
 
328
  );
329
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
330
  $field_array = array(
331
- 'id' => 'not_allow_after_expired_time',
332
- 'label' => __( 'Do not allow quiz submission after the end date/time', 'quiz-master-next' ),
333
- 'type' => 'checkbox',
334
- 'options' => array(
335
  array(
336
  'value' => 1,
337
  ),
338
  ),
339
- 'default' => 0,
340
- 'ph_text' => '',
 
341
  );
342
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
343
 
344
  // Registers contact_info_location setting
345
  $field_array = array(
346
- 'id' => 'contact_info_location',
347
- 'label' => __( 'Contact form position', 'quiz-master-next' ),
348
- 'type' => 'radio',
349
- 'options' => array(
350
  array(
351
  'label' => __( 'Show before quiz begins', 'quiz-master-next' ),
352
  'value' => 0,
@@ -356,18 +397,19 @@ class QSM_Install {
356
  'value' => 1,
357
  ),
358
  ),
359
- 'default' => 0,
360
- 'help' => __( 'Select when to display the contact form', 'quiz-master-next' ),
361
- 'tooltip' => __( 'The form can be configured in Contact tab', 'quiz-master-next' ),
 
362
  );
363
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
364
 
365
  // Registers loggedin_user_contact setting
366
  $field_array = array(
367
- 'id' => 'loggedin_user_contact',
368
- 'label' => __( 'Show contact form to logged in users', 'quiz-master-next' ),
369
- 'type' => 'radio',
370
- 'options' => array(
371
  array(
372
  'label' => __( 'Yes', 'quiz-master-next' ),
373
  'value' => 0,
@@ -377,18 +419,19 @@ class QSM_Install {
377
  'value' => 1,
378
  ),
379
  ),
380
- 'default' => 0,
381
- 'help' => __( 'Logged in users can edit their contact information', 'quiz-master-next' ),
382
- 'tooltip' => __( 'The information will still get saved if this option is disabled', 'quiz-master-next' ),
 
383
  );
384
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
385
 
386
  // Registers comment_section setting
387
  $field_array = array(
388
- 'id' => 'comment_section',
389
- 'label' => __( 'Enable comments', 'quiz-master-next' ),
390
- 'type' => 'radio',
391
- 'options' => array(
392
  array(
393
  'label' => __( 'Yes', 'quiz-master-next' ),
394
  'value' => 0,
@@ -398,17 +441,18 @@ class QSM_Install {
398
  'value' => 1,
399
  ),
400
  ),
401
- 'default' => 1,
402
- 'help' => __( 'Allow users to enter their comments after the quiz', 'quiz-master-next' ),
 
403
  );
404
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
405
 
406
  // Registers question_numbering setting
407
  $field_array = array(
408
- 'id' => 'question_numbering',
409
- 'label' => __( 'Show question numbers', 'quiz-master-next' ),
410
- 'type' => 'radio',
411
- 'options' => array(
412
  array(
413
  'label' => __( 'Yes', 'quiz-master-next' ),
414
  'value' => 1,
@@ -418,16 +462,37 @@ class QSM_Install {
418
  'value' => 0,
419
  ),
420
  ),
421
- 'default' => 0,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  );
423
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
424
 
425
  // Registers store_responses setting
426
  $field_array = array(
427
- 'id' => 'store_responses',
428
- 'label' => __( 'Save Responses', 'quiz-master-next' ),
429
- 'type' => 'radio',
430
- 'options' => array(
431
  array(
432
  'label' => __( 'Yes', 'quiz-master-next' ),
433
  'value' => 1,
@@ -437,17 +502,18 @@ class QSM_Install {
437
  'value' => 0,
438
  ),
439
  ),
440
- 'default' => 1,
441
- 'help' => __( 'The results will be permanently stored in a database', 'quiz-master-next' ),
 
442
  );
443
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
444
 
445
  // Registers disable_answer_onselect setting
446
  $field_array = array(
447
- 'id' => 'disable_answer_onselect',
448
- 'label' => __( 'Disable change of answers', 'quiz-master-next' ),
449
- 'type' => 'radio',
450
- 'options' => array(
451
  array(
452
  'label' => __( 'Yes', 'quiz-master-next' ),
453
  'value' => 1,
@@ -457,18 +523,19 @@ class QSM_Install {
457
  'value' => 0,
458
  ),
459
  ),
460
- 'default' => 0,
461
- 'help' => __( 'Works with multiple choice questions only', 'quiz-master-next' ),
462
- 'tooltip' => __( 'The question will be disabled once an answer is selected', 'quiz-master-next' ),
 
463
  );
464
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
465
 
466
  // Registers ajax_show_correct setting
467
  $field_array = array(
468
- 'id' => 'ajax_show_correct',
469
- 'label' => __( 'Add class for correct/incorrect answers', 'quiz-master-next' ),
470
- 'type' => 'radio',
471
- 'options' => array(
472
  array(
473
  'label' => __( 'Yes', 'quiz-master-next' ),
474
  'value' => 1,
@@ -478,18 +545,19 @@ class QSM_Install {
478
  'value' => 0,
479
  ),
480
  ),
481
- 'default' => 0,
482
- 'help' => __( 'Works with multiple choice questions only', 'quiz-master-next' ),
483
- 'tooltip' => __( 'Dynamically add class for incorrect/correct answer after user selects answer.', 'quiz-master-next' ),
 
484
  );
485
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
486
 
487
  // Registers hide_auto fill setting
488
  $field_array = array(
489
- 'id' => 'contact_disable_autofill',
490
- 'label' => __( 'Disable auto fill for contact input', 'quiz-master-next' ),
491
- 'type' => 'radio',
492
- 'options' => array(
493
  array(
494
  'label' => __( 'Yes', 'quiz-master-next' ),
495
  'value' => 1,
@@ -499,15 +567,16 @@ class QSM_Install {
499
  'value' => 0,
500
  ),
501
  ),
502
- 'default' => 0,
 
503
  );
504
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
505
 
506
  $field_array = array(
507
- 'id' => 'form_disable_autofill',
508
- 'label' => __( 'Disable auto fill for Quiz input', 'quiz-master-next' ),
509
- 'type' => 'radio',
510
- 'options' => array(
511
  array(
512
  'label' => __( 'Yes', 'quiz-master-next' ),
513
  'value' => 1,
@@ -517,16 +586,17 @@ class QSM_Install {
517
  'value' => 0,
518
  ),
519
  ),
520
- 'default' => 0,
 
521
  );
522
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
523
 
524
  // Registers show category on front setting
525
  $field_array = array(
526
- 'id' => 'show_category_on_front',
527
- 'label' => __( 'Display category name on front end', 'quiz-master-next' ),
528
- 'type' => 'radio',
529
- 'options' => array(
530
  array(
531
  'label' => __( 'Yes', 'quiz-master-next' ),
532
  'value' => 1,
@@ -536,16 +606,17 @@ class QSM_Install {
536
  'value' => 0,
537
  ),
538
  ),
539
- 'default' => 0,
 
540
  );
541
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
542
 
543
  // Settings for quick result
544
  $field_array = array(
545
- 'id' => 'enable_quick_result_mc',
546
- 'label' => __( 'Show results inline', 'quiz-master-next' ),
547
- 'type' => 'radio',
548
- 'options' => array(
549
  array(
550
  'label' => __( 'Yes', 'quiz-master-next' ),
551
  'value' => 1,
@@ -555,16 +626,17 @@ class QSM_Install {
555
  'value' => 0,
556
  ),
557
  ),
558
- 'default' => 0,
559
- 'help' => __( 'Instantly displays the result for each question', 'quiz-master-next' ),
 
560
  );
561
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
562
 
563
  $field_array = array(
564
- 'id' => 'end_quiz_if_wrong',
565
- 'label' => __( 'End quiz if there is wrong answer', 'quiz-master-next' ),
566
- 'type' => 'radio',
567
- 'options' => array(
568
  array(
569
  'label' => __( 'Yes', 'quiz-master-next' ),
570
  'value' => 1,
@@ -574,17 +646,18 @@ class QSM_Install {
574
  'value' => 0,
575
  ),
576
  ),
577
- 'default' => 0,
578
- 'help' => __( 'This option works with vertical Multiple Choice , horizontal Multiple Choice , drop down , multiple response and horizontal multiple response question types', 'quiz-master-next' ),
 
579
  );
580
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
581
 
582
  // Settings for quick result
583
  $field_array = array(
584
- 'id' => 'enable_quick_correct_answer_info',
585
- 'label' => __( 'Show correct answer inline', 'quiz-master-next' ),
586
- 'type' => 'radio',
587
- 'options' => array(
588
  array(
589
  'label' => __( 'Yes When answer is correct', 'quiz-master-next' ),
590
  'value' => 1,
@@ -598,17 +671,18 @@ class QSM_Install {
598
  'value' => 0,
599
  ),
600
  ),
601
- 'default' => 0,
602
- 'help' => __( 'Show correct user info when inline result is enabled.', 'quiz-master-next' ),
 
603
  );
604
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
605
 
606
  // Setting for retake quiz
607
  $field_array = array(
608
- 'id' => 'enable_retake_quiz_button',
609
- 'label' => __( 'Retake Quiz', 'quiz-master-next' ),
610
- 'type' => 'radio',
611
- 'options' => array(
612
  array(
613
  'label' => __( 'Yes', 'quiz-master-next' ),
614
  'value' => 1,
@@ -618,17 +692,18 @@ class QSM_Install {
618
  'value' => 0,
619
  ),
620
  ),
621
- 'default' => 0,
622
- 'help' => __( 'Show a button on result page to retake the quiz', 'quiz-master-next' ),
 
623
  );
624
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
625
 
626
  // Setting for pagination of quiz
627
  $field_array = array(
628
- 'id' => 'enable_pagination_quiz',
629
- 'label' => __( 'Show current page number', 'quiz-master-next' ),
630
- 'type' => 'radio',
631
- 'options' => array(
632
  array(
633
  'label' => __( 'Yes', 'quiz-master-next' ),
634
  'value' => 1,
@@ -638,16 +713,17 @@ class QSM_Install {
638
  'value' => 0,
639
  ),
640
  ),
641
- 'default' => 0,
 
642
  );
643
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
644
 
645
  // Setting for pagination of quiz
646
  $field_array = array(
647
- 'id' => 'enable_deselect_option',
648
- 'label' => __( 'Deselect Answer', 'quiz-master-next' ),
649
- 'type' => 'radio',
650
- 'options' => array(
651
  array(
652
  'label' => __( 'Yes', 'quiz-master-next' ),
653
  'value' => 1,
@@ -657,17 +733,18 @@ class QSM_Install {
657
  'value' => 0,
658
  ),
659
  ),
660
- 'default' => 0,
661
- 'help' => __( 'Users are able deselect an answer and leave it blank. Works with Multiple Choice and Horizintal Multiple Choice questions only', 'quiz-master-next' ),
 
662
  );
663
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
664
 
665
  // Setting for pagination of quiz
666
  $field_array = array(
667
- 'id' => 'disable_description_on_result',
668
- 'label' => __( 'Disable description on quiz result page?', 'quiz-master-next' ),
669
- 'type' => 'radio',
670
- 'options' => array(
671
  array(
672
  'label' => __( 'Yes', 'quiz-master-next' ),
673
  'value' => 1,
@@ -677,16 +754,17 @@ class QSM_Install {
677
  'value' => 0,
678
  ),
679
  ),
680
- 'default' => 0,
 
681
  );
682
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
683
 
684
  // Setting for pagination of quiz
685
  $field_array = array(
686
- 'id' => 'disable_scroll_next_previous_click',
687
- 'label' => __( 'Disable scroll on next and previous button click?', 'quiz-master-next' ),
688
- 'type' => 'radio',
689
- 'options' => array(
690
  array(
691
  'label' => __( 'Yes', 'quiz-master-next' ),
692
  'value' => 1,
@@ -696,16 +774,17 @@ class QSM_Install {
696
  'value' => 0,
697
  ),
698
  ),
699
- 'default' => 0,
 
700
  );
701
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
702
 
703
  // Setting for display first page
704
  $field_array = array(
705
- 'id' => 'disable_first_page',
706
- 'label' => __( 'Disable first page on quiz', 'quiz-master-next' ),
707
- 'type' => 'radio',
708
- 'options' => array(
709
  array(
710
  'label' => __( 'Yes', 'quiz-master-next' ),
711
  'value' => 1,
@@ -715,59 +794,53 @@ class QSM_Install {
715
  'value' => 0,
716
  ),
717
  ),
718
- 'default' => 0,
 
719
  );
720
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
721
 
722
  // Setting for animation
723
  $field_array = array(
724
- 'id' => 'quiz_animation',
725
- 'label' => __( 'Quiz Animation', 'quiz-master-next' ),
726
- 'type' => 'select',
727
- 'options' => $mlwQuizMasterNext->pluginHelper->quiz_animation_effect(),
728
- 'default' => '',
 
729
  );
730
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
731
 
732
  // result page for sharing
733
  $field_array = array(
734
- 'id' => 'result_page_fb_image',
735
- 'label' => __( 'Logo URL', 'quiz-master-next' ),
736
- 'type' => 'url',
737
- 'default' => QSM_PLUGIN_URL . 'assets/icon-200x200.png',
738
- 'tooltip' => __( 'Enter the url of an image which will be used as logo while sharing on facebook.', 'quiz-master-next' ),
739
- 'help' => __( 'If left blank, this will default to QSM logo', 'quiz-master-next' ),
 
740
  );
741
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
742
 
743
  // Registers Preferred date type settings in the quiz options
744
  $field_array = array(
745
- 'id' => 'preferred_date_format',
746
- 'label' => __( 'Preferred Date Format', 'quiz-master-next' ),
747
- 'type' => 'text',
748
- 'default' => isset( get_option( 'qsm-quiz-settings' )['preferred_date_format'] ) ? get_option( 'qsm-quiz-settings' )['preferred_date_format'] : get_option( 'date_format' ),
749
- 'help' => __( 'Overrides global settings for preferred date format', 'quiz-master-next' ),
 
750
  );
751
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
752
 
753
  do_action( 'qsm_extra_setting_fields' );
754
- // Setting for animation
755
- $field_array = array(
756
- 'id' => 'legacy_options',
757
- 'label' => __( 'Show Legacy Options', 'quiz-master-next' ),
758
- 'type' => 'hide_show',
759
- 'default' => '',
760
- 'help' => __( 'All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next' ),
761
- // 'tooltip' => __('All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next')
762
- );
763
- $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
764
 
765
  // Registers social_media setting
766
  $field_array = array(
767
- 'id' => 'social_media',
768
- 'label' => __( 'Social Sharing Buttons', 'quiz-master-next' ),
769
- 'type' => 'radio',
770
- 'options' => array(
771
  array(
772
  'label' => __( 'Yes', 'quiz-master-next' ),
773
  'value' => 1,
@@ -777,18 +850,19 @@ class QSM_Install {
777
  'value' => 0,
778
  ),
779
  ),
780
- 'default' => 0,
781
  /* translators: %FACEBOOK_SHARE%: Facebook share link, %TWITTER_SHARE%: Twitter share link */
782
- 'tooltip' => __( 'Please use the new template variables instead.%FACEBOOK_SHARE% %TWITTER_SHARE%', 'quiz-master-next' ),
 
783
  );
784
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
785
 
786
  // Registers user_name setting
787
  $field_array = array(
788
- 'id' => 'user_name',
789
- 'label' => __( "Ask user's name", 'quiz-master-next' ),
790
- 'type' => 'radio',
791
- 'options' => array(
792
  array(
793
  'label' => __( 'No', 'quiz-master-next' ),
794
  'value' => 2,
@@ -803,16 +877,17 @@ class QSM_Install {
803
  ),
804
 
805
  ),
806
- 'default' => 2,
 
807
  );
808
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
809
 
810
  // Registers user_comp setting
811
  $field_array = array(
812
- 'id' => 'user_comp',
813
- 'label' => __( "Ask user's business", 'quiz-master-next' ),
814
- 'type' => 'radio',
815
- 'options' => array(
816
  array(
817
  'label' => __( 'No', 'quiz-master-next' ),
818
  'value' => 2,
@@ -826,16 +901,17 @@ class QSM_Install {
826
  'value' => 1,
827
  ),
828
  ),
829
- 'default' => 2,
 
830
  );
831
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
832
 
833
  // Registers user_email setting
834
  $field_array = array(
835
- 'id' => 'user_email',
836
- 'label' => __( "Ask user's email", 'quiz-master-next' ),
837
- 'type' => 'radio',
838
- 'options' => array(
839
  array(
840
  'label' => __( 'No', 'quiz-master-next' ),
841
  'value' => 2,
@@ -849,16 +925,17 @@ class QSM_Install {
849
  'value' => 1,
850
  ),
851
  ),
852
- 'default' => 2,
 
853
  );
854
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
855
 
856
  // Registers user_phone setting
857
  $field_array = array(
858
- 'id' => 'user_phone',
859
- 'label' => __( "Ask user's phone", 'quiz-master-next' ),
860
- 'type' => 'radio',
861
- 'options' => array(
862
  array(
863
  'label' => __( 'No', 'quiz-master-next' ),
864
  'value' => 2,
@@ -872,7 +949,8 @@ class QSM_Install {
872
  'value' => 1,
873
  ),
874
  ),
875
- 'default' => 2,
 
876
  );
877
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
878
 
@@ -1063,185 +1141,205 @@ class QSM_Install {
1063
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1064
 
1065
  $field_array = array(
1066
- 'id' => 'submit_button_text',
1067
- 'label' => __( 'Submit Button', 'quiz-master-next' ),
1068
- 'type' => 'text',
1069
- 'default' => 0,
 
1070
  );
1071
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1072
 
1073
  $field_array = array(
1074
- 'id' => 'retake_quiz_button_text',
1075
- 'label' => __( 'Retake Quiz Button', 'quiz-master-next' ),
1076
- 'type' => 'text',
1077
- 'default' => 'Retake Quiz',
 
1078
  );
1079
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1080
 
1081
  // Registers previous_button_text setting
1082
  $field_array = array(
1083
- 'id' => 'previous_button_text',
1084
- 'label' => __( 'Previous button', 'quiz-master-next' ),
1085
- 'type' => 'text',
1086
- 'default' => 0,
 
1087
  );
1088
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1089
 
1090
  // Registers next_button_text setting
1091
  $field_array = array(
1092
- 'id' => 'next_button_text',
1093
- 'label' => __( 'Next button', 'quiz-master-next' ),
1094
- 'type' => 'text',
1095
- 'default' => 0,
 
1096
  );
1097
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1098
 
1099
- // Registers submit_button_text setting
1100
  $field_array = array(
1101
- 'id' => 'validation_text_section',
1102
- 'label' => __( 'Validation Messages', 'quiz-master-next' ),
1103
- 'type' => 'section_heading',
1104
- 'default' => 0,
 
1105
  );
1106
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1107
 
1108
- // Registers empty_error_text setting
1109
  $field_array = array(
1110
- 'id' => 'empty_error_text',
1111
- 'label' => __( 'All required fields', 'quiz-master-next' ),
1112
- 'type' => 'text',
1113
- 'default' => __( 'Please complete all required fields!', 'quiz-master-next' ),
 
1114
  );
1115
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1116
 
1117
- // Registers email_error_text setting
1118
  $field_array = array(
1119
- 'id' => 'email_error_text',
1120
- 'label' => __( 'Invalid email', 'quiz-master-next' ),
1121
- 'type' => 'text',
1122
- 'default' => __( 'Not a valid e-mail address!', 'quiz-master-next' ),
 
1123
  );
1124
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1125
 
1126
- // Registers number_error_text setting
1127
  $field_array = array(
1128
- 'id' => 'number_error_text',
1129
- 'label' => __( 'Invalid number', 'quiz-master-next' ),
1130
- 'type' => 'text',
1131
- 'default' => __( 'This field must be a number!', 'quiz-master-next' ),
 
1132
  );
1133
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1134
 
1135
- // Registers incorrect_error_text setting
1136
  $field_array = array(
1137
- 'id' => 'incorrect_error_text',
1138
- 'label' => __( 'Invalid Captcha', 'quiz-master-next' ),
1139
- 'type' => 'text',
1140
- 'default' => __( 'The entered text is not correct!', 'quiz-master-next' ),
 
 
1141
  );
1142
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1143
 
1144
- // Registers submit_button_text setting
1145
  $field_array = array(
1146
- 'id' => 'other_text_section',
1147
- 'label' => __( 'Other', 'quiz-master-next' ),
1148
- 'type' => 'section_heading',
1149
- 'default' => 0,
 
 
1150
  );
1151
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1152
 
1153
- // Registers comment_field_text setting
1154
  $field_array = array(
1155
- 'id' => 'comment_field_text',
1156
- 'label' => __( 'Comments field', 'quiz-master-next' ),
1157
- 'type' => 'text',
1158
- 'default' => 0,
 
1159
  );
1160
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1161
 
1162
- // Registers hint_text setting
1163
  $field_array = array(
1164
- 'id' => 'hint_text',
1165
- 'label' => __( 'Hint Text', 'quiz-master-next' ),
1166
- 'type' => 'text',
1167
- 'default' => __( 'Hint', 'quiz-master-next' ),
 
1168
  );
1169
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1170
 
1171
- // Registers quick result correct answer setting
1172
  $field_array = array(
1173
- 'id' => 'quick_result_correct_answer_text',
1174
- 'label' => __( 'Correct answer message', 'quiz-master-next' ),
1175
- 'type' => 'text',
1176
- 'default' => __( 'Correct! You have selected correct answer.', 'quiz-master-next' ),
1177
- 'tooltip' => __( 'Text to show when the selected option is correct answer.', 'quiz-master-next' ),
1178
  );
1179
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1180
 
1181
- // Registers quick result wrong answer setting
1182
  $field_array = array(
1183
- 'id' => 'quick_result_wrong_answer_text',
1184
- 'label' => __( 'Incorrect answer message', 'quiz-master-next' ),
1185
- 'type' => 'text',
1186
- 'default' => __( 'Wrong! You have selected wrong answer.', 'quiz-master-next' ),
1187
- 'tooltip' => __( 'Text to show when the selected option is wrong answer.', 'quiz-master-next' ),
 
1188
  );
1189
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1190
 
1191
  // Registers quick result wrong answer setting
1192
  $field_array = array(
1193
- 'id' => 'quiz_processing_message',
1194
- 'label' => __( 'Quiz Submit/Processing Message', 'quiz-master-next' ),
1195
- 'type' => 'text',
1196
- 'default' => '',
1197
- 'tooltip' => __( 'Text to show while submitting the quiz.', 'quiz-master-next' ),
 
1198
  );
1199
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1200
 
1201
- // Setting for animation
1202
  $field_array = array(
1203
- 'id' => 'legacy_options',
1204
- 'label' => __( 'Show Legacy Options', 'quiz-master-next' ),
1205
- 'type' => 'hide_show',
1206
- 'default' => '',
1207
- 'help' => __( 'All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next' ),
1208
- // 'tooltip' => __('All the legacy options are deprecated and will be removed in upcoming version', 'quiz-master-next')
1209
  );
1210
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1211
 
1212
  // Registers name_field_text setting
1213
  $field_array = array(
1214
- 'id' => 'name_field_text',
1215
- 'label' => __( 'Name field', 'quiz-master-next' ),
1216
- 'type' => 'text',
1217
- 'default' => 0,
 
1218
  );
1219
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1220
 
1221
  // Registers business_field_text setting
1222
  $field_array = array(
1223
- 'id' => 'business_field_text',
1224
- 'label' => __( 'Business field', 'quiz-master-next' ),
1225
- 'type' => 'text',
1226
- 'default' => 0,
 
1227
  );
1228
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1229
 
1230
  // Registers email_field_text setting
1231
  $field_array = array(
1232
- 'id' => 'email_field_text',
1233
- 'label' => __( 'Email field', 'quiz-master-next' ),
1234
- 'type' => 'text',
1235
- 'default' => 0,
 
1236
  );
1237
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1238
 
1239
  // Registers phone_field_text setting
1240
  $field_array = array(
1241
- 'id' => 'phone_field_text',
1242
- 'label' => __( 'Phone number field', 'quiz-master-next' ),
1243
- 'type' => 'text',
1244
- 'default' => 0,
 
1245
  );
1246
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1247
 
@@ -1923,7 +2021,7 @@ class QSM_Install {
1923
  */
1924
  public function plugin_action_links( $links ) {
1925
  $action_links = array(
1926
- 'settings' => '<a href="' . admin_url( 'admin.php?page=mlw_quiz_list' ) . '" title="' . esc_attr( __( 'Quizzes/Surveys', 'quiz-master-next' ) ) . '">' . __( 'Quizzes/Surveys', 'quiz-master-next' ) . '</a>',
1927
  );
1928
  return array_merge( $action_links, $links );
1929
  }
44
 
45
  // Registers system setting
46
  $field_array = array(
47
+ 'id' => 'form_type',
48
+ 'label' => __( 'Quiz Type', 'quiz-master-next' ),
49
+ 'type' => 'select',
50
+ 'options' => array(
51
  array(
52
  'label' => __( 'Quiz', 'quiz-master-next' ),
53
  'value' => 0,
61
  'value' => 2,
62
  ),
63
  ),
64
+ 'default' => 0,
65
+ 'option_tab' => 'general',
66
  );
67
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
68
 
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
+ );
94
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
95
+
96
+ // Registers correct_answer_logic field
97
+ $field_array = array(
98
+ 'id' => 'correct_answer_logic',
99
+ 'label' => __( 'Correct Answer Logic', 'quiz-master-next' ),
100
+ 'type' => 'radio',
101
+ 'options' => array(
102
+ array(
103
+ 'label' => __( 'All correct answers', 'quiz-master-next' ),
104
+ 'value' => 1,
105
+ ),
106
+ array(
107
+ 'label' => __( 'Any correct answer', 'quiz-master-next' ),
108
+ 'value' => 0,
109
+ ),
110
+ ),
111
+ 'default' => 0,
112
+ 'show_option' => 'qsm_hidden_tr_gradingsystem',
113
+ 'option_tab' => 'general',
114
  );
115
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
116
 
117
  // Registers default number of answers field
118
  $field_array = array(
119
+ 'id' => 'default_answers',
120
+ 'label' => __( 'Default Number of Answers', 'quiz-master-next' ),
121
+ 'type' => 'number',
122
+ 'options' => array(),
123
+ 'default' => 1,
124
+ 'help' => __( 'Adds number of answer fields', 'quiz-master-next' ),
125
+ 'option_tab' => 'general',
126
  );
127
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
128
 
138
  ),
139
  'default' => 0,
140
  'show_option' => 'form_type_0',
141
+ 'option_tab' => 'general',
142
  );
143
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
144
 
145
  // Registers progress_bar setting
146
  $field_array = array(
147
+ 'id' => 'progress_bar',
148
+ 'label' => __( 'Show progress bar', 'quiz-master-next' ),
149
+ 'type' => 'radio',
150
+ 'options' => array(
151
  array(
152
  'label' => __( 'Yes', 'quiz-master-next' ),
153
  'value' => 1,
157
  'value' => 0,
158
  ),
159
  ),
160
+ 'default' => 0,
161
+ 'option_tab' => 'display',
162
  );
163
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
164
 
165
  // Registers require_log_in setting
166
  $field_array = array(
167
+ 'id' => 'require_log_in',
168
+ 'label' => __( 'Require User Login', 'quiz-master-next' ),
169
+ 'type' => 'radio',
170
+ 'options' => array(
171
  array(
172
  'label' => __( 'Yes', 'quiz-master-next' ),
173
  'value' => 1,
177
  'value' => 0,
178
  ),
179
  ),
180
+ 'default' => 0,
181
+ 'help' => __( 'Enabling this allows only logged in users to take the quiz', 'quiz-master-next' ),
182
+ 'option_tab' => 'general',
183
  );
184
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
185
 
186
  // Registers pagination setting
187
  $field_array = array(
188
+ 'id' => 'pagination',
189
+ 'label' => __( 'Questions Per Page', 'quiz-master-next' ),
190
+ 'type' => 'number',
191
+ 'options' => array(),
192
+ 'default' => 0,
193
+ 'help' => __( 'Override the default pagination created on questions tab', 'quiz-master-next' ),
194
+ 'option_tab' => 'general',
195
+ 'option_tab' => 'display',
196
  );
197
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
198
 
199
  // Registers timer_limit setting
200
  $field_array = array(
201
+ 'id' => 'timer_limit',
202
+ 'label' => __( 'Time Limit (in minutes)', 'quiz-master-next' ),
203
+ 'type' => 'number',
204
+ 'options' => array(),
205
+ 'default' => 0,
206
+ 'help' => __( 'Leave 0 for no time limit', 'quiz-master-next' ),
207
+ 'option_tab' => 'quiz_submission',
208
  );
209
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
210
 
211
  // Settings for quick result
212
  $field_array = array(
213
+ 'id' => 'enable_result_after_timer_end',
214
+ 'label' => __( 'Force submit after timer expiry', 'quiz-master-next' ),
215
+ 'type' => 'radio',
216
+ 'options' => array(
217
  array(
218
  'label' => __( 'Yes', 'quiz-master-next' ),
219
  'value' => 1,
223
  'value' => 0,
224
  ),
225
  ),
226
+ 'default' => 0,
227
+ 'option_tab' => 'quiz_submission',
228
  );
229
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
230
 
231
  $field_array = array(
232
+ 'id' => 'skip_validation_time_expire',
233
+ 'label' => __( 'Skip validations when time expire', 'quiz-master-next' ),
234
+ 'type' => 'radio',
235
+ 'options' => array(
236
  array(
237
  'label' => __( 'Yes', 'quiz-master-next' ),
238
  'value' => 1,
242
  'value' => 0,
243
  ),
244
  ),
245
+ 'default' => 1,
246
+ 'option_tab' => 'quiz_submission',
247
  );
248
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
249
 
250
  // Registers total_user_tries setting
251
  $field_array = array(
252
+ 'id' => 'total_user_tries',
253
+ 'label' => __( 'Limit Attempts', 'quiz-master-next' ),
254
+ 'type' => 'number',
255
+ 'options' => array(),
256
+ 'default' => 0,
257
+ 'help' => __( 'Leave 0 for unlimited attempts', 'quiz-master-next' ),
258
+ 'tooltip' => __( 'Limits how many times a user can take the quiz', 'quiz-master-next' ),
259
+ 'option_tab' => 'quiz_submission',
260
  );
261
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
262
 
263
  // Registers limit_total_entries setting
264
  $field_array = array(
265
+ 'id' => 'limit_total_entries',
266
+ 'label' => __( 'Limit Entries', 'quiz-master-next' ),
267
+ 'type' => 'number',
268
+ 'options' => array(),
269
+ 'default' => 0,
270
+ 'help' => __( 'Leave 0 for unlimited entries', 'quiz-master-next' ),
271
+ 'tooltip' => __( 'Limits how many users can take the quiz.', 'quiz-master-next' ),
272
+ 'option_tab' => 'quiz_submission',
273
  );
274
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
275
 
276
  // Registers question_from_total setting
277
  $field_array = array(
278
+ 'id' => 'question_from_total',
279
+ 'label' => __( 'Limit number of Questions', 'quiz-master-next' ),
280
+ 'type' => 'number',
281
+ 'options' => array(),
282
+ 'default' => 0,
283
+ 'help' => __( 'Leave 0 to load all questions', 'quiz-master-next' ),
284
+ 'tooltip' => __( 'Show only limited number of questions from your quiz.', 'quiz-master-next' ),
285
+ 'option_tab' => 'general',
286
  );
287
 
288
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
289
 
290
  // Registers question_per_category setting
291
  $field_array = array(
292
+ 'id' => 'question_per_category',
293
+ 'label' => __( 'Limit number of Questions Per Category ', 'quiz-master-next' ),
294
+ 'type' => 'number',
295
+ 'options' => array(),
296
+ 'default' => 0,
297
+ 'help' => __( 'Leave 0 to load all questions. You also need to set Limit Number of questions, as well as select Question Categories', 'quiz-master-next' ),
298
+ 'tooltip' => __( 'Show only limited number of category questions from your quiz.You also need to set Limit Number of questions.', 'quiz-master-next' ),
299
+ 'option_tab' => 'general',
300
  );
301
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
302
 
303
  // Registers category setting
304
  $field_array = array(
305
+ 'id' => 'randon_category',
306
+ 'label' => __( 'Questions Categories', 'quiz-master-next' ),
307
+ 'type' => 'category',
308
+ 'default' => '',
309
+ 'help' => __( 'Questions will load only from selected categories.', 'quiz-master-next' ),
310
+ 'option_tab' => 'general',
311
  );
312
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
313
 
314
  // Registers randomness_order setting
315
  $field_array = array(
316
+ 'id' => 'randomness_order',
317
+ 'label' => __( 'Random Questions', 'quiz-master-next' ),
318
+ 'type' => 'select',
319
+ 'options' => array(
320
  array(
321
  'label' => __( 'Random Questions', 'quiz-master-next' ),
322
  'value' => 1,
334
  'value' => 0,
335
  ),
336
  ),
337
+ 'default' => 0,
338
+ 'tooltip' => __( 'Randomize the order of questions or answers every time a quiz loads', 'quiz-master-next' ),
339
+ 'option_tab' => 'general',
340
  );
341
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
342
 
343
  // Registers scheduled_time_start setting
344
  $field_array = array(
345
+ 'id' => 'scheduled_time_start',
346
+ 'label' => __( 'Quiz Dates', 'quiz-master-next' ),
347
+ 'type' => 'date',
348
+ 'options' => array(),
349
+ 'default' => '',
350
+ 'help' => '',
351
+ 'ph_text' => __( 'Start Date', 'quiz-master-next' ),
352
+ 'help' => __( 'If set, Quiz will be accessible only after this date', 'quiz-master-next' ),
353
+ 'tooltip' => __( 'Leave blank for no date limit', 'quiz-master-next' ),
354
+ 'option_tab' => 'general',
355
  );
356
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
357
 
358
  // Registers scheduled_time_end setting
359
  $field_array = array(
360
+ 'id' => 'scheduled_time_end',
361
+ 'label' => '',
362
+ 'type' => 'date',
363
+ 'options' => array(),
364
+ 'default' => '',
365
+ 'help' => __( ' If set, Quiz will not be accessible after this date', 'quiz-master-next' ),
366
+ 'ph_text' => __( 'End Date', 'quiz-master-next' ),
367
+ 'option_tab' => 'general',
368
  );
369
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
370
  $field_array = array(
371
+ 'id' => 'not_allow_after_expired_time',
372
+ 'label' => __( 'Do not allow quiz submission after the end date/time', 'quiz-master-next' ),
373
+ 'type' => 'checkbox',
374
+ 'options' => array(
375
  array(
376
  'value' => 1,
377
  ),
378
  ),
379
+ 'default' => 0,
380
+ 'ph_text' => '',
381
+ 'option_tab' => 'quiz_submission',
382
  );
383
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
384
 
385
  // Registers contact_info_location setting
386
  $field_array = array(
387
+ 'id' => 'contact_info_location',
388
+ 'label' => __( 'Contact form position', 'quiz-master-next' ),
389
+ 'type' => 'radio',
390
+ 'options' => array(
391
  array(
392
  'label' => __( 'Show before quiz begins', 'quiz-master-next' ),
393
  'value' => 0,
397
  'value' => 1,
398
  ),
399
  ),
400
+ 'default' => 0,
401
+ 'help' => __( 'Select when to display the contact form', 'quiz-master-next' ),
402
+ 'tooltip' => __( 'The form can be configured in Contact tab', 'quiz-master-next' ),
403
+ 'option_tab' => 'contact_form',
404
  );
405
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
406
 
407
  // Registers loggedin_user_contact setting
408
  $field_array = array(
409
+ 'id' => 'loggedin_user_contact',
410
+ 'label' => __( 'Show contact form to logged in users', 'quiz-master-next' ),
411
+ 'type' => 'radio',
412
+ 'options' => array(
413
  array(
414
  'label' => __( 'Yes', 'quiz-master-next' ),
415
  'value' => 0,
419
  'value' => 1,
420
  ),
421
  ),
422
+ 'default' => 0,
423
+ 'help' => __( 'Logged in users can edit their contact information', 'quiz-master-next' ),
424
+ 'tooltip' => __( 'The information will still get saved if this option is disabled', 'quiz-master-next' ),
425
+ 'option_tab' => 'contact_form',
426
  );
427
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
428
 
429
  // Registers comment_section setting
430
  $field_array = array(
431
+ 'id' => 'comment_section',
432
+ 'label' => __( 'Enable comments', 'quiz-master-next' ),
433
+ 'type' => 'radio',
434
+ 'options' => array(
435
  array(
436
  'label' => __( 'Yes', 'quiz-master-next' ),
437
  'value' => 0,
441
  'value' => 1,
442
  ),
443
  ),
444
+ 'default' => 1,
445
+ 'help' => __( 'Allow users to enter their comments after the quiz', 'quiz-master-next' ),
446
+ 'option_tab' => 'general',
447
  );
448
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
449
 
450
  // Registers question_numbering setting
451
  $field_array = array(
452
+ 'id' => 'question_numbering',
453
+ 'label' => __( 'Show question numbers', 'quiz-master-next' ),
454
+ 'type' => 'radio',
455
+ 'options' => array(
456
  array(
457
  'label' => __( 'Yes', 'quiz-master-next' ),
458
  'value' => 1,
462
  'value' => 0,
463
  ),
464
  ),
465
+ 'default' => 0,
466
+ 'option_tab' => 'display',
467
+ );
468
+ $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
469
+
470
+ // Registers show-optin setting
471
+ $field_array = array(
472
+ 'id' => 'show_optin',
473
+ 'label' => __( 'Show Opt-in type Answers to User', 'quiz-master-next' ),
474
+ 'type' => 'radio',
475
+ 'options' => array(
476
+ array(
477
+ 'label' => __( 'Yes', 'quiz-master-next' ),
478
+ 'value' => 1,
479
+ ),
480
+ array(
481
+ 'label' => __( 'No', 'quiz-master-next' ),
482
+ 'value' => 0,
483
+ ),
484
+ ),
485
+ 'default' => 0,
486
+ 'option_tab' => 'display',
487
  );
488
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
489
 
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,
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' );
510
 
511
  // Registers disable_answer_onselect setting
512
  $field_array = array(
513
+ 'id' => 'disable_answer_onselect',
514
+ 'label' => __( 'Disable change of answers', 'quiz-master-next' ),
515
+ 'type' => 'radio',
516
+ 'options' => array(
517
  array(
518
  'label' => __( 'Yes', 'quiz-master-next' ),
519
  'value' => 1,
523
  'value' => 0,
524
  ),
525
  ),
526
+ 'default' => 0,
527
+ 'help' => __( 'Works with multiple choice questions only', 'quiz-master-next' ),
528
+ 'tooltip' => __( 'The question will be disabled once an answer is selected', 'quiz-master-next' ),
529
+ 'option_tab' => 'quiz_submission',
530
  );
531
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
532
 
533
  // Registers ajax_show_correct setting
534
  $field_array = array(
535
+ 'id' => 'ajax_show_correct',
536
+ 'label' => __( 'Add class for correct/incorrect answers', 'quiz-master-next' ),
537
+ 'type' => 'radio',
538
+ 'options' => array(
539
  array(
540
  'label' => __( 'Yes', 'quiz-master-next' ),
541
  'value' => 1,
545
  'value' => 0,
546
  ),
547
  ),
548
+ 'default' => 0,
549
+ 'help' => __( 'Works with multiple choice questions only', 'quiz-master-next' ),
550
+ 'tooltip' => __( 'Dynamically add class for incorrect/correct answer after user selects answer.', 'quiz-master-next' ),
551
+ 'option_tab' => 'display',
552
  );
553
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
554
 
555
  // Registers hide_auto fill setting
556
  $field_array = array(
557
+ 'id' => 'contact_disable_autofill',
558
+ 'label' => __( 'Disable auto fill for contact input', 'quiz-master-next' ),
559
+ 'type' => 'radio',
560
+ 'options' => array(
561
  array(
562
  'label' => __( 'Yes', 'quiz-master-next' ),
563
  'value' => 1,
567
  'value' => 0,
568
  ),
569
  ),
570
+ 'default' => 0,
571
+ 'option_tab' => 'contact_form',
572
  );
573
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
574
 
575
  $field_array = array(
576
+ 'id' => 'form_disable_autofill',
577
+ 'label' => __( 'Disable auto fill for Quiz input', 'quiz-master-next' ),
578
+ 'type' => 'radio',
579
+ 'options' => array(
580
  array(
581
  'label' => __( 'Yes', 'quiz-master-next' ),
582
  'value' => 1,
586
  'value' => 0,
587
  ),
588
  ),
589
+ 'default' => 0,
590
+ 'option_tab' => 'general',
591
  );
592
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
593
 
594
  // Registers show category on front setting
595
  $field_array = array(
596
+ 'id' => 'show_category_on_front',
597
+ 'label' => __( 'Display category name on front end', 'quiz-master-next' ),
598
+ 'type' => 'radio',
599
+ 'options' => array(
600
  array(
601
  'label' => __( 'Yes', 'quiz-master-next' ),
602
  'value' => 1,
606
  'value' => 0,
607
  ),
608
  ),
609
+ 'default' => 0,
610
+ 'option_tab' => 'display',
611
  );
612
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
613
 
614
  // Settings for quick result
615
  $field_array = array(
616
+ 'id' => 'enable_quick_result_mc',
617
+ 'label' => __( 'Show results inline', 'quiz-master-next' ),
618
+ 'type' => 'radio',
619
+ 'options' => array(
620
  array(
621
  'label' => __( 'Yes', 'quiz-master-next' ),
622
  'value' => 1,
626
  'value' => 0,
627
  ),
628
  ),
629
+ 'default' => 0,
630
+ 'help' => __( 'Instantly displays the result for each question', 'quiz-master-next' ),
631
+ 'option_tab' => 'display',
632
  );
633
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
634
 
635
  $field_array = array(
636
+ 'id' => 'end_quiz_if_wrong',
637
+ 'label' => __( 'End quiz if there is wrong answer', 'quiz-master-next' ),
638
+ 'type' => 'radio',
639
+ 'options' => array(
640
  array(
641
  'label' => __( 'Yes', 'quiz-master-next' ),
642
  'value' => 1,
646
  'value' => 0,
647
  ),
648
  ),
649
+ 'default' => 0,
650
+ 'help' => __( 'This option works with vertical Multiple Choice , horizontal Multiple Choice , drop down , multiple response and horizontal multiple response question types', 'quiz-master-next' ),
651
+ 'option_tab' => 'quiz_submission',
652
  );
653
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
654
 
655
  // Settings for quick result
656
  $field_array = array(
657
+ 'id' => 'enable_quick_correct_answer_info',
658
+ 'label' => __( 'Show correct answer inline', 'quiz-master-next' ),
659
+ 'type' => 'radio',
660
+ 'options' => array(
661
  array(
662
  'label' => __( 'Yes When answer is correct', 'quiz-master-next' ),
663
  'value' => 1,
671
  'value' => 0,
672
  ),
673
  ),
674
+ 'default' => 0,
675
+ 'help' => __( 'Show correct user info when inline result is enabled.', 'quiz-master-next' ),
676
+ 'option_tab' => 'display',
677
  );
678
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
679
 
680
  // Setting for retake quiz
681
  $field_array = array(
682
+ 'id' => 'enable_retake_quiz_button',
683
+ 'label' => __( 'Retake Quiz', 'quiz-master-next' ),
684
+ 'type' => 'radio',
685
+ 'options' => array(
686
  array(
687
  'label' => __( 'Yes', 'quiz-master-next' ),
688
  'value' => 1,
692
  'value' => 0,
693
  ),
694
  ),
695
+ 'default' => 0,
696
+ 'help' => __( 'Show a button on result page to retake the quiz', 'quiz-master-next' ),
697
+ 'option_tab' => 'quiz_submission',
698
  );
699
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
700
 
701
  // Setting for pagination of quiz
702
  $field_array = array(
703
+ 'id' => 'enable_pagination_quiz',
704
+ 'label' => __( 'Show current page number', 'quiz-master-next' ),
705
+ 'type' => 'radio',
706
+ 'options' => array(
707
  array(
708
  'label' => __( 'Yes', 'quiz-master-next' ),
709
  'value' => 1,
713
  'value' => 0,
714
  ),
715
  ),
716
+ 'default' => 0,
717
+ 'option_tab' => 'display',
718
  );
719
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
720
 
721
  // Setting for pagination of quiz
722
  $field_array = array(
723
+ 'id' => 'enable_deselect_option',
724
+ 'label' => __( 'Deselect Answer', 'quiz-master-next' ),
725
+ 'type' => 'radio',
726
+ 'options' => array(
727
  array(
728
  'label' => __( 'Yes', 'quiz-master-next' ),
729
  'value' => 1,
733
  'value' => 0,
734
  ),
735
  ),
736
+ 'default' => 0,
737
+ 'help' => __( 'Users are able deselect an answer and leave it blank. Works with Multiple Choice and Horizintal Multiple Choice questions only', 'quiz-master-next' ),
738
+ 'option_tab' => 'general',
739
  );
740
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
741
 
742
  // Setting for pagination of quiz
743
  $field_array = array(
744
+ 'id' => 'disable_description_on_result',
745
+ 'label' => __( 'Disable description on quiz result page?', 'quiz-master-next' ),
746
+ 'type' => 'radio',
747
+ 'options' => array(
748
  array(
749
  'label' => __( 'Yes', 'quiz-master-next' ),
750
  'value' => 1,
754
  'value' => 0,
755
  ),
756
  ),
757
+ 'default' => 0,
758
+ 'option_tab' => 'general',
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',
765
+ 'label' => __( 'Disable scroll on next and previous button click?', 'quiz-master-next' ),
766
+ 'type' => 'radio',
767
+ 'options' => array(
768
  array(
769
  'label' => __( 'Yes', 'quiz-master-next' ),
770
  'value' => 1,
774
  'value' => 0,
775
  ),
776
  ),
777
+ 'default' => 0,
778
+ 'option_tab' => 'display',
779
  );
780
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
781
 
782
  // Setting for display first page
783
  $field_array = array(
784
+ 'id' => 'disable_first_page',
785
+ 'label' => __( 'Disable first page on quiz', 'quiz-master-next' ),
786
+ 'type' => 'radio',
787
+ 'options' => array(
788
  array(
789
  'label' => __( 'Yes', 'quiz-master-next' ),
790
  'value' => 1,
794
  'value' => 0,
795
  ),
796
  ),
797
+ 'default' => 0,
798
+ 'option_tab' => 'contact_form',
799
  );
800
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
801
 
802
  // Setting for animation
803
  $field_array = array(
804
+ 'id' => 'quiz_animation',
805
+ 'label' => __( 'Quiz Animation', 'quiz-master-next' ),
806
+ 'type' => 'select',
807
+ 'options' => $mlwQuizMasterNext->pluginHelper->quiz_animation_effect(),
808
+ 'default' => '',
809
+ 'option_tab' => 'display',
810
  );
811
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
812
 
813
  // result page for sharing
814
  $field_array = array(
815
+ 'id' => 'result_page_fb_image',
816
+ 'label' => __( 'Logo URL', 'quiz-master-next' ),
817
+ 'type' => 'url',
818
+ 'default' => QSM_PLUGIN_URL . 'assets/icon-200x200.png',
819
+ 'tooltip' => __( 'Enter the url of an image which will be used as logo while sharing on facebook.', 'quiz-master-next' ),
820
+ 'help' => __( 'If left blank, this will default to QSM logo', 'quiz-master-next' ),
821
+ 'option_tab' => 'display',
822
  );
823
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
824
 
825
  // Registers Preferred date type settings in the quiz options
826
  $field_array = array(
827
+ 'id' => 'preferred_date_format',
828
+ 'label' => __( 'Preferred Date Format', 'quiz-master-next' ),
829
+ 'type' => 'text',
830
+ 'default' => isset( get_option( 'qsm-quiz-settings' )['preferred_date_format'] ) ? get_option( 'qsm-quiz-settings' )['preferred_date_format'] : get_option( 'date_format' ),
831
+ 'help' => __( 'Overrides global settings for preferred date format', 'quiz-master-next' ),
832
+ 'option_tab' => 'display',
833
  );
834
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
835
 
836
  do_action( 'qsm_extra_setting_fields' );
 
 
 
 
 
 
 
 
 
 
837
 
838
  // Registers social_media setting
839
  $field_array = array(
840
+ 'id' => 'social_media',
841
+ 'label' => __( 'Social Sharing Buttons', 'quiz-master-next' ),
842
+ 'type' => 'radio',
843
+ 'options' => array(
844
  array(
845
  'label' => __( 'Yes', 'quiz-master-next' ),
846
  'value' => 1,
850
  'value' => 0,
851
  ),
852
  ),
853
+ 'default' => 0,
854
  /* translators: %FACEBOOK_SHARE%: Facebook share link, %TWITTER_SHARE%: Twitter share link */
855
+ 'tooltip' => __( 'Please use the new template variables instead.%FACEBOOK_SHARE% %TWITTER_SHARE%', 'quiz-master-next' ),
856
+ 'option_tab' => 'legacy',
857
  );
858
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
859
 
860
  // Registers user_name setting
861
  $field_array = array(
862
+ 'id' => 'user_name',
863
+ 'label' => __( "Ask user's name", 'quiz-master-next' ),
864
+ 'type' => 'radio',
865
+ 'options' => array(
866
  array(
867
  'label' => __( 'No', 'quiz-master-next' ),
868
  'value' => 2,
877
  ),
878
 
879
  ),
880
+ 'default' => 2,
881
+ 'option_tab' => 'legacy',
882
  );
883
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
884
 
885
  // Registers user_comp setting
886
  $field_array = array(
887
+ 'id' => 'user_comp',
888
+ 'label' => __( "Ask user's business", 'quiz-master-next' ),
889
+ 'type' => 'radio',
890
+ 'options' => array(
891
  array(
892
  'label' => __( 'No', 'quiz-master-next' ),
893
  'value' => 2,
901
  'value' => 1,
902
  ),
903
  ),
904
+ 'default' => 2,
905
+ 'option_tab' => 'legacy',
906
  );
907
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
908
 
909
  // Registers user_email setting
910
  $field_array = array(
911
+ 'id' => 'user_email',
912
+ 'label' => __( "Ask user's email", 'quiz-master-next' ),
913
+ 'type' => 'radio',
914
+ 'options' => array(
915
  array(
916
  'label' => __( 'No', 'quiz-master-next' ),
917
  'value' => 2,
925
  'value' => 1,
926
  ),
927
  ),
928
+ 'default' => 2,
929
+ 'option_tab' => 'legacy',
930
  );
931
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
932
 
933
  // Registers user_phone setting
934
  $field_array = array(
935
+ 'id' => 'user_phone',
936
+ 'label' => __( "Ask user's phone", 'quiz-master-next' ),
937
+ 'type' => 'radio',
938
+ 'options' => array(
939
  array(
940
  'label' => __( 'No', 'quiz-master-next' ),
941
  'value' => 2,
949
  'value' => 1,
950
  ),
951
  ),
952
+ 'default' => 2,
953
+ 'option_tab' => 'legacy',
954
  );
955
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
956
 
1141
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1142
 
1143
  $field_array = array(
1144
+ 'id' => 'submit_button_text',
1145
+ 'label' => __( 'Submit Button', 'quiz-master-next' ),
1146
+ 'type' => 'text',
1147
+ 'default' => 0,
1148
+ 'option_tab' => 'text-button',
1149
  );
1150
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1151
 
1152
  $field_array = array(
1153
+ 'id' => 'retake_quiz_button_text',
1154
+ 'label' => __( 'Retake Quiz Button', 'quiz-master-next' ),
1155
+ 'type' => 'text',
1156
+ 'default' => __( 'Retake Quiz', 'quiz-master-next' ),
1157
+ 'option_tab' => 'text-button',
1158
  );
1159
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1160
 
1161
  // Registers previous_button_text setting
1162
  $field_array = array(
1163
+ 'id' => 'previous_button_text',
1164
+ 'label' => __( 'Previous button', 'quiz-master-next' ),
1165
+ 'type' => 'text',
1166
+ 'default' => 0,
1167
+ 'option_tab' => 'text-button',
1168
  );
1169
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1170
 
1171
  // Registers next_button_text setting
1172
  $field_array = array(
1173
+ 'id' => 'next_button_text',
1174
+ 'label' => __( 'Next button', 'quiz-master-next' ),
1175
+ 'type' => 'text',
1176
+ 'default' => 0,
1177
+ 'option_tab' => 'text-button',
1178
  );
1179
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1180
 
1181
+ // Registers empty_error_text setting
1182
  $field_array = array(
1183
+ 'id' => 'empty_error_text',
1184
+ 'label' => __( 'All required fields', 'quiz-master-next' ),
1185
+ 'type' => 'text',
1186
+ 'default' => __( 'Please complete all required fields!', 'quiz-master-next' ),
1187
+ 'option_tab' => 'text-validation-messages',
1188
  );
1189
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1190
 
1191
+ // Registers email_error_text setting
1192
  $field_array = array(
1193
+ 'id' => 'email_error_text',
1194
+ 'label' => __( 'Invalid email', 'quiz-master-next' ),
1195
+ 'type' => 'text',
1196
+ 'default' => __( 'Not a valid e-mail address!', 'quiz-master-next' ),
1197
+ 'option_tab' => 'text-validation-messages',
1198
  );
1199
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1200
 
1201
+ // Registers number_error_text setting
1202
  $field_array = array(
1203
+ 'id' => 'number_error_text',
1204
+ 'label' => __( 'Invalid number', 'quiz-master-next' ),
1205
+ 'type' => 'text',
1206
+ 'default' => __( 'This field must be a number!', 'quiz-master-next' ),
1207
+ 'option_tab' => 'text-validation-messages',
1208
  );
1209
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1210
 
1211
+ // Registers url_error_text setting
1212
  $field_array = array(
1213
+ 'id' => 'url_error_text',
1214
+ 'label' => __( 'Invalid URL', 'quiz-master-next' ),
1215
+ 'type' => 'text',
1216
+ 'default' => __( 'The entered URL is not valid!', 'quiz-master-next' ),
1217
+ 'option_tab' => 'text-validation-messages',
1218
  );
1219
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1220
 
1221
+ // Registers minlength_error_text setting
1222
  $field_array = array(
1223
+ 'id' => 'minlength_error_text',
1224
+ 'label' => __( 'Minimum Length', 'quiz-master-next' ),
1225
+ 'type' => 'text',
1226
+ 'default' => __( 'Required atleast %minlength% characters.', 'quiz-master-next' ),
1227
+ 'tooltip' => __( 'Use %minlength% to display number of characters required.', 'quiz-master-next' ),
1228
+ 'option_tab' => 'text-validation-messages',
1229
  );
1230
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1231
 
1232
+ // Registers maxlength_error_text setting
1233
  $field_array = array(
1234
+ 'id' => 'maxlength_error_text',
1235
+ 'label' => __( 'Maximum Length', 'quiz-master-next' ),
1236
+ 'type' => 'text',
1237
+ 'default' => __( 'Maximum %maxlength% characters allowed.', 'quiz-master-next' ),
1238
+ 'tooltip' => __( 'Use %maxlength% to display number of characters allowed.', 'quiz-master-next' ),
1239
+ 'option_tab' => 'text-validation-messages',
1240
  );
1241
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1242
 
1243
+ // Registers incorrect_error_text setting
1244
  $field_array = array(
1245
+ 'id' => 'incorrect_error_text',
1246
+ 'label' => __( 'Invalid Captcha', 'quiz-master-next' ),
1247
+ 'type' => 'text',
1248
+ 'default' => __( 'The entered text is not correct!', 'quiz-master-next' ),
1249
+ 'option_tab' => 'text-validation-messages',
1250
  );
1251
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1252
 
1253
+ // Registers comment_field_text setting
1254
  $field_array = array(
1255
+ 'id' => 'comment_field_text',
1256
+ 'label' => __( 'Comments field', 'quiz-master-next' ),
1257
+ 'type' => 'text',
1258
+ 'default' => 0,
1259
+ 'option_tab' => 'text-other',
1260
  );
1261
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1262
 
1263
+ // Registers hint_text setting
1264
  $field_array = array(
1265
+ 'id' => 'hint_text',
1266
+ 'label' => __( 'Hint Text', 'quiz-master-next' ),
1267
+ 'type' => 'text',
1268
+ 'default' => __( 'Hint', 'quiz-master-next' ),
1269
+ 'option_tab' => 'text-other',
1270
  );
1271
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1272
 
1273
+ // Registers quick result correct answer setting
1274
  $field_array = array(
1275
+ 'id' => 'quick_result_correct_answer_text',
1276
+ 'label' => __( 'Correct answer message', 'quiz-master-next' ),
1277
+ 'type' => 'text',
1278
+ 'default' => __( 'Correct! You have selected correct answer.', 'quiz-master-next' ),
1279
+ 'tooltip' => __( 'Text to show when the selected option is correct answer.', 'quiz-master-next' ),
1280
+ 'option_tab' => 'text-other',
1281
  );
1282
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1283
 
1284
  // Registers quick result wrong answer setting
1285
  $field_array = array(
1286
+ 'id' => 'quick_result_wrong_answer_text',
1287
+ 'label' => __( 'Incorrect answer message', 'quiz-master-next' ),
1288
+ 'type' => 'text',
1289
+ 'default' => __( 'Wrong! You have selected wrong answer.', 'quiz-master-next' ),
1290
+ 'tooltip' => __( 'Text to show when the selected option is wrong answer.', 'quiz-master-next' ),
1291
+ 'option_tab' => 'text-other',
1292
  );
1293
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1294
 
1295
+ // Registers quick result wrong answer setting
1296
  $field_array = array(
1297
+ 'id' => 'quiz_processing_message',
1298
+ 'label' => __( 'Quiz Submit/Processing Message', 'quiz-master-next' ),
1299
+ 'type' => 'text',
1300
+ 'default' => '',
1301
+ 'tooltip' => __( 'Text to show while submitting the quiz.', 'quiz-master-next' ),
1302
+ 'option_tab' => 'text-other',
1303
  );
1304
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1305
 
1306
  // Registers name_field_text setting
1307
  $field_array = array(
1308
+ 'id' => 'name_field_text',
1309
+ 'label' => __( 'Name field', 'quiz-master-next' ),
1310
+ 'type' => 'text',
1311
+ 'default' => 0,
1312
+ 'option_tab' => 'text-legacy',
1313
  );
1314
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1315
 
1316
  // Registers business_field_text setting
1317
  $field_array = array(
1318
+ 'id' => 'business_field_text',
1319
+ 'label' => __( 'Business field', 'quiz-master-next' ),
1320
+ 'type' => 'text',
1321
+ 'default' => 0,
1322
+ 'option_tab' => 'text-legacy',
1323
  );
1324
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1325
 
1326
  // Registers email_field_text setting
1327
  $field_array = array(
1328
+ 'id' => 'email_field_text',
1329
+ 'label' => __( 'Email field', 'quiz-master-next' ),
1330
+ 'type' => 'text',
1331
+ 'default' => 0,
1332
+ 'option_tab' => 'text-legacy',
1333
  );
1334
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1335
 
1336
  // Registers phone_field_text setting
1337
  $field_array = array(
1338
+ 'id' => 'phone_field_text',
1339
+ 'label' => __( 'Phone number field', 'quiz-master-next' ),
1340
+ 'type' => 'text',
1341
+ 'default' => 0,
1342
+ 'option_tab' => 'text-legacy',
1343
  );
1344
  $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
1345
 
2021
  */
2022
  public function plugin_action_links( $links ) {
2023
  $action_links = array(
2024
+ 'settings' => '<a href="' . admin_url( 'edit.php?post_type=qsm_quiz' ) . '" title="' . esc_attr( __( 'Quizzes & Surveys', 'quiz-master-next' ) ) . '">' . __( 'Quizzes & Surveys', 'quiz-master-next' ) . '</a>',
2025
  );
2026
  return array_merge( $action_links, $links );
2027
  }
php/classes/class-qsm-questions.php CHANGED
@@ -376,6 +376,16 @@ class QSM_Questions {
376
  }
377
  }
378
 
 
 
 
 
 
 
 
 
 
 
379
  return $question_id;
380
  }
381
 
@@ -533,11 +543,13 @@ class QSM_Questions {
533
  */
534
  public static function create_terms_tree( &$list, $parent ) {
535
  $taxTree = array();
536
- foreach ( $parent as $ind => $val ) {
537
- if ( isset( $list[ $val->term_id ] ) ) {
538
- $val->children = self::create_terms_tree( $list, $list[ $val->term_id ] );
 
 
 
539
  }
540
- $taxTree[] = $val;
541
  }
542
  return $taxTree;
543
  }
376
  }
377
  }
378
 
379
+ /**
380
+ * Hook after saving question
381
+ */
382
+ if ( $is_creating ) {
383
+ do_action( 'qsm_question_added', $question_id, $values );
384
+ } else {
385
+ do_action( 'qsm_question_updated', $question_id, $values );
386
+ }
387
+ do_action( 'qsm_saved_question', $question_id, $values );
388
+
389
  return $question_id;
390
  }
391
 
543
  */
544
  public static function create_terms_tree( &$list, $parent ) {
545
  $taxTree = array();
546
+ if ( is_array($parent) ) {
547
+ foreach ( $parent as $ind => $val ) {
548
+ if ( isset( $list[ $val->term_id ] ) ) {
549
+ $val->children = self::create_terms_tree( $list, $list[ $val->term_id ] );
550
+ }
551
+ $taxTree[] = $val;
552
  }
 
553
  }
554
  return $taxTree;
555
  }
php/classes/class-qsm-results-pages.php CHANGED
@@ -24,6 +24,7 @@ class QSM_Results_Pages {
24
  * @return string The HTML for the page to be displayed.
25
  */
26
  public static function generate_pages( $response_data ) {
 
27
  $pages = QSM_Results_Pages::load_pages( $response_data['quiz_id'] );
28
  $default = '%QUESTIONS_ANSWERS%';
29
  $redirect = false;
@@ -35,8 +36,9 @@ class QSM_Results_Pages {
35
  do_action( 'qsm_before_results_page' );
36
 
37
  // Cycles through each possible page.
38
- foreach ( $pages as $page ) {
39
-
 
40
  // Checks if any conditions are present. Else, set it as the default.
41
  if ( ! empty( $page['conditions'] ) ) {
42
  /**
@@ -133,13 +135,13 @@ class QSM_Results_Pages {
133
 
134
  // If we passed all conditions, show this page.
135
  if ( $show ) {
136
- $content = $page['page'];
137
  if ( $page['redirect'] ) {
138
  $redirect = $page['redirect'];
139
  }
140
  }
141
  } else {
142
- $default = $page['page'];
143
  if ( $page['redirect'] ) {
144
  $default_redirect = $page['redirect'];
145
  }
@@ -311,6 +313,7 @@ class QSM_Results_Pages {
311
  * @return bool True or false depending on success.
312
  */
313
  public static function save_pages( $quiz_id, $pages ) {
 
314
  if ( ! is_array( $pages ) ) {
315
  return false;
316
  }
@@ -350,10 +353,11 @@ class QSM_Results_Pages {
350
  if ( isset( $pages[ $i ]['page'] ) && $is_not_allow_html ) {
351
  // Sanitizes the conditions.
352
  $pages[ $i ]['page'] = wp_kses_post( $pages[ $i ]['page'] );
 
353
  }
 
354
  }
355
 
356
- global $wpdb;
357
  $results = $wpdb->update(
358
  $wpdb->prefix . 'mlw_quizzes',
359
  array( 'message_after' => maybe_serialize( $pages ) ),
24
  * @return string The HTML for the page to be displayed.
25
  */
26
  public static function generate_pages( $response_data ) {
27
+ global $mlwQuizMasterNext;
28
  $pages = QSM_Results_Pages::load_pages( $response_data['quiz_id'] );
29
  $default = '%QUESTIONS_ANSWERS%';
30
  $redirect = false;
36
  do_action( 'qsm_before_results_page' );
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'] ) ) {
44
  /**
135
 
136
  // If we passed all conditions, show this page.
137
  if ( $show ) {
138
+ $content = $page_content;
139
  if ( $page['redirect'] ) {
140
  $redirect = $page['redirect'];
141
  }
142
  }
143
  } else {
144
+ $default = $page_content;
145
  if ( $page['redirect'] ) {
146
  $default_redirect = $page['redirect'];
147
  }
313
  * @return bool True or false depending on success.
314
  */
315
  public static function save_pages( $quiz_id, $pages ) {
316
+ global $wpdb, $mlwQuizMasterNext;
317
  if ( ! is_array( $pages ) ) {
318
  return false;
319
  }
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
  }
360
 
 
361
  $results = $wpdb->update(
362
  $wpdb->prefix . 'mlw_quizzes',
363
  array( 'message_after' => maybe_serialize( $pages ) ),
php/classes/class-qsm-settings.php CHANGED
@@ -199,6 +199,7 @@ class QSM_Quiz_Settings {
199
  $setDefaultvalue['loggedin_user_contact'] = $globalQuizsetting['loggedin_user_contact'];
200
  $setDefaultvalue['comment_section'] = $globalQuizsetting['comment_section'];
201
  $setDefaultvalue['question_numbering'] = $globalQuizsetting['question_numbering'];
 
202
  $setDefaultvalue['store_responses'] = $globalQuizsetting['store_responses'];
203
  $setDefaultvalue['disable_answer_onselect'] = $globalQuizsetting['disable_answer_onselect'];
204
  $setDefaultvalue['ajax_show_correct'] = $globalQuizsetting['ajax_show_correct'];
@@ -255,6 +256,19 @@ class QSM_Quiz_Settings {
255
  $mlwQuizMasterNext->log_manager->add( 'Error when updating setting', $wpdb->last_error . ' from ' . $wpdb->last_query, 0, 'error' );
256
  return false;
257
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  return true;
259
  }
260
 
199
  $setDefaultvalue['loggedin_user_contact'] = $globalQuizsetting['loggedin_user_contact'];
200
  $setDefaultvalue['comment_section'] = $globalQuizsetting['comment_section'];
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'];
256
  $mlwQuizMasterNext->log_manager->add( 'Error when updating setting', $wpdb->last_error . ' from ' . $wpdb->last_query, 0, 'error' );
257
  return false;
258
  } else {
259
+ global $wpdb;
260
+ $results = $wpdb->get_results( "SELECT post_id FROM $wpdb->postmeta WHERE meta_value = $this->quiz_id AND meta_key = 'quiz_id'", ARRAY_A );
261
+ if ( ! empty( $results ) ) {
262
+ foreach ( $results as $result ) {
263
+ // update post_modified
264
+ $datetime = current_time( 'Y-m-d H:i:s', 0 );
265
+ $update = array(
266
+ 'ID' => $result['post_id'],
267
+ 'post_modified' => $datetime,
268
+ );
269
+ wp_update_post( $update );
270
+ }
271
+ }
272
  return true;
273
  }
274
 
php/classes/class-qsm-tracking.php CHANGED
@@ -41,7 +41,7 @@ class QSM_Tracking {
41
  private function add_hooks() {
42
  add_action( 'admin_notices', array( $this, 'admin_notice' ) );
43
  add_action( 'admin_init', array( $this, 'admin_notice_check' ) );
44
- add_action( 'plugins_loaded', array( $this, 'track_check' ) );
45
  }
46
 
47
  /**
41
  private function add_hooks() {
42
  add_action( 'admin_notices', array( $this, 'admin_notice' ) );
43
  add_action( 'admin_init', array( $this, 'admin_notice_check' ) );
44
+ add_action( 'init', array( $this, 'track_check' ) );
45
  }
46
 
47
  /**
php/classes/question-types/class-question-review-choice.php CHANGED
@@ -10,18 +10,19 @@ class QSM_Question_Review_Choice extends QSM_Question_Review {
10
  }
11
 
12
  public function set_user_answer() {
 
13
  if ( isset( $_POST[ 'question' . $this->question_id ] ) ) {
14
  $user_response = wp_unslash( $_POST[ 'question' . $this->question_id ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
15
  if ( is_array( $user_response ) ) {
16
  foreach ( $user_response as $user_response_single ) {
17
  $user_answer_key = intval( $this->sanitize_answer_from_post( $user_response_single ) );
18
  $user_answer_value = $this->sanitize_answer_from_db( $this->answer_array[ $user_answer_key ][0] );
19
- $this->user_answer[ $user_answer_key ] = $user_answer_value;
20
  }
21
  } elseif ( '' !== $user_response ) {
22
  $user_answer_key = intval( $this->sanitize_answer_from_post( $user_response ) );
23
  $user_answer_value = $this->sanitize_answer_from_db( $this->answer_array[ $user_answer_key ][0] );
24
- $this->user_answer[ $user_answer_key ] = $user_answer_value;
25
  }
26
  }
27
  }
@@ -44,7 +45,7 @@ class QSM_Question_Review_Choice extends QSM_Question_Review {
44
  $total_correct_ans++;
45
  }
46
  }
47
- if ( $user_correct_ans == $total_correct_ans && $is_user_attempted ) {
48
  $this->answer_status = 'correct';
49
  }
50
  }
10
  }
11
 
12
  public function set_user_answer() {
13
+ global $mlwQuizMasterNext;
14
  if ( isset( $_POST[ 'question' . $this->question_id ] ) ) {
15
  $user_response = wp_unslash( $_POST[ 'question' . $this->question_id ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
16
  if ( is_array( $user_response ) ) {
17
  foreach ( $user_response as $user_response_single ) {
18
  $user_answer_key = intval( $this->sanitize_answer_from_post( $user_response_single ) );
19
  $user_answer_value = $this->sanitize_answer_from_db( $this->answer_array[ $user_answer_key ][0] );
20
+ $this->user_answer[ $user_answer_key ] = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $user_answer_value, 'answer-' . $user_answer_value, 'QSM Answers' );
21
  }
22
  } elseif ( '' !== $user_response ) {
23
  $user_answer_key = intval( $this->sanitize_answer_from_post( $user_response ) );
24
  $user_answer_value = $this->sanitize_answer_from_db( $this->answer_array[ $user_answer_key ][0] );
25
+ $this->user_answer[ $user_answer_key ] = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $user_answer_value, 'answer-' . $user_answer_value, 'QSM Answers' );
26
  }
27
  }
28
  }
45
  $total_correct_ans++;
46
  }
47
  }
48
+ if ( ( $this->correct_answer_logic && count( $this->correct_answer ) === $user_correct_ans || ! $this->correct_answer_logic && $user_correct_ans === $total_correct_ans ) && $is_user_attempted ) {
49
  $this->answer_status = 'correct';
50
  }
51
  }
php/classes/question-types/class-question-review.php CHANGED
@@ -14,6 +14,7 @@ abstract class QSM_Question_Review {
14
  public $input_field = '';
15
  public $form_type = 0;
16
  public $grading_system = 0;
 
17
 
18
  function __construct( $question_id = 0, $question_description = '', $answer_array = array() ) {
19
  global $mlwQuizMasterNext;
@@ -25,6 +26,7 @@ abstract class QSM_Question_Review {
25
  $quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
26
  $this->form_type = intval( $quiz_options->form_type );
27
  $this->grading_system = intval( $quiz_options->system );
 
28
  $this->set_user_answer();
29
  $this->set_correct_answer();
30
  $this->set_answer_status();
14
  public $input_field = '';
15
  public $form_type = 0;
16
  public $grading_system = 0;
17
+ public $correct_answer_logic = 0;
18
 
19
  function __construct( $question_id = 0, $question_description = '', $answer_array = array() ) {
20
  global $mlwQuizMasterNext;
26
  $quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
27
  $this->form_type = intval( $quiz_options->form_type );
28
  $this->grading_system = intval( $quiz_options->system );
29
+ $this->correct_answer_logic = intval( $quiz_options->correct_answer_logic );
30
  $this->set_user_answer();
31
  $this->set_correct_answer();
32
  $this->set_answer_status();
php/question-types.php CHANGED
@@ -206,7 +206,7 @@ function qmn_question_type_accept() {
206
  'extra_inputs' => array(),
207
  'function' => '',
208
  );
209
- $mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Opt-in', 'quiz-master-next' ), 'qmn_accept_display', false, null, $edit_args, null, 8 );
210
  $mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'input_field', 'Checkbox' );
211
  $mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'category', 'Choice' );
212
  }
206
  'extra_inputs' => array(),
207
  'function' => '',
208
  );
209
+ $mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Opt-in', 'quiz-master-next' ), 'qmn_accept_display', false, 'qmn_opt_in_review', $edit_args, null, 8 );
210
  $mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'input_field', 'Checkbox' );
211
  $mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'category', 'Choice' );
212
  }
php/question-types/qsm-question-title.php CHANGED
@@ -27,15 +27,19 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_
27
  }
28
  }
29
  if ( '' !== $new_question_title ) {
 
30
  ?>
31
- <div class='mlw_qmn_new_question'><?php echo esc_html( htmlspecialchars_decode( $new_question_title, ENT_QUOTES ) ); ?> </div>
32
  <?php
33
  $polar_extra_class .= ' qsm_remove_bold';
34
  }
35
-
 
 
36
  ?>
37
  <div class='mlw_qmn_question <?php echo esc_attr( $polar_extra_class ); ?>' >
38
- <?php echo do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) . $deselect_answer ); ?>
 
39
  </div>
40
  <?php
41
  }
27
  }
28
  }
29
  if ( '' !== $new_question_title ) {
30
+ $new_question_title = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $new_question_title, ENT_QUOTES ), "Question-{$question_id}", "QSM Questions");
31
  ?>
32
+ <div class='mlw_qmn_new_question'><?php echo esc_html( $new_question_title ); ?> </div>
33
  <?php
34
  $polar_extra_class .= ' qsm_remove_bold';
35
  }
36
+ if ( ! empty( $question_title ) ) {
37
+ $question_title = do_shortcode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question_title, ENT_QUOTES ), "question-description-{$question_id}", "QSM Questions" ) );
38
+ }
39
  ?>
40
  <div class='mlw_qmn_question <?php echo esc_attr( $polar_extra_class ); ?>' >
41
+ <?php do_action('qsm_before_question_title',$question, $question_type, $new_question_title, $question_id ); ?>
42
+ <?php echo wp_kses_post( $question_title . $deselect_answer ); ?>
43
  </div>
44
  <?php
45
  }
php/question-types/qsm-question-type-dropdown.php CHANGED
@@ -31,8 +31,10 @@ function qmn_drop_down_display( $id, $question, $answers ) {
31
  foreach ( $answers as $answer_index => $answer ) {
32
  $mlw_answer_total++;
33
  if ( '' !== $answer[0] ) {
 
 
34
  ?>
35
- <option value="<?php echo esc_attr( $answer_index ); ?>"><?php echo esc_html( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ); ?></option>
36
  <?php
37
  }
38
  }
31
  foreach ( $answers as $answer_index => $answer ) {
32
  $mlw_answer_total++;
33
  if ( '' !== $answer[0] ) {
34
+ $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
35
+ $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, "answer-" . $answer_text, "QSM Answers" );
36
  ?>
37
+ <option value="<?php echo esc_attr( $answer_index ); ?>"><?php echo esc_html( $answer_text ); ?></option>
38
  <?php
39
  }
40
  }
php/question-types/qsm-question-type-fill-in-the-blanks.php CHANGED
@@ -12,12 +12,32 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  * @since 4.4.0
13
  */
14
  function qmn_fill_blank_display( $id, $question, $answers ) {
15
- global $mlwQuizMasterNext;
16
- $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
17
- $autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
18
- $limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
19
- $autofill_att = $autofill ? "autocomplete='off' " : '';
20
- $limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  if ( 0 == $required ) {
22
  $mlw_require_class = 'mlwRequiredText';
23
  } else {
12
  * @since 4.4.0
13
  */
14
  function qmn_fill_blank_display( $id, $question, $answers ) {
15
+ global $mlwQuizMasterNext, $allowedposttags;
16
+ $allowedposttags['input'] = array(
17
+ 'autocomplete' => true,
18
+ 'class' => true,
19
+ 'id' => true,
20
+ 'height' => true,
21
+ 'min' => true,
22
+ 'max' => true,
23
+ 'minlenght' => true,
24
+ 'maxlength' => true,
25
+ 'name' => true,
26
+ 'pattern' => true,
27
+ 'placeholder' => true,
28
+ 'readony' => true,
29
+ 'required' => true,
30
+ 'size' => true,
31
+ 'step' => true,
32
+ 'type' => true,
33
+ 'value' => true,
34
+ 'width' => true,
35
+ );
36
+ $required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
37
+ $autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
38
+ $limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
39
+ $autofill_att = $autofill ? "autocomplete='off' " : '';
40
+ $limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
41
  if ( 0 == $required ) {
42
  $mlw_require_class = 'mlwRequiredText';
43
  } else {
php/question-types/qsm-question-type-multiple-choice-horizontal.php CHANGED
@@ -4,10 +4,10 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  }
5
 
6
  /**
7
- *
8
- *
9
- *
10
- */
11
 
12
  /**
13
  * This function shows the content of the horizontal multiple choice question.
@@ -26,7 +26,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
26
  } else {
27
  $mlw_require_class = '';
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
  ?>
@@ -38,17 +38,27 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
38
  $mlw_answer_total++;
39
  if ( '' !== $answer[0] ) {
40
  $answer_class = apply_filters( 'qsm_answer_wrapper_class', '', $answer, $id );
 
41
  ?>
42
  <span class="mlw_horizontal_choice <?php echo esc_attr( $answer_class ); ?>">
43
- <input type="radio" class="qmn_quiz_radio" name="question<?php echo esc_attr( $id ); ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
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
  <?php
50
  } else {
51
- echo wp_kses_post( trim( do_shortcode( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ) );
 
 
52
  }
53
  ?>
54
  </label>
@@ -65,7 +75,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
65
  <?php
66
  }
67
  ?>
68
- </div>
69
  <?php
70
  echo apply_filters( 'qmn_horizontal_multiple_choice_display_front', '', $id, $question, $answers );
71
  }
@@ -83,12 +93,12 @@ function qmn_horizontal_multiple_choice_review( $id, $question, $answers ) {
83
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
84
  $user_text_array = $current_question->get_user_answer( 'single_response' );
85
  $correct_text_array = $current_question->get_correct_answer();
86
- $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '' ;
87
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
88
  $return_array['correct'] = $current_question->get_answer_status( 'single_response' );
89
  $return_array['points'] = $current_question->get_points();
90
  $return_array['user_answer'] = $user_text_array;
91
- $return_array['correct_answer'] = $correct_text_array ;
92
  /**
93
  * Hook to filter answers array
94
  */
4
  }
5
 
6
  /**
7
+ *
8
+ *
9
+ *
10
+ */
11
 
12
  /**
13
  * This function shows the content of the horizontal multiple choice question.
26
  } else {
27
  $mlw_require_class = '';
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
  ?>
38
  $mlw_answer_total++;
39
  if ( '' !== $answer[0] ) {
40
  $answer_class = apply_filters( 'qsm_answer_wrapper_class', '', $answer, $id );
41
+ $answer_class = 'image' === $answerEditor ? $answer_class.' qmn_image_option' : '';
42
  ?>
43
  <span class="mlw_horizontal_choice <?php echo esc_attr( $answer_class ); ?>">
44
+ <input type="radio" class="qmn_quiz_radio" name="question<?php echo esc_attr( $id ); ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
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 ) );
53
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
54
+ echo esc_html( $caption_text );
55
+ ?>
56
+ </span>
57
  <?php
58
  } else {
59
+ $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
60
+ $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
61
+ echo wp_kses_post( do_shortcode( $answer_text ) );
62
  }
63
  ?>
64
  </label>
75
  <?php
76
  }
77
  ?>
78
+ </div>
79
  <?php
80
  echo apply_filters( 'qmn_horizontal_multiple_choice_display_front', '', $id, $question, $answers );
81
  }
93
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
94
  $user_text_array = $current_question->get_user_answer( 'single_response' );
95
  $correct_text_array = $current_question->get_correct_answer();
96
+ $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '';
97
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
98
  $return_array['correct'] = $current_question->get_answer_status( 'single_response' );
99
  $return_array['points'] = $current_question->get_points();
100
  $return_array['user_answer'] = $user_text_array;
101
+ $return_array['correct_answer'] = $correct_text_array;
102
  /**
103
  * Hook to filter answers array
104
  */
php/question-types/qsm-question-type-multiple-choice.php CHANGED
@@ -55,11 +55,17 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
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 echo esc_html( trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) ) ); ?>
 
 
 
 
59
  </span>
60
  <?php
61
  } else {
62
- echo wp_kses_post( trim( do_shortcode( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ) );
 
 
63
  }
64
  ?>
65
  </label>
@@ -94,10 +100,10 @@ function qmn_multiple_choice_review( $id, $question, $answers ) {
94
  $user_text_array = $current_question->get_user_answer();
95
  $correct_text_array = $current_question->get_correct_answer();
96
  $return_array['user_answer'] = $user_text_array;
97
- $return_array['correct_answer'] = $correct_text_array ;
98
- $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '' ;
99
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
100
  $return_array['correct'] = $current_question->get_answer_status();
101
  $return_array['points'] = $current_question->get_points();
102
  return apply_filters( 'qmn_multiple_choice_review', $return_array, $answers );
103
- }
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 ) );
60
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
61
+ echo esc_html( $caption_text );
62
+ ?>
63
  </span>
64
  <?php
65
  } else {
66
+ $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
67
+ $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
68
+ echo wp_kses_post( do_shortcode( $answer_text ) );
69
  }
70
  ?>
71
  </label>
100
  $user_text_array = $current_question->get_user_answer();
101
  $correct_text_array = $current_question->get_correct_answer();
102
  $return_array['user_answer'] = $user_text_array;
103
+ $return_array['correct_answer'] = $correct_text_array;
104
+ $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '';
105
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
106
  $return_array['correct'] = $current_question->get_answer_status();
107
  $return_array['points'] = $current_question->get_points();
108
  return apply_filters( 'qmn_multiple_choice_review', $return_array, $answers );
109
+ }
php/question-types/qsm-question-type-multiple-response-horizontal.php CHANGED
@@ -37,20 +37,29 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
37
  if ( '' !== $answer[0] ) {
38
  ?>
39
  <span class="mlw_horizontal_multiple">
40
- <input type="checkbox" <?php echo esc_attr( $limit_mr_text ); ?> name="question<?php echo esc_attr( $id ) .'[]' ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
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
  <?php
 
 
 
 
 
 
 
 
 
 
 
47
  } else {
48
- echo wp_kses_post( trim( do_shortcode( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ) );
 
 
49
  }
50
  ?>
51
  </label>
52
  </span>
53
- <?php
54
  }
55
  }
56
  }
@@ -73,12 +82,12 @@ function qmn_horizontal_multiple_response_review( $id, $question, $answers ) {
73
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
74
  $user_text_array = $current_question->get_user_answer();
75
  $correct_text_array = $current_question->get_correct_answer();
76
- $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '' ;
77
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
78
  $return_array['correct'] = $current_question->get_answer_status();
79
  $return_array['points'] = $current_question->get_points();
80
  $return_array['user_answer'] = $user_text_array;
81
- $return_array['correct_answer'] = $correct_text_array ;
82
  /**
83
  * Hook to filter answers array
84
  */
37
  if ( '' !== $answer[0] ) {
38
  ?>
39
  <span class="mlw_horizontal_multiple">
40
+ <input type="checkbox" <?php echo esc_attr( $limit_mr_text ); ?> name="question<?php echo esc_attr( $id ) . '[]'; ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
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 ) );
49
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
50
+ echo esc_html( $caption_text );
51
+ ?>
52
+ </span>
53
+ <?php
54
  } else {
55
+ $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
56
+ $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
57
+ echo wp_kses_post( do_shortcode( $answer_text ) );
58
  }
59
  ?>
60
  </label>
61
  </span>
62
+ <?php
63
  }
64
  }
65
  }
82
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
83
  $user_text_array = $current_question->get_user_answer();
84
  $correct_text_array = $current_question->get_correct_answer();
85
+ $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '';
86
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
87
  $return_array['correct'] = $current_question->get_answer_status();
88
  $return_array['points'] = $current_question->get_points();
89
  $return_array['user_answer'] = $user_text_array;
90
+ $return_array['correct_answer'] = $correct_text_array;
91
  /**
92
  * Hook to filter answers array
93
  */
php/question-types/qsm-question-type-multiple-response.php CHANGED
@@ -36,17 +36,28 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
36
  foreach ( $answers as $answer_index => $answer ) {
37
  $mlw_answer_total++;
38
  if ( '' !== $answer[0] ) {
 
 
39
  ?>
40
- <div class="qsm_check_answer">
41
- <input type="checkbox" <?php echo esc_attr( $limit_mr_text ); ?> name="question<?php echo esc_attr( $id ) . '[]' ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
42
  <label class="qsm-input-label" for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
43
  <?php
44
  if ( 'image' === $answerEditor ) {
45
- ?>
46
- <img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" />
47
- <?php
 
 
 
 
 
 
 
48
  } else {
49
- echo wp_kses_post( trim( do_shortcode( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ) );
 
 
50
  }
51
  ?>
52
  </label>
@@ -74,14 +85,14 @@ function qmn_multiple_response_review( $id, $question, $answers ) {
74
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
75
  $user_text_array = $current_question->get_user_answer();
76
  $correct_text_array = $current_question->get_correct_answer();
77
- $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '' ;
78
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
79
  $return_array['correct'] = $current_question->get_answer_status();
80
  $return_array['points'] = $current_question->get_points();
81
  $return_array['user_answer'] = $user_text_array;
82
- $return_array['correct_answer'] = $correct_text_array ;
83
  /**
84
  * Hook to filter answers array
85
  */
86
  return apply_filters( 'qmn_multiple_response_review', $return_array, $answers );
87
- }
36
  foreach ( $answers as $answer_index => $answer ) {
37
  $mlw_answer_total++;
38
  if ( '' !== $answer[0] ) {
39
+ $answer_class = apply_filters( 'qsm_answer_wrapper_class', '', $answer, $id );
40
+ $answer_class = 'image' === $answerEditor ? $answer_class.' qmn_image_option' : '';
41
  ?>
42
+ <div class="qsm_check_answer <?php echo esc_attr( $answer_class ); ?>">
43
+ <input type="checkbox" <?php echo esc_attr( $limit_mr_text ); ?> name="question<?php echo esc_attr( $id ) . '[]'; ?>" id="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
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 ) );
52
+ $caption_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $caption_text, 'caption-' . $caption_text, 'QSM Answers' );
53
+ echo esc_html( $caption_text );
54
+ ?>
55
+ </span>
56
+ <?php
57
  } else {
58
+ $answer_text = trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) );
59
+ $answer_text = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer_text, 'answer-' . $answer_text, 'QSM Answers' );
60
+ echo wp_kses_post( do_shortcode( $answer_text ) );
61
  }
62
  ?>
63
  </label>
85
  $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
86
  $user_text_array = $current_question->get_user_answer();
87
  $correct_text_array = $current_question->get_correct_answer();
88
+ $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '';
89
  $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
90
  $return_array['correct'] = $current_question->get_answer_status();
91
  $return_array['points'] = $current_question->get_points();
92
  $return_array['user_answer'] = $user_text_array;
93
+ $return_array['correct_answer'] = $correct_text_array;
94
  /**
95
  * Hook to filter answers array
96
  */
97
  return apply_filters( 'qmn_multiple_response_review', $return_array, $answers );
98
+ }
php/question-types/qsm-question-type-opt-in.php CHANGED
@@ -22,9 +22,36 @@ function qmn_accept_display( $id, $question, $answers ) {
22
  }
23
  ?>
24
  <div class="qmn_accept_answers">
25
- <input type="checkbox" id="mlwAcceptance" class="<?php echo esc_attr( $mlw_require_class ); ?>" />
26
- <label class="qsm-input-label" for="mlwAcceptance"><span class="qmn_accept_text"><?php echo wp_kses_post( do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) ); ?></span></label>
 
 
 
 
 
 
 
 
27
  </div>
28
  <?php
29
  echo apply_filters( 'qmn_accept_display_front', '', $id, $question, $answers );
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
  ?>
24
  <div class="qmn_accept_answers">
25
+ <input type="checkbox" id="mlwAcceptance" name="<?php echo esc_attr( 'question' . $id ); ?>" class="<?php echo esc_attr( $mlw_require_class ); ?>" />
26
+ <label class="qsm-input-label" for="mlwAcceptance">
27
+ <span class="qmn_accept_text">
28
+ <?php
29
+ $question = do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) );
30
+ $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question, "question-description-{$id}", 'QSM Questions' );
31
+ echo wp_kses_post( $question );
32
+ ?>
33
+ </span>
34
+ </label>
35
  </div>
36
  <?php
37
  echo apply_filters( 'qmn_accept_display_front', '', $id, $question, $answers );
38
+ }
39
+
40
+ function qmn_opt_in_review( $id, $question, $answers ) {
41
+ if ( isset( $_POST[ 'question' . $id ] ) && 'on' == sanitize_text_field( wp_unslash( $_POST[ 'question' . $id ] ) ) ) {
42
+ $user_compare_text = 'opted';
43
+ } else {
44
+ $user_compare_text = 'not-opted';
45
+ }
46
+ $current_question = new QSM_Question_Review_Choice( $id, $question, $answers );
47
+ $user_text_array = $current_question->get_user_answer();
48
+ $correct_text_array = $current_question->get_correct_answer();
49
+ $return_array['user_answer'] = $user_text_array;
50
+ $return_array['correct_answer'] = $correct_text_array;
51
+ $return_array['user_text'] = ! empty( $user_text_array ) ? implode( '.', $user_text_array ) : '';
52
+ $return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
53
+ $return_array['correct'] = 'opt-in';
54
+ $return_array['points'] = '';
55
+ $return_array['user_compare_text'] = $user_compare_text;
56
+ return apply_filters( 'qmn_opt_in_review', $return_array, $answers );
57
+ }
php/question-types/qsm-question-type-paragraph.php CHANGED
@@ -25,7 +25,7 @@ function qmn_large_open_display( $id, $question, $answers ) {
25
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
26
  qsm_question_title_func( $question, '', $new_question_title, $id );
27
  ?>
28
- <textarea class="mlw_answer_open_text <?php echo esc_attr( $mlw_require_class ); ?>" cols="70" rows="5" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>"<?php endif; ?> /></textarea>
29
  <?php
30
  echo apply_filters( 'qmn_large_open_display_front', '', $id, $question, $answers );
31
  }
25
  $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
26
  qsm_question_title_func( $question, '', $new_question_title, $id );
27
  ?>
28
+ <textarea class="mlw_answer_open_text <?php echo esc_attr( $mlw_require_class ); ?>" cols="70" rows="5" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>"<?php endif; ?> /></textarea>
29
  <?php
30
  echo apply_filters( 'qmn_large_open_display_front', '', $id, $question, $answers );
31
  }
php/question-types/qsm-question-type-polar.php CHANGED
@@ -41,15 +41,21 @@ function qmn_polar_display( $id, $question, $answers ) {
41
 
42
  ?>
43
  <span class="mlw_qmn_question question-type-polar-s">
44
- <div class='left-polar-title'> <?php echo esc_html( $answers[0][0] ); ?> </div>
 
 
 
45
  <div class='slider-main-wrapper'>
46
  <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=''/>
47
  <div id="slider-<?php echo esc_attr( $id ); ?>" <?php echo esc_attr( $slider_data_atts ); ?> ></div>
48
  </div>
49
- <div class='right-polar-title'><?php echo esc_html( $answers[1][0] ); ?></div>
 
 
 
50
  </span>
51
  <?php
52
-
53
  }
54
 
55
  /**
41
 
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
58
+ echo apply_filters( 'qmn_polar_display_front', '', $id, $question, $answers );
59
  }
60
 
61
  /**
php/question-types/qsm-question-type-text-or-html.php CHANGED
@@ -13,5 +13,9 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  * @since 4.4.0
14
  */
15
  function qmn_text_block_display( $id, $question, $answers ) {
16
- echo wp_kses_post( do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) );
 
 
 
 
17
  }
13
  * @since 4.4.0
14
  */
15
  function qmn_text_block_display( $id, $question, $answers ) {
16
+ global $mlwQuizMasterNext;
17
+ $question = do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) );
18
+ $question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $question, "question-description-{$id}", "QSM Questions" );
19
+ $question = apply_filters( 'qmn_text_block_display_front', $question, $id, $answers);
20
+ echo wp_kses_post( $question );
21
  }
php/rest-api.php CHANGED
@@ -143,7 +143,6 @@ function qsm_register_rest_routes() {
143
  )
144
  );
145
 
146
-
147
  }
148
 
149
  /**
@@ -156,22 +155,22 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
156
  if ( is_user_logged_in() ) {
157
  global $wpdb;
158
  $category = isset( $_REQUEST['category'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['category'] ) ) : '';
159
- $search = isset( $_REQUEST['search'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['search'] ) ) : '';
160
- $enabled = get_option( 'qsm_multiple_category_enabled' );
161
  $migrated = false;
162
  if ( $enabled && 'cancelled' !== $enabled ) {
163
  $migrated = true;
164
  }
165
  if ( ! empty( $category ) ) {
166
  if ( $migrated && is_numeric( $category ) ) {
167
- $query = $wpdb->prepare( "SELECT DISTINCT question_id FROM {$wpdb->prefix}mlw_question_terms WHERE term_id = %d", $category );
168
- $term_ids = $wpdb->get_results( $query, 'ARRAY_A' );
169
- $question_ids = [];
170
  foreach ( $term_ids as $term_id ) {
171
  $question_ids[] = esc_sql( intval( $term_id['question_id'] ) );
172
  }
173
  $question_ids = array_unique( $question_ids );
174
- $query = $wpdb->prepare( "SELECT COUNT(question_id) as total_question FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_id IN (%s) AND question_settings LIKE %s", implode(',', $question_ids), $search );
175
  } else {
176
  $query = $wpdb->prepare( "SELECT COUNT(question_id) as total_question FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND category = %s AND question_settings LIKE %s", $category, '%' . $search . '%' );
177
  }
@@ -193,28 +192,28 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
193
 
194
  if ( ! empty( $category ) ) {
195
  if ( $migrated && is_numeric( $category ) ) {
196
- $query = $wpdb->prepare( "SELECT DISTINCT question_id FROM {$wpdb->prefix}mlw_question_terms WHERE term_id = %d", $category );
197
- $term_ids = $wpdb->get_results( $query, 'ARRAY_A' );
198
- $question_ids = [];
199
  foreach ( $term_ids as $term_id ) {
200
  $question_ids[] = esc_sql( intval( $term_id['question_id'] ) );
201
  }
202
  $question_ids = array_unique( $question_ids );
203
- $query_result = [];
204
  foreach ( $question_ids as $question_id ) {
205
- $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_id = %d AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", $question_id, '%' . $search . '%', $offset, $limit );
206
  $question_data = $wpdb->get_row( $query, 'ARRAY_A' );
207
- if ( ! is_null($question_data) ) {
208
  $query_result[] = $question_data;
209
  }
210
  }
211
  $questions = $query_result;
212
  } else {
213
- $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND category = %s AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", $category, '%' . $search . '%', $offset, $limit );
214
  $questions = $wpdb->get_results( $query, 'ARRAY_A' );
215
  }
216
  } else {
217
- $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", '%' . $search . '%', $offset, $limit );
218
  $questions = $wpdb->get_results( $query, 'ARRAY_A' );
219
  }
220
 
@@ -245,8 +244,8 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
245
  continue;
246
  }
247
 
248
- $question['settings'] = $settings;
249
- $question_data = array(
250
  'id' => $question['question_id'],
251
  'quizID' => $question['quiz_id'],
252
  'type' => $question['question_type_new'],
@@ -268,7 +267,7 @@ function qsm_rest_get_bank_questions( WP_REST_Request $request ) {
268
  'quiz_name' => isset( $quiz_name['quiz_name'] ) ? $quiz_name['quiz_name'] : '',
269
  'question_title' => isset( $question['settings']['question_title'] ) ? $question['settings']['question_title'] : '',
270
  );
271
- $question_data = apply_filters( 'qsm_rest_api_filter_question_data', $question_data, $question, $request );
272
  $question_array['questions'][] = $question_data;
273
  }
274
  return $question_array;
@@ -403,7 +402,7 @@ function qsm_rest_save_emails( WP_REST_Request $request ) {
403
  // Makes sure user is logged in.
404
  if ( is_user_logged_in() ) {
405
  $current_user = wp_get_current_user();
406
- $stop = qsm_verify_rest_user_nonce( $request['id'], $current_user->ID, $request['rest_nonce'] );
407
  if ( ! $stop ) {
408
  if ( ! isset( $request['emails'] ) || ! is_array( $request['emails'] ) ) {
409
  $request['emails'] = array();
@@ -456,7 +455,7 @@ function qsm_rest_save_results( WP_REST_Request $request ) {
456
  // Makes sure user is logged in.
457
  if ( is_user_logged_in() ) {
458
  $current_user = wp_get_current_user();
459
- $stop = qsm_verify_rest_user_nonce( $request['id'], $current_user->ID, $request['rest_nonce'] );
460
  if ( ! $stop ) {
461
  if ( ! isset( $request['pages'] ) || ! is_array( $request['pages'] ) ) {
462
  $request['pages'] = array();
@@ -485,8 +484,8 @@ function qsm_rest_get_question( WP_REST_Request $request ) {
485
  if ( is_user_logged_in() ) {
486
  $current_user = wp_get_current_user();
487
  if ( 0 !== $current_user ) {
488
- $question = QSM_Questions::load_question( $request['id'] );
489
- $categorysArray = QSM_Questions::get_question_categories($question['question_id']);
490
  if ( ! empty( $question ) ) {
491
  $question['page'] = isset( $question['page'] ) ? $question['page'] : 0;
492
  $question = array(
@@ -497,7 +496,7 @@ function qsm_rest_get_question( WP_REST_Request $request ) {
497
  'answerInfo' => $question['question_answer_info'],
498
  'comments' => $question['comments'],
499
  'hint' => $question['hints'],
500
- 'category' => (isset($categorysArray['category_name']) && ! empty($categorysArray['category_name']) ? implode(',',$categorysArray['category_name']) : "" ),
501
  'multicategories' => $question['multicategories'],
502
  'required' => $question['settings']['required'],
503
  'answers' => $question['answers'],
@@ -537,7 +536,7 @@ function qsm_rest_get_questions( WP_REST_Request $request ) {
537
  foreach ( $questions as $question ) {
538
  $quiz_name = $wpdb->get_row( $wpdb->prepare( "SELECT quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id = %d", $question['quiz_id'] ), ARRAY_A );
539
  $question['page'] = isset( $question['page'] ) ? $question['page'] : 0;
540
- $categorysArray = QSM_Questions::get_question_categories($question['question_id']);
541
 
542
  $question_data = array(
543
  'id' => $question['question_id'],
@@ -547,7 +546,7 @@ function qsm_rest_get_questions( WP_REST_Request $request ) {
547
  'answerInfo' => htmlspecialchars_decode( $question['question_answer_info'], ENT_QUOTES ),
548
  'comments' => $question['comments'],
549
  'hint' => $question['hints'],
550
- 'category' => (isset($categorysArray['category_name']) && ! empty($categorysArray['category_name']) ? implode(',',$categorysArray['category_name']) : "" ),
551
  'multicategories' => $question['multicategories'],
552
  'required' => $question['settings']['required'],
553
  'answers' => $question['answers'],
@@ -645,7 +644,7 @@ function qsm_rest_save_question( WP_REST_Request $request ) {
645
  // Makes sure user is logged in.
646
  if ( is_user_logged_in() ) {
647
  $current_user = wp_get_current_user();
648
- $stop = qsm_verify_rest_user_nonce( $request['quizID'], $current_user->ID, $request['rest_nonce'] );
649
  if ( ! $stop ) {
650
  try {
651
  $id = intval( $request['id'] );
@@ -674,12 +673,20 @@ function qsm_rest_save_question( WP_REST_Request $request ) {
674
  $intial_answers = $request['answers'];
675
  $answers = array();
676
  if ( is_array( $intial_answers ) ) {
677
- $answers = $intial_answers;
 
 
 
 
 
 
 
 
 
 
678
  }
679
  $question_id = QSM_Questions::save_question( $id, $data, $answers, $settings );
680
-
681
  do_action( 'qsm_saved_question_data', $question_id, $request );
682
-
683
  return array(
684
  'status' => 'success',
685
  );
@@ -709,8 +716,8 @@ function qsm_rest_get_categories( WP_REST_Request $request ) {
709
  if ( is_user_logged_in() ) {
710
  $current_user = wp_get_current_user();
711
  if ( 0 !== $current_user ) {
712
- $categories = array();
713
- $quiz_id = isset( $request['id'] ) ? intval( $request['id'] ) : 0;
714
  if ( 0 !== $quiz_id ) {
715
  $categories = QSM_Questions::get_quiz_categories( $quiz_id );
716
  }
@@ -744,20 +751,20 @@ function qsm_verify_rest_user_nonce( $id, $user_id, $rest_nonce ) {
744
  * @since 7.3.6
745
  * @return array
746
  */
747
- function qsm_get_quizzes_list( ) {
748
  global $wpdb;
749
- $quizzes = $wpdb->get_results( "SELECT quiz_id, quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE deleted='0'" );
750
  $qsm_quiz_list[] = array(
751
- 'label' => __('Select the quiz', 'quiz-master-next'),
752
  'value' => '',
753
  );
754
  if ( $quizzes ) {
755
- foreach ( $quizzes as $quiz ) {
756
- $qsm_quiz_list[] = array(
757
- 'label' => $quiz->quiz_name,
758
- 'value' => $quiz->quiz_id,
759
- );
760
- }
761
  }
762
  return $qsm_quiz_list;
763
  }
143
  )
144
  );
145
 
 
146
  }
147
 
148
  /**
155
  if ( is_user_logged_in() ) {
156
  global $wpdb;
157
  $category = isset( $_REQUEST['category'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['category'] ) ) : '';
158
+ $search = isset( $_REQUEST['search'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['search'] ) ) : '';
159
+ $enabled = get_option( 'qsm_multiple_category_enabled' );
160
  $migrated = false;
161
  if ( $enabled && 'cancelled' !== $enabled ) {
162
  $migrated = true;
163
  }
164
  if ( ! empty( $category ) ) {
165
  if ( $migrated && is_numeric( $category ) ) {
166
+ $query = $wpdb->prepare( "SELECT DISTINCT question_id FROM {$wpdb->prefix}mlw_question_terms WHERE term_id = %d", $category );
167
+ $term_ids = $wpdb->get_results( $query, 'ARRAY_A' );
168
+ $question_ids = array();
169
  foreach ( $term_ids as $term_id ) {
170
  $question_ids[] = esc_sql( intval( $term_id['question_id'] ) );
171
  }
172
  $question_ids = array_unique( $question_ids );
173
+ $query = $wpdb->prepare( "SELECT COUNT(question_id) as total_question FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_id IN (%s) AND question_settings LIKE %s", implode( ',', $question_ids ), $search );
174
  } else {
175
  $query = $wpdb->prepare( "SELECT COUNT(question_id) as total_question FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND category = %s AND question_settings LIKE %s", $category, '%' . $search . '%' );
176
  }
192
 
193
  if ( ! empty( $category ) ) {
194
  if ( $migrated && is_numeric( $category ) ) {
195
+ $query = $wpdb->prepare( "SELECT DISTINCT question_id FROM {$wpdb->prefix}mlw_question_terms WHERE term_id = %d", $category );
196
+ $term_ids = $wpdb->get_results( $query, 'ARRAY_A' );
197
+ $question_ids = array();
198
  foreach ( $term_ids as $term_id ) {
199
  $question_ids[] = esc_sql( intval( $term_id['question_id'] ) );
200
  }
201
  $question_ids = array_unique( $question_ids );
202
+ $query_result = array();
203
  foreach ( $question_ids as $question_id ) {
204
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_id = %d AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", $question_id, '%' . $search . '%', $offset, $limit );
205
  $question_data = $wpdb->get_row( $query, 'ARRAY_A' );
206
+ if ( ! is_null( $question_data ) ) {
207
  $query_result[] = $question_data;
208
  }
209
  }
210
  $questions = $query_result;
211
  } else {
212
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND category = %s AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", $category, '%' . $search . '%', $offset, $limit );
213
  $questions = $wpdb->get_results( $query, 'ARRAY_A' );
214
  }
215
  } else {
216
+ $query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_questions WHERE deleted = 0 AND deleted_question_bank = 0 AND question_settings LIKE %s ORDER BY question_order ASC LIMIT %d, %d", '%' . $search . '%', $offset, $limit );
217
  $questions = $wpdb->get_results( $query, 'ARRAY_A' );
218
  }
219
 
244
  continue;
245
  }
246
 
247
+ $question['settings'] = $settings;
248
+ $question_data = array(
249
  'id' => $question['question_id'],
250
  'quizID' => $question['quiz_id'],
251
  'type' => $question['question_type_new'],
267
  'quiz_name' => isset( $quiz_name['quiz_name'] ) ? $quiz_name['quiz_name'] : '',
268
  'question_title' => isset( $question['settings']['question_title'] ) ? $question['settings']['question_title'] : '',
269
  );
270
+ $question_data = apply_filters( 'qsm_rest_api_filter_question_data', $question_data, $question, $request );
271
  $question_array['questions'][] = $question_data;
272
  }
273
  return $question_array;
402
  // Makes sure user is logged in.
403
  if ( is_user_logged_in() ) {
404
  $current_user = wp_get_current_user();
405
+ $stop = qsm_verify_rest_user_nonce( $request['id'], $current_user->ID, $request['rest_nonce'] );
406
  if ( ! $stop ) {
407
  if ( ! isset( $request['emails'] ) || ! is_array( $request['emails'] ) ) {
408
  $request['emails'] = array();
455
  // Makes sure user is logged in.
456
  if ( is_user_logged_in() ) {
457
  $current_user = wp_get_current_user();
458
+ $stop = qsm_verify_rest_user_nonce( $request['id'], $current_user->ID, $request['rest_nonce'] );
459
  if ( ! $stop ) {
460
  if ( ! isset( $request['pages'] ) || ! is_array( $request['pages'] ) ) {
461
  $request['pages'] = array();
484
  if ( is_user_logged_in() ) {
485
  $current_user = wp_get_current_user();
486
  if ( 0 !== $current_user ) {
487
+ $question = QSM_Questions::load_question( $request['id'] );
488
+ $categorysArray = QSM_Questions::get_question_categories( $question['question_id'] );
489
  if ( ! empty( $question ) ) {
490
  $question['page'] = isset( $question['page'] ) ? $question['page'] : 0;
491
  $question = array(
496
  'answerInfo' => $question['question_answer_info'],
497
  'comments' => $question['comments'],
498
  'hint' => $question['hints'],
499
+ 'category' => ( isset( $categorysArray['category_name'] ) && ! empty( $categorysArray['category_name'] ) ? implode( ',', $categorysArray['category_name'] ) : '' ),
500
  'multicategories' => $question['multicategories'],
501
  'required' => $question['settings']['required'],
502
  'answers' => $question['answers'],
536
  foreach ( $questions as $question ) {
537
  $quiz_name = $wpdb->get_row( $wpdb->prepare( "SELECT quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE quiz_id = %d", $question['quiz_id'] ), ARRAY_A );
538
  $question['page'] = isset( $question['page'] ) ? $question['page'] : 0;
539
+ $categorysArray = QSM_Questions::get_question_categories( $question['question_id'] );
540
 
541
  $question_data = array(
542
  'id' => $question['question_id'],
546
  'answerInfo' => htmlspecialchars_decode( $question['question_answer_info'], ENT_QUOTES ),
547
  'comments' => $question['comments'],
548
  'hint' => $question['hints'],
549
+ 'category' => ( isset( $categorysArray['category_name'] ) && ! empty( $categorysArray['category_name'] ) ? implode( ',', $categorysArray['category_name'] ) : '' ),
550
  'multicategories' => $question['multicategories'],
551
  'required' => $question['settings']['required'],
552
  'answers' => $question['answers'],
644
  // Makes sure user is logged in.
645
  if ( is_user_logged_in() ) {
646
  $current_user = wp_get_current_user();
647
+ $stop = qsm_verify_rest_user_nonce( $request['quizID'], $current_user->ID, $request['rest_nonce'] );
648
  if ( ! $stop ) {
649
  try {
650
  $id = intval( $request['id'] );
673
  $intial_answers = $request['answers'];
674
  $answers = array();
675
  if ( is_array( $intial_answers ) ) {
676
+ if ( 8 == $request['type'] ) {
677
+ $answers = array(
678
+ array(
679
+ '0' => $request['name'],
680
+ '1' => 0,
681
+ '2' => 1,
682
+ ),
683
+ );
684
+ } else {
685
+ $answers = $intial_answers;
686
+ }
687
  }
688
  $question_id = QSM_Questions::save_question( $id, $data, $answers, $settings );
 
689
  do_action( 'qsm_saved_question_data', $question_id, $request );
 
690
  return array(
691
  'status' => 'success',
692
  );
716
  if ( is_user_logged_in() ) {
717
  $current_user = wp_get_current_user();
718
  if ( 0 !== $current_user ) {
719
+ $categories = array();
720
+ $quiz_id = isset( $request['id'] ) ? intval( $request['id'] ) : 0;
721
  if ( 0 !== $quiz_id ) {
722
  $categories = QSM_Questions::get_quiz_categories( $quiz_id );
723
  }
751
  * @since 7.3.6
752
  * @return array
753
  */
754
+ function qsm_get_quizzes_list() {
755
  global $wpdb;
756
+ $quizzes = $wpdb->get_results( "SELECT quiz_id, quiz_name FROM {$wpdb->prefix}mlw_quizzes WHERE deleted='0'" );
757
  $qsm_quiz_list[] = array(
758
+ 'label' => __( 'Select the quiz', 'quiz-master-next' ),
759
  'value' => '',
760
  );
761
  if ( $quizzes ) {
762
+ foreach ( $quizzes as $quiz ) {
763
+ $qsm_quiz_list[] = array(
764
+ 'label' => $quiz->quiz_name,
765
+ 'value' => $quiz->quiz_id,
766
+ );
767
+ }
768
  }
769
  return $qsm_quiz_list;
770
  }
php/template-variables.php CHANGED
@@ -87,12 +87,14 @@ function qsm_variable_single_question_answer( $content, $mlw_quiz_array ) {
87
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
88
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $qmn_question_answer_template;
89
  }
 
90
  } else {
91
  $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
92
  if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
93
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
94
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $qmn_question_answer_template;
95
  }
 
96
  }
97
  $mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
98
  $questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
@@ -244,6 +246,7 @@ function mlw_qmn_variable_social_share( $content, $mlw_quiz_array ) {
244
  $url = qsm_get_post_id_from_quiz_id( $mlw_quiz_array['quiz_id'] );
245
  $page_link = $url . '?result_id=' . '%FB_RESULT_ID%';
246
  $sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'facebook_sharing_text', '%QUIZ_NAME%' );
 
247
  $sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $mlw_quiz_array );
248
  $fb_image = plugins_url( '', dirname( __FILE__ ) ) . '/assets/facebook.png';
249
  $social_display = "<a class=\"mlw_qmn_quiz_link\" onclick=\"qmnSocialShare('facebook', '" . esc_js( $sharing ) . "', '" . esc_js( $mlw_quiz_array['quiz_name'] ) . "', '$facebook_app_id', '$page_link');\"><img src='" . $fb_image . "' alt='" . __( 'Facebbok Share', 'quiz-master-next' ) . "' /></a>";
@@ -252,6 +255,7 @@ function mlw_qmn_variable_social_share( $content, $mlw_quiz_array ) {
252
  if ( false !== strpos( $content, '%TWITTER_SHARE%' ) ) {
253
  $tw_image = plugins_url( '', dirname( __FILE__ ) ) . '/assets/twitter.png';
254
  $sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'twitter_sharing_text', '%QUIZ_NAME%' );
 
255
  $sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $mlw_quiz_array );
256
  $social_display = "<a class=\"mlw_qmn_quiz_link\" onclick=\"qmnSocialShare('twitter', '" . esc_js( $sharing ) . "', '" . esc_js( $mlw_quiz_array['quiz_name'] ) . "');\"><img src='" . $tw_image . "' alt='" . __( 'Twitter Share', 'quiz-master-next' ) . "' /></a>";
257
  $content = str_replace( '%TWITTER_SHARE%', $social_display, $content );
@@ -459,12 +463,14 @@ function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
459
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
460
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $qmn_question_answer_template;
461
  }
 
462
  } else {
463
  $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
464
  if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
465
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
466
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $qmn_question_answer_template;
467
  }
 
468
  }
469
  $questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
470
  $qmn_questions = array();
@@ -602,6 +608,7 @@ function qmn_variable_category_points( $content, $mlw_quiz_array ) {
602
  } else {
603
  $return_points = 0;
604
  }
 
605
  $content = str_replace( '%CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
606
  }
607
  return $content;
@@ -928,18 +935,23 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
928
  $disable_description_on_result = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'disable_description_on_result' );
929
  // Get question setting
930
  $question_settings = isset( $questions[ $answer['id'] ]['settings'] ) ? $questions[ $answer['id'] ]['settings'] : array();
 
 
 
 
 
931
  if ( isset( $answer['question_title'] ) && '' !== $answer['question_title'] ) {
932
  $add_br = '';
933
  if ( '' !== $answer[0] ) {
934
  $add_br = '<br/>';
935
  }
936
  if ( 1 == $disable_description_on_result ) {
937
- $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . htmlspecialchars_decode( $answer['question_title'], ENT_QUOTES ) . '</b>', $mlw_question_answer_display );
938
  } else {
939
- $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . htmlspecialchars_decode( $answer['question_title'], ENT_QUOTES ) . '</b>' . $add_br . htmlspecialchars_decode( $answer[0], ENT_QUOTES ) . $add_br, $mlw_question_answer_display );
940
  }
941
  } else {
942
- $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . htmlspecialchars_decode( $answer[0], ENT_QUOTES ) . '</b>', $mlw_question_answer_display );
943
  }
944
  $mlw_question_answer_display = qsm_varibale_question_title_func( $mlw_question_answer_display );
945
  $extra_border_bottom_class = '';
@@ -969,7 +981,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
969
  if ( isset( $answer['question_type'] ) && in_array( intval( $answer['question_type'] ), $question_with_text_input, true ) ) {
970
  $do_show_wrong = true;
971
  foreach ( $total_answers as $single_answer_key => $single_answer ) {
972
- $current_answer_zero = trim( htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) );
973
 
974
  if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
975
  if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
@@ -986,7 +998,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
986
  }
987
  } else {
988
  if ( isset( $single_answer[2] ) && strcasecmp( htmlspecialchars_decode( $answer[1], ENT_QUOTES ), $current_answer_zero ) == 0 ) {
989
- $question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) . '</span>';
990
  $do_show_wrong = false;
991
  }
992
  }
@@ -997,7 +1009,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
997
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
998
  foreach ( $total_answers as $single_answer ) {
999
  if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
1000
- $question_with_answer_text .= '<span class="qsm-text-correct-option">' . htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) . '</span>';
1001
  break;
1002
  }
1003
  }
@@ -1023,7 +1035,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1023
 
1024
  $is_answer_correct = false;
1025
  $decode_show_user_answer = htmlspecialchars_decode( mb_strtoupper( $show_user_answer ), ENT_QUOTES );
1026
- $decode_single_user_answer = mb_strtoupper( htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) );
1027
  if ( $decode_show_user_answer == $decode_single_user_answer ) {
1028
  $is_answer_correct = true;
1029
  }
@@ -1037,13 +1049,13 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1037
  }
1038
 
1039
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">(' . $index . ') ' . $show_user_answer . '</span>';
1040
- $question_with_answer_text .= '<span class="qsm-text-correct-option">(' . $index . ') ' . strval( htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) ) . '</span>';
1041
  }
1042
  }
1043
  } else {
1044
  $options = array();
1045
  foreach ( $total_answers as $key => $single_answer ) {
1046
- $options[] = mb_strtoupper( htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) );
1047
  }
1048
 
1049
  if ( sizeof( $new_array_user_answer ) < sizeof( $total_answers ) ) {
@@ -1154,21 +1166,22 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
1154
  if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && '' !== $user_answer_new ) {
1155
  $image_url = htmlspecialchars_decode( $user_answer_new, ENT_QUOTES );
1156
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag<img src='$image_url'/>$close_span_with_br", $mlw_question_answer_display );
1157
- } elseif ( 5 == $answer['question_type'] ) {
1158
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . nl2br( htmlspecialchars_decode( $user_answer_new, ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
1159
  } else {
1160
- $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . htmlspecialchars_decode( $user_answer_new, ENT_QUOTES ) . $close_span_with_br, $mlw_question_answer_display );
1161
  }
1162
  }
1163
- $answer_2 = ! empty( $answer[2] ) ? $answer[2] : 'NA';
1164
  if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
1165
  $qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
 
1166
  $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
1167
  } elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
1168
  $image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
1169
  $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '<br/><img src="' . $image_url . '"/>', $mlw_question_answer_display );
1170
  } else {
1171
- $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '' . htmlspecialchars_decode( $answer_2, ENT_QUOTES ) . '<br/>', $mlw_question_answer_display );
1172
  }
1173
  $answer_3 = ! empty( $answer[3] ) ? $answer[3] : 'NA';
1174
  $mlw_question_answer_display = str_replace( '%USER_COMMENTS%', $answer_3, $mlw_question_answer_display );
@@ -1304,11 +1317,10 @@ function qmn_polar_display_on_resultspage( $id, $question, $answers, $answer ) {
1304
  }
1305
  }
1306
 
1307
- $new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
1308
- $input_text .= "<div class='left-polar-title' $left_polar_title_style >" . $answers[0][0] . '</div>';
1309
  $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 ) . "' />";
1310
  $input_text .= '<div id="slider-' . esc_attr( $id ) . '"' . $slider_date_atts . '></div></div>';
1311
- $input_text .= "<div class='right-polar-title' $right_polar_title_style>" . $answers[1][0] . '</div>';
1312
  $question = $input_text;
1313
  $question_display .= "<span class='mlw_qmn_question mlw-qmn-question-result-$id question-type-polar-s'>" . do_shortcode( htmlspecialchars_decode( $question, ENT_QUOTES ) ) . '</span>';
1314
  return apply_filters( 'qmn_polar_display_front', $question_display, $id, $question, $answers );
@@ -1384,11 +1396,11 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
1384
  $question_display .= '<div class="qsm-featured-image">' . wp_get_attachment_image( $featureImageID, apply_filters( 'qsm_filter_feature_image_size', 'full', $question_id ) ) . '</div>';
1385
  }
1386
  }
1387
- if ( '' === $new_question_title ) {
1388
- $question_display .= "<div class='mlw_qmn_new_question'>" . sanitize_text_field( htmlspecialchars_decode( $new_question_title, ENT_QUOTES ) ) . '</div>';
 
1389
  $polar_extra_class .= ' qsm_remove_bold';
1390
  }
1391
-
1392
  $question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" . $question_numbering . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
1393
  return $question_display;
1394
  }
87
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
88
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $qmn_question_answer_template;
89
  }
90
+ $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_question_answer_template, "quiz_question_answer_email_template-{$quiz_id}" );
91
  } else {
92
  $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
93
  if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
94
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
95
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $qmn_question_answer_template;
96
  }
97
+ $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_question_answer_template, "quiz_question_answer_template-{$quiz_id}" );
98
  }
99
  $mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
100
  $questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
246
  $url = qsm_get_post_id_from_quiz_id( $mlw_quiz_array['quiz_id'] );
247
  $page_link = $url . '?result_id=' . '%FB_RESULT_ID%';
248
  $sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'facebook_sharing_text', '%QUIZ_NAME%' );
249
+ $sharing = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $sharing, "quiz_facebook_sharing_text-{$mlw_quiz_array['quiz_id']}" );
250
  $sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $mlw_quiz_array );
251
  $fb_image = plugins_url( '', dirname( __FILE__ ) ) . '/assets/facebook.png';
252
  $social_display = "<a class=\"mlw_qmn_quiz_link\" onclick=\"qmnSocialShare('facebook', '" . esc_js( $sharing ) . "', '" . esc_js( $mlw_quiz_array['quiz_name'] ) . "', '$facebook_app_id', '$page_link');\"><img src='" . $fb_image . "' alt='" . __( 'Facebbok Share', 'quiz-master-next' ) . "' /></a>";
255
  if ( false !== strpos( $content, '%TWITTER_SHARE%' ) ) {
256
  $tw_image = plugins_url( '', dirname( __FILE__ ) ) . '/assets/twitter.png';
257
  $sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'twitter_sharing_text', '%QUIZ_NAME%' );
258
+ $sharing = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $sharing, "quiz_twitter_sharing_text-{$mlw_quiz_array['quiz_id']}" );
259
  $sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $mlw_quiz_array );
260
  $social_display = "<a class=\"mlw_qmn_quiz_link\" onclick=\"qmnSocialShare('twitter', '" . esc_js( $sharing ) . "', '" . esc_js( $mlw_quiz_array['quiz_name'] ) . "');\"><img src='" . $tw_image . "' alt='" . __( 'Twitter Share', 'quiz-master-next' ) . "' /></a>";
261
  $content = str_replace( '%TWITTER_SHARE%', $social_display, $content );
463
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
464
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $qmn_question_answer_template;
465
  }
466
+ $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_question_answer_template, "quiz_question_answer_email_template-{$quiz_id}" );
467
  } else {
468
  $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
469
  if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
470
  $quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
471
  $qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $qmn_question_answer_template;
472
  }
473
+ $qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qmn_question_answer_template, "quiz_question_answer_template-{$quiz_id}" );
474
  }
475
  $questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
476
  $qmn_questions = array();
608
  } else {
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;
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 = do_shortcode( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[0], "question-description-{$answer['id']}", "QSM Questions" ) );
942
+ }
943
  if ( isset( $answer['question_title'] ) && '' !== $answer['question_title'] ) {
944
  $add_br = '';
945
  if ( '' !== $answer[0] ) {
946
  $add_br = '<br/>';
947
  }
948
  if ( 1 == $disable_description_on_result ) {
949
+ $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . $question_title . '</b>', $mlw_question_answer_display );
950
  } else {
951
+ $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . $question_title . '</b>' . $add_br . $question_description . $add_br, $mlw_question_answer_display );
952
  }
953
  } else {
954
+ $mlw_question_answer_display = str_replace( '%QUESTION%', '<b>' . $question_description . '</b>', $mlw_question_answer_display );
955
  }
956
  $mlw_question_answer_display = qsm_varibale_question_title_func( $mlw_question_answer_display );
957
  $extra_border_bottom_class = '';
981
  if ( isset( $answer['question_type'] ) && in_array( intval( $answer['question_type'] ), $question_with_text_input, true ) ) {
982
  $do_show_wrong = true;
983
  foreach ( $total_answers as $single_answer_key => $single_answer ) {
984
+ $current_answer_zero = trim( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) );
985
 
986
  if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
987
  if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
998
  }
999
  } else {
1000
  if ( isset( $single_answer[2] ) && strcasecmp( htmlspecialchars_decode( $answer[1], ENT_QUOTES ), $current_answer_zero ) == 0 ) {
1001
+ $question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
1002
  $do_show_wrong = false;
1003
  }
1004
  }
1009
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
1010
  foreach ( $total_answers as $single_answer ) {
1011
  if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
1012
+ $question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
1013
  break;
1014
  }
1015
  }
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
  }
1049
  }
1050
 
1051
  $question_with_answer_text .= '<span class="qsm-text-wrong-option">(' . $index . ') ' . $show_user_answer . '</span>';
1052
+ $question_with_answer_text .= '<span class="qsm-text-correct-option">(' . $index . ') ' . strval( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) ) . '</span>';
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 ) ) {
1166
  if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && '' !== $user_answer_new ) {
1167
  $image_url = htmlspecialchars_decode( $user_answer_new, ENT_QUOTES );
1168
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag<img src='$image_url'/>$close_span_with_br", $mlw_question_answer_display );
1169
+ } elseif ( 5 == $answer['question_type'] || 3 == $answer['question_type'] ) {
1170
  $mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . nl2br( htmlspecialchars_decode( $user_answer_new, ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
1171
  } else {
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 );
1182
  $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '<br/><img src="' . $image_url . '"/>', $mlw_question_answer_display );
1183
  } else {
1184
+ $mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '' . do_shortcode( $answer_2 ) . '<br/>', $mlw_question_answer_display );
1185
  }
1186
  $answer_3 = ! empty( $answer[3] ) ? $answer[3] : 'NA';
1187
  $mlw_question_answer_display = str_replace( '%USER_COMMENTS%', $answer_3, $mlw_question_answer_display );
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 );
1396
  $question_display .= '<div class="qsm-featured-image">' . wp_get_attachment_image( $featureImageID, apply_filters( 'qsm_filter_feature_image_size', 'full', $question_id ) ) . '</div>';
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>';
1405
  return $question_display;
1406
  }
php/template-variables/qsm-tempvar-question-answers.php CHANGED
@@ -1,43 +1,58 @@
1
  <?php
2
-
3
  function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response, $grading_system, $question_settings, $form_type = 0 ) {
4
- $question_with_answer_text = '';
5
- foreach ( $total_answers as $single_answer_key => $single_answer ) {
6
- $user_answer_array = isset( $answers_from_response['user_answer'] ) && is_array( $answers_from_response['user_answer'] ) ? $answers_from_response['user_answer'] : array();
7
- $user_answer_keys = ! empty( $user_answer_array ) ? array_keys( $user_answer_array ) : array() ;
8
- $is_answer_correct = false;
9
- $is_user_answer = false;
10
- if ( 1 === intval( $single_answer[2] ) ) {
11
- $is_answer_correct = true;
12
- }
13
- if ( in_array( $single_answer_key, $user_answer_keys, true) ) {
14
- $is_user_answer = true;
15
- }
16
- $image_class = '';
17
- if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] ) {
18
- $show_user_answer = '<img src="' . htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ) . '"/>';
19
- $image_class = 'qmn_image_option';
20
- } else {
21
- $show_user_answer = htmlspecialchars_decode( $single_answer[0], ENT_QUOTES );
22
- $image_class = '';
23
- }
24
- if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
25
- if ( $is_user_answer && $is_answer_correct ) {
26
- $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer ' . $image_class . '">' . $show_user_answer . '</span>';
27
- } elseif ( ! $is_user_answer && $is_answer_correct ) {
28
- $question_with_answer_text .= '<span class="qsm-text-correct-option ' . $image_class . '">' . $show_user_answer . '</span>';
29
- } elseif ( $is_user_answer && ! $is_answer_correct ) {
30
- $question_with_answer_text .= '<span class="qsm-text-wrong-option ' . $image_class . '">' . $show_user_answer . '</span>';
31
- } else {
32
- $question_with_answer_text .= '<span class="qsm-text-simple-option ' . $image_class . '">' . $show_user_answer . '</span>';
33
- }
34
- } else {
35
- if ( $is_user_answer ) {
36
- $question_with_answer_text .= '<span class="qsm-text-correct-option ' . $image_class . '">' . $show_user_answer . '</span>';
37
- } else {
38
- $question_with_answer_text .= '<span class="qsm-text-simple-option ' . $image_class . '">' . $show_user_answer . '</span>';
39
- }
40
- }
41
- }
42
- return $question_with_answer_text;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
1
  <?php
 
2
  function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response, $grading_system, $question_settings, $form_type = 0 ) {
3
+ global $mlwQuizMasterNext;
4
+ $question_with_answer_text = '';
5
+ $class = '';
6
+ $optin = '';
7
+ $hide = '';
8
+ foreach ( $total_answers as $single_answer_key => $single_answer ) {
9
+ if ( 8 == $answers_from_response['question_type'] && 'not-opted' == $answers_from_response['user_compare_text'] ) {
10
+ $class = 'not-opted';
11
+ }
12
+ if ( 8 == $answers_from_response['question_type'] ) {
13
+ $quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
14
+ $settings_quiz = maybe_unserialize( $quiz_options->quiz_settings );
15
+ $options_quiz = maybe_unserialize( $settings_quiz['quiz_options'] );
16
+ $optin = $options_quiz['show_optin'];
17
+ if ( 0 == $optin ) {
18
+ $hide = 'hide';
19
+ }
20
+ }
21
+ $user_answer_array = isset( $answers_from_response['user_answer'] ) && is_array( $answers_from_response['user_answer'] ) ? $answers_from_response['user_answer'] : array();
22
+ $user_answer_keys = ! empty( $user_answer_array ) ? array_keys( $user_answer_array ) : array();
23
+ $is_answer_correct = false;
24
+ $is_user_answer = false;
25
+ if ( 1 === intval( $single_answer[2] ) ) {
26
+ $is_answer_correct = true;
27
+ }
28
+ if ( in_array( $single_answer_key, $user_answer_keys, true ) ) {
29
+ $is_user_answer = true;
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' );
37
+ $image_class = '';
38
+ }
39
+ if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
40
+ if ( $is_user_answer && $is_answer_correct ) {
41
+ $question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
42
+ } elseif ( ! $is_user_answer && $is_answer_correct ) {
43
+ $question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
44
+ } elseif ( $is_user_answer && ! $is_answer_correct ) {
45
+ $question_with_answer_text .= '<span class="qsm-text-wrong-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
46
+ } else {
47
+ $question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
48
+ }
49
+ } else {
50
+ if ( $is_user_answer ) {
51
+ $question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
52
+ } else {
53
+ $question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer . '</span>';
54
+ }
55
+ }
56
+ }
57
+ return $question_with_answer_text;
58
  }
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: 7.3.14
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -74,6 +74,7 @@ You can integrate Mailchimp, Activecampaign, Zapier, Campaign Monitor, Get Respo
74
  * Keep track how long a user takes on the quiz or survey
75
  * Able to set up time limits on the quiz or survey
76
  * Create and display math formulas
 
77
  * And **Much** More...
78
 
79
  = QSM Addons =
@@ -116,8 +117,6 @@ If you like this plugin, consider exploring our other themes and plugins:
116
 
117
  ⚡ [InstaWP](https://instawp.io/) - Launch a quick WordPress site with this sandbox service. Create New WordPress instance within a second.
118
 
119
- 🔒 [Hide My WP](https://hidemywp.net/) - Hide your WordPress from bots, attackers & spammers. Hides all the known URLs, paths, plugins, themes which can reveal that you are using WP, also comes with an in-built firewall & trust network.
120
-
121
  == Installation ==
122
 
123
  * Navigate to Add New Plugin page within your WordPress
@@ -164,6 +163,26 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
164
  18. Database
165
 
166
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  = 7.3.14 (April 5, 2022) =
168
  * Bug: Fixed issue with paragraph question type
169
  * Bug: Fixed issue with qmn_register_my_templates hook
4
  Requires at least: 4.9
5
  Tested up to: 6.0
6
  Requires PHP: 5.4
7
+ Stable tag: 8.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
74
  * Keep track how long a user takes on the quiz or survey
75
  * Able to set up time limits on the quiz or survey
76
  * Create and display math formulas
77
+ * Compatible with [WPML](https://wpml.org/) and its extensions
78
  * And **Much** More...
79
 
80
  = QSM Addons =
117
 
118
  ⚡ [InstaWP](https://instawp.io/) - Launch a quick WordPress site with this sandbox service. Create New WordPress instance within a second.
119
 
 
 
120
  == Installation ==
121
 
122
  * Navigate to Add New Plugin page within your WordPress
163
  18. Database
164
 
165
  == Changelog ==
166
+ = 8.0 (June 13, 2022) =
167
+ * Feature: Added WPML compatibility
168
+ * Feature: Added option to select correct answer logic
169
+ * Feature: Added option to show and hide Opt-in question type on result page
170
+ * Feature: Added validation options in contact form fields
171
+ * Enhancement: Improved UI for question editor in admin panel
172
+ * Enhancement: Redesigned contact tab interface in admin panel
173
+ * Enhancement: Autosave last question when user creates new question
174
+ * Enhancement: Added column to show the number of questions in quiz list
175
+ * Enhancement: Added qsm_results_css_inliner hook to edit email template
176
+ * Bug: Fixed issue with quiz links
177
+ * Bug: Fixed deletion issue with trash quizzes
178
+ * Bug: Fixed issues with random questions order
179
+ * Bug: Fixed %AMOUNT_INCORRECT% & %AMOUNT_ATTEMPTED% variables
180
+ * Bug: Fixed issue while updating quiz title
181
+ * Bug: Fixed issue with duplicate question while importing from question bank
182
+ * Bug: Fixed JS issue with polar question type
183
+ * Bug: Fixed several PHP warning and errors
184
+ * Bug: Fixed issue with HTML tags in answer text editor
185
+
186
  = 7.3.14 (April 5, 2022) =
187
  * Bug: Fixed issue with paragraph question type
188
  * Bug: Fixed issue with qmn_register_my_templates hook
templates/qmn_primary.css CHANGED
@@ -178,6 +178,7 @@ label.inline .mlw_qmn_question,
178
  .quiz_section textarea,
179
  .quiz_section input[type="text"],
180
  .quiz_section input[type="email"],
 
181
  .quiz_section input[type="number"] {
182
  width: 70%;
183
  min-height: 35px;
@@ -208,11 +209,13 @@ label.inline .mlw_qmn_question,
208
  .quiz_section textarea:hover,
209
  .quiz_section input[type="text"]:hover,
210
  .quiz_section input[type="email"]:hover,
 
211
  .quiz_section input[type="number"]:hover,
212
  .quiz_section select:focus,
213
  .quiz_section textarea:focus,
214
  .quiz_section input[type="text"]:focus,
215
  .quiz_section input[type="email"]:focus,
 
216
  .quiz_section input[type="number"]:focus {
217
  outline: 0;
218
  background: #f7f7f7;
@@ -285,6 +288,7 @@ label.inline .mlw_qmn_question,
285
  .quiz_section.qmn_error input[type="text"],
286
  .quiz_section.qmn_error input[type="number"],
287
  .quiz_section.qmn_error input[type="email"],
 
288
  .quiz_section.qmn_error input[type="checkbox"],
289
  .quiz_section.qmn_error input[type="file"],
290
  .quiz_section.qmn_error input[type="date"],
@@ -293,6 +297,7 @@ label.inline .mlw_qmn_question,
293
  .quiz_section.qmn_error input[type="text"]:hover,
294
  .quiz_section.qmn_error input[type="number"]:hover,
295
  .quiz_section.qmn_error input[type="email"]:hover,
 
296
  .quiz_section.qmn_error input[type="checkbox"]:hover,
297
  .quiz_section.qmn_error input[type="file"]:hover,
298
  .quiz_section.qmn_error input[type="date"]:hover,
@@ -301,6 +306,7 @@ label.inline .mlw_qmn_question,
301
  .quiz_section.qmn_error input[type="text"]:focus,
302
  .quiz_section.qmn_error input[type="number"]:focus,
303
  .quiz_section.qmn_error input[type="email"]:focus,
 
304
  .quiz_section.qmn_error input[type="checkbox"]:focus,
305
  .quiz_section.qmn_error input[type="file"]:focus
306
  .quiz_section.qmn_error input[type="date"]:focus {
@@ -422,6 +428,7 @@ label.inline .mlw_qmn_question,
422
  .qmn_quiz_container textarea,
423
  .qmn_quiz_container input[type="text"],
424
  .qmn_quiz_container input[type="email"],
 
425
  .qmn_quiz_container input[type="number"] {
426
  background: #fff;
427
  border: 1px solid #3498db;
@@ -431,11 +438,13 @@ label.inline .mlw_qmn_question,
431
  .qmn_quiz_container textarea:hover,
432
  .qmn_quiz_container input[type="text"]:hover,
433
  .qmn_quiz_container input[type="email"]:hover,
 
434
  .qmn_quiz_container input[type="number"]:hover,
435
  .qmn_quiz_container select:focus,
436
  .qmn_quiz_container textarea:focus,
437
  .qmn_quiz_container input[type="text"]:focus,
438
  .qmn_quiz_container input[type="email"]:focus,
 
439
  .qmn_quiz_container input[type="number"]:focus {
440
  outline: 0;
441
  background: #fff;
178
  .quiz_section textarea,
179
  .quiz_section input[type="text"],
180
  .quiz_section input[type="email"],
181
+ .quiz_section input[type="url"],
182
  .quiz_section input[type="number"] {
183
  width: 70%;
184
  min-height: 35px;
209
  .quiz_section textarea:hover,
210
  .quiz_section input[type="text"]:hover,
211
  .quiz_section input[type="email"]:hover,
212
+ .quiz_section input[type="url"]:hover,
213
  .quiz_section input[type="number"]:hover,
214
  .quiz_section select:focus,
215
  .quiz_section textarea:focus,
216
  .quiz_section input[type="text"]:focus,
217
  .quiz_section input[type="email"]:focus,
218
+ .quiz_section input[type="url"]:focus,
219
  .quiz_section input[type="number"]:focus {
220
  outline: 0;
221
  background: #f7f7f7;
288
  .quiz_section.qmn_error input[type="text"],
289
  .quiz_section.qmn_error input[type="number"],
290
  .quiz_section.qmn_error input[type="email"],
291
+ .quiz_section.qmn_error input[type="url"],
292
  .quiz_section.qmn_error input[type="checkbox"],
293
  .quiz_section.qmn_error input[type="file"],
294
  .quiz_section.qmn_error input[type="date"],
297
  .quiz_section.qmn_error input[type="text"]:hover,
298
  .quiz_section.qmn_error input[type="number"]:hover,
299
  .quiz_section.qmn_error input[type="email"]:hover,
300
+ .quiz_section.qmn_error input[type="url"]:hover,
301
  .quiz_section.qmn_error input[type="checkbox"]:hover,
302
  .quiz_section.qmn_error input[type="file"]:hover,
303
  .quiz_section.qmn_error input[type="date"]:hover,
306
  .quiz_section.qmn_error input[type="text"]:focus,
307
  .quiz_section.qmn_error input[type="number"]:focus,
308
  .quiz_section.qmn_error input[type="email"]:focus,
309
+ .quiz_section.qmn_error input[type="url"]:focus,
310
  .quiz_section.qmn_error input[type="checkbox"]:focus,
311
  .quiz_section.qmn_error input[type="file"]:focus
312
  .quiz_section.qmn_error input[type="date"]:focus {
428
  .qmn_quiz_container textarea,
429
  .qmn_quiz_container input[type="text"],
430
  .qmn_quiz_container input[type="email"],
431
+ .qmn_quiz_container input[type="url"],
432
  .qmn_quiz_container input[type="number"] {
433
  background: #fff;
434
  border: 1px solid #3498db;
438
  .qmn_quiz_container textarea:hover,
439
  .qmn_quiz_container input[type="text"]:hover,
440
  .qmn_quiz_container input[type="email"]:hover,
441
+ .qmn_quiz_container input[type="url"]:hover,
442
  .qmn_quiz_container input[type="number"]:hover,
443
  .qmn_quiz_container select:focus,
444
  .qmn_quiz_container textarea:focus,
445
  .qmn_quiz_container input[type="text"]:focus,
446
  .qmn_quiz_container input[type="email"]:focus,
447
+ .qmn_quiz_container input[type="url"]:focus,
448
  .qmn_quiz_container input[type="number"]:focus {
449
  outline: 0;
450
  background: #fff;