Version Description
(February 17, 2022) = * Bug: Fixed validation issues with limit multiple choice option * Bug: Fixed issue while creating new quiz * Bug: Fixed issue where empty answers are marked as correct * Bug: Fixed issue with quiz dashboard * Bug: Fixed issue with random questions & answers * Bug: Fixed issue with template variable %QUESTIONS_ANSWERS_EMAIL% * Bug: Fixed validation issues with dropdown field * Bug: Fixed issue while importing questions from question bank * Bug: Fixed issue while saving multiple results pages * Bug: Fixed various security vulnerabilities * Feature: Added new template variable %FINISHED_TIME% * Enhancement: Made UI improvements in question numbers
Download this release
Release Info
Developer | expresstech |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 7.3.11 |
Comparing to | |
See all releases |
Code changes from version 7.3.10 to 7.3.11
- css/admin-dashboard.css +5 -0
- css/common.css +3 -0
- data/parsing_script.json +1 -353
- js/qsm-admin.js +5 -5
- js/qsm-quiz.js +7 -4
- mlw_quizmaster2.php +3 -3
- php/admin/admin-dashboard.php +9 -2
- php/admin/admin-results-details-page.php +1 -1
- php/admin/functions.php +1 -0
- php/admin/settings-page.php +8 -1
- php/admin/tools-page.php +4 -7
- php/classes/class-qmn-plugin-helper.php +23 -2
- php/classes/class-qmn-quiz-manager.php +29 -7
- php/classes/class-qsm-audit.php +1 -1
- php/classes/class-qsm-contact-manager.php +1 -1
- php/classes/class-qsm-install.php +22 -14
- php/classes/question-types/class-question-review-choice.php +6 -4
- php/question-types/qsm-question-type-multiple-choice-horizontal.php +4 -4
- php/question-types/qsm-question-type-multiple-choice.php +2 -2
- php/question-types/qsm-question-type-multiple-response-horizontal.php +3 -3
- php/question-types/qsm-question-type-multiple-response.php +3 -3
- php/question-types/qsm-question-type-opt-in.php +2 -2
- php/template-variables.php +47 -31
- php/template-variables/qsm-tempvar-question-answers.php +5 -8
- readme.txt +15 -1
css/admin-dashboard.css
CHANGED
@@ -89,6 +89,11 @@
|
|
89 |
-moz-columns: 2;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
.qsm-popup .popuar-addon-ul {
|
93 |
columns: 1;
|
94 |
-webkit-columns: 1;
|
89 |
-moz-columns: 2;
|
90 |
}
|
91 |
|
92 |
+
ul.popuar-addon-ul::after {
|
93 |
+
content: '';
|
94 |
+
clear: both;
|
95 |
+
}
|
96 |
+
|
97 |
.qsm-popup .popuar-addon-ul {
|
98 |
columns: 1;
|
99 |
-webkit-columns: 1;
|
css/common.css
CHANGED
@@ -136,6 +136,9 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
|
|
136 |
.qsm-quiz-container .qsm-contact-type-checkbox input{
|
137 |
display: inline-block;
|
138 |
}
|
|
|
|
|
|
|
139 |
.quiz_section .mlw_qmn_new_question{
|
140 |
font-weight: bold;
|
141 |
display: inline;
|
136 |
.qsm-quiz-container .qsm-contact-type-checkbox input{
|
137 |
display: inline-block;
|
138 |
}
|
139 |
+
.mlw_qmn_question_number{
|
140 |
+
font-weight: bold;
|
141 |
+
}
|
142 |
.quiz_section .mlw_qmn_new_question{
|
143 |
font-weight: bold;
|
144 |
display: inline;
|
data/parsing_script.json
CHANGED
@@ -1,353 +1 @@
|
|
1 |
-
{
|
2 |
-
"change_log": [
|
3 |
-
"",
|
4 |
-
" Bug: Fixed the issue with validation of date field for contact section"
|
5 |
-
],
|
6 |
-
"products": [
|
7 |
-
{
|
8 |
-
"name": "Pro Bundle",
|
9 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Pro.png",
|
10 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306210"
|
11 |
-
},
|
12 |
-
{
|
13 |
-
"name": "Plus Bundle",
|
14 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/PLUS.png",
|
15 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306190"
|
16 |
-
},
|
17 |
-
{
|
18 |
-
"name": "Basic Bundle",
|
19 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Basic-1.png",
|
20 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=305426"
|
21 |
-
},
|
22 |
-
{
|
23 |
-
"name": "Premium Bundle",
|
24 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/premium-bundle-qsm-scaled.jpg",
|
25 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=275059"
|
26 |
-
}
|
27 |
-
],
|
28 |
-
"new_addons": [
|
29 |
-
{
|
30 |
-
"name": "Pro Bundle",
|
31 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Pro.png",
|
32 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306210",
|
33 |
-
"price": {
|
34 |
-
"amount": "179.00"
|
35 |
-
},
|
36 |
-
"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."
|
37 |
-
},
|
38 |
-
{
|
39 |
-
"name": "Plus Bundle",
|
40 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/PLUS.png",
|
41 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306190",
|
42 |
-
"price": {
|
43 |
-
"amount": "149.00"
|
44 |
-
},
|
45 |
-
"description": "14+ addons to add useful features to your quiz and surveys. "
|
46 |
-
},
|
47 |
-
{
|
48 |
-
"name": "Basic Bundle",
|
49 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Basic-1.png",
|
50 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=305426",
|
51 |
-
"price": {
|
52 |
-
"amount": "99.00"
|
53 |
-
},
|
54 |
-
"description": "All the right addons to get you started with QSM premium features. "
|
55 |
-
},
|
56 |
-
{
|
57 |
-
"name": "Pool",
|
58 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Poolv2-1.png",
|
59 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=302299",
|
60 |
-
"price": {
|
61 |
-
"1site": "14.00",
|
62 |
-
"2-5sites": "24.00",
|
63 |
-
"unlimited": "49.00"
|
64 |
-
},
|
65 |
-
"description": ""
|
66 |
-
},
|
67 |
-
{
|
68 |
-
"name": "Ivory",
|
69 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Ivoryv2-1.png",
|
70 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=302297",
|
71 |
-
"price": {
|
72 |
-
"1site": "14.00",
|
73 |
-
"2-5sites": "24.00",
|
74 |
-
"unlimited": "49.00"
|
75 |
-
},
|
76 |
-
"description": ""
|
77 |
-
},
|
78 |
-
{
|
79 |
-
"name": "Fragrance",
|
80 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Fragrancev2.png",
|
81 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=300658",
|
82 |
-
"price": {
|
83 |
-
"1site": "14.00",
|
84 |
-
"2-5sites": "24.00",
|
85 |
-
"unlimited": "49.00"
|
86 |
-
},
|
87 |
-
"description": ""
|
88 |
-
},
|
89 |
-
{
|
90 |
-
"name": "Breeze",
|
91 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Breezev2-1.png",
|
92 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=300513",
|
93 |
-
"price": {
|
94 |
-
"1site": "19.00",
|
95 |
-
"2-5sites": "24.00",
|
96 |
-
"unlimited": "39.00"
|
97 |
-
},
|
98 |
-
"description": ""
|
99 |
-
},
|
100 |
-
{
|
101 |
-
"name": "Premium Bundle",
|
102 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/premium-bundle-qsm-scaled.jpg",
|
103 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=275059",
|
104 |
-
"price": {
|
105 |
-
"1site": "147.00",
|
106 |
-
"3sites": "197.00",
|
107 |
-
"25sites": "297.00"
|
108 |
-
},
|
109 |
-
"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."
|
110 |
-
},
|
111 |
-
{
|
112 |
-
"name": "ActiveCampaign Integration",
|
113 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/07/ActiveCampaign_Integration.jpg",
|
114 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=141594",
|
115 |
-
"price": {
|
116 |
-
"1site": "19.00",
|
117 |
-
"2-5sites": "29.00",
|
118 |
-
"unlimited": "49.00"
|
119 |
-
},
|
120 |
-
"description": ""
|
121 |
-
},
|
122 |
-
{
|
123 |
-
"name": "Advanced Timer",
|
124 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/35.jpg",
|
125 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=109654",
|
126 |
-
"price": {
|
127 |
-
"personal1site": "19.00",
|
128 |
-
"business2-5sites": "39.00",
|
129 |
-
"developerunlimitedsites": "59.00"
|
130 |
-
},
|
131 |
-
"description": ""
|
132 |
-
}
|
133 |
-
],
|
134 |
-
"blog_post": [
|
135 |
-
{
|
136 |
-
"link": "https://quizandsurveymaster.com/employee-engagement-survey/",
|
137 |
-
"title": "Creating an Employee Engagement Survey in WordPress (5 simple steps)",
|
138 |
-
"excerpt": "<p>Create an employee engagement survey using the QSM plugin for your WordPress website. An employee engagement survey helps in getting to know your employees </p>\n"
|
139 |
-
},
|
140 |
-
{
|
141 |
-
"link": "https://quizandsurveymaster.com/create-interactive-questionnaire/",
|
142 |
-
"title": "How to make Interactive Questionnaire on WordPress? (5 Simple Steps)",
|
143 |
-
"excerpt": "<p>Thinking about adding a fun quiz to your WordPress website? You are in the right place to know all about it and how it is done. So without wasting any time, let us see how you can make interactive questionnaires on WordPress using the QSM plugin. What are Interactive Questionnaires? Many websites host questionnaires under […]</p>\n"
|
144 |
-
}
|
145 |
-
],
|
146 |
-
"popular_products": [
|
147 |
-
{
|
148 |
-
"name": "Google Sheet Connector",
|
149 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/03/first-1.jpg",
|
150 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=83375",
|
151 |
-
"price": {
|
152 |
-
"personal1site": "29.00",
|
153 |
-
"business2-5sites": "39.00",
|
154 |
-
"developerunlimited": "59.00"
|
155 |
-
},
|
156 |
-
"description": "Sync your surveys with Google Sheets. "
|
157 |
-
},
|
158 |
-
{
|
159 |
-
"name": "Paypal and Stripe Payment Integration",
|
160 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Paypal-and-Stripe-Payment-Integration.jpg",
|
161 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=63522",
|
162 |
-
"price": {
|
163 |
-
"personal1site": "29.00",
|
164 |
-
"business2-5sites": "39.00",
|
165 |
-
"developerunlimitedsites": "59.00"
|
166 |
-
},
|
167 |
-
"description": "Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "
|
168 |
-
},
|
169 |
-
{
|
170 |
-
"name": "Simple Popups",
|
171 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Simple-Popups.jpg",
|
172 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=38572",
|
173 |
-
"price": {
|
174 |
-
"personal1site": "35.00",
|
175 |
-
"business2-5sites": "56.00",
|
176 |
-
"developerunlimitedsites": "87.00"
|
177 |
-
},
|
178 |
-
"description": "Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"
|
179 |
-
},
|
180 |
-
{
|
181 |
-
"name": "Google Analytics Tracking",
|
182 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Google-Analytics-Tracking.jpg",
|
183 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=34421",
|
184 |
-
"price": {
|
185 |
-
"personal1site": "35.00",
|
186 |
-
"business2-5sites": "56.00",
|
187 |
-
"developerunlimited": "87.00"
|
188 |
-
},
|
189 |
-
"description": "Track your quiz and survey submissions in Google Analytics."
|
190 |
-
},
|
191 |
-
{
|
192 |
-
"name": "Logic",
|
193 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Logic.jpg",
|
194 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=8071",
|
195 |
-
"price": {
|
196 |
-
"personal1site": "49.00",
|
197 |
-
"business2-5sites": "59.00",
|
198 |
-
"developerunlimitedsites": "99.00"
|
199 |
-
},
|
200 |
-
"description": ""
|
201 |
-
},
|
202 |
-
{
|
203 |
-
"name": "Reporting And Analysis",
|
204 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Reporting-And-Analysis.jpg",
|
205 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=3437",
|
206 |
-
"price": {
|
207 |
-
"personal1site": "39.00",
|
208 |
-
"business2-5sites": "59.00",
|
209 |
-
"developerunlimitedsites": "99.00"
|
210 |
-
},
|
211 |
-
"description": "Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."
|
212 |
-
},
|
213 |
-
{
|
214 |
-
"name": "Zapier Integration",
|
215 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Zapier-Integration.jpg",
|
216 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=2809",
|
217 |
-
"price": {
|
218 |
-
"personal1site": "35.00",
|
219 |
-
"business2-5sites": "56.00",
|
220 |
-
"developerunlimitedsites": "87.00"
|
221 |
-
},
|
222 |
-
"description": "With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."
|
223 |
-
},
|
224 |
-
{
|
225 |
-
"name": "Export Results",
|
226 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/Export-Results.jpg",
|
227 |
-
"link": "https://quizandsurveymaster.com/downloads/export-results/",
|
228 |
-
"price": {
|
229 |
-
"personal1site": "29.00",
|
230 |
-
"business2-5sites": "39.00",
|
231 |
-
"developerunlimitedsites": "59.00"
|
232 |
-
},
|
233 |
-
"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."
|
234 |
-
},
|
235 |
-
{
|
236 |
-
"name": "User Dashboard",
|
237 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/User-Dashboard.jpg",
|
238 |
-
"link": "https://quizandsurveymaster.com/downloads/user-dashboard/",
|
239 |
-
"price": {
|
240 |
-
"personal1site": "29.00",
|
241 |
-
"business2-5sites": "39.00",
|
242 |
-
"developerunlimitedsites": "59.00"
|
243 |
-
},
|
244 |
-
"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."
|
245 |
-
},
|
246 |
-
{
|
247 |
-
"name": "MailPoet Integration",
|
248 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/04/MailPoet-Integration.jpg",
|
249 |
-
"link": "https://quizandsurveymaster.com/downloads/mailpoet-integration/",
|
250 |
-
"price": {
|
251 |
-
"personal1site": "25.00",
|
252 |
-
"business2-5sites": "40.00",
|
253 |
-
"developerunlimitedsites": "62.00"
|
254 |
-
},
|
255 |
-
"description": "Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"
|
256 |
-
}
|
257 |
-
],
|
258 |
-
"on_sale_products": [
|
259 |
-
{
|
260 |
-
"name": "Google Sheet Connector",
|
261 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2020/03/first-1.jpg",
|
262 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=83375",
|
263 |
-
"price": {
|
264 |
-
"personal1site": "29.00",
|
265 |
-
"business2-5sites": "39.00",
|
266 |
-
"developerunlimited": "59.00"
|
267 |
-
},
|
268 |
-
"description": "Sync your surveys with Google Sheets. "
|
269 |
-
}
|
270 |
-
],
|
271 |
-
"bundles": [
|
272 |
-
{
|
273 |
-
"name": "Pro Bundle",
|
274 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Pro.png",
|
275 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306210",
|
276 |
-
"price": {
|
277 |
-
"amount": "179.00"
|
278 |
-
},
|
279 |
-
"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.",
|
280 |
-
"icon": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/PRO.png"
|
281 |
-
},
|
282 |
-
{
|
283 |
-
"name": "Plus Bundle",
|
284 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/PLUS.png",
|
285 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=306190",
|
286 |
-
"price": {
|
287 |
-
"amount": "149.00"
|
288 |
-
},
|
289 |
-
"desc": "14+ addons to add useful features to your quiz and surveys. ",
|
290 |
-
"icon": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Plus.png"
|
291 |
-
},
|
292 |
-
{
|
293 |
-
"name": "Basic Bundle",
|
294 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Basic-1.png",
|
295 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=305426",
|
296 |
-
"price": {
|
297 |
-
"amount": "99.00"
|
298 |
-
},
|
299 |
-
"desc": "All the right addons to get you started with QSM premium features. ",
|
300 |
-
"icon": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/Basic.png"
|
301 |
-
}
|
302 |
-
],
|
303 |
-
"themes": [
|
304 |
-
{
|
305 |
-
"name": "Pool",
|
306 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/theme-pool.png",
|
307 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=302299",
|
308 |
-
"price": {
|
309 |
-
"1site": "14.00",
|
310 |
-
"2-5sites": "24.00",
|
311 |
-
"unlimited": "49.00"
|
312 |
-
},
|
313 |
-
"description": "",
|
314 |
-
"demo": "https://themes.quizandsurveymaster.com/ivory-qsm-theme-demo"
|
315 |
-
},
|
316 |
-
{
|
317 |
-
"name": "Ivory",
|
318 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/theme-ivory.png",
|
319 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=302297",
|
320 |
-
"price": {
|
321 |
-
"1site": "14.00",
|
322 |
-
"2-5sites": "24.00",
|
323 |
-
"unlimited": "49.00"
|
324 |
-
},
|
325 |
-
"description": "",
|
326 |
-
"demo": "https://themes.quizandsurveymaster.com/ivory-qsm-theme-demo"
|
327 |
-
},
|
328 |
-
{
|
329 |
-
"name": "Fragrance",
|
330 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/theme-fragrance.png",
|
331 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=300658",
|
332 |
-
"price": {
|
333 |
-
"1site": "14.00",
|
334 |
-
"2-5sites": "24.00",
|
335 |
-
"unlimited": "49.00"
|
336 |
-
},
|
337 |
-
"description": "",
|
338 |
-
"demo": "https://themes.quizandsurveymaster.com/fragrance-qsm-theme-demo"
|
339 |
-
},
|
340 |
-
{
|
341 |
-
"name": "Breeze",
|
342 |
-
"img": "https://quizandsurveymaster.com/wp-content/uploads/edd/2021/06/theme-breeze.png",
|
343 |
-
"link": "https://quizandsurveymaster.com/?post_type=download&p=300513",
|
344 |
-
"price": {
|
345 |
-
"1site": "19.00",
|
346 |
-
"2-5sites": "24.00",
|
347 |
-
"unlimited": "39.00"
|
348 |
-
},
|
349 |
-
"description": "",
|
350 |
-
"demo": "https://themes.quizandsurveymaster.com/breeze-qsm-theme-demo"
|
351 |
-
}
|
352 |
-
]
|
353 |
-
}
|
1 |
+
{"change_log":[""," Checked compatibility with WordPress 5.9\n"," Bug: Fixed UI issues in QSM dashboard banner\n"," Bug: Fixed CURRENT_DATE template variable with certificate addon\n"," Bug: Fixed CATEGORY_SCORE_X template variable\n"," Bug: Fixed incorrectly marked answers in survey & simple form\n"," Bug: Fixed translation issues\n"," Bug: Fixed issues with global default settings\n"," Bug: Fixed issues with multiple response question type"],"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":""},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Breezev2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":""},{"name":"Premium Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/premium-bundle-qsm-scaled.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=275059","price":{"1site":"147.00","3sites":"197.00","25sites":"297.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":"ActiveCampaign Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/07\/ActiveCampaign_Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=141594","price":{"1site":"19.00","2-5sites":"29.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/how-to-create-a-wellness-quiz-with-qsm\/","title":"How to create an accurate wellness quiz with QSM in 4 simple steps?","excerpt":"<p>A wellness quiz is a medium to understand your wellness type and you would be able to find them all over the internet these days. Every one of us has started to take our health regime seriously and it is only right of us to do. Along the same lines, the wellness quizlets are gaining […]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/who-do-you-kin-in-haikyuu-quiz-using-qsm\/","title":"Create Haikyuu Quiz for true anime fans in 5 steps!","excerpt":"<p>If we talk about anime quizzes and do not mention a Haikyuu quiz, the conversation does not conclude. Drawing the fact that Haikyuu anime is of the most underrated and non-typical anime of the new gen, it is only safe to say, the fandom does justice to the Haikyuu kin quizzes on the internet. Creating […]<\/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"}]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/qsm-admin.js
CHANGED
@@ -425,6 +425,7 @@ var QSMAdmin;
|
|
425 |
url: ajaxurl,
|
426 |
data: {
|
427 |
action: "qsm_export_data",
|
|
|
428 |
},
|
429 |
success: function(response) {
|
430 |
/*
|
@@ -451,8 +452,6 @@ var QSMAdmin;
|
|
451 |
document.body.appendChild(downloadLink);
|
452 |
downloadLink.click();
|
453 |
document.body.removeChild(downloadLink);
|
454 |
-
|
455 |
-
|
456 |
},
|
457 |
error: function(errorThrown) {
|
458 |
alert(errorThrown);
|
@@ -462,7 +461,7 @@ var QSMAdmin;
|
|
462 |
|
463 |
jQuery(document).on('click', '#btn_clear_logs', function(e) {
|
464 |
e.preventDefault();
|
465 |
-
var delete_logs=confirm(
|
466 |
if ( delete_logs ) {
|
467 |
// your deletion code
|
468 |
jQuery.ajax({
|
@@ -470,6 +469,7 @@ var QSMAdmin;
|
|
470 |
url: ajaxurl,
|
471 |
data: {
|
472 |
action: "qsm_clear_audit_data",
|
|
|
473 |
},
|
474 |
success: function(response) {
|
475 |
location.reload();
|
@@ -479,8 +479,6 @@ var QSMAdmin;
|
|
479 |
}
|
480 |
});
|
481 |
}
|
482 |
-
|
483 |
-
|
484 |
});
|
485 |
|
486 |
jQuery('.qsm_audit_data').click(function (e) {
|
@@ -1571,6 +1569,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
|
|
1571 |
QSMQuestion.questions.add(model);
|
1572 |
QSMQuestion.addQuestionToPage(model);
|
1573 |
$('.import-button').removeClass('disable_import');
|
|
|
1574 |
import_button.html('').html('Add Question');
|
1575 |
},
|
1576 |
prepareCategories: function () {
|
@@ -2401,6 +2400,7 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')){
|
|
2401 |
$($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).each(function () {
|
2402 |
$(this).find('.import-button').text('').text('Adding Question');
|
2403 |
import_button = $(this).find('.import-button');
|
|
|
2404 |
QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
|
2405 |
$(this).find('.import-button').text('').text('Add Question');
|
2406 |
});
|
425 |
url: ajaxurl,
|
426 |
data: {
|
427 |
action: "qsm_export_data",
|
428 |
+
nonce: qsm_tools_page.nonce,
|
429 |
},
|
430 |
success: function(response) {
|
431 |
/*
|
452 |
document.body.appendChild(downloadLink);
|
453 |
downloadLink.click();
|
454 |
document.body.removeChild(downloadLink);
|
|
|
|
|
455 |
},
|
456 |
error: function(errorThrown) {
|
457 |
alert(errorThrown);
|
461 |
|
462 |
jQuery(document).on('click', '#btn_clear_logs', function(e) {
|
463 |
e.preventDefault();
|
464 |
+
var delete_logs=confirm(qsm_tools_page.qsm_delete_audit_logs);
|
465 |
if ( delete_logs ) {
|
466 |
// your deletion code
|
467 |
jQuery.ajax({
|
469 |
url: ajaxurl,
|
470 |
data: {
|
471 |
action: "qsm_clear_audit_data",
|
472 |
+
nonce: qsm_tools_page.nonce,
|
473 |
},
|
474 |
success: function(response) {
|
475 |
location.reload();
|
479 |
}
|
480 |
});
|
481 |
}
|
|
|
|
|
482 |
});
|
483 |
|
484 |
jQuery('.qsm_audit_data').click(function (e) {
|
1569 |
QSMQuestion.questions.add(model);
|
1570 |
QSMQuestion.addQuestionToPage(model);
|
1571 |
$('.import-button').removeClass('disable_import');
|
1572 |
+
QSMQuestion.countTotal();
|
1573 |
import_button.html('').html('Add Question');
|
1574 |
},
|
1575 |
prepareCategories: function () {
|
2400 |
$($('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').parents('.question-bank-question').reverse()).each(function () {
|
2401 |
$(this).find('.import-button').text('').text('Adding Question');
|
2402 |
import_button = $(this).find('.import-button');
|
2403 |
+
QSMQuestion.countTotal();
|
2404 |
QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'));
|
2405 |
$(this).find('.import-button').text('').text('Add Question');
|
2406 |
});
|
js/qsm-quiz.js
CHANGED
@@ -394,7 +394,7 @@ var QSMPageTimer;
|
|
394 |
if(pageNumber == 1){
|
395 |
$quizForm.find(".quiz_begin").hide();
|
396 |
$quizForm.find(".mlw_previous").hide();
|
397 |
-
$quizForm.find('.qsm-page-' + (parseInt(pageNumber))).show();
|
398 |
}
|
399 |
}
|
400 |
if ('1' == qmn_quiz_data[quizID].progress_bar) {
|
@@ -449,7 +449,7 @@ var QSMPageTimer;
|
|
449 |
$('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
|
450 |
}
|
451 |
}
|
452 |
-
|
453 |
}
|
454 |
page += difference;
|
455 |
QSM.goToPage(quizID, page);
|
@@ -663,7 +663,7 @@ function isEmail(email) {
|
|
663 |
|
664 |
/**
|
665 |
* Limit multiple response based on question limit
|
666 |
-
* @returns
|
667 |
*/
|
668 |
function qsmCheckMR(event, limit) {
|
669 |
var checked = jQuery(event).parents('.quiz_section').find(':checkbox:checked').length;
|
@@ -803,7 +803,7 @@ function qmnValidation(element, quiz_form_id) {
|
|
803 |
}
|
804 |
if (jQuery(this).attr('class').indexOf('qsmRequiredSelect') > -1) {
|
805 |
check_val = jQuery(this).val();
|
806 |
-
if (check_val == "No Answer Provided" || check_val == "") {
|
807 |
qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
|
808 |
result = false;
|
809 |
}
|
@@ -866,6 +866,7 @@ function qmnFormSubmit(quiz_form_id) {
|
|
866 |
fd.append(input.name, input.value);
|
867 |
});
|
868 |
fd.append("action", 'qmn_process_quiz');
|
|
|
869 |
fd.append("currentuserTime", Math.round(new Date().getTime()/1000));
|
870 |
fd.append("currentuserTimeZone",Intl.DateTimeFormat().resolvedOptions().timeZone);
|
871 |
|
@@ -1249,12 +1250,14 @@ function qmnInitPagination(quiz_id) {
|
|
1249 |
if (qmnValidatePage('quizForm' + quiz_id)) {
|
1250 |
qmnNextSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
1251 |
}
|
|
|
1252 |
});
|
1253 |
|
1254 |
jQuery(".mlw_previous").click(function (event) {
|
1255 |
event.preventDefault();
|
1256 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1257 |
qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
|
|
1258 |
});
|
1259 |
|
1260 |
if (qmn_quiz_data[quiz_id].first_page) {
|
394 |
if(pageNumber == 1){
|
395 |
$quizForm.find(".quiz_begin").hide();
|
396 |
$quizForm.find(".mlw_previous").hide();
|
397 |
+
$quizForm.find('.qsm-page-' + (parseInt(pageNumber))).show();
|
398 |
}
|
399 |
}
|
400 |
if ('1' == qmn_quiz_data[quizID].progress_bar) {
|
449 |
$('#quizForm' + quizID).closest('.qmn_quiz_container').find('.stoptimer-p').show();
|
450 |
}
|
451 |
}
|
452 |
+
|
453 |
}
|
454 |
page += difference;
|
455 |
QSM.goToPage(quizID, page);
|
663 |
|
664 |
/**
|
665 |
* Limit multiple response based on question limit
|
666 |
+
* @returns
|
667 |
*/
|
668 |
function qsmCheckMR(event, limit) {
|
669 |
var checked = jQuery(event).parents('.quiz_section').find(':checkbox:checked').length;
|
803 |
}
|
804 |
if (jQuery(this).attr('class').indexOf('qsmRequiredSelect') > -1) {
|
805 |
check_val = jQuery(this).val();
|
806 |
+
if (check_val == "No Answer Provided" || check_val == "" || check_val == null) {
|
807 |
qmnDisplayError(empty_error, jQuery(this), quiz_form_id);
|
808 |
result = false;
|
809 |
}
|
866 |
fd.append(input.name, input.value);
|
867 |
});
|
868 |
fd.append("action", 'qmn_process_quiz');
|
869 |
+
fd.append("nonce", qmn_ajax_object.security );
|
870 |
fd.append("currentuserTime", Math.round(new Date().getTime()/1000));
|
871 |
fd.append("currentuserTimeZone",Intl.DateTimeFormat().resolvedOptions().timeZone);
|
872 |
|
1250 |
if (qmnValidatePage('quizForm' + quiz_id)) {
|
1251 |
qmnNextSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
1252 |
}
|
1253 |
+
jQuery(document).trigger('qsm_next_button_click_after', [quiz_id]);
|
1254 |
});
|
1255 |
|
1256 |
jQuery(".mlw_previous").click(function (event) {
|
1257 |
event.preventDefault();
|
1258 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1259 |
qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
1260 |
+
jQuery(document).trigger('qsm_previous_button_click_after', [quiz_id]);
|
1261 |
});
|
1262 |
|
1263 |
if (qmn_quiz_data[quiz_id].first_page) {
|
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.
|
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.
|
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.
|
48 |
|
49 |
/**
|
50 |
* QSM Alert Manager Object
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
+
* Version: 7.3.11
|
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.11
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
44 |
* @var string
|
45 |
* @since 4.0.0
|
46 |
*/
|
47 |
+
public $version = '7.3.11';
|
48 |
|
49 |
/**
|
50 |
* QSM Alert Manager Object
|
php/admin/admin-dashboard.php
CHANGED
@@ -564,6 +564,10 @@ function qsm_dashboard_chagelog( $widget_id ) {
|
|
564 |
$expload_str = explode( ':', $single_change_log );
|
565 |
$cl_type = $expload_str[0];
|
566 |
$cl_str = $expload_str[1];
|
|
|
|
|
|
|
|
|
567 |
?>
|
568 |
<li>
|
569 |
<span class="<?php echo esc_attr( strtolower( $cl_type ) ); ?>"><?php echo esc_html( $cl_type ); ?></span>
|
@@ -619,9 +623,12 @@ function qsm_create_new_quiz_from_wizard() {
|
|
619 |
'enable_pagination_quiz' => isset( $_POST['enable_pagination_quiz'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_pagination_quiz'] ) ) : '',
|
620 |
'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
|
621 |
'disable_scroll_next_previous_click' => isset( $_POST['disable_scroll_next_previous_click'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_scroll_next_previous_click'] ) ) : '',
|
|
|
622 |
);
|
623 |
-
$get_saved_value =
|
624 |
-
|
|
|
|
|
625 |
$quiz_options = apply_filters( 'qsm_quiz_wizard_settings_option_save', $quiz_options );
|
626 |
$mlwQuizMasterNext->quizCreator->create_quiz( $quiz_name, $theme_id, array( 'quiz_options' => $quiz_options ) );
|
627 |
}
|
564 |
$expload_str = explode( ':', $single_change_log );
|
565 |
$cl_type = $expload_str[0];
|
566 |
$cl_str = $expload_str[1];
|
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>
|
623 |
'enable_pagination_quiz' => isset( $_POST['enable_pagination_quiz'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_pagination_quiz'] ) ) : '',
|
624 |
'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
|
625 |
'disable_scroll_next_previous_click' => isset( $_POST['disable_scroll_next_previous_click'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_scroll_next_previous_click'] ) ) : '',
|
626 |
+
'disable_first_page' => isset( $_POST['disable_first_page'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_first_page'] ) ) : '',
|
627 |
);
|
628 |
+
$get_saved_value = QMNGlobalSettingsPage::get_global_quiz_settings();
|
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 |
}
|
php/admin/admin-results-details-page.php
CHANGED
@@ -18,7 +18,7 @@ function qsm_generate_result_details() {
|
|
18 |
<style type="text/css">
|
19 |
.prettyprint {width: 200px;}
|
20 |
.result-tab-content p {font-size: 16px;}
|
21 |
-
.qmn_question_answer b {font-size: 18px;margin-bottom: 0;
|
22 |
.qmn_question_answer {margin-bottom: 30px;font-size: 16px;line-height: 1.5;}
|
23 |
</style>
|
24 |
<div class="wrap">
|
18 |
<style type="text/css">
|
19 |
.prettyprint {width: 200px;}
|
20 |
.result-tab-content p {font-size: 16px;}
|
21 |
+
.qmn_question_answer b, .qmn_question_answer .mlw_qmn_question_number {font-size: 18px;margin-bottom: 0;}
|
22 |
.qmn_question_answer {margin-bottom: 30px;font-size: 16px;line-height: 1.5;}
|
23 |
</style>
|
24 |
<div class="wrap">
|
php/admin/functions.php
CHANGED
@@ -720,6 +720,7 @@ function qsm_text_template_variable_list() {
|
|
720 |
'%CONTACT_ALL%' => __( 'Value user entered into contact field. X is # of contact field. For example, first contact field would be %CONTACT_1%', 'quiz-master-next' ),
|
721 |
'%AVERAGE_CATEGORY_POINTS_X%' => __( 'X: Category name - The average amount of points a specific category earned.', 'quiz-master-next' ),
|
722 |
'%QUESTION_ANSWER_X%' => __( 'X = Question ID. It will show result of particular question.', 'quiz-master-next' ),
|
|
|
723 |
),
|
724 |
);
|
725 |
$variable_list = apply_filters( 'qsm_text_variable_list', $variable_list );
|
720 |
'%CONTACT_ALL%' => __( 'Value user entered into contact field. X is # of contact field. For example, first contact field would be %CONTACT_1%', 'quiz-master-next' ),
|
721 |
'%AVERAGE_CATEGORY_POINTS_X%' => __( 'X: Category name - The average amount of points a specific category earned.', 'quiz-master-next' ),
|
722 |
'%QUESTION_ANSWER_X%' => __( 'X = Question ID. It will show result of particular question.', 'quiz-master-next' ),
|
723 |
+
'%TIME_FINISHED%' => __( 'Display time after quiz submission.', 'quiz-master-next' ),
|
724 |
),
|
725 |
);
|
726 |
$variable_list = apply_filters( 'qsm_text_variable_list', $variable_list );
|
php/admin/settings-page.php
CHANGED
@@ -39,7 +39,7 @@ class QMNGlobalSettingsPage {
|
|
39 |
add_filter(
|
40 |
'pre_update_option_qmn-settings',
|
41 |
function( $new_value ) {
|
42 |
-
$new_value['cpt_slug'] = sanitize_title( $new_value['cpt_slug'] );
|
43 |
return $new_value;
|
44 |
},
|
45 |
10,
|
@@ -189,6 +189,13 @@ class QMNGlobalSettingsPage {
|
|
189 |
$get_saved_value = get_option( 'qsm-quiz-settings' );
|
190 |
$globalQuizsetting = wp_parse_args( $get_saved_value, $get_default_value );
|
191 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
/**
|
193 |
* Generates Section Text
|
194 |
*
|
39 |
add_filter(
|
40 |
'pre_update_option_qmn-settings',
|
41 |
function( $new_value ) {
|
42 |
+
$new_value['cpt_slug'] = isset( $new_value['cpt_slug'] ) ? sanitize_title( $new_value['cpt_slug'] ) : '';
|
43 |
return $new_value;
|
44 |
},
|
45 |
10,
|
189 |
$get_saved_value = get_option( 'qsm-quiz-settings' );
|
190 |
$globalQuizsetting = wp_parse_args( $get_saved_value, $get_default_value );
|
191 |
}
|
192 |
+
|
193 |
+
public static function get_global_quiz_settings() {
|
194 |
+
$get_default_value = self::default_settings();
|
195 |
+
$get_saved_value = get_option( 'qsm-quiz-settings' );
|
196 |
+
return wp_parse_args( $get_saved_value, $get_default_value );
|
197 |
+
}
|
198 |
+
|
199 |
/**
|
200 |
* Generates Section Text
|
201 |
*
|
php/admin/tools-page.php
CHANGED
@@ -207,13 +207,10 @@ function qsm_audit_box() {
|
|
207 |
</thead>
|
208 |
<tbody id="the-list">
|
209 |
<?php
|
210 |
-
wp_localize_script(
|
211 |
-
'
|
212 |
-
'
|
213 |
-
|
214 |
-
'qsm_delete_audit_logs' => esc_html__( 'Are you sure you want to delete this record? You will not be able to recover this data!', 'quiz-master-next' ),
|
215 |
-
)
|
216 |
-
);
|
217 |
$alternate = '';
|
218 |
if ( ! empty( $audit_trails ) ) {
|
219 |
foreach ( $audit_trails as $audit ) {
|
207 |
</thead>
|
208 |
<tbody id="the-list">
|
209 |
<?php
|
210 |
+
wp_localize_script( 'qsm_admin_js', 'qsm_tools_page', array(
|
211 |
+
'qsm_delete_audit_logs' => esc_html__( 'Are you sure you want to delete this record? You will not be able to recover this data!', 'quiz-master-next' ),
|
212 |
+
'nonce' => wp_create_nonce( 'qsm_tools_' . get_current_user_id() ),
|
213 |
+
) );
|
|
|
|
|
|
|
214 |
$alternate = '';
|
215 |
if ( ! empty( $audit_trails ) ) {
|
216 |
foreach ( $audit_trails as $audit ) {
|
php/classes/class-qmn-plugin-helper.php
CHANGED
@@ -403,7 +403,7 @@ class QMNPluginHelper {
|
|
403 |
}
|
404 |
$answers_original = $answers;
|
405 |
if ( 2 === intval( $quiz_options->randomness_order ) || 3 === intval( $quiz_options->randomness_order ) ) {
|
406 |
-
|
407 |
update_post_meta( $question_id, 'qsm_random_quetion_answer', $answers );
|
408 |
}
|
409 |
|
@@ -426,7 +426,7 @@ class QMNPluginHelper {
|
|
426 |
if ( $type['graded'] ) {
|
427 |
$qmn_total_questions += 1;
|
428 |
if ( 1 === intval( $quiz_options->question_numbering ) ) { ?>
|
429 |
-
<span class='mlw_qmn_question_number'><?php echo esc_html( $qmn_total_questions );
|
430 |
<?php
|
431 |
}
|
432 |
}
|
@@ -444,6 +444,27 @@ class QMNPluginHelper {
|
|
444 |
}
|
445 |
}
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
/**
|
448 |
* Calculates Score For Question
|
449 |
*
|
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 |
|
426 |
if ( $type['graded'] ) {
|
427 |
$qmn_total_questions += 1;
|
428 |
if ( 1 === intval( $quiz_options->question_numbering ) ) { ?>
|
429 |
+
<span class='mlw_qmn_question_number'><?php echo esc_html( $qmn_total_questions ); ?>. </span>
|
430 |
<?php
|
431 |
}
|
432 |
}
|
444 |
}
|
445 |
}
|
446 |
|
447 |
+
/**
|
448 |
+
* Shuffle assoc array
|
449 |
+
*
|
450 |
+
* @since 7.3.11
|
451 |
+
* @param array $list An array
|
452 |
+
* @return array
|
453 |
+
*/
|
454 |
+
public function qsm_shuffle_assoc( $list ) {
|
455 |
+
if ( ! is_array( $list ) ) {
|
456 |
+
return $list;
|
457 |
+
}
|
458 |
+
$keys = array_keys( $list );
|
459 |
+
shuffle( $keys );
|
460 |
+
$random = array();
|
461 |
+
foreach ( $keys as $key ) {
|
462 |
+
$random[ $key ] = $list[ $key ];
|
463 |
+
}
|
464 |
+
return $random;
|
465 |
+
}
|
466 |
+
|
467 |
+
|
468 |
/**
|
469 |
* Calculates Score For Question
|
470 |
*
|
php/classes/class-qmn-quiz-manager.php
CHANGED
@@ -70,11 +70,12 @@ class QMNQuizManager {
|
|
70 |
add_action( 'wp_ajax_nopriv_qsm_get_quiz_to_reload', array( $this, 'qsm_get_quiz_to_reload' ) );
|
71 |
add_action( 'wp_ajax_qsm_get_question_quick_result', array( $this, 'qsm_get_question_quick_result' ) );
|
72 |
add_action( 'wp_ajax_nopriv_qsm_get_question_quick_result', array( $this, 'qsm_get_question_quick_result' ) );
|
|
|
|
|
73 |
add_action( 'wp_ajax_qsm_export_data', array( $this, 'qsm_export_data' ) );
|
74 |
-
add_action( 'wp_ajax_nopriv_qsm_export_data', array( $this, 'qsm_export_data' ) );
|
75 |
|
|
|
76 |
add_action( 'wp_ajax_qsm_clear_audit_data', array( $this, 'qsm_clear_audit_data' ) );
|
77 |
-
add_action( 'wp_ajax_nopriv_qsm_clear_audit_data', array( $this, 'qsm_clear_audit_data' ) );
|
78 |
|
79 |
// Upload file of file upload question type
|
80 |
add_action( 'wp_ajax_qsm_upload_image_fd_question', array( $this, 'qsm_upload_image_fd_question' ) );
|
@@ -249,10 +250,14 @@ class QMNQuizManager {
|
|
249 |
*/
|
250 |
|
251 |
public function qsm_export_data() {
|
|
|
|
|
|
|
|
|
252 |
global $wpdb;
|
253 |
$export_tool_data = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}mlw_qm_audit_trail" );
|
254 |
// file creation
|
255 |
-
$qsm_export_filename = 'export_' .
|
256 |
|
257 |
// Clean object
|
258 |
ob_end_clean();
|
@@ -279,17 +284,20 @@ class QMNQuizManager {
|
|
279 |
header( 'Content-Disposition: attachment; filename=' . $qsm_export_filename );
|
280 |
header( 'Content-Type: text/csv;' );
|
281 |
exit;
|
282 |
-
|
283 |
}
|
284 |
|
285 |
public function qsm_clear_audit_data() {
|
|
|
|
|
|
|
|
|
286 |
global $wpdb;
|
287 |
$table_audit = $wpdb->prefix . 'mlw_qm_audit_trail';
|
288 |
$wpdb->query( "TRUNCATE TABLE $table_audit" );
|
289 |
|
|
|
290 |
}
|
291 |
|
292 |
-
|
293 |
/**
|
294 |
* Generates Content For Quiz Shortcode
|
295 |
*
|
@@ -781,8 +789,9 @@ class QMNQuizManager {
|
|
781 |
array(
|
782 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
783 |
'multicheckbox_limit_reach' => __( 'Limit of choice is reached.', 'quiz-master-next' ),
|
784 |
-
'out_of_text' => __( 'out of', 'quiz-master-next' ),
|
785 |
'quiz_time_over' => __( 'Quiz time is over.', 'quiz-master-next' ),
|
|
|
786 |
)
|
787 |
);
|
788 |
wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
|
@@ -1365,6 +1374,19 @@ class QMNQuizManager {
|
|
1365 |
* @return string The content for the results page section
|
1366 |
*/
|
1367 |
public function ajax_submit_results() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1368 |
global $qmn_allowed_visit;
|
1369 |
global $mlwQuizMasterNext;
|
1370 |
|
@@ -1398,7 +1420,7 @@ class QMNQuizManager {
|
|
1398 |
if ( ! $verified ) {
|
1399 |
echo wp_json_encode(
|
1400 |
array(
|
1401 |
-
'display' => htmlspecialchars_decode( 'ReCaptcha Validation failed' ),
|
1402 |
'redirect' => false,
|
1403 |
'result_status' => array(
|
1404 |
'save_response' => false,
|
70 |
add_action( 'wp_ajax_nopriv_qsm_get_quiz_to_reload', array( $this, 'qsm_get_quiz_to_reload' ) );
|
71 |
add_action( 'wp_ajax_qsm_get_question_quick_result', array( $this, 'qsm_get_question_quick_result' ) );
|
72 |
add_action( 'wp_ajax_nopriv_qsm_get_question_quick_result', array( $this, 'qsm_get_question_quick_result' ) );
|
73 |
+
|
74 |
+
// Exposrt audit trail
|
75 |
add_action( 'wp_ajax_qsm_export_data', array( $this, 'qsm_export_data' ) );
|
|
|
76 |
|
77 |
+
// Clear audit trail
|
78 |
add_action( 'wp_ajax_qsm_clear_audit_data', array( $this, 'qsm_clear_audit_data' ) );
|
|
|
79 |
|
80 |
// Upload file of file upload question type
|
81 |
add_action( 'wp_ajax_qsm_upload_image_fd_question', array( $this, 'qsm_upload_image_fd_question' ) );
|
250 |
*/
|
251 |
|
252 |
public function qsm_export_data() {
|
253 |
+
if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ), 'qsm_tools_' . get_current_user_id() ) ) {
|
254 |
+
wp_send_json_error();
|
255 |
+
}
|
256 |
+
|
257 |
global $wpdb;
|
258 |
$export_tool_data = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}mlw_qm_audit_trail" );
|
259 |
// file creation
|
260 |
+
$qsm_export_filename = 'export_' . gmdate( 'd-m-y' ) . '.csv';
|
261 |
|
262 |
// Clean object
|
263 |
ob_end_clean();
|
284 |
header( 'Content-Disposition: attachment; filename=' . $qsm_export_filename );
|
285 |
header( 'Content-Type: text/csv;' );
|
286 |
exit;
|
|
|
287 |
}
|
288 |
|
289 |
public function qsm_clear_audit_data() {
|
290 |
+
if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ), 'qsm_tools_' . get_current_user_id() ) ) {
|
291 |
+
wp_send_json_error();
|
292 |
+
}
|
293 |
+
|
294 |
global $wpdb;
|
295 |
$table_audit = $wpdb->prefix . 'mlw_qm_audit_trail';
|
296 |
$wpdb->query( "TRUNCATE TABLE $table_audit" );
|
297 |
|
298 |
+
wp_send_json_success();
|
299 |
}
|
300 |
|
|
|
301 |
/**
|
302 |
* Generates Content For Quiz Shortcode
|
303 |
*
|
789 |
array(
|
790 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
791 |
'multicheckbox_limit_reach' => __( 'Limit of choice is reached.', 'quiz-master-next' ),
|
792 |
+
'out_of_text' => __( ' out of ', 'quiz-master-next' ),
|
793 |
'quiz_time_over' => __( 'Quiz time is over.', 'quiz-master-next' ),
|
794 |
+
'security' => wp_create_nonce( 'qsm_submit_quiz' ),
|
795 |
)
|
796 |
);
|
797 |
wp_enqueue_script( 'math_jax', $this->mathjax_url, array(), $this->mathjax_version, true );
|
1374 |
* @return string The content for the results page section
|
1375 |
*/
|
1376 |
public function ajax_submit_results() {
|
1377 |
+
if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ), 'qsm_submit_quiz' ) ) {
|
1378 |
+
echo wp_json_encode(
|
1379 |
+
array(
|
1380 |
+
'display' => htmlspecialchars_decode( 'Nonce Validation failed!' ),
|
1381 |
+
'redirect' => false,
|
1382 |
+
'result_status' => array(
|
1383 |
+
'save_response' => false,
|
1384 |
+
),
|
1385 |
+
)
|
1386 |
+
);
|
1387 |
+
exit;
|
1388 |
+
}
|
1389 |
+
|
1390 |
global $qmn_allowed_visit;
|
1391 |
global $mlwQuizMasterNext;
|
1392 |
|
1420 |
if ( ! $verified ) {
|
1421 |
echo wp_json_encode(
|
1422 |
array(
|
1423 |
+
'display' => htmlspecialchars_decode( 'ReCaptcha Validation failed!' ),
|
1424 |
'redirect' => false,
|
1425 |
'result_status' => array(
|
1426 |
'save_response' => false,
|
php/classes/class-qsm-audit.php
CHANGED
@@ -41,7 +41,7 @@ class QSM_Audit {
|
|
41 |
'quiz_id' => $quiz_id,
|
42 |
'quiz_name' => $quiz_name,
|
43 |
'form_data' => $json_updated_setting_data,
|
44 |
-
'time' =>
|
45 |
),
|
46 |
array(
|
47 |
'%s',
|
41 |
'quiz_id' => $quiz_id,
|
42 |
'quiz_name' => $quiz_name,
|
43 |
'form_data' => $json_updated_setting_data,
|
44 |
+
'time' => gmdate( 'h:i:s A m/d/Y' ),
|
45 |
),
|
46 |
array(
|
47 |
'%s',
|
php/classes/class-qsm-contact-manager.php
CHANGED
@@ -230,7 +230,7 @@ class QSM_Contact_Manager {
|
|
230 |
for ( $i = 0; $i < $total_fields; $i++ ) {
|
231 |
$field_array = array(
|
232 |
'label' => $fields[ $i ]['label'],
|
233 |
-
'value' => isset( $_POST[ "contact_field_$i" ] ) ? sanitize_text_field( wp_unslash( $_POST[ "contact_field_$i" ] ) ) : 'None',
|
234 |
);
|
235 |
if ( isset( $fields[ $i ]['use'] ) ) {
|
236 |
$field_array['use'] = $fields[ $i ]['use'];
|
230 |
for ( $i = 0; $i < $total_fields; $i++ ) {
|
231 |
$field_array = array(
|
232 |
'label' => $fields[ $i ]['label'],
|
233 |
+
'value' => isset( $_POST[ "contact_field_$i" ] ) ? htmlentities( sanitize_text_field( wp_unslash( $_POST[ "contact_field_$i" ] ) ) ) : 'None',
|
234 |
);
|
235 |
if ( isset( $fields[ $i ]['use'] ) ) {
|
236 |
$field_array['use'] = $fields[ $i ]['use'];
|
php/classes/class-qsm-install.php
CHANGED
@@ -734,7 +734,7 @@ class QSM_Install {
|
|
734 |
'id' => 'preferred_date_format',
|
735 |
'label' => __( 'Preferred Date Format', 'quiz-master-next' ),
|
736 |
'type' => 'text',
|
737 |
-
'default' => isset(get_option( 'qsm-quiz-settings' )['preferred_date_format']) ? get_option( 'qsm-quiz-settings' )['preferred_date_format'] : get_option( 'date_format'),
|
738 |
'help' => __( 'Overrides global settings for preferred date format', 'quiz-master-next' ),
|
739 |
);
|
740 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
@@ -1249,7 +1249,7 @@ class QSM_Install {
|
|
1249 |
quiz_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
1250 |
quiz_name TEXT NOT NULL,
|
1251 |
message_before TEXT NOT NULL,
|
1252 |
-
message_after
|
1253 |
message_comment TEXT NOT NULL,
|
1254 |
message_end_template TEXT NOT NULL,
|
1255 |
user_email_template LONGTEXT NOT NULL,
|
@@ -1718,8 +1718,8 @@ class QSM_Install {
|
|
1718 |
|
1719 |
// Update 7.3.8
|
1720 |
if ( $wpdb->get_var( 'SHOW COLUMNS FROM ' . $table_name . " LIKE 'quiz_author_id'" ) != 'quiz_author_id' ) {
|
1721 |
-
$sql
|
1722 |
-
$results
|
1723 |
}
|
1724 |
|
1725 |
// Update 3.7.1
|
@@ -1819,7 +1819,14 @@ class QSM_Install {
|
|
1819 |
// Update 7.1.11
|
1820 |
$user_email_template_data = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "mlw_quizzes LIKE 'user_email_template'" );
|
1821 |
if ( 'text' === $user_email_template_data->Type ) {
|
1822 |
-
$sql = 'ALTER TABLE ' . $wpdb->prefix . 'mlw_quizzes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1823 |
$results = $wpdb->query( $sql );
|
1824 |
}
|
1825 |
|
@@ -1830,7 +1837,7 @@ class QSM_Install {
|
|
1830 |
$results = $wpdb->query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_results CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci' );
|
1831 |
|
1832 |
global $wpdb;
|
1833 |
-
$table_name
|
1834 |
$audit_table = $wpdb->prefix . 'mlw_qm_audit_trail';
|
1835 |
|
1836 |
// Update 2.6.4
|
@@ -1849,17 +1856,18 @@ class QSM_Install {
|
|
1849 |
$results = $wpdb->query( $update_sql );
|
1850 |
}
|
1851 |
// Update 7.1.11
|
1852 |
-
|
|
|
1853 |
$results = $wpdb->query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_results MODIFY point_score FLOAT NOT NULL;' );
|
1854 |
}
|
1855 |
|
1856 |
if ( $wpdb->get_var( 'SHOW COLUMNS FROM ' . $audit_table . " LIKE 'quiz_id'" ) != 'quiz_id' ) {
|
1857 |
-
$sql
|
1858 |
-
$results
|
1859 |
-
$sql
|
1860 |
-
$results
|
1861 |
-
$sql
|
1862 |
-
$results
|
1863 |
|
1864 |
}
|
1865 |
// Update 5.0.0
|
@@ -1917,4 +1925,4 @@ class QSM_Install {
|
|
1917 |
}
|
1918 |
}
|
1919 |
|
1920 |
-
$qsm_install = new QSM_Install();
|
734 |
'id' => 'preferred_date_format',
|
735 |
'label' => __( 'Preferred Date Format', 'quiz-master-next' ),
|
736 |
'type' => 'text',
|
737 |
+
'default' => isset( get_option( 'qsm-quiz-settings' )['preferred_date_format'] ) ? get_option( 'qsm-quiz-settings' )['preferred_date_format'] : get_option( 'date_format' ),
|
738 |
'help' => __( 'Overrides global settings for preferred date format', 'quiz-master-next' ),
|
739 |
);
|
740 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
1249 |
quiz_id mediumint(9) NOT NULL AUTO_INCREMENT,
|
1250 |
quiz_name TEXT NOT NULL,
|
1251 |
message_before TEXT NOT NULL,
|
1252 |
+
message_after LONGTEXT NOT NULL,
|
1253 |
message_comment TEXT NOT NULL,
|
1254 |
message_end_template TEXT NOT NULL,
|
1255 |
user_email_template LONGTEXT NOT NULL,
|
1718 |
|
1719 |
// Update 7.3.8
|
1720 |
if ( $wpdb->get_var( 'SHOW COLUMNS FROM ' . $table_name . " LIKE 'quiz_author_id'" ) != 'quiz_author_id' ) {
|
1721 |
+
$sql = 'ALTER TABLE ' . $table_name . ' ADD quiz_author_id TEXT NOT NULL AFTER deleted';
|
1722 |
+
$results = $wpdb->query( $sql );
|
1723 |
}
|
1724 |
|
1725 |
// Update 3.7.1
|
1819 |
// Update 7.1.11
|
1820 |
$user_email_template_data = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "mlw_quizzes LIKE 'user_email_template'" );
|
1821 |
if ( 'text' === $user_email_template_data->Type ) {
|
1822 |
+
$sql = 'ALTER TABLE ' . $wpdb->prefix . 'mlw_quizzes MODIFY user_email_template LONGTEXT';
|
1823 |
+
$results = $wpdb->query( $sql );
|
1824 |
+
}
|
1825 |
+
|
1826 |
+
// Update 7.3.11
|
1827 |
+
$user_message_after_data = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "mlw_quizzes LIKE 'message_after'" );
|
1828 |
+
if ( 'text' === $user_message_after_data->Type ) {
|
1829 |
+
$sql = 'ALTER TABLE ' . $wpdb->prefix . 'mlw_quizzes MODIFY message_after LONGTEXT';
|
1830 |
$results = $wpdb->query( $sql );
|
1831 |
}
|
1832 |
|
1837 |
$results = $wpdb->query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_results CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci' );
|
1838 |
|
1839 |
global $wpdb;
|
1840 |
+
$table_name = $wpdb->prefix . 'mlw_results';
|
1841 |
$audit_table = $wpdb->prefix . 'mlw_qm_audit_trail';
|
1842 |
|
1843 |
// Update 2.6.4
|
1856 |
$results = $wpdb->query( $update_sql );
|
1857 |
}
|
1858 |
// Update 7.1.11
|
1859 |
+
$user_message_after_data = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "mlw_results LIKE 'point_score'" );
|
1860 |
+
if ( 'FLOAT' != $user_message_after_data->Type ) {
|
1861 |
$results = $wpdb->query( 'ALTER TABLE ' . $wpdb->prefix . 'mlw_results MODIFY point_score FLOAT NOT NULL;' );
|
1862 |
}
|
1863 |
|
1864 |
if ( $wpdb->get_var( 'SHOW COLUMNS FROM ' . $audit_table . " LIKE 'quiz_id'" ) != 'quiz_id' ) {
|
1865 |
+
$sql = 'ALTER TABLE ' . $audit_table . ' ADD quiz_id TEXT NOT NULL AFTER action';
|
1866 |
+
$results = $wpdb->query( $sql );
|
1867 |
+
$sql = 'ALTER TABLE ' . $audit_table . ' ADD quiz_name TEXT NOT NULL AFTER quiz_id';
|
1868 |
+
$results = $wpdb->query( $sql );
|
1869 |
+
$sql = 'ALTER TABLE ' . $audit_table . ' ADD form_data TEXT NOT NULL AFTER quiz_name';
|
1870 |
+
$results = $wpdb->query( $sql );
|
1871 |
|
1872 |
}
|
1873 |
// Update 5.0.0
|
1925 |
}
|
1926 |
}
|
1927 |
|
1928 |
+
$qsm_install = new QSM_Install();
|
php/classes/question-types/class-question-review-choice.php
CHANGED
@@ -11,7 +11,7 @@ class QSM_Question_Review_Choice extends QSM_Question_Review {
|
|
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 ] )
|
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 ) );
|
@@ -29,20 +29,22 @@ class QSM_Question_Review_Choice extends QSM_Question_Review {
|
|
29 |
public function set_answer_status() {
|
30 |
$user_correct_ans = 0;
|
31 |
$total_correct_ans = 0;
|
|
|
32 |
foreach ( $this->user_answer as $user_answer_key => $user_answer_value ) {
|
33 |
if ( in_array( $user_answer_key, array_keys( $this->correct_answer ), true ) ) {
|
34 |
-
$user_correct_ans
|
|
|
35 |
} else {
|
36 |
$user_correct_ans = -1;
|
37 |
}
|
38 |
-
$this->points
|
39 |
$check_correct_answer_key = $this->answer_array[ $user_answer_key ][2];
|
40 |
|
41 |
if ( 1 == $check_correct_answer_key ) {
|
42 |
$total_correct_ans++;
|
43 |
}
|
44 |
}
|
45 |
-
if ( $user_correct_ans == $total_correct_ans ) {
|
46 |
$this->answer_status = 'correct';
|
47 |
}
|
48 |
}
|
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 ) );
|
29 |
public function set_answer_status() {
|
30 |
$user_correct_ans = 0;
|
31 |
$total_correct_ans = 0;
|
32 |
+
$is_user_attempted = false;
|
33 |
foreach ( $this->user_answer as $user_answer_key => $user_answer_value ) {
|
34 |
if ( in_array( $user_answer_key, array_keys( $this->correct_answer ), true ) ) {
|
35 |
+
$user_correct_ans += 1;
|
36 |
+
$is_user_attempted = true;
|
37 |
} else {
|
38 |
$user_correct_ans = -1;
|
39 |
}
|
40 |
+
$this->points += $this->answer_array[ $user_answer_key ][1];
|
41 |
$check_correct_answer_key = $this->answer_array[ $user_answer_key ][2];
|
42 |
|
43 |
if ( 1 == $check_correct_answer_key ) {
|
44 |
$total_correct_ans++;
|
45 |
}
|
46 |
}
|
47 |
+
if ( $user_correct_ans == $total_correct_ans && $is_user_attempted ) {
|
48 |
$this->answer_status = 'correct';
|
49 |
}
|
50 |
}
|
php/question-types/qsm-question-type-multiple-choice-horizontal.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
-
*
|
|
|
10 |
*/
|
11 |
|
12 |
/**
|
@@ -41,7 +41,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
|
|
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 for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
|
45 |
<?php
|
46 |
if ( 'image' === $answerEditor ) {
|
47 |
?>
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
|
6 |
/**
|
|
|
7 |
*
|
8 |
+
*
|
9 |
+
*
|
10 |
*/
|
11 |
|
12 |
/**
|
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 |
?>
|
php/question-types/qsm-question-type-multiple-choice.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
|
6 |
/**
|
7 |
* This function shows the content of the multiple choice question.
|
@@ -49,7 +49,7 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
|
|
49 |
}
|
50 |
?>
|
51 |
<input type='radio' class='qmn_quiz_radio' name="<?php echo esc_attr( 'question' . $id ); ?>" id="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
|
52 |
-
<label for="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>">
|
53 |
<?php
|
54 |
if ( 'image' === $answerEditor ) {
|
55 |
?>
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
|
6 |
/**
|
7 |
* This function shows the content of the multiple choice question.
|
49 |
}
|
50 |
?>
|
51 |
<input type='radio' class='qmn_quiz_radio' name="<?php echo esc_attr( 'question' . $id ); ?>" id="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>" value="<?php echo esc_attr( $answer_index ); ?>" />
|
52 |
+
<label class="qsm-input-label" for="<?php echo esc_attr( 'question' . $id . '_' . $mlw_answer_total ); ?>">
|
53 |
<?php
|
54 |
if ( 'image' === $answerEditor ) {
|
55 |
?>
|
php/question-types/qsm-question-type-multiple-response-horizontal.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
/**
|
6 |
* This function displays the content of the multiple response question type
|
7 |
*
|
@@ -22,7 +22,7 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
|
22 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
23 |
$limit_mr_text = '';
|
24 |
if ( $limit_multiple_response > 0 ) {
|
25 |
-
$limit_mr_text = 'onchange=
|
26 |
}
|
27 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
28 |
$answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
|
@@ -38,7 +38,7 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
|
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 for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
|
42 |
<?php
|
43 |
if ( 'image' === $answerEditor ) {
|
44 |
?>
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
/**
|
6 |
* This function displays the content of the multiple response question type
|
7 |
*
|
22 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
23 |
$limit_mr_text = '';
|
24 |
if ( $limit_multiple_response > 0 ) {
|
25 |
+
$limit_mr_text = 'onchange=qsmCheckMR(this,' . $limit_multiple_response . ')';
|
26 |
}
|
27 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
28 |
$answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
|
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 |
?>
|
php/question-types/qsm-question-type-multiple-response.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
|
6 |
/**
|
7 |
* This function shows the content of the multiple response question
|
@@ -18,7 +18,7 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
|
|
18 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
19 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
20 |
if ( $limit_multiple_response > 0 ) {
|
21 |
-
$limit_mr_text = 'onchange=
|
22 |
}
|
23 |
if ( 0 == $required ) {
|
24 |
$mlw_require_class = 'mlwRequiredCheck';
|
@@ -39,7 +39,7 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
|
|
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 for="question<?php echo esc_attr( $id ) . '_' . esc_attr( $mlw_answer_total ); ?>">
|
43 |
<?php
|
44 |
if ( 'image' === $answerEditor ) {
|
45 |
?>
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
|
6 |
/**
|
7 |
* This function shows the content of the multiple response question
|
18 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
19 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
20 |
if ( $limit_multiple_response > 0 ) {
|
21 |
+
$limit_mr_text = 'onchange=qsmCheckMR(this,' . $limit_multiple_response . ')';
|
22 |
}
|
23 |
if ( 0 == $required ) {
|
24 |
$mlw_require_class = 'mlwRequiredCheck';
|
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 |
?>
|
php/question-types/qsm-question-type-opt-in.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
-
}
|
5 |
|
6 |
/**
|
7 |
* This function displays the accept question
|
@@ -23,7 +23,7 @@ function qmn_accept_display( $id, $question, $answers ) {
|
|
23 |
?>
|
24 |
<div class="qmn_accept_answers">
|
25 |
<input type="checkbox" id="mlwAcceptance" class="<?php echo esc_attr( $mlw_require_class ); ?>" />
|
26 |
-
<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 );
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
|
6 |
/**
|
7 |
* This function displays the accept question
|
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 );
|
php/template-variables.php
CHANGED
@@ -41,6 +41,7 @@ add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_timer',
|
|
41 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_timer_minutes', 10, 2 );
|
42 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_timer_seconds', 10, 2 );
|
43 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_date', 10, 2 );
|
|
|
44 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_date_taken', 10, 2 );
|
45 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_social_share', 10, 2 );
|
46 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_result_id', 10, 2 );
|
@@ -442,6 +443,8 @@ function qsm_all_contact_fields_variable( $content, $results ) {
|
|
442 |
*/
|
443 |
function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
|
444 |
global $mlwQuizMasterNext;
|
|
|
|
|
445 |
$logic_rules = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'logic_rules' );
|
446 |
$logic_rules = qmn_sanitize_input_data( $logic_rules );
|
447 |
$hidden_questions = isset( $mlw_quiz_array['hidden_questions'] ) ? $mlw_quiz_array['hidden_questions'] : array();
|
@@ -453,18 +456,16 @@ function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
|
|
453 |
global $wpdb;
|
454 |
$display = '';
|
455 |
if ( strpos( $content, '%QUESTIONS_ANSWERS_EMAIL%' ) !== false ) {
|
|
|
456 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
457 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
458 |
-
$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'] ) : $
|
459 |
-
} else {
|
460 |
-
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_email_template', '%QUESTION%<br/>Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%' );
|
461 |
}
|
462 |
} else {
|
|
|
463 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
464 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
465 |
-
$qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $
|
466 |
-
} else {
|
467 |
-
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
|
468 |
}
|
469 |
}
|
470 |
$questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
|
@@ -520,11 +521,24 @@ function mlw_qmn_variable_timer_seconds( $content, $mlw_quiz_array ) {
|
|
520 |
* @return string Returns the contents for the results page
|
521 |
*/
|
522 |
function mlw_qmn_variable_date( $content, $results ) {
|
523 |
-
$date = date_i18n( get_option( 'date_format' ),
|
524 |
$content = str_replace( '%CURRENT_DATE%', $date, $content );
|
525 |
return $content;
|
526 |
}
|
527 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
/**
|
529 |
* Replaces the variable %DATE_TAKEN% and returns the date the user submitted his or her responses
|
530 |
*
|
@@ -1103,18 +1117,16 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1103 |
} else {
|
1104 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_correct( $total_answers, $answer, $question_settings );
|
1105 |
}
|
|
|
|
|
|
|
|
|
|
|
1106 |
} else {
|
1107 |
-
if (
|
1108 |
-
$
|
1109 |
-
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1110 |
-
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1111 |
-
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1112 |
} else {
|
1113 |
-
|
1114 |
-
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
|
1115 |
-
} else {
|
1116 |
-
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_single_choice_correct( $total_answers, $answer, $question_settings );
|
1117 |
-
}
|
1118 |
}
|
1119 |
}
|
1120 |
} else {
|
@@ -1124,20 +1136,18 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1124 |
} else {
|
1125 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_points( $total_answers, $answer, $question_settings );
|
1126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
} else {
|
1128 |
-
if (
|
1129 |
-
$
|
1130 |
-
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1131 |
-
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1132 |
-
$questionid = $questions[ $answer['id'] ]['question_id'];
|
1133 |
-
$question_type = $answer['question_type'];
|
1134 |
-
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1135 |
} else {
|
1136 |
-
|
1137 |
-
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
|
1138 |
-
} else {
|
1139 |
-
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_single_choice_points( $total_answers, $answer, $question_settings );
|
1140 |
-
}
|
1141 |
}
|
1142 |
}
|
1143 |
}
|
@@ -1387,7 +1397,7 @@ function qsm_variable_minimum_points( $content, $mlw_quiz_array ) {
|
|
1387 |
*/
|
1388 |
function qsm_varibale_question_title_func( $question, $question_type = '', $new_question_title = '', $question_id = 0 ) {
|
1389 |
$question_title = $question;
|
1390 |
-
global $wp_embed, $mlwQuizMasterNext;
|
1391 |
$question_title = $wp_embed->run_shortcode( $question_title );
|
1392 |
$question_title = preg_replace( '/\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i', '<iframe width="420" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $question_title );
|
1393 |
$polar_extra_class = '';
|
@@ -1401,6 +1411,12 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
|
|
1401 |
$deselect_answer = '<a href="#" class="qsm-deselect-answer">Deselect Answer</a>';
|
1402 |
}
|
1403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1404 |
if ( $question_id ) {
|
1405 |
$featureImageID = $mlwQuizMasterNext->pluginHelper->get_question_setting( $question_id, 'featureImageID' );
|
1406 |
if ( $featureImageID ) {
|
@@ -1412,6 +1428,6 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
|
|
1412 |
$polar_extra_class .= ' qsm_remove_bold';
|
1413 |
}
|
1414 |
|
1415 |
-
$question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
|
1416 |
return $question_display;
|
1417 |
}
|
41 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_timer_minutes', 10, 2 );
|
42 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_timer_seconds', 10, 2 );
|
43 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_date', 10, 2 );
|
44 |
+
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_finished_time', 10, 2 );
|
45 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_date_taken', 10, 2 );
|
46 |
add_filter( 'mlw_qmn_template_variable_results_page', 'mlw_qmn_variable_social_share', 10, 2 );
|
47 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_result_id', 10, 2 );
|
443 |
*/
|
444 |
function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
|
445 |
global $mlwQuizMasterNext;
|
446 |
+
$quiz_id = is_object( $mlw_quiz_array ) ? $mlw_quiz_array->quiz_id : $mlw_quiz_array['quiz_id'];
|
447 |
+
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
|
448 |
$logic_rules = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'logic_rules' );
|
449 |
$logic_rules = qmn_sanitize_input_data( $logic_rules );
|
450 |
$hidden_questions = isset( $mlw_quiz_array['hidden_questions'] ) ? $mlw_quiz_array['hidden_questions'] : array();
|
456 |
global $wpdb;
|
457 |
$display = '';
|
458 |
if ( strpos( $content, '%QUESTIONS_ANSWERS_EMAIL%' ) !== false ) {
|
459 |
+
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_email_template', '%QUESTION%<br/>Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%' );
|
460 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
461 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
462 |
+
$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;
|
|
|
|
|
463 |
}
|
464 |
} else {
|
465 |
+
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
|
466 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
467 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
468 |
+
$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;
|
|
|
|
|
469 |
}
|
470 |
}
|
471 |
$questions = QSM_Questions::load_questions_by_pages( $mlw_quiz_array['quiz_id'] );
|
521 |
* @return string Returns the contents for the results page
|
522 |
*/
|
523 |
function mlw_qmn_variable_date( $content, $results ) {
|
524 |
+
$date = date_i18n( get_option( 'date_format' ), current_time( 'h:i:s A m/d/Y' ) );
|
525 |
$content = str_replace( '%CURRENT_DATE%', $date, $content );
|
526 |
return $content;
|
527 |
}
|
528 |
|
529 |
+
/**
|
530 |
+
* Replaces the variable %FINISHED_TAKEN% and displays the current date
|
531 |
+
*
|
532 |
+
* @param string $content The contents of the results page
|
533 |
+
* @param array $results The array of all the results from user taking the quiz
|
534 |
+
* @return string Returns the contents for the results page
|
535 |
+
*/
|
536 |
+
function mlw_qmn_variable_finished_time( $content, $mlw_quiz_array ) {
|
537 |
+
$date = date_i18n( get_option( 'time_format' ), $mlw_quiz_array['time_taken'] );
|
538 |
+
$content = str_replace( '%TIME_FINISHED%', $date, $content );
|
539 |
+
return $content;
|
540 |
+
}
|
541 |
+
|
542 |
/**
|
543 |
* Replaces the variable %DATE_TAKEN% and returns the date the user submitted his or her responses
|
544 |
*
|
1117 |
} else {
|
1118 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_correct( $total_answers, $answer, $question_settings );
|
1119 |
}
|
1120 |
+
} elseif ( 13 == $answer['question_type'] ) {
|
1121 |
+
$questionid = $questions[ $answer['id'] ]['question_id'];
|
1122 |
+
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1123 |
+
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1124 |
+
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1125 |
} else {
|
1126 |
+
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
|
1127 |
+
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
|
|
|
|
|
|
|
1128 |
} else {
|
1129 |
+
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_single_choice_correct( $total_answers, $answer, $question_settings );
|
|
|
|
|
|
|
|
|
1130 |
}
|
1131 |
}
|
1132 |
} else {
|
1136 |
} else {
|
1137 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_points( $total_answers, $answer, $question_settings );
|
1138 |
}
|
1139 |
+
} elseif ( 13 == $answer['question_type'] ) {
|
1140 |
+
$questionid = $questions[ $answer['id'] ]['question_id'];
|
1141 |
+
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1142 |
+
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1143 |
+
$questionid = $questions[ $answer['id'] ]['question_id'];
|
1144 |
+
$question_type = $answer['question_type'];
|
1145 |
+
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1146 |
} else {
|
1147 |
+
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
|
1148 |
+
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
|
|
|
|
|
|
|
|
|
|
|
1149 |
} else {
|
1150 |
+
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_single_choice_points( $total_answers, $answer, $question_settings );
|
|
|
|
|
|
|
|
|
1151 |
}
|
1152 |
}
|
1153 |
}
|
1397 |
*/
|
1398 |
function qsm_varibale_question_title_func( $question, $question_type = '', $new_question_title = '', $question_id = 0 ) {
|
1399 |
$question_title = $question;
|
1400 |
+
global $wp_embed, $mlwQuizMasterNext, $qmn_total_questions;
|
1401 |
$question_title = $wp_embed->run_shortcode( $question_title );
|
1402 |
$question_title = preg_replace( '/\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i', '<iframe width="420" height="315" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $question_title );
|
1403 |
$polar_extra_class = '';
|
1411 |
$deselect_answer = '<a href="#" class="qsm-deselect-answer">Deselect Answer</a>';
|
1412 |
}
|
1413 |
|
1414 |
+
$question_numbering = '';
|
1415 |
+
$qmn_total_questions += 1;
|
1416 |
+
if ( isset( $qmn_quiz_options->question_numbering ) && 1 == $qmn_quiz_options->question_numbering ) {
|
1417 |
+
$question_numbering = '<span class="mlw_qmn_question_number">'.esc_html( $qmn_total_questions ).'. </span>';
|
1418 |
+
}
|
1419 |
+
|
1420 |
if ( $question_id ) {
|
1421 |
$featureImageID = $mlwQuizMasterNext->pluginHelper->get_question_setting( $question_id, 'featureImageID' );
|
1422 |
if ( $featureImageID ) {
|
1428 |
$polar_extra_class .= ' qsm_remove_bold';
|
1429 |
}
|
1430 |
|
1431 |
+
$question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" .$question_numbering . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
|
1432 |
return $question_display;
|
1433 |
}
|
php/template-variables/qsm-tempvar-question-answers.php
CHANGED
@@ -1,19 +1,16 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
function qsm_tempvar_qa_text_qt_choice( $
|
4 |
$question_with_answer_text = '';
|
5 |
-
foreach ( $
|
6 |
-
$current_answer_key = $single_answer_key;
|
7 |
$user_answer_array = isset( $answers_from_response['user_answer'] ) && is_array( $answers_from_response['user_answer'] ) ? $answers_from_response['user_answer'] : array();
|
8 |
-
$correct_answer_array = isset( $answers_from_response['correct_answer'] ) && is_array( $answers_from_response['correct_answer'] ) ? $answers_from_response['correct_answer'] : array();
|
9 |
$user_answer_keys = ! empty( $user_answer_array ) ? array_keys( $user_answer_array ) : array() ;
|
10 |
-
$correct_answer_keys = ! empty( $correct_answer_array ) ? array_keys( $correct_answer_array ) : array();
|
11 |
$is_answer_correct = false;
|
12 |
$is_user_answer = false;
|
13 |
-
if (
|
14 |
$is_answer_correct = true;
|
15 |
}
|
16 |
-
if ( in_array( $
|
17 |
$is_user_answer = true;
|
18 |
}
|
19 |
$image_class = '';
|
@@ -40,7 +37,7 @@ function qsm_tempvar_qa_text_qt_choice( $answers_from_db, $answers_from_response
|
|
40 |
} else {
|
41 |
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $image_class . '">' . $show_user_answer . '</span>';
|
42 |
}
|
43 |
-
}
|
44 |
}
|
45 |
return $question_with_answer_text;
|
46 |
}
|
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 = '';
|
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 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress q
|
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 7.3.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -160,6 +160,20 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
160 |
18. Database
|
161 |
|
162 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
= 7.3.10 (January 28, 2022) =
|
164 |
* Checked compatibility with WordPress 5.9
|
165 |
* Bug: Fixed UI issues in QSM dashboard banner
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 7.3.11
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
160 |
18. Database
|
161 |
|
162 |
== Changelog ==
|
163 |
+
= 7.3.11 (February 17, 2022) =
|
164 |
+
* Bug: Fixed validation issues with limit multiple choice option
|
165 |
+
* Bug: Fixed issue while creating new quiz
|
166 |
+
* Bug: Fixed issue where empty answers are marked as correct
|
167 |
+
* Bug: Fixed issue with quiz dashboard
|
168 |
+
* Bug: Fixed issue with random questions & answers
|
169 |
+
* Bug: Fixed issue with template variable %QUESTIONS_ANSWERS_EMAIL%
|
170 |
+
* Bug: Fixed validation issues with dropdown field
|
171 |
+
* Bug: Fixed issue while importing questions from question bank
|
172 |
+
* Bug: Fixed issue while saving multiple results pages
|
173 |
+
* Bug: Fixed various security vulnerabilities
|
174 |
+
* Feature: Added new template variable %FINISHED_TIME%
|
175 |
+
* Enhancement: Made UI improvements in question numbers
|
176 |
+
|
177 |
= 7.3.10 (January 28, 2022) =
|
178 |
* Checked compatibility with WordPress 5.9
|
179 |
* Bug: Fixed UI issues in QSM dashboard banner
|