Version Description
(September 29, 2022) = * Feature: Added captions for image answer on result page * Bug: Fixed issue with themes list in style tab * Bug: Fixed issue with quiz end date * Bug: Fixed issue with labels for opt-in question type * Bug: Fixed PHP warning and errors with inactive quiz themes * Enhancement: Minor UI improvements * Enhancement: Improved Image alignment in image type answers
Download this release
Release Info
Developer | expresstech |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 8.0.4 |
Comparing to | |
See all releases |
Code changes from version 8.0.3 to 8.0.4
- css/common.css +63 -0
- css/qsm-admin-question.css +19 -7
- css/qsm-admin.css +187 -141
- data/parsing_script.json +1 -1
- js/qsm-admin.js +27 -2
- js/qsm-common.js +26 -1
- js/qsm-quiz.js +30 -22
- mlw_quizmaster2.php +48 -48
- php/admin/admin-results-page.php +364 -347
- php/admin/functions.php +456 -454
- php/admin/options-page-questions-tab.php +4 -3
- php/admin/options-page-style-tab.php +15 -4
- php/admin/quiz-options-page.php +19 -3
- php/admin/quizzes-page.php +23 -33
- php/admin/settings-page.php +4 -3
- php/classes/class-qmn-plugin-helper.php +8 -16
- php/classes/class-qmn-quiz-manager.php +13 -25
- php/classes/class-qsm-contact-manager.php +13 -11
- php/classes/class-qsm-fields.php +3 -0
- php/classes/class-qsm-install.php +4 -3
- php/classes/class-qsm-theme-settings.php +15 -2
- php/classes/class-qsm-tracking.php +1 -1
- php/images/advanced_question_type.png +0 -0
- php/images/export_import_chart.png +0 -0
- php/images/info.png +0 -0
- php/images/read_icon.png +0 -0
- php/images/report_analysis_chart.png +0 -0
- php/images/warning.png +0 -0
- php/question-types.php +196 -185
- php/question-types/qsm-question-type-multiple-choice-horizontal.php +6 -6
- php/question-types/qsm-question-type-multiple-response-horizontal.php +7 -4
- php/question-types/qsm-question-type-number.php +3 -3
- php/question-types/qsm-question-type-opt-in.php +5 -2
- php/template-variables.php +29 -3
- php/template-variables/qsm-tempvar-question-answers.php +11 -6
- readme.txt +10 -1
- templates/qmn_primary.css +1 -6
css/common.css
CHANGED
@@ -62,6 +62,14 @@ div .quiz_section .question-type-polar-s,
|
|
62 |
.question-type-polar-s .qsm_image_caption{
|
63 |
display: block;
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
.question-type-polar-s .ui-widget-content{
|
66 |
background: #A5A5A5;
|
67 |
border-color: #A5A5A5;
|
@@ -138,6 +146,11 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
|
|
138 |
.qsm-quiz-container input[type=radio]{
|
139 |
cursor: pointer;
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
141 |
.qsm-quiz-container .qsm-contact-type-checkbox{
|
142 |
display: flex;
|
143 |
align-items: center;
|
@@ -245,6 +258,19 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
|
|
245 |
top: 3px;
|
246 |
left: -10px;
|
247 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
.mlw_qmn_question .qsm-text-correct-option.qsm-text-user-correct-answer:before{
|
249 |
content: "\f12a";
|
250 |
top: 4px;
|
@@ -387,4 +413,41 @@ body .ui-tooltip, body .ui-tooltip.ui-widget-content{
|
|
387 |
}
|
388 |
.qsm-text-correct-option.not-opted {
|
389 |
color: #6f7479;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
}
|
62 |
.question-type-polar-s .qsm_image_caption{
|
63 |
display: block;
|
64 |
}
|
65 |
+
.qsm_image_result_caption,
|
66 |
+
.qsm_image_result_caption_default{
|
67 |
+
background-color: white;
|
68 |
+
display: block;
|
69 |
+
width: 100%;
|
70 |
+
box-sizing: border-box;
|
71 |
+
padding: 5px 5px 5px 27px;
|
72 |
+
}
|
73 |
.question-type-polar-s .ui-widget-content{
|
74 |
background: #A5A5A5;
|
75 |
border-color: #A5A5A5;
|
146 |
.qsm-quiz-container input[type=radio]{
|
147 |
cursor: pointer;
|
148 |
}
|
149 |
+
.qmn_accept_answers input[type=checkbox] {
|
150 |
+
vertical-align: top;
|
151 |
+
position: relative;
|
152 |
+
bottom: -5px;
|
153 |
+
}
|
154 |
.qsm-quiz-container .qsm-contact-type-checkbox{
|
155 |
display: flex;
|
156 |
align-items: center;
|
258 |
top: 3px;
|
259 |
left: -10px;
|
260 |
}
|
261 |
+
body .qsm-results-page .mlw_qmn_question .qmn_image_option:before{
|
262 |
+
position: absolute;
|
263 |
+
top: calc(100% - 40px);
|
264 |
+
left: 15px;
|
265 |
+
background: #fff;
|
266 |
+
border-radius: 50%;
|
267 |
+
line-height: 1;
|
268 |
+
}
|
269 |
+
.qsm-results-page .mlw_qmn_question .qmn_image_option{
|
270 |
+
flex-direction: column;
|
271 |
+
flex-wrap: nowrap;
|
272 |
+
height: auto;
|
273 |
+
}
|
274 |
.mlw_qmn_question .qsm-text-correct-option.qsm-text-user-correct-answer:before{
|
275 |
content: "\f12a";
|
276 |
top: 4px;
|
413 |
}
|
414 |
.qsm-text-correct-option.not-opted {
|
415 |
color: #6f7479;
|
416 |
+
}
|
417 |
+
.admin_page_qsm_quiz_result_details .qmn_image_option img,
|
418 |
+
.quiz_section .qmn_image_option img {
|
419 |
+
width: 100%;
|
420 |
+
height: 100%;
|
421 |
+
object-fit: cover;
|
422 |
+
}
|
423 |
+
.admin_page_qsm_quiz_result_details .qmn_image_option img {
|
424 |
+
overflow: hidden;
|
425 |
+
}
|
426 |
+
.admin_page_qsm_quiz_result_details .qmn_image_option{
|
427 |
+
width: 48%;
|
428 |
+
height: 250px;
|
429 |
+
display: inline-flex !important;
|
430 |
+
position: relative;
|
431 |
+
flex-wrap: nowrap;
|
432 |
+
overflow: hidden;
|
433 |
+
padding: 1%;
|
434 |
+
box-sizing: border-box;
|
435 |
+
align-items: flex-end;
|
436 |
+
}
|
437 |
+
.admin_page_qsm_quiz_result_details
|
438 |
+
.qsm_image_result_caption_default{
|
439 |
+
display: block;
|
440 |
+
width: calc(100% - 45px);
|
441 |
+
box-sizing: content-box;
|
442 |
+
position: absolute;
|
443 |
+
left: 27px;
|
444 |
+
right: 50px;
|
445 |
+
padding: 5px;
|
446 |
+
bottom:10px;
|
447 |
+
z-index:99;
|
448 |
+
color: black;
|
449 |
+
}
|
450 |
+
.admin_page_qsm_quiz_result_details .qmn_question_answer.qsm-add-border-bottom {
|
451 |
+
border-bottom: 1px solid #808080;
|
452 |
+
padding-bottom: 25px;
|
453 |
}
|
css/qsm-admin-question.css
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
.question-controls {
|
2 |
display: flex;
|
3 |
-
flex-direction:
|
4 |
justify-content: space-between;
|
5 |
align-items: center;
|
|
|
6 |
}
|
7 |
.qsm_tab_content a.button-gray{
|
8 |
border: transparent;
|
@@ -65,11 +66,6 @@
|
|
65 |
color: red;
|
66 |
font-size: 15px;
|
67 |
}
|
68 |
-
@media screen and (min-width:700px) {
|
69 |
-
.question-controls {
|
70 |
-
flex-direction: row;
|
71 |
-
}
|
72 |
-
}
|
73 |
.page {
|
74 |
width: 100%;
|
75 |
background-color: #fafafa;
|
@@ -344,6 +340,7 @@ input#image_size-width {
|
|
344 |
color: #969696;
|
345 |
display: inline-block;
|
346 |
box-sizing: border-box;
|
|
|
347 |
}
|
348 |
#categorydiv .qsm-question-doc {
|
349 |
right: 15px;
|
@@ -656,7 +653,15 @@ a#qsm-category-add-toggle {
|
|
656 |
}
|
657 |
.question-controls .search-box {
|
658 |
height: auto;
|
659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
.questionElements .postbox {
|
661 |
max-width: 100%;
|
662 |
width: 100%;
|
@@ -668,4 +673,11 @@ a#qsm-category-add-toggle {
|
|
668 |
.answer-text-div {
|
669 |
width: 135%;
|
670 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
}
|
1 |
.question-controls {
|
2 |
display: flex;
|
3 |
+
flex-direction: row;
|
4 |
justify-content: space-between;
|
5 |
align-items: center;
|
6 |
+
flex-wrap: nowrap;
|
7 |
}
|
8 |
.qsm_tab_content a.button-gray{
|
9 |
border: transparent;
|
66 |
color: red;
|
67 |
font-size: 15px;
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
69 |
.page {
|
70 |
width: 100%;
|
71 |
background-color: #fafafa;
|
340 |
color: #969696;
|
341 |
display: inline-block;
|
342 |
box-sizing: border-box;
|
343 |
+
vertical-align: middle;
|
344 |
}
|
345 |
#categorydiv .qsm-question-doc {
|
346 |
right: 15px;
|
653 |
}
|
654 |
.question-controls .search-box {
|
655 |
height: auto;
|
656 |
+
width: auto;
|
657 |
+
position: relative;
|
658 |
+
margin: 0;
|
659 |
+
bottom: 0;
|
660 |
+
top: 0;
|
661 |
+
right: 0;
|
662 |
+
left: 0;
|
663 |
+
}
|
664 |
+
.question-controls .search-box input{padding: 0 8px;min-height: auto;}
|
665 |
.questionElements .postbox {
|
666 |
max-width: 100%;
|
667 |
width: 100%;
|
673 |
.answer-text-div {
|
674 |
width: 135%;
|
675 |
}
|
676 |
+
.page{padding-bottom: 100px;}
|
677 |
+
.page-footer .page-header-buttons{flex-wrap: nowrap;}
|
678 |
+
.page-footer a.qsm-dashed-btn{
|
679 |
+
font-size: 12px;
|
680 |
+
padding: 5px 5px;
|
681 |
+
margin: 5px;
|
682 |
+
}
|
683 |
}
|
css/qsm-admin.css
CHANGED
@@ -741,7 +741,7 @@ ul.changelog li.update div.two:before {
|
|
741 |
box-sizing: border-box;
|
742 |
}
|
743 |
.admin_page_mlw_quiz_options .update-nag{display: none;}
|
744 |
-
.admin_page_mlw_quiz_options #
|
745 |
overflow: hidden;
|
746 |
}
|
747 |
.admin_page_mlw_quiz_options .qsm-info-widget {
|
@@ -1669,117 +1669,184 @@ td.scheduled_time_start {
|
|
1669 |
/* display: none;
|
1670 |
*/
|
1671 |
}
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
.qsm-news-ads .qsm-info-widget:nth-child(3n+5) {
|
1679 |
-
clear: both;
|
1680 |
-
}
|
1681 |
-
.remove-ads-adv-link {
|
1682 |
-
width: 100%;
|
1683 |
-
display: inline-block;
|
1684 |
-
margin-bottom: 30px;
|
1685 |
-
}
|
1686 |
}
|
1687 |
-
|
1688 |
-
|
1689 |
-
margin-top: -1px !important;
|
1690 |
-
vertical-align: top;
|
1691 |
-
}
|
1692 |
-
.qsm-tooltips-icon .qsm-tooltips {
|
1693 |
-
left: -90px;
|
1694 |
-
}
|
1695 |
-
.qsm-opt-tr .qsm-tooltips-icon {
|
1696 |
-
right: 13px;
|
1697 |
-
}
|
1698 |
-
.qsm-tooltips-icon .qsm-tooltips:before {
|
1699 |
-
left: auto;
|
1700 |
-
right: -3px;
|
1701 |
-
}
|
1702 |
}
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
.qsm-news-ads .qsm-info-widget {
|
1753 |
-
width: calc(100% - 30px);
|
1754 |
-
max-width: 100%;
|
1755 |
-
box-sizing: border-box;
|
1756 |
-
margin: 15px 15px 0 15px;
|
1757 |
-
}
|
1758 |
-
.form-table .qsm-opt-tr {
|
1759 |
-
padding-bottom: 10px;
|
1760 |
-
}
|
1761 |
-
.overview-main-wrapper {
|
1762 |
-
display: block;
|
1763 |
-
}
|
1764 |
-
.overview-main-wrapper .overview-inner-wrap {
|
1765 |
-
margin-right: 0;
|
1766 |
-
width: 100%;
|
1767 |
-
}
|
1768 |
-
.result-page-title {
|
1769 |
-
margin-bottom: 10px;
|
1770 |
-
}
|
1771 |
}
|
1772 |
.popup-template-span-wrap .popup-copied-des span.dashicons {
|
1773 |
line-height: 28px;
|
1774 |
}
|
1775 |
-
.comment-inner-wrap {
|
1776 |
-
/* display: none;
|
1777 |
-
*/
|
1778 |
-
}
|
1779 |
#qsm_themes h2.wp-heading-inline {
|
1780 |
display: inline-block;
|
1781 |
margin-right: 5px;
|
1782 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1783 |
/** * Style tab design */
|
1784 |
.wp-upload-form {
|
1785 |
background: #fafafa;
|
@@ -1822,6 +1889,7 @@ td.scheduled_time_start {
|
|
1822 |
}
|
1823 |
}
|
1824 |
@media screen and (max-width: 767px) {
|
|
|
1825 |
.qsm-quiz-row td:nth-of-type(2n) {
|
1826 |
display: none;
|
1827 |
}
|
@@ -1840,7 +1908,11 @@ td.scheduled_time_start {
|
|
1840 |
.qsm-popup__container {
|
1841 |
min-width: auto;
|
1842 |
max-width: 100%;
|
1843 |
-
|
|
|
|
|
|
|
|
|
1844 |
#show-advanced-option {
|
1845 |
display: block;
|
1846 |
width: 100%;
|
@@ -2198,44 +2270,6 @@ input#duplicate_questions {
|
|
2198 |
border: 1px solid #dddddd;
|
2199 |
border-radius: 1px;
|
2200 |
}
|
2201 |
-
.qsm-standard-popup .qsm-popup__container{
|
2202 |
-
padding: 0;
|
2203 |
-
margin: 0;
|
2204 |
-
position: relative;
|
2205 |
-
min-width: 450px;
|
2206 |
-
}
|
2207 |
-
.qsm-standard-popup .qsm-popup__header h2{
|
2208 |
-
padding: 10px 20px;
|
2209 |
-
}
|
2210 |
-
.qsm-standard-popup .qsm-popup__header .qsm-popup__close{
|
2211 |
-
position: relative;
|
2212 |
-
font-size: 22px;
|
2213 |
-
border: 1px solid #ddd;
|
2214 |
-
padding: 15px;
|
2215 |
-
cursor: pointer;
|
2216 |
-
}
|
2217 |
-
.qsm-standard-popup .qsm-popup__content{
|
2218 |
-
padding: 20px 20px;
|
2219 |
-
margin: 0;
|
2220 |
-
box-shadow: inset 0 0 10px 1px #ddd;
|
2221 |
-
}
|
2222 |
-
.qsm-standard-popup .qsm-popup__content a{outline: none;box-shadow: none;text-decoration: underline;}
|
2223 |
-
.qsm-standard-popup .qsm-popup__content table{
|
2224 |
-
width: 100%;
|
2225 |
-
border-spacing: 0 5px;
|
2226 |
-
}
|
2227 |
-
.qsm-standard-popup .qsm-popup__footer{
|
2228 |
-
padding: 12px 20px;
|
2229 |
-
}
|
2230 |
-
#qsm-global-default-popup .qsm-popup__footer {
|
2231 |
-
display: flex;
|
2232 |
-
justify-content: flex-end;
|
2233 |
-
align-items: center;
|
2234 |
-
flex-wrap: nowrap;
|
2235 |
-
}
|
2236 |
-
#qsm-global-default-popup .qsm-popup__footer button{
|
2237 |
-
margin: 0 5px;
|
2238 |
-
}
|
2239 |
.qsm-badge {
|
2240 |
background: linear-gradient(225deg, #344ad6, #42d96b);
|
2241 |
z-index: 9999;
|
@@ -2247,6 +2281,18 @@ input#duplicate_questions {
|
|
2247 |
padding: 0 10px;
|
2248 |
text-transform: uppercase;
|
2249 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2250 |
/** Quiz Contact Tab Style **/
|
2251 |
.contact-form-builder-wrap{
|
2252 |
display: flex;
|
741 |
box-sizing: border-box;
|
742 |
}
|
743 |
.admin_page_mlw_quiz_options .update-nag{display: none;}
|
744 |
+
.admin_page_mlw_quiz_options #wpwrap{
|
745 |
overflow: hidden;
|
746 |
}
|
747 |
.admin_page_mlw_quiz_options .qsm-info-widget {
|
1669 |
/* display: none;
|
1670 |
*/
|
1671 |
}
|
1672 |
+
.qsm-standard-popup .qsm-popup__container{
|
1673 |
+
padding: 0;
|
1674 |
+
margin: 0;
|
1675 |
+
position: relative;
|
1676 |
+
min-width: 450px;
|
1677 |
+
max-width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1678 |
}
|
1679 |
+
.qsm-standard-popup .qsm-popup__header .qsm-popup__title{
|
1680 |
+
padding: 10px 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1681 |
}
|
1682 |
+
.qsm-standard-popup .qsm-popup__header .qsm-popup__close{
|
1683 |
+
position: relative;
|
1684 |
+
font-size: 22px;
|
1685 |
+
border: 1px solid #ddd;
|
1686 |
+
padding: 15px;
|
1687 |
+
cursor: pointer;
|
1688 |
+
}
|
1689 |
+
.qsm-standard-popup .qsm-popup__content{
|
1690 |
+
padding: 20px 20px;
|
1691 |
+
margin: 0;
|
1692 |
+
box-shadow: inset 0 0 10px 1px #ddd;
|
1693 |
+
}
|
1694 |
+
.qsm-standard-popup .qsm-popup__content a{outline: none;box-shadow: none;text-decoration: underline;}
|
1695 |
+
.qsm-standard-popup .qsm-popup__content table{
|
1696 |
+
width: 100%;
|
1697 |
+
border-spacing: 0 5px;
|
1698 |
+
}
|
1699 |
+
.qsm-standard-popup .qsm-popup__footer{
|
1700 |
+
padding: 12px 20px;
|
1701 |
+
}
|
1702 |
+
.qsm-standard-popup .qsm-popup__footer_with_btns{
|
1703 |
+
display: flex;
|
1704 |
+
justify-content: space-between;
|
1705 |
+
align-items: center;
|
1706 |
+
}
|
1707 |
+
#duplicate-quiz-form, #delete-quiz-form{
|
1708 |
+
margin: 10px 0;
|
1709 |
+
}
|
1710 |
+
#delete-quiz-form h3{margin-top: 0;}
|
1711 |
+
.qsm-popup-upgrade .qsm-popup__footer{
|
1712 |
+
display: flex;
|
1713 |
+
justify-content: space-around;
|
1714 |
+
align-items: center;
|
1715 |
+
}
|
1716 |
+
.qsm-popup-upgrade .qsm-popup__container{
|
1717 |
+
max-width: 500px;
|
1718 |
+
max-height: 90vh;
|
1719 |
+
}
|
1720 |
+
.qsm-popup-upgrade .qsm-popup__container .qsm-popup__content{
|
1721 |
+
padding: 20px 20px 10px;
|
1722 |
+
}
|
1723 |
+
#qsm-global-default-popup .qsm-popup__footer {
|
1724 |
+
display: flex;
|
1725 |
+
justify-content: flex-end;
|
1726 |
+
align-items: center;
|
1727 |
+
flex-wrap: nowrap;
|
1728 |
+
}
|
1729 |
+
#qsm-global-default-popup .qsm-popup__footer button{
|
1730 |
+
margin: 0 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1731 |
}
|
1732 |
.popup-template-span-wrap .popup-copied-des span.dashicons {
|
1733 |
line-height: 28px;
|
1734 |
}
|
|
|
|
|
|
|
|
|
1735 |
#qsm_themes h2.wp-heading-inline {
|
1736 |
display: inline-block;
|
1737 |
margin-right: 5px;
|
1738 |
}
|
1739 |
+
.qsm-upgrade-box{
|
1740 |
+
display: inline-block;
|
1741 |
+
width: 100%;
|
1742 |
+
box-sizing: border-box;
|
1743 |
+
padding: 10px;
|
1744 |
+
max-width: 800px;
|
1745 |
+
}
|
1746 |
+
.qsm-popup-upgrade-close{
|
1747 |
+
border:none;
|
1748 |
+
padding:0px;
|
1749 |
+
}
|
1750 |
+
.qsm-upgrade-box h2{
|
1751 |
+
font-size: 22px;
|
1752 |
+
line-height: normal;
|
1753 |
+
margin: 15px 0 10px;
|
1754 |
+
letter-spacing: 1px;
|
1755 |
+
}
|
1756 |
+
.qsm-upgrade-box h5{
|
1757 |
+
background: #D0DAFF;
|
1758 |
+
border-radius:5px;
|
1759 |
+
padding: 4px 10px;
|
1760 |
+
display: inline-block;
|
1761 |
+
font-size: 11px;
|
1762 |
+
letter-spacing: 1px;
|
1763 |
+
vertical-align: middle;
|
1764 |
+
margin: 0 5px;
|
1765 |
+
}
|
1766 |
+
.qsm-upgrade-box .qsm-upgrade-text{
|
1767 |
+
font-size: 16px;
|
1768 |
+
line-height: 22px;
|
1769 |
+
text-align: justify;
|
1770 |
+
}
|
1771 |
+
.qsm-upgrade-box .qsm-upgrade-read-icon{
|
1772 |
+
display: flex;
|
1773 |
+
flex-direction: row;
|
1774 |
+
margin: 10px 0;
|
1775 |
+
flex-wrap: nowrap;
|
1776 |
+
align-items: center;
|
1777 |
+
font-size: 14px;
|
1778 |
+
}
|
1779 |
+
.qsm-upgrade-box .qsm-upgrade-read-icon a{
|
1780 |
+
text-decoration: none;
|
1781 |
+
font-weight: bold;
|
1782 |
+
display: inline-flex;
|
1783 |
+
flex-direction: row;
|
1784 |
+
flex-wrap: nowrap;
|
1785 |
+
align-content: center;
|
1786 |
+
align-items: center;
|
1787 |
+
margin: 2px 6px 0;
|
1788 |
+
}
|
1789 |
+
.qsm-upgrade-box .qsm-upgrade-read-icon img{
|
1790 |
+
height: 15px;
|
1791 |
+
}
|
1792 |
+
.qsm-upgrade-box .qsm-upgrade-right-arrow{
|
1793 |
+
font-size: 16px;
|
1794 |
+
color: inherit;
|
1795 |
+
height: 16px;
|
1796 |
+
margin: 0 2px;
|
1797 |
+
}
|
1798 |
+
.qsm-upgrade-chart img{
|
1799 |
+
max-width: 100%;
|
1800 |
+
}
|
1801 |
+
.qsm-popup-upgrade-warning,
|
1802 |
+
.qsm-popup-upgrade-info{
|
1803 |
+
display: flex;
|
1804 |
+
flex-direction: row;
|
1805 |
+
flex-wrap: nowrap;
|
1806 |
+
align-items: flex-start;
|
1807 |
+
background: #EFF6FF;
|
1808 |
+
border: 1px solid #D1E5FF;
|
1809 |
+
border-radius: 4px;
|
1810 |
+
padding: 10px 8px;
|
1811 |
+
margin: 5px 0;
|
1812 |
+
color: #1E40AF;
|
1813 |
+
font-weight: 500;
|
1814 |
+
}
|
1815 |
+
.qsm-popup-upgrade-info img{width: auto;height: 20px;margin-right: 8px;}
|
1816 |
+
.qsm-popup-upgrade-warning{
|
1817 |
+
background: #FFFBEB;
|
1818 |
+
border: 1px solid #FBBF24;
|
1819 |
+
padding: 12px;
|
1820 |
+
color: #92400E;
|
1821 |
+
font-size: 15px;
|
1822 |
+
align-items: center;
|
1823 |
+
}
|
1824 |
+
.qsm-upgrade-box .qsm-popup-upgrade-warning img{width: auto;height: 15px;margin-right: 8px;}
|
1825 |
+
.qsm-upgrade-box .qsm-upgrade-buttons{
|
1826 |
+
display: flex;
|
1827 |
+
flex-direction: column;
|
1828 |
+
align-content: space-between;
|
1829 |
+
flex-wrap: nowrap;
|
1830 |
+
align-items: center;
|
1831 |
+
}
|
1832 |
+
.qsm-upgrade-box .qsm-upgrade-buttons a{
|
1833 |
+
text-decoration: none;
|
1834 |
+
text-align: center;
|
1835 |
+
margin: 5px 0;
|
1836 |
+
width: 100%;
|
1837 |
+
box-sizing: border-box;
|
1838 |
+
}
|
1839 |
+
.qsm-upgrade-box .qsm-upgrade-buttons a.qsm_bundle{
|
1840 |
+
padding: 10px 20px;
|
1841 |
+
}
|
1842 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-upgrade-buttons-report-analysis{
|
1843 |
+
display: flex;
|
1844 |
+
flex-direction: row;
|
1845 |
+
flex-wrap: wrap;
|
1846 |
+
align-content: center;
|
1847 |
+
align-items: center;
|
1848 |
+
}
|
1849 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-upgrade-buttons-report-analysis a{width: auto;margin-right: 10px;font-weight: 500;font-size: 14px;padding: 10px 20px;}
|
1850 |
/** * Style tab design */
|
1851 |
.wp-upload-form {
|
1852 |
background: #fafafa;
|
1889 |
}
|
1890 |
}
|
1891 |
@media screen and (max-width: 767px) {
|
1892 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-upgrade-buttons-report-analysis a{width: 100%;margin-right: 0;}
|
1893 |
.qsm-quiz-row td:nth-of-type(2n) {
|
1894 |
display: none;
|
1895 |
}
|
1908 |
.qsm-popup__container {
|
1909 |
min-width: auto;
|
1910 |
max-width: 100%;
|
1911 |
+
}
|
1912 |
+
.qsm-standard-popup .qsm-popup__container{
|
1913 |
+
min-width: 98%;
|
1914 |
+
max-width: 98% !important;
|
1915 |
+
}
|
1916 |
#show-advanced-option {
|
1917 |
display: block;
|
1918 |
width: 100%;
|
2270 |
border: 1px solid #dddddd;
|
2271 |
border-radius: 1px;
|
2272 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2273 |
.qsm-badge {
|
2274 |
background: linear-gradient(225deg, #344ad6, #42d96b);
|
2275 |
z-index: 9999;
|
2281 |
padding: 0 10px;
|
2282 |
text-transform: uppercase;
|
2283 |
}
|
2284 |
+
.themes-container .market-theme:hover .market-theme-url {
|
2285 |
+
opacity: 1;
|
2286 |
+
}
|
2287 |
+
.themes-container .market-theme .market-theme-url {
|
2288 |
+
position: absolute;
|
2289 |
+
left: 50%;
|
2290 |
+
top: 50%;
|
2291 |
+
transform: translate(-50%, -50%);
|
2292 |
+
opacity: 0;
|
2293 |
+
transition: all 200ms ease-in-out;
|
2294 |
+
text-align: center;
|
2295 |
+
}
|
2296 |
/** Quiz Contact Tab Style **/
|
2297 |
.contact-form-builder-wrap{
|
2298 |
display: flex;
|
data/parsing_script.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"change_log":[""," Bug: Fixed issue with paragraph question type\n"," Bug: Fixed issue with qmn_register_my_templates hook\n"," Bug: Fixed issue with %CATEGORY_POINTS_X% template variable\n"," Bug: Fixed issue with question numbers in email\n"," Bug: Fixed issue with elementor popup\n"," Bug: Issue fixed with touch devices\n"," Feature: Added option to set default number of answers\n"," Feature: Added option to search questions from question bank\n"," Enhancement: Made UI improvements in polar question"],"products":[{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861"},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858"},{"name":"Plugin Configuration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452658"},{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053"}],"new_addons":[{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861","price":{"amount":"99.00"},"description":""},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858","price":{"amount":"199.00"},"description":""},{"name":"Plugin Configuration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452658","price":{"amount":"49.00"},"description":""},{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Ivoryv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Fragrancev2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/avenger-quiz-which-avenger-are-you-quiz\/","title":"Super Avenger Quiz: Which Avenger Are You? Find Out in 1 minute!","excerpt":"<p>Avengers is one of the most cherished and precious gifts that MCU (Marvel Comic Universe) has provided us. Thank you, Stan Lee. But have you wondered which Avenger are you? Don’t worry, we do not leave you in question, take an Avenger Quiz to find out which of the 6 (core members) Avengers are you! […]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/creating-a-snowflake-test-quiz-using-qsm\/","title":"Creating a Snowflake Test Quiz in 4 easy steps!","excerpt":"<p>Snowflake test is the talk the hour, did you take one yet? No? Well, that’s okay, because Quiz and Survey Master has made one just for you! In this blog, you could not only take this super famous snowflake test online quiz but you will also get to know all about this test! The Quiz […]<\/p>\n"}],"popular_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "},{"name":"Paypal and Stripe Payment Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Paypal-and-Stripe-Payment-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63522","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "},{"name":"Simple Popups","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Simple-Popups.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=38572","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"},{"name":"Google Analytics Tracking","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Google-Analytics-Tracking.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=34421","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimited":"87.00"},"description":"Track your quiz and survey submissions in Google Analytics."},{"name":"Logic","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Logic.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=8071","price":{"personal1site":"49.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":""},{"name":"Reporting & Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."},{"name":"MailPoet Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/MailPoet-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/mailpoet-integration\/","price":{"personal1site":"25.00","business2-5sites":"40.00","developerunlimitedsites":"62.00"},"description":"Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"}],"on_sale_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "}],"bundles":[{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"desc":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle.","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PRO.png"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"desc":"14+ addons to add useful features to your quiz and surveys. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Plus.png"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"desc":"All the right addons to get you started with QSM premium features. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic.png"}],"themes":[{"name":"Companion","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/companion.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=505248","price":{"amount":"0.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/quiz\/where-should-i-travel-next\/"},{"name":"Serene","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/serene.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=503010","price":{"amount":"0.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/quiz\/the-ultimate-harry-potter-quiz"},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-pool.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-ivory.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-fragrance.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/fragrance-qsm-theme-demo"},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-breeze.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/breeze-qsm-theme-demo"}]}
|
1 |
+
{"change_log":[""," Feature: Added option to enable\/disable case sensitive answer for fill-in blank question\n"," Feature: Added option to enable\/disable MathJax\n"," Feature: Added option to enable\/disable emails notifications\n"," Feature: Added option to set images size for image type answers\n"," Feature: Added %ANSWER_X% variables to show user's answer to a specific question\n"," Feature: Added translation support for all Javascript string messages\n"," Feature: Added image answer support for polar question type\n"," Bug: Fixed display issue with leaderboard customization block\n"," Bug: Fixed issue with questions count in quiz list page\n"," Bug: Fixed issue with %QUESTION_ANSWER_X% variables\n"," Bug: Fixed issue while deleting\/duplicating old quizzes\n"," Bug: Fixed issue with timer while using pagination\n"," Enhancement: Improved UI for image type answers options"],"products":[{"name":"Companion","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/companion_banner.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=505248"},{"name":"Serene","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/serene_banner.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=503010"},{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861"},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858"}],"new_addons":[{"name":"Companion","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/companion_banner.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=505248","price":{"amount":"0.00"},"description":""},{"name":"Serene","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/06\/serene_banner.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=503010","price":{"amount":"0.00"},"description":""},{"name":"Care Pack","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/3.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452861","price":{"amount":"99.00"},"description":""},{"name":"Speed Improvement","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452858","price":{"amount":"199.00"},"description":""},{"name":"Plugin Configuration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/03\/1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=452658","price":{"amount":"49.00"},"description":""},{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/create-an-interior-design-style-quiz-qsm\/","title":"How to Create an Interior Design Style Quiz with the best Quiz Plugin! (8 minutes read)","excerpt":"<p>Wanting to learn how to create an interior design style quiz for your audience could be a hassle in a competitive world like ours. But we have got your back mate! Today, in this blog, you can learn the A-Z of how to create any kind of interior design quiz, design style quiz, decoration style […]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/relationship-quiz\/","title":"How to Create a Relationship Quiz in WordPress? (6 Simple Steps)","excerpt":"<p>A relationship is a kind of bond or connection between two people. A relationship quiz will help your users to find out in which type of relationship they are or what they should be expecting from a relationship. <\/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":"Save & Resume","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Save-and-Resume.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63518","price":{"personal1site":"19.00","business2-5sites":"29.00","developerunlimitedsites":"49.00"},"description":"Enable save and resume functionality in your quiz. Users can now close and come back to a quiz anytime! "},{"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":"Create Advanced Quizzes by adding Logic and Conditional Branching to your Quizzes and Surveys. Adds Unlimited Additional Conditons."},{"name":"Reporting & Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."}],"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
@@ -233,6 +233,22 @@ var QSMAdmin;
|
|
233 |
e.preventDefault();
|
234 |
MicroModal.show('show-all-variable');
|
235 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
//Hide/show tr based on selection
|
237 |
$('.qsm_tab_content select').each(function () {
|
238 |
var name = $(this).attr('name');
|
@@ -1373,7 +1389,7 @@ var QSMQuestion;
|
|
1373 |
var import_button;
|
1374 |
(function ($) {
|
1375 |
if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
|
1376 |
-
if (window.location.href.indexOf('tab') == -1 || window.location.href.indexOf('tab=questions') > 0) {
|
1377 |
|
1378 |
$.QSMSanitize = function (input) {
|
1379 |
return input.replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');
|
@@ -2227,6 +2243,9 @@ var import_button;
|
|
2227 |
$("#edit-page-id").text('').text(pageID);
|
2228 |
jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
|
2229 |
field.value = page.get(field.name);
|
|
|
|
|
|
|
2230 |
});
|
2231 |
MicroModal.show('modal-page-1');
|
2232 |
},
|
@@ -2675,7 +2694,11 @@ var import_button;
|
|
2675 |
} else {
|
2676 |
$('.correct-answer').show();
|
2677 |
}
|
2678 |
-
|
|
|
|
|
|
|
|
|
2679 |
// show points field only for polar in survey and simple form
|
2680 |
if (qsmQuestionSettings.form_type != 0) {
|
2681 |
if (13 == question_val) {
|
@@ -2695,6 +2718,8 @@ var import_button;
|
|
2695 |
}
|
2696 |
});
|
2697 |
|
|
|
|
|
2698 |
//Add new category
|
2699 |
$(document).on('click', '#qsm-category-add-toggle', function () {
|
2700 |
if ($('#qsm-category-add').is(":visible")) {
|
233 |
e.preventDefault();
|
234 |
MicroModal.show('show-all-variable');
|
235 |
});
|
236 |
+
if ( "" != jQuery('#scheduled_time_end').val() ) {
|
237 |
+
jQuery('.not_allow_after_expired_time label').css('opacity', '1');
|
238 |
+
jQuery('#not_allow_after_expired_time-1').attr('disabled', false);
|
239 |
+
} else {
|
240 |
+
jQuery('.not_allow_after_expired_time label').css('opacity', '0.7');
|
241 |
+
jQuery('#not_allow_after_expired_time-1').attr('disabled', true);
|
242 |
+
}
|
243 |
+
jQuery(document).on('change', '#scheduled_time_end', function () {
|
244 |
+
if ( "" != jQuery(this).val() ) {
|
245 |
+
jQuery('.not_allow_after_expired_time label').css('opacity', '1');
|
246 |
+
jQuery('#not_allow_after_expired_time-1').attr('disabled', false);
|
247 |
+
} else {
|
248 |
+
jQuery('.not_allow_after_expired_time label').css('opacity', '0.7');
|
249 |
+
jQuery('#not_allow_after_expired_time-1').attr('disabled', true);
|
250 |
+
}
|
251 |
+
});
|
252 |
//Hide/show tr based on selection
|
253 |
$('.qsm_tab_content select').each(function () {
|
254 |
var name = $(this).attr('name');
|
1389 |
var import_button;
|
1390 |
(function ($) {
|
1391 |
if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
|
1392 |
+
if (window.location.href.indexOf('&tab') == -1 || window.location.href.indexOf('tab=questions') > 0) {
|
1393 |
|
1394 |
$.QSMSanitize = function (input) {
|
1395 |
return input.replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');
|
2243 |
$("#edit-page-id").text('').text(pageID);
|
2244 |
jQuery('#page-options').find(':input, select, textarea').each(function (i, field) {
|
2245 |
field.value = page.get(field.name);
|
2246 |
+
if ('undefined' == field.value) {
|
2247 |
+
field.value = "";
|
2248 |
+
}
|
2249 |
});
|
2250 |
MicroModal.show('modal-page-1');
|
2251 |
},
|
2694 |
} else {
|
2695 |
$('.correct-answer').show();
|
2696 |
}
|
2697 |
+
if (15 == question_val || 16 == question_val || 17 == question_val) {
|
2698 |
+
MicroModal.show('modal-advanced-question-type');
|
2699 |
+
$('#question_type').val(previous_question_val);
|
2700 |
+
return false;
|
2701 |
+
}
|
2702 |
// show points field only for polar in survey and simple form
|
2703 |
if (qsmQuestionSettings.form_type != 0) {
|
2704 |
if (13 == question_val) {
|
2718 |
}
|
2719 |
});
|
2720 |
|
2721 |
+
|
2722 |
+
|
2723 |
//Add new category
|
2724 |
$(document).on('click', '#qsm-category-add-toggle', function () {
|
2725 |
if ($('#qsm-category-add').is(":visible")) {
|
js/qsm-common.js
CHANGED
@@ -12,10 +12,11 @@
|
|
12 |
jQuery(document).on('qsm_after_quiz_submit',function(event,quiz_form_id){
|
13 |
event.preventDefault();
|
14 |
let parentDivClass = 'qsm-quiz-container-'+quiz_form_id.replace(new RegExp(/[a-zA-Z]/g),'');
|
15 |
-
|
16 |
if(polarQuestions.length >0){
|
17 |
qsmPolarSlider('answer', polarQuestions);
|
18 |
}
|
|
|
19 |
});
|
20 |
|
21 |
function qsmPolarSlider(page , polarQuestions){
|
@@ -102,28 +103,48 @@
|
|
102 |
if ( ui.value == answer1 ) {
|
103 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
104 |
'.left-polar-title').css('font-weight', '900');
|
|
|
|
|
105 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
106 |
'.right-polar-title').css('font-weight', '100');
|
|
|
|
|
107 |
} else if (ui.value == answer2 ) {
|
108 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
109 |
'.left-polar-title').css('font-weight', '100');
|
|
|
|
|
110 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
111 |
'.right-polar-title').css('font-weight', '900');
|
|
|
|
|
112 |
} else if (ui.value == value) {
|
113 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
114 |
'.left-polar-title').css('font-weight', '400');
|
|
|
|
|
115 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
116 |
'.right-polar-title').css('font-weight', '400');
|
|
|
|
|
117 |
} else if (ui.value < value ) {
|
118 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
119 |
lowerMidClass).css('font-weight', '600');
|
|
|
|
|
120 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
121 |
upperMidClass).css('font-weight', '400');
|
|
|
|
|
122 |
} else if (ui.value > value ) {
|
123 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
124 |
lowerMidClass).css('font-weight', '400');
|
|
|
|
|
125 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
126 |
upperMidClass).css('font-weight', '600');
|
|
|
|
|
127 |
}
|
128 |
}
|
129 |
|
@@ -131,7 +152,11 @@
|
|
131 |
|
132 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
133 |
'.left-polar-title').css('font-weight', '400');
|
|
|
|
|
134 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
135 |
'.right-polar-title').css('font-weight', '400');
|
|
|
|
|
136 |
}
|
137 |
}(jQuery));
|
12 |
jQuery(document).on('qsm_after_quiz_submit',function(event,quiz_form_id){
|
13 |
event.preventDefault();
|
14 |
let parentDivClass = 'qsm-quiz-container-'+quiz_form_id.replace(new RegExp(/[a-zA-Z]/g),'');
|
15 |
+
polarQuestions = jQuery('.'+parentDivClass).find('.qmn_question_answer').find('.mlw_qmn_question').find('.question-type-polar-s');
|
16 |
if(polarQuestions.length >0){
|
17 |
qsmPolarSlider('answer', polarQuestions);
|
18 |
}
|
19 |
+
|
20 |
});
|
21 |
|
22 |
function qsmPolarSlider(page , polarQuestions){
|
103 |
if ( ui.value == answer1 ) {
|
104 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
105 |
'.left-polar-title').css('font-weight', '900');
|
106 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
107 |
+
'.left-polar-title img').css('opacity', " 1 ");
|
108 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
109 |
'.right-polar-title').css('font-weight', '100');
|
110 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
111 |
+
'.right-polar-title img').css('opacity', "0.4");
|
112 |
} else if (ui.value == answer2 ) {
|
113 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
114 |
'.left-polar-title').css('font-weight', '100');
|
115 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
116 |
+
'.left-polar-title img').css('opacity', "0.4");
|
117 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
118 |
'.right-polar-title').css('font-weight', '900');
|
119 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
120 |
+
'.right-polar-title img').css('opacity', "1");
|
121 |
} else if (ui.value == value) {
|
122 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
123 |
'.left-polar-title').css('font-weight', '400');
|
124 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
125 |
+
'.left-polar-title img').css('opacity', "0.5");
|
126 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
127 |
'.right-polar-title').css('font-weight', '400');
|
128 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
129 |
+
'.right-polar-title img').css('opacity', "0.5");
|
130 |
} else if (ui.value < value ) {
|
131 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
132 |
lowerMidClass).css('font-weight', '600');
|
133 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
134 |
+
'.left-polar-title img').css('opacity', "0.8");
|
135 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
136 |
upperMidClass).css('font-weight', '400');
|
137 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
138 |
+
'.right-polar-title img').css('opacity', "0.5");
|
139 |
} else if (ui.value > value ) {
|
140 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
141 |
lowerMidClass).css('font-weight', '400');
|
142 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
143 |
+
'.left-polar-title img').css('opacity', "0.5");
|
144 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
145 |
upperMidClass).css('font-weight', '600');
|
146 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
147 |
+
'.right-polar-title img').css('opacity', "0.8");
|
148 |
}
|
149 |
}
|
150 |
|
152 |
|
153 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
154 |
'.left-polar-title').css('font-weight', '400');
|
155 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s img').find(
|
156 |
+
'.left-polar-title img').css('opacity', "0.5");
|
157 |
jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find(
|
158 |
'.right-polar-title').css('font-weight', '400');
|
159 |
+
jQuery('.question-section-id-'+questionID+' .question-type-polar-s img').find(
|
160 |
+
'.right-polar-title img').css('opacity', "0.5");
|
161 |
}
|
162 |
}(jQuery));
|
js/qsm-quiz.js
CHANGED
@@ -26,23 +26,16 @@ var qsmTimerInterval = [];
|
|
26 |
QSM.initPagination(quizID);
|
27 |
qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
|
28 |
|
29 |
-
if (quiz.hasOwnProperty('pagination') || quiz.qpages.hasOwnProperty(2)) {
|
30 |
qsmEndTimeTakenTimer(quizID);
|
31 |
jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
|
32 |
jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
|
33 |
quizType = 'paginated';
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
qsmEndTimeTakenTimer(quizID);
|
38 |
-
jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
|
39 |
-
jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
|
40 |
-
QSMPageTimer.endPageTimer(quizID, true);
|
41 |
}
|
42 |
if (quiz.hasOwnProperty('timer_limit') && 0 != quiz.timer_limit) {
|
43 |
-
qsmEndTimeTakenTimer(quizID);
|
44 |
-
jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
|
45 |
-
jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
|
46 |
QSM.initTimer(quizID);
|
47 |
quizType = 'timer';
|
48 |
}
|
@@ -77,7 +70,7 @@ var qsmTimerInterval = [];
|
|
77 |
if (qmn_quiz_data[quizID].hasOwnProperty('pagination') && qmn_quiz_data[quizID].first_page) {
|
78 |
$(document).on('click', '.qsm-quiz-container-' + quizID + ' .mlw_next', function (event) {
|
79 |
event.preventDefault();
|
80 |
-
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
|
81 |
var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
|
82 |
if ($('.qsm-quiz-container-' + quizID).find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
|
83 |
QSM.activateTimer(quizID);
|
@@ -172,7 +165,7 @@ var qsmTimerInterval = [];
|
|
172 |
document.title = display + ' ' + qsmTitleText;
|
173 |
|
174 |
/*CUSTOM TIMER*/
|
175 |
-
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.timer_design == 'big_timer') {
|
176 |
$(".second.circle").parent('.mlw_quiz_form').addClass('qsm_big_timer');
|
177 |
$(".second.circle").show();
|
178 |
$(".second.circle strong").html(display);
|
@@ -376,7 +369,7 @@ var qsmTimerInterval = [];
|
|
376 |
$pages.hide();
|
377 |
$currentPage.show();
|
378 |
|
379 |
-
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
|
380 |
QSMPageTimer.endPageTimer(quizID);
|
381 |
QSMPageTimer.initPageTimer(quizID, $currentPage);
|
382 |
}
|
@@ -391,7 +384,9 @@ var qsmTimerInterval = [];
|
|
391 |
$quizForm.find('.qsm-next').show();
|
392 |
} else {
|
393 |
$quizForm.find('.qsm-submit-btn').show();
|
394 |
-
|
|
|
|
|
395 |
}
|
396 |
if (1 < pageNumber) {
|
397 |
$quizForm.find('.qsm-previous').show();
|
@@ -445,7 +440,7 @@ var qsmTimerInterval = [];
|
|
445 |
changePage: function (quizID, difference) {
|
446 |
var page = QSM.getPage(quizID);
|
447 |
if (qmn_quiz_data[quizID].hasOwnProperty('first_page') && qmn_quiz_data[quizID].first_page) {
|
448 |
-
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
|
449 |
var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
|
450 |
if (page == start_timer) { // check current page
|
451 |
QSM.activateTimer(quizID);
|
@@ -939,7 +934,7 @@ function qmnFormSubmit(quiz_form_id) {
|
|
939 |
|
940 |
|
941 |
qsmEndTimeTakenTimer(quizID);
|
942 |
-
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer')) {
|
943 |
QSMPageTimer.endPageTimer(quiz_id);
|
944 |
}
|
945 |
if (qmn_quiz_data[quiz_id].hasOwnProperty('timer_limit')) {
|
@@ -968,7 +963,7 @@ function qmnFormSubmit(quiz_form_id) {
|
|
968 |
MicroModal.show('modal-4');
|
969 |
return false;
|
970 |
} else {
|
971 |
-
qmnDisplayResults(response, quiz_form_id, $container);
|
972 |
// run MathJax on the new content
|
973 |
if (1 != qmn_quiz_data[quiz_id].disable_mathjax) {
|
974 |
MathJax.typesetPromise();
|
@@ -992,10 +987,12 @@ function qsmDisplayLoading($container, quiz_id) {
|
|
992 |
loader_html += '</div>';
|
993 |
$container.empty();
|
994 |
$container.append(loader_html);
|
995 |
-
|
|
|
|
|
996 |
}
|
997 |
|
998 |
-
function qmnDisplayResults(results, quiz_form_id, $container) {
|
999 |
$container.empty();
|
1000 |
jQuery(document).trigger('qsm_before_display_result', [results, quiz_form_id, $container]);
|
1001 |
if (results.redirect) {
|
@@ -1003,7 +1000,9 @@ function qmnDisplayResults(results, quiz_form_id, $container) {
|
|
1003 |
} else {
|
1004 |
$container.append('<div class="qmn_results_page"></div>');
|
1005 |
$container.find('.qmn_results_page').html(results.display);
|
1006 |
-
|
|
|
|
|
1007 |
// Fires after result is populates via ajax
|
1008 |
jQuery(document).trigger('qsm_after_display_result', [results, quiz_form_id, $container]);
|
1009 |
}
|
@@ -1658,4 +1657,13 @@ jQuery(document).ready(function () {
|
|
1658 |
}
|
1659 |
});
|
1660 |
|
1661 |
-
var quizType = 'default';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
QSM.initPagination(quizID);
|
27 |
qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
|
28 |
|
29 |
+
if ( ( quiz.hasOwnProperty('pagination') || ( quiz.qpages.hasOwnProperty(2) && !jQuery('.qsm-quiz-container-'+quizID+' .qsm-auto-page-row').length ) ) ) {
|
30 |
qsmEndTimeTakenTimer(quizID);
|
31 |
jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
|
32 |
jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
|
33 |
quizType = 'paginated';
|
34 |
+
if ( qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
|
35 |
+
QSMPageTimer.endPageTimer(quizID, true);
|
36 |
+
}
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
if (quiz.hasOwnProperty('timer_limit') && 0 != quiz.timer_limit) {
|
|
|
|
|
|
|
39 |
QSM.initTimer(quizID);
|
40 |
quizType = 'timer';
|
41 |
}
|
70 |
if (qmn_quiz_data[quizID].hasOwnProperty('pagination') && qmn_quiz_data[quizID].first_page) {
|
71 |
$(document).on('click', '.qsm-quiz-container-' + quizID + ' .mlw_next', function (event) {
|
72 |
event.preventDefault();
|
73 |
+
if ( qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
|
74 |
var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
|
75 |
if ($('.qsm-quiz-container-' + quizID).find('.qmn_pagination > .slide_number_hidden').val() == start_timer) {
|
76 |
QSM.activateTimer(quizID);
|
165 |
document.title = display + ' ' + qsmTitleText;
|
166 |
|
167 |
/*CUSTOM TIMER*/
|
168 |
+
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') && qmn_quiz_data[quizID].advanced_timer.timer_design == 'big_timer') {
|
169 |
$(".second.circle").parent('.mlw_quiz_form').addClass('qsm_big_timer');
|
170 |
$(".second.circle").show();
|
171 |
$(".second.circle strong").html(display);
|
369 |
$pages.hide();
|
370 |
$currentPage.show();
|
371 |
|
372 |
+
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
|
373 |
QSMPageTimer.endPageTimer(quizID);
|
374 |
QSMPageTimer.initPageTimer(quizID, $currentPage);
|
375 |
}
|
384 |
$quizForm.find('.qsm-next').show();
|
385 |
} else {
|
386 |
$quizForm.find('.qsm-submit-btn').show();
|
387 |
+
if ( !jQuery('.qsm-quiz-container-'+ quizID +'.random') || !qmn_quiz_data[quizID].hasOwnProperty('pagination') ) {
|
388 |
+
$quizForm.find('.g-recaptcha').show();
|
389 |
+
}
|
390 |
}
|
391 |
if (1 < pageNumber) {
|
392 |
$quizForm.find('.qsm-previous').show();
|
440 |
changePage: function (quizID, difference) {
|
441 |
var page = QSM.getPage(quizID);
|
442 |
if (qmn_quiz_data[quizID].hasOwnProperty('first_page') && qmn_quiz_data[quizID].first_page) {
|
443 |
+
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
|
444 |
var start_timer = parseInt(qmn_quiz_data[quizID].advanced_timer.start_timer_page);
|
445 |
if (page == start_timer) { // check current page
|
446 |
QSM.activateTimer(quizID);
|
934 |
|
935 |
|
936 |
qsmEndTimeTakenTimer(quizID);
|
937 |
+
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
|
938 |
QSMPageTimer.endPageTimer(quiz_id);
|
939 |
}
|
940 |
if (qmn_quiz_data[quiz_id].hasOwnProperty('timer_limit')) {
|
963 |
MicroModal.show('modal-4');
|
964 |
return false;
|
965 |
} else {
|
966 |
+
qmnDisplayResults(response, quiz_form_id, $container, quiz_id);
|
967 |
// run MathJax on the new content
|
968 |
if (1 != qmn_quiz_data[quiz_id].disable_mathjax) {
|
969 |
MathJax.typesetPromise();
|
987 |
loader_html += '</div>';
|
988 |
$container.empty();
|
989 |
$container.append(loader_html);
|
990 |
+
if (qmn_quiz_data[quiz_id].hasOwnProperty('disable_scroll_next_previous_click') && qmn_quiz_data[quiz_id].disable_scroll_next_previous_click != 1) {
|
991 |
+
qsmScrollTo($container);
|
992 |
+
}
|
993 |
}
|
994 |
|
995 |
+
function qmnDisplayResults(results, quiz_form_id, $container, quiz_id) {
|
996 |
$container.empty();
|
997 |
jQuery(document).trigger('qsm_before_display_result', [results, quiz_form_id, $container]);
|
998 |
if (results.redirect) {
|
1000 |
} else {
|
1001 |
$container.append('<div class="qmn_results_page"></div>');
|
1002 |
$container.find('.qmn_results_page').html(results.display);
|
1003 |
+
if (qmn_quiz_data[quiz_id].hasOwnProperty('disable_scroll_next_previous_click') && qmn_quiz_data[quiz_id].disable_scroll_next_previous_click != 1) {
|
1004 |
+
qsmScrollTo($container);
|
1005 |
+
}
|
1006 |
// Fires after result is populates via ajax
|
1007 |
jQuery(document).trigger('qsm_after_display_result', [results, quiz_form_id, $container]);
|
1008 |
}
|
1657 |
}
|
1658 |
});
|
1659 |
|
1660 |
+
var quizType = 'default';
|
1661 |
+
|
1662 |
+
//check max lengh
|
1663 |
+
function checkMaxLength(obj){
|
1664 |
+
var value = obj.value;
|
1665 |
+
var maxlength = obj.maxLength;
|
1666 |
+
if (value.length > parseInt(maxlength)) {
|
1667 |
+
obj.value = value.slice(0, parseInt(maxlength));
|
1668 |
+
}
|
1669 |
+
}
|
mlw_quizmaster2.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
-
* Version: 8.0.
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
@@ -43,7 +43,7 @@ class MLWQuizMasterNext {
|
|
43 |
* @var string
|
44 |
* @since 4.0.0
|
45 |
*/
|
46 |
-
public $version = '8.0.
|
47 |
|
48 |
/**
|
49 |
* QSM Alert Manager Object
|
@@ -153,75 +153,75 @@ class MLWQuizMasterNext {
|
|
153 |
*/
|
154 |
private function load_dependencies() {
|
155 |
|
156 |
-
|
157 |
-
|
158 |
|
159 |
-
|
160 |
$this->log_manager = new QMN_Log_Manager();
|
161 |
|
162 |
-
|
163 |
$this->audit_manager = new QSM_Audit();
|
164 |
|
165 |
if ( is_admin() ) {
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
}
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
|
202 |
if ( function_exists( 'register_block_type' ) ) {
|
203 |
-
|
204 |
}
|
205 |
|
206 |
-
|
207 |
$this->alertManager = new MlwQmnAlertManager();
|
208 |
|
209 |
-
|
210 |
$this->quizCreator = new QMNQuizCreator();
|
211 |
|
212 |
-
|
213 |
$this->pluginHelper = new QMNPluginHelper();
|
214 |
|
215 |
-
|
216 |
$this->quiz_settings = new QSM_Quiz_Settings();
|
217 |
|
218 |
-
|
219 |
$this->theme_settings = new QSM_Theme_Settings();
|
220 |
|
221 |
-
|
222 |
$this->migrationHelper = new QSM_Migrate();
|
223 |
|
224 |
-
|
225 |
}
|
226 |
|
227 |
/**
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
+
* Version: 8.0.4
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
43 |
* @var string
|
44 |
* @since 4.0.0
|
45 |
*/
|
46 |
+
public $version = '8.0.4';
|
47 |
|
48 |
/**
|
49 |
* QSM Alert Manager Object
|
153 |
*/
|
154 |
private function load_dependencies() {
|
155 |
|
156 |
+
include_once 'php/classes/class-qsm-install.php';
|
157 |
+
include_once 'php/classes/class-qsm-fields.php';
|
158 |
|
159 |
+
include_once 'php/classes/class-qmn-log-manager.php';
|
160 |
$this->log_manager = new QMN_Log_Manager();
|
161 |
|
162 |
+
include_once 'php/classes/class-qsm-audit.php';
|
163 |
$this->audit_manager = new QSM_Audit();
|
164 |
|
165 |
if ( is_admin() ) {
|
166 |
+
include_once 'php/admin/functions.php';
|
167 |
+
include_once 'php/admin/stats-page.php';
|
168 |
+
include_once 'php/admin/quizzes-page.php';
|
169 |
+
include_once 'php/admin/admin-dashboard.php';
|
170 |
+
include_once 'php/admin/quiz-options-page.php';
|
171 |
+
include_once 'php/admin/admin-results-page.php';
|
172 |
+
include_once 'php/admin/admin-results-details-page.php';
|
173 |
+
include_once 'php/admin/tools-page.php';
|
174 |
+
include_once 'php/classes/class-qsm-changelog-generator.php';
|
175 |
+
include_once 'php/admin/about-page.php';
|
176 |
+
include_once 'php/admin/dashboard-widgets.php';
|
177 |
+
include_once 'php/admin/options-page-questions-tab.php';
|
178 |
+
include_once 'php/admin/options-page-contact-tab.php';
|
179 |
+
include_once 'php/admin/options-page-text-tab.php';
|
180 |
+
include_once 'php/admin/options-page-option-tab.php';
|
181 |
+
include_once 'php/admin/options-page-email-tab.php';
|
182 |
+
include_once 'php/admin/options-page-results-page-tab.php';
|
183 |
+
include_once 'php/admin/options-page-style-tab.php';
|
184 |
+
include_once 'php/admin/addons-page.php';
|
185 |
+
include_once 'php/admin/settings-page.php';
|
186 |
+
include_once 'php/classes/class-qsm-tracking.php';
|
187 |
+
include_once 'php/classes/class-qmn-review-message.php';
|
188 |
+
include_once 'php/gdpr.php';
|
189 |
}
|
190 |
+
include_once 'php/classes/class-qsm-questions.php';
|
191 |
+
include_once 'php/classes/class-qsm-contact-manager.php';
|
192 |
+
include_once 'php/classes/class-qsm-results-pages.php';
|
193 |
+
include_once 'php/classes/class-qsm-emails.php';
|
194 |
+
include_once 'php/classes/class-qmn-quiz-manager.php';
|
195 |
+
|
196 |
+
include_once 'php/template-variables.php';
|
197 |
+
include_once 'php/adverts-generate.php';
|
198 |
+
include_once 'php/question-types.php';
|
199 |
+
include_once 'php/default-templates.php';
|
200 |
+
include_once 'php/shortcodes.php';
|
201 |
|
202 |
if ( function_exists( 'register_block_type' ) ) {
|
203 |
+
include_once 'blocks/block.php';
|
204 |
}
|
205 |
|
206 |
+
include_once 'php/classes/class-qmn-alert-manager.php';
|
207 |
$this->alertManager = new MlwQmnAlertManager();
|
208 |
|
209 |
+
include_once 'php/classes/class-qmn-quiz-creator.php';
|
210 |
$this->quizCreator = new QMNQuizCreator();
|
211 |
|
212 |
+
include_once 'php/classes/class-qmn-plugin-helper.php';
|
213 |
$this->pluginHelper = new QMNPluginHelper();
|
214 |
|
215 |
+
include_once 'php/classes/class-qsm-settings.php';
|
216 |
$this->quiz_settings = new QSM_Quiz_Settings();
|
217 |
|
218 |
+
include_once 'php/classes/class-qsm-theme-settings.php';
|
219 |
$this->theme_settings = new QSM_Theme_Settings();
|
220 |
|
221 |
+
include_once 'php/classes/class-qsm-migrate.php';
|
222 |
$this->migrationHelper = new QSM_Migrate();
|
223 |
|
224 |
+
include_once 'php/rest-api.php';
|
225 |
}
|
226 |
|
227 |
/**
|
php/admin/admin-results-page.php
CHANGED
@@ -18,21 +18,20 @@ function qsm_generate_admin_results_page() {
|
|
18 |
|
19 |
// Retrieves the current stab and all registered tabs.
|
20 |
global $mlwQuizMasterNext;
|
21 |
-
$active_tab
|
22 |
-
$tab_array
|
23 |
-
|
24 |
?>
|
25 |
-
<div class="wrap">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
// Cycles through the tabs and creates the navigation.
|
37 |
foreach ( $tab_array as $tab ) {
|
38 |
$active_class = '';
|
@@ -41,14 +40,13 @@ function qsm_generate_admin_results_page() {
|
|
41 |
}
|
42 |
$tab_url = "?page=mlw_quiz_results&tab={$tab['slug']}";
|
43 |
?>
|
44 |
-
|
45 |
-
|
46 |
-
<?php
|
47 |
}
|
48 |
?>
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
// Locates the active tab and calls its content function.
|
53 |
foreach ( $tab_array as $tab ) {
|
54 |
if ( $active_tab === $tab['slug'] ) {
|
@@ -56,11 +54,9 @@ function qsm_generate_admin_results_page() {
|
|
56 |
}
|
57 |
}
|
58 |
?>
|
|
|
59 |
</div>
|
60 |
-
|
61 |
-
|
62 |
-
<?php
|
63 |
-
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -72,6 +68,9 @@ function qsm_generate_admin_results_page() {
|
|
72 |
function qsm_results_overview_tab() {
|
73 |
global $mlwQuizMasterNext;
|
74 |
$mlwQuizMasterNext->pluginHelper->register_admin_results_tab( __( 'Quiz Results', 'quiz-master-next' ), 'qsm_results_overview_tab_content' );
|
|
|
|
|
|
|
75 |
}
|
76 |
|
77 |
add_action( 'plugins_loaded', 'qsm_results_overview_tab' );
|
@@ -92,19 +91,9 @@ function qsm_results_overview_tab_content() {
|
|
92 |
|
93 |
$mlw_delete_results_id = isset( $_POST['result_id'] ) ? intval( $_POST['result_id'] ) : 0;
|
94 |
$mlw_delete_results_name = isset( $_POST['delete_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['delete_quiz_name'] ) ) : '';
|
95 |
-
do_action('qsm_before_delete_result'
|
96 |
// Updates table to mark results as deleted.
|
97 |
-
$results
|
98 |
-
$wpdb->prefix . 'mlw_results',
|
99 |
-
array(
|
100 |
-
'deleted' => 1,
|
101 |
-
),
|
102 |
-
array( 'result_id' => $mlw_delete_results_id ),
|
103 |
-
array(
|
104 |
-
'%d',
|
105 |
-
),
|
106 |
-
array( '%d' )
|
107 |
-
);
|
108 |
|
109 |
if ( false === $results ) {
|
110 |
$error = $wpdb->last_error;
|
@@ -117,14 +106,13 @@ function qsm_results_overview_tab_content() {
|
|
117 |
} else {
|
118 |
$mlwQuizMasterNext->alertManager->newAlert( __( 'Your results has been deleted successfully.', 'quiz-master-next' ), 'success' );
|
119 |
$mlwQuizMasterNext->audit_manager->new_audit( "Results Has Been Deleted From:", $mlw_delete_results_name, "" );
|
120 |
-
|
121 |
}
|
122 |
}
|
123 |
|
124 |
// Check if bulk delete has been selected. If so, verify nonce.
|
125 |
if ( isset( $_POST["bulk_delete"], $_POST['bulk_delete_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['bulk_delete_nonce'] ) ), 'bulk_delete' ) ) {
|
126 |
|
127 |
-
|
128 |
if ( isset( $_POST["delete_results"] ) && is_array( $_POST["delete_results"] ) ) {
|
129 |
$delete_results = array_map( 'sanitize_text_field', wp_unslash( $_POST["delete_results"] ) );
|
130 |
|
@@ -135,20 +123,11 @@ function qsm_results_overview_tab_content() {
|
|
135 |
$result_id = intval( $result );
|
136 |
if ( isset( $_POST['bulk_permanent_delete'] ) && 1 === intval( sanitize_text_field( wp_unslash( $_POST['bulk_permanent_delete'] ) ) ) ) {
|
137 |
$wpdb->delete(
|
138 |
-
$wpdb->prefix . "mlw_results",
|
139 |
-
array( 'result_id' => $result_id )
|
140 |
);
|
141 |
} else {
|
142 |
$wpdb->update(
|
143 |
-
$wpdb->prefix . "mlw_results",
|
144 |
-
array(
|
145 |
-
'deleted' => 1,
|
146 |
-
),
|
147 |
-
array( 'result_id' => $result_id ),
|
148 |
-
array(
|
149 |
-
'%d',
|
150 |
-
),
|
151 |
-
array( '%d' )
|
152 |
);
|
153 |
}
|
154 |
}
|
@@ -158,11 +137,11 @@ function qsm_results_overview_tab_content() {
|
|
158 |
}
|
159 |
|
160 |
// Prepares the SQL to retrieve the results.
|
161 |
-
$table_limit
|
162 |
-
$search_phrase_sql
|
163 |
-
$delete
|
164 |
-
$delete
|
165 |
-
$order_by_sql
|
166 |
if ( isset( $_GET['qsm_search_phrase'] ) && ! empty( $_GET['qsm_search_phrase'] ) ) {
|
167 |
// Sanitizes the search phrase and then uses $wpdb->prepare to properly escape the queries after using $wpdb->esc_like.
|
168 |
$sanitized_search_phrase = sanitize_text_field( wp_unslash( $_GET['qsm_search_phrase'] ) );
|
@@ -170,8 +149,8 @@ function qsm_results_overview_tab_content() {
|
|
170 |
$search_phrase_sql = $wpdb->prepare( ' AND (quiz_name LIKE %s OR name LIKE %s OR business LIKE %s OR email LIKE %s OR phone LIKE %s)', $search_phrase_percents, $search_phrase_percents, $search_phrase_percents, $search_phrase_percents, $search_phrase_percents );
|
171 |
}
|
172 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
173 |
-
$quiz_id
|
174 |
-
$qsm_results_count
|
175 |
} else {
|
176 |
$qsm_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM {$wpdb->prefix}mlw_results WHERE {$delete} {$search_phrase_sql}" );
|
177 |
}
|
@@ -180,62 +159,64 @@ function qsm_results_overview_tab_content() {
|
|
180 |
if ( isset( $_GET['qmn_order_by'] ) ) {
|
181 |
switch ( $_GET['qmn_order_by'] ) {
|
182 |
case 'quiz_name':
|
183 |
-
$order_by
|
184 |
-
$order_by_sql
|
185 |
break;
|
186 |
case 'name':
|
187 |
-
$order_by
|
188 |
-
$order_by_sql
|
189 |
break;
|
190 |
case 'point_score':
|
191 |
-
$order_by
|
192 |
-
$order_by_sql
|
193 |
break;
|
194 |
case 'correct_score':
|
195 |
-
$order_by
|
196 |
-
$order_by_sql
|
197 |
break;
|
198 |
default:
|
199 |
-
$order_by
|
200 |
-
$order_by_sql
|
201 |
}
|
202 |
}
|
203 |
|
204 |
if ( isset( $_GET['qsm_results_page'] ) ) {
|
205 |
-
$result_page
|
206 |
-
$result_begin
|
207 |
} else {
|
208 |
-
$result_page
|
209 |
-
$result_begin
|
210 |
}
|
211 |
$results_left = $qsm_results_count - ( $result_page * $table_limit );
|
212 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
213 |
-
$quiz_id
|
214 |
-
$mlw_quiz_data
|
215 |
} else {
|
216 |
-
$mlw_quiz_data = $wpdb->get_results(stripslashes( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE $delete $search_phrase_sql $order_by_sql LIMIT %d, %d", $result_begin, $table_limit ) ) );
|
217 |
}
|
218 |
-
|
219 |
?>
|
220 |
-
<div class="tablenav top">
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
<
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
239 |
|
240 |
$url_query_string = '';
|
241 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
@@ -272,292 +253,328 @@ function qsm_results_overview_tab_content() {
|
|
272 |
$mlw_qmn_previous_page = $result_page - 2;
|
273 |
?>
|
274 |
<a class="prev-page button" href="<?php echo esc_url_raw( "?page=mlw_quiz_results&qsm_results_page=$mlw_qmn_previous_page$url_query_string" ); ?>"><< /a>
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
if ( isset( $_GET['quiz_id'] ) ) {
|
286 |
?>
|
287 |
-
|
288 |
-
|
289 |
}
|
290 |
-
$qsm_search_phrase
|
291 |
-
$qmn_order_by
|
292 |
?>
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
</div>
|
309 |
-
<?php
|
310 |
//process screen options
|
311 |
-
$user_id
|
312 |
-
if ( isset($_POST["results-screen_option_nonce"]) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST["results-screen_option_nonce"] ) ), 'results_screen_option' ) ) {
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
} else {
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
}
|
333 |
-
?>
|
334 |
-
|
335 |
-
<form action="" method="post" name="bulk_delete_form">
|
336 |
-
<input type="hidden" name="bulk_delete" value="confirmation" />
|
337 |
-
<input type="hidden" name="bulk_permanent_delete" id="bulk_permanent_delete" value="0" />
|
338 |
-
<?php wp_nonce_field( 'bulk_delete', 'bulk_delete_nonce' );
|
339 |
-
|
340 |
-
$th_elements = apply_filters( 'mlw_qmn_admin_results_page_headings', array(
|
341 |
-
'score' => __( 'Score', 'quiz-master-next' ),
|
342 |
-
'time_complete' => __( 'Time To Complete', 'quiz-master-next' ),
|
343 |
-
'name' => __( 'Name', 'quiz-master-next' ),
|
344 |
-
'business' => __( 'Business', 'quiz-master-next' ),
|
345 |
-
'email' => __( 'Email', 'quiz-master-next' ),
|
346 |
-
'phone' => __( 'Phone', 'quiz-master-next' ),
|
347 |
-
'user' => __( 'User', 'quiz-master-next' ),
|
348 |
-
'time_taken' => __( 'Time Taken', 'quiz-master-next' ),
|
349 |
-
'ip' => __( 'IP Address', 'quiz-master-next' ),
|
350 |
-
'page_name' => __( 'Page Name', 'quiz-master-next' ),
|
351 |
-
'page_url' => __( 'Page URL', 'quiz-master-next' ),
|
352 |
-
) );
|
353 |
-
|
354 |
-
$values = $quiz_infos = [];
|
355 |
-
foreach ( $th_elements as $key => $th ) {
|
356 |
-
$values[ $key ]['title'] = $th;
|
357 |
-
$values[ $key ]['style'] = "";
|
358 |
}
|
|
|
359 |
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
377 |
-
|
378 |
-
|
379 |
-
$
|
380 |
-
|
381 |
-
|
382 |
-
$
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
-
$mlw_complete_seconds = $mlw_qmn_results_array[0] % 60;
|
393 |
-
$mlw_complete_time .= "$mlw_complete_seconds seconds";
|
394 |
-
}
|
395 |
|
396 |
-
|
397 |
-
|
398 |
|
399 |
-
|
400 |
-
|
401 |
-
$values['score']['content'][] = esc_html__( 'Not Graded', 'quiz-master-next' );
|
402 |
-
} else {
|
403 |
-
if ( 0 === intval( $mlw_quiz_info->quiz_system ) ) {
|
404 |
-
$values['score']['content'][] = sprintf( '%1$s %2$s %3$s %4$s %5$s', esc_html( $mlw_quiz_info->correct ), esc_html__( 'out of', 'quiz-master-next' ), esc_html( $out_of_q ), esc_html__( 'or', 'quiz-master-next' ), esc_html( $mlw_quiz_info->correct_score ) );
|
405 |
-
} elseif ( 1 === intval( $mlw_quiz_info->quiz_system ) ) {
|
406 |
-
$values['score']['content'][] = sprintf( '%1$s %2$s', esc_html( $mlw_quiz_info->point_score ), esc_html__( 'Points', 'quiz-master-next' ) );
|
407 |
-
} elseif ( 3 === intval( $mlw_quiz_info->quiz_system ) ) {
|
408 |
-
$values['score']['content'][] = sprintf( '%1$s %2$s %3$s %4$s %5$s <br /> %6$s %7$s', esc_html( $mlw_quiz_info->correct ), esc_html__( 'out of', 'quiz-master-next' ), esc_html( $out_of_q ), esc_html__( 'or', 'quiz-master-next' ), esc_html( $mlw_quiz_info->correct_score ), esc_html( $mlw_quiz_info->point_score ), esc_html__( 'Points', 'quiz-master-next' ) );
|
409 |
-
} else {
|
410 |
$values['score']['content'][] = esc_html__( 'Not Graded', 'quiz-master-next' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
}
|
412 |
}
|
413 |
-
}
|
414 |
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
|
|
440 |
}
|
441 |
-
}
|
442 |
|
443 |
-
|
444 |
-
|
445 |
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
|
|
464 |
}
|
465 |
}
|
466 |
}
|
467 |
}
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
478 |
}
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
<
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
|
|
|
|
494 |
}
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
<
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
</
|
506 |
-
|
507 |
-
<div id="delete_dialog" title="Delete Results?" style="display:none;">
|
508 |
-
<h3><b><?php esc_html_e( 'Are you sure you want to delete these results?', 'quiz-master-next' ); ?></b></h3>
|
509 |
-
<form action='' method='post'>
|
510 |
-
<?php wp_nonce_field( 'delete_results', 'delete_results_nonce' ); ?>
|
511 |
-
<input type='hidden' id='result_id' name='result_id' value='' />
|
512 |
-
<input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
|
513 |
-
<p class='submit'><input type='submit' class='button-primary'
|
514 |
-
value='<?php esc_html_e( 'Delete Results', 'quiz-master-next' ); ?>' /></p>
|
515 |
</form>
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
<
|
520 |
-
|
521 |
-
|
522 |
-
<
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
<
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
<
|
537 |
-
<
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
<
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
<
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
</div>
|
558 |
</div>
|
559 |
-
</div>
|
560 |
|
561 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
}
|
563 |
-
?>
|
18 |
|
19 |
// Retrieves the current stab and all registered tabs.
|
20 |
global $mlwQuizMasterNext;
|
21 |
+
$active_tab = strtolower( str_replace( ' ', '-', isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : __( 'Quiz Results', 'quiz-master-next' ) ) );
|
22 |
+
$tab_array = $mlwQuizMasterNext->pluginHelper->get_admin_results_tabs();
|
|
|
23 |
?>
|
24 |
+
<div class="wrap">
|
25 |
+
<div>
|
26 |
+
<h2 id="result_details">
|
27 |
+
<?php esc_html_e( 'Quiz Results', 'quiz-master-next' ); ?>
|
28 |
+
<span id="results-screen-option-button" class="button">Screen Options</span>
|
29 |
+
</h2>
|
30 |
+
</div>
|
31 |
+
<?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
|
32 |
+
<?php qsm_show_adverts(); ?>
|
33 |
+
<h2 class="nav-tab-wrapper">
|
34 |
+
<?php
|
35 |
// Cycles through the tabs and creates the navigation.
|
36 |
foreach ( $tab_array as $tab ) {
|
37 |
$active_class = '';
|
40 |
}
|
41 |
$tab_url = "?page=mlw_quiz_results&tab={$tab['slug']}";
|
42 |
?>
|
43 |
+
<a href="<?php echo esc_url_raw( $tab_url ); ?>" class="nav-tab <?php echo esc_attr( $active_class ); ?>"><?php echo wp_kses_post( $tab['title'] ); ?></a>
|
44 |
+
<?php
|
|
|
45 |
}
|
46 |
?>
|
47 |
+
</h2>
|
48 |
+
<div class="result-page-wrapper">
|
49 |
+
<?php
|
50 |
// Locates the active tab and calls its content function.
|
51 |
foreach ( $tab_array as $tab ) {
|
52 |
if ( $active_tab === $tab['slug'] ) {
|
54 |
}
|
55 |
}
|
56 |
?>
|
57 |
+
</div>
|
58 |
</div>
|
59 |
+
<?php
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
68 |
function qsm_results_overview_tab() {
|
69 |
global $mlwQuizMasterNext;
|
70 |
$mlwQuizMasterNext->pluginHelper->register_admin_results_tab( __( 'Quiz Results', 'quiz-master-next' ), 'qsm_results_overview_tab_content' );
|
71 |
+
if ( ! class_exists( 'QSM_Analysis' ) ) {
|
72 |
+
$mlwQuizMasterNext->pluginHelper->register_admin_results_tab( __( 'Reporting And Analysis', 'quiz-master-next' ), 'qsm_reporting_analysis_tabs_content' );
|
73 |
+
}
|
74 |
}
|
75 |
|
76 |
add_action( 'plugins_loaded', 'qsm_results_overview_tab' );
|
91 |
|
92 |
$mlw_delete_results_id = isset( $_POST['result_id'] ) ? intval( $_POST['result_id'] ) : 0;
|
93 |
$mlw_delete_results_name = isset( $_POST['delete_quiz_name'] ) ? sanitize_text_field( wp_unslash( $_POST['delete_quiz_name'] ) ) : '';
|
94 |
+
do_action( 'qsm_before_delete_result', $mlw_delete_results_id );
|
95 |
// Updates table to mark results as deleted.
|
96 |
+
$results = $wpdb->update( $wpdb->prefix . 'mlw_results', array( 'deleted' => 1 ), array( 'result_id' => $mlw_delete_results_id ), array( '%d' ), array( '%d' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
if ( false === $results ) {
|
99 |
$error = $wpdb->last_error;
|
106 |
} else {
|
107 |
$mlwQuizMasterNext->alertManager->newAlert( __( 'Your results has been deleted successfully.', 'quiz-master-next' ), 'success' );
|
108 |
$mlwQuizMasterNext->audit_manager->new_audit( "Results Has Been Deleted From:", $mlw_delete_results_name, "" );
|
|
|
109 |
}
|
110 |
}
|
111 |
|
112 |
// Check if bulk delete has been selected. If so, verify nonce.
|
113 |
if ( isset( $_POST["bulk_delete"], $_POST['bulk_delete_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['bulk_delete_nonce'] ) ), 'bulk_delete' ) ) {
|
114 |
|
115 |
+
// Ensure the POST variable is an array
|
116 |
if ( isset( $_POST["delete_results"] ) && is_array( $_POST["delete_results"] ) ) {
|
117 |
$delete_results = array_map( 'sanitize_text_field', wp_unslash( $_POST["delete_results"] ) );
|
118 |
|
123 |
$result_id = intval( $result );
|
124 |
if ( isset( $_POST['bulk_permanent_delete'] ) && 1 === intval( sanitize_text_field( wp_unslash( $_POST['bulk_permanent_delete'] ) ) ) ) {
|
125 |
$wpdb->delete(
|
126 |
+
$wpdb->prefix . "mlw_results", array( 'result_id' => $result_id )
|
|
|
127 |
);
|
128 |
} else {
|
129 |
$wpdb->update(
|
130 |
+
$wpdb->prefix . "mlw_results", array( 'deleted' => 1 ), array( 'result_id' => $result_id ), array( '%d' ), array( '%d' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
);
|
132 |
}
|
133 |
}
|
137 |
}
|
138 |
|
139 |
// Prepares the SQL to retrieve the results.
|
140 |
+
$table_limit = 40;
|
141 |
+
$search_phrase_sql = '';
|
142 |
+
$delete = 'deleted=0';
|
143 |
+
$delete = apply_filters( 'qsm_results_delete_clause', $delete );
|
144 |
+
$order_by_sql = 'ORDER BY time_taken_real DESC';
|
145 |
if ( isset( $_GET['qsm_search_phrase'] ) && ! empty( $_GET['qsm_search_phrase'] ) ) {
|
146 |
// Sanitizes the search phrase and then uses $wpdb->prepare to properly escape the queries after using $wpdb->esc_like.
|
147 |
$sanitized_search_phrase = sanitize_text_field( wp_unslash( $_GET['qsm_search_phrase'] ) );
|
149 |
$search_phrase_sql = $wpdb->prepare( ' AND (quiz_name LIKE %s OR name LIKE %s OR business LIKE %s OR email LIKE %s OR phone LIKE %s)', $search_phrase_percents, $search_phrase_percents, $search_phrase_percents, $search_phrase_percents, $search_phrase_percents );
|
150 |
}
|
151 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
152 |
+
$quiz_id = intval( $_GET['quiz_id'] );
|
153 |
+
$qsm_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM {$wpdb->prefix}mlw_results WHERE {$delete} AND quiz_id='{$quiz_id}' {$search_phrase_sql}" );
|
154 |
} else {
|
155 |
$qsm_results_count = $wpdb->get_var( "SELECT COUNT(result_id) FROM {$wpdb->prefix}mlw_results WHERE {$delete} {$search_phrase_sql}" );
|
156 |
}
|
159 |
if ( isset( $_GET['qmn_order_by'] ) ) {
|
160 |
switch ( $_GET['qmn_order_by'] ) {
|
161 |
case 'quiz_name':
|
162 |
+
$order_by = 'quiz_name';
|
163 |
+
$order_by_sql = ' ORDER BY quiz_name DESC';
|
164 |
break;
|
165 |
case 'name':
|
166 |
+
$order_by = 'name';
|
167 |
+
$order_by_sql = ' ORDER BY name DESC';
|
168 |
break;
|
169 |
case 'point_score':
|
170 |
+
$order_by = 'point_score';
|
171 |
+
$order_by_sql = ' ORDER BY point_score DESC';
|
172 |
break;
|
173 |
case 'correct_score':
|
174 |
+
$order_by = 'correct_score';
|
175 |
+
$order_by_sql = ' ORDER BY correct_score DESC';
|
176 |
break;
|
177 |
default:
|
178 |
+
$order_by = 'time_taken_real';
|
179 |
+
$order_by_sql = ' ORDER BY time_taken_real DESC';
|
180 |
}
|
181 |
}
|
182 |
|
183 |
if ( isset( $_GET['qsm_results_page'] ) ) {
|
184 |
+
$result_page = intval( $_GET['qsm_results_page'] ) + 1;
|
185 |
+
$result_begin = $table_limit * $result_page;
|
186 |
} else {
|
187 |
+
$result_page = 0;
|
188 |
+
$result_begin = 0;
|
189 |
}
|
190 |
$results_left = $qsm_results_count - ( $result_page * $table_limit );
|
191 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
192 |
+
$quiz_id = intval( $_GET['quiz_id'] );
|
193 |
+
$mlw_quiz_data = $wpdb->get_results( stripslashes( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE $delete AND quiz_id = %d $search_phrase_sql $order_by_sql LIMIT %d, %d", $quiz_id, $result_begin, $table_limit ) ) );
|
194 |
} else {
|
195 |
+
$mlw_quiz_data = $wpdb->get_results( stripslashes( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE $delete $search_phrase_sql $order_by_sql LIMIT %d, %d", $result_begin, $table_limit ) ) );
|
196 |
}
|
|
|
197 |
?>
|
198 |
+
<div class="tablenav top">
|
199 |
+
<div class="alignleft actions bulkactions">
|
200 |
+
<a id="result_bulkaction" href="javascript: void(0);" onclick="if ( confirm( 'Are you sure?' ) ) {
|
201 |
+
document.bulk_delete_form.submit();
|
202 |
+
}" class="button action">Bulk Delete</a>
|
203 |
+
<a href="javascript: void(0);" onclick="if ( confirm( 'Are you sure?' ) ) {
|
204 |
+
document.getElementById( 'bulk_permanent_delete' ).value = '1';
|
205 |
+
document.bulk_delete_form.submit();
|
206 |
+
}" class="button action">Bulk Permanent Delete</a>
|
207 |
+
</div>
|
208 |
+
<div class="tablenav-pages">
|
209 |
+
<span class="displaying-num">
|
210 |
+
<?php
|
211 |
+
/* translators: %s: Result Count */
|
212 |
+
echo esc_html( sprintf( _n( '%s result', '%s results', $qsm_results_count, 'quiz-master-next' ), number_format_i18n( $qsm_results_count ) ) );
|
213 |
+
?>
|
214 |
+
</span>
|
215 |
+
<span class="pagination-links">
|
216 |
+
<?php
|
217 |
+
$mlw_qmn_previous_page = 0;
|
218 |
+
$mlw_current_page = $result_page + 1;
|
219 |
+
$mlw_total_pages = ceil( $qsm_results_count / $table_limit );
|
220 |
|
221 |
$url_query_string = '';
|
222 |
if ( isset( $_GET['quiz_id'] ) && ! empty( $_GET['quiz_id'] ) ) {
|
253 |
$mlw_qmn_previous_page = $result_page - 2;
|
254 |
?>
|
255 |
<a class="prev-page button" href="<?php echo esc_url_raw( "?page=mlw_quiz_results&qsm_results_page=$mlw_qmn_previous_page$url_query_string" ); ?>"><< /a>
|
256 |
+
<span class="paging-input"><?php echo esc_html( $mlw_current_page ); ?> of <?php echo esc_html( $mlw_total_pages ); ?></span>
|
257 |
+
<a class="next-page button" href="<?php echo esc_url_raw( "?page=mlw_quiz_results&qsm_results_page=$result_page$url_query_string" ); ?>">></a>
|
258 |
+
<?php
|
259 |
+
}
|
260 |
+
?>
|
261 |
+
</span>
|
262 |
+
<br class="clear">
|
263 |
+
</div>
|
264 |
+
<form action='' method="get">
|
265 |
+
<?php
|
266 |
if ( isset( $_GET['quiz_id'] ) ) {
|
267 |
?>
|
268 |
+
<input type="hidden" name="quiz_id" value="<?php echo intval( $_GET['quiz_id'] ); ?>" />
|
269 |
+
<?php
|
270 |
}
|
271 |
+
$qsm_search_phrase = ( isset( $_GET['qsm_search_phrase'] ) ) ? sanitize_text_field( wp_unslash( $_GET['qsm_search_phrase'] ) ) : '';
|
272 |
+
$qmn_order_by = ( isset( $_GET['qmn_order_by'] ) && ! empty( $_GET['qmn_order_by'] ) ) ? sanitize_text_field( wp_unslash( $_GET['qmn_order_by'] ) ) : 'default';
|
273 |
?>
|
274 |
+
<input type="hidden" name="page" value="mlw_quiz_results">
|
275 |
+
<p class="search-box">
|
276 |
+
<label for="qsm_search_phrase"><?php esc_html_e( 'Search Results', 'quiz-master-next' ); ?></label>
|
277 |
+
<input type="search" id="qsm_search_phrase" name="qsm_search_phrase" value="<?php echo esc_attr( $qsm_search_phrase ); ?>">
|
278 |
+
<label for="qmn_order_by"><?php esc_html_e( 'Order By', 'quiz-master-next' ); ?></label>
|
279 |
+
<select id="qmn_order_by" name="qmn_order_by">
|
280 |
+
<option value="default" <?php selected( $qmn_order_by, 'default' ); ?>><?php esc_html_e( 'Default (Time)', 'quiz-master-next' ); ?></option>
|
281 |
+
<option value="quiz_name" <?php selected( $qmn_order_by, 'quiz_name' ); ?>><?php esc_html_e( 'Quiz Name', 'quiz-master-next' ); ?></option>
|
282 |
+
<option value="name" <?php selected( $qmn_order_by, 'name' ); ?>><?php esc_html_e( 'User Name', 'quiz-master-next' ); ?></option>
|
283 |
+
<option value="point_score" <?php selected( $qmn_order_by, 'point_score' ); ?>><?php esc_html_e( 'Points', 'quiz-master-next' ); ?></option>
|
284 |
+
<option value="correct_score" <?php selected( $qmn_order_by, 'correct_score' ); ?>><?php esc_html_e( 'Correct Percent', 'quiz-master-next' ); ?></option>
|
285 |
+
</select>
|
286 |
+
<button class="button"><?php esc_html_e( 'Search Results', 'quiz-master-next' ); ?></button>
|
287 |
+
</p>
|
288 |
+
</form>
|
289 |
+
</div>
|
290 |
+
<?php
|
291 |
//process screen options
|
292 |
+
$user_id = get_current_user_id();
|
293 |
+
if ( isset( $_POST["results-screen_option_nonce"] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST["results-screen_option_nonce"] ) ), 'results_screen_option' ) ) {
|
294 |
+
$results_screen_option['page_url'] = isset( $_POST['page_url'] ) ? sanitize_text_field( wp_unslash( $_POST['page_url'] ) ) : "0";
|
295 |
+
$results_screen_option['page_name'] = isset( $_POST['page_name'] ) ? sanitize_text_field( wp_unslash( $_POST['page_name'] ) ) : "0";
|
296 |
+
$results_screen_option['business'] = isset( $_POST['business'] ) ? sanitize_text_field( wp_unslash( $_POST['business'] ) ) : "0";
|
297 |
+
$results_screen_option['phone'] = isset( $_POST['phone'] ) ? sanitize_text_field( wp_unslash( $_POST['phone'] ) ) : "0";
|
298 |
+
$results_screen_option['ip_address'] = isset( $_POST['ip_address'] ) ? sanitize_text_field( wp_unslash( $_POST['ip_address'] ) ) : "0";
|
299 |
+
//set screen option as user meta
|
300 |
+
add_user_meta( $user_id, 'results_screen_option', $results_screen_option, true );
|
301 |
+
} else {
|
302 |
+
$results_screen_option = get_user_meta( $user_id, 'results_screen_option', true );
|
303 |
+
$results_screen_option = ! empty( $results_screen_option ) ? $results_screen_option : '';
|
304 |
+
if ( empty( $results_screen_option ) ) {
|
305 |
+
$results_screen_option = array(
|
306 |
+
'page_url' => '0',
|
307 |
+
'page_name' => '0',
|
308 |
+
'business' => '1',
|
309 |
+
'phone' => '1',
|
310 |
+
'ip_address' => '1',
|
311 |
+
);
|
312 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
}
|
314 |
+
?>
|
315 |
|
316 |
+
<form action="" method="post" name="bulk_delete_form">
|
317 |
+
<input type="hidden" name="bulk_delete" value="confirmation" />
|
318 |
+
<input type="hidden" name="bulk_permanent_delete" id="bulk_permanent_delete" value="0" />
|
319 |
+
<?php
|
320 |
+
wp_nonce_field( 'bulk_delete', 'bulk_delete_nonce' );
|
321 |
+
|
322 |
+
$th_elements = apply_filters( 'mlw_qmn_admin_results_page_headings', array(
|
323 |
+
'score' => __( 'Score', 'quiz-master-next' ),
|
324 |
+
'time_complete' => __( 'Time To Complete', 'quiz-master-next' ),
|
325 |
+
'name' => __( 'Name', 'quiz-master-next' ),
|
326 |
+
'business' => __( 'Business', 'quiz-master-next' ),
|
327 |
+
'email' => __( 'Email', 'quiz-master-next' ),
|
328 |
+
'phone' => __( 'Phone', 'quiz-master-next' ),
|
329 |
+
'user' => __( 'User', 'quiz-master-next' ),
|
330 |
+
'time_taken' => __( 'Time Taken', 'quiz-master-next' ),
|
331 |
+
'ip' => __( 'IP Address', 'quiz-master-next' ),
|
332 |
+
'page_name' => __( 'Page Name', 'quiz-master-next' ),
|
333 |
+
'page_url' => __( 'Page URL', 'quiz-master-next' ),
|
334 |
+
) );
|
335 |
+
|
336 |
+
$values = $quiz_infos = [];
|
337 |
+
foreach ( $th_elements as $key => $th ) {
|
338 |
+
$values[ $key ]['title'] = $th;
|
339 |
+
$values[ $key ]['style'] = "";
|
340 |
+
}
|
341 |
|
342 |
+
$display_none = ' style=display:none; ';
|
343 |
+
if ( "0" === $results_screen_option['page_url'] ) {
|
344 |
+
$values['page_url']['style'] = $display_none;
|
345 |
+
}
|
346 |
+
if ( "0" === $results_screen_option['page_name'] ) {
|
347 |
+
$values['page_name']['style'] = $display_none;
|
348 |
+
}
|
349 |
+
if ( "0" === $results_screen_option['business'] ) {
|
350 |
+
$values['business']['style'] = $display_none;
|
351 |
+
}
|
352 |
+
if ( "0" === $results_screen_option['phone'] ) {
|
353 |
+
$values['phone']['style'] = $display_none;
|
354 |
+
}
|
355 |
+
if ( "0" === $results_screen_option['ip_address'] ) {
|
356 |
+
$values['ip']['style'] = $display_none;
|
357 |
+
}
|
358 |
+
|
359 |
+
if ( $mlw_quiz_data ) {
|
360 |
+
foreach ( $mlw_quiz_data as $mlw_quiz_info ) {
|
361 |
+
$quiz_infos[] = $mlw_quiz_info;
|
362 |
+
$mlw_complete_time = '';
|
363 |
+
$mlw_qmn_results_array = maybe_unserialize( $mlw_quiz_info->quiz_results );
|
364 |
+
$hidden_questions = isset( $mlw_qmn_results_array['hidden_questions'] ) ? count( $mlw_qmn_results_array['hidden_questions'] ) : 0;
|
365 |
+
if ( is_array( $mlw_qmn_results_array ) ) {
|
366 |
+
$mlw_complete_hours = floor( $mlw_qmn_results_array[0] / 3600 );
|
367 |
+
if ( $mlw_complete_hours > 0 ) {
|
368 |
+
$mlw_complete_time .= "$mlw_complete_hours hours ";
|
369 |
+
}
|
370 |
+
$mlw_complete_minutes = floor( ( $mlw_qmn_results_array[0] % 3600 ) / 60 );
|
371 |
+
if ( $mlw_complete_minutes > 0 ) {
|
372 |
+
$mlw_complete_time .= "$mlw_complete_minutes minutes ";
|
373 |
+
}
|
374 |
+
$mlw_complete_seconds = $mlw_qmn_results_array[0] % 60;
|
375 |
+
$mlw_complete_time .= "$mlw_complete_seconds seconds";
|
376 |
}
|
|
|
|
|
|
|
377 |
|
378 |
+
$out_of_q = $mlw_quiz_info->total - $hidden_questions;
|
379 |
+
$form_type = isset( $mlw_quiz_info->form_type ) ? $mlw_quiz_info->form_type : 0;
|
380 |
|
381 |
+
if ( isset( $values['score'] ) ) {
|
382 |
+
if ( 1 === intval( $form_type ) || 2 === intval( $form_type ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
$values['score']['content'][] = esc_html__( 'Not Graded', 'quiz-master-next' );
|
384 |
+
} else {
|
385 |
+
if ( 0 === intval( $mlw_quiz_info->quiz_system ) ) {
|
386 |
+
$values['score']['content'][] = sprintf( '%1$s %2$s %3$s %4$s %5$s', esc_html( $mlw_quiz_info->correct ), esc_html__( 'out of', 'quiz-master-next' ), esc_html( $out_of_q ), esc_html__( 'or', 'quiz-master-next' ), esc_html( $mlw_quiz_info->correct_score ) );
|
387 |
+
} elseif ( 1 === intval( $mlw_quiz_info->quiz_system ) ) {
|
388 |
+
$values['score']['content'][] = sprintf( '%1$s %2$s', esc_html( $mlw_quiz_info->point_score ), esc_html__( 'Points', 'quiz-master-next' ) );
|
389 |
+
} elseif ( 3 === intval( $mlw_quiz_info->quiz_system ) ) {
|
390 |
+
$values['score']['content'][] = sprintf( '%1$s %2$s %3$s %4$s %5$s <br /> %6$s %7$s', esc_html( $mlw_quiz_info->correct ), esc_html__( 'out of', 'quiz-master-next' ), esc_html( $out_of_q ), esc_html__( 'or', 'quiz-master-next' ), esc_html( $mlw_quiz_info->correct_score ), esc_html( $mlw_quiz_info->point_score ), esc_html__( 'Points', 'quiz-master-next' ) );
|
391 |
+
} else {
|
392 |
+
$values['score']['content'][] = esc_html__( 'Not Graded', 'quiz-master-next' );
|
393 |
+
}
|
394 |
}
|
395 |
}
|
|
|
396 |
|
397 |
+
if ( isset( $values['time_complete'] ) ) {
|
398 |
+
$values['time_complete']['content'][] = $mlw_complete_time;
|
399 |
+
}
|
400 |
|
401 |
+
if ( isset( $values['name'] ) ) {
|
402 |
+
$values['name']['content'][] = $mlw_quiz_info->name;
|
403 |
+
}
|
404 |
|
405 |
+
if ( isset( $values['business'] ) ) {
|
406 |
+
$values['business']['content'][] = $mlw_quiz_info->business;
|
407 |
+
}
|
408 |
|
409 |
+
if ( isset( $values['email'] ) ) {
|
410 |
+
$values['email']['content'][] = $mlw_quiz_info->email;
|
411 |
+
}
|
412 |
|
413 |
+
if ( isset( $values['phone'] ) ) {
|
414 |
+
$values['phone']['content'][] = $mlw_quiz_info->phone;
|
415 |
+
}
|
416 |
|
417 |
+
if ( isset( $values['user'] ) ) {
|
418 |
+
if ( 0 === intval( $mlw_quiz_info->user ) ) {
|
419 |
+
$values['user']['content'][] = esc_html__( 'Visitor', 'quiz-master-next' );
|
420 |
+
} else {
|
421 |
+
$values['user']['content'][] = '<a href="' . esc_url( admin_url( 'user-edit.php?user_id=' . $mlw_quiz_info->user ) ) . '">' . esc_html( $mlw_quiz_info->user ) . '</a>';
|
422 |
+
}
|
423 |
}
|
|
|
424 |
|
425 |
+
$date = gmdate( get_option( 'date_format' ), strtotime( $mlw_quiz_info->time_taken ) );
|
426 |
+
$time = gmdate( "h:i:s A", strtotime( $mlw_quiz_info->time_taken ) );
|
427 |
|
428 |
+
if ( isset( $values['time_taken'] ) ) {
|
429 |
+
$values['time_taken']['content'][] = '<abbr title="' . esc_attr( $date . $time ) . '">' . esc_html( $date ) . '</abbr>';
|
430 |
+
}
|
431 |
|
432 |
+
if ( isset( $values['ip'] ) ) {
|
433 |
+
$values['ip']['content'][] = $mlw_quiz_info->user_ip;
|
434 |
+
}
|
435 |
+
if ( isset( $values['page_name'] ) ) {
|
436 |
+
$values['page_name']['content'][] = $mlw_quiz_info->page_name;
|
437 |
+
}
|
438 |
+
if ( isset( $values['page_url'] ) ) {
|
439 |
+
$values['page_url']['content'][] = '<a href="' . esc_url( $mlw_quiz_info->page_url ) . '">' . esc_html( $mlw_quiz_info->page_url ) . '</a>';
|
440 |
+
}
|
441 |
+
foreach ( $values as $k => $v ) {
|
442 |
+
if ( ! in_array( $k, [ 'score', 'time_complete', 'name', 'business', 'email', 'phone', 'user', 'time_taken', 'ip', 'page_name', 'page_url' ], true ) ) {
|
443 |
+
$content = apply_filters( 'mlw_qmn_admin_results_page_column_content', '', $mlw_quiz_info, $k );
|
444 |
+
if ( isset( $values[ $k ] ) && ! empty( $content ) ) {
|
445 |
+
$values[ $k ]['content'][] = $content;
|
446 |
+
}
|
447 |
}
|
448 |
}
|
449 |
}
|
450 |
}
|
451 |
+
?>
|
452 |
+
|
453 |
+
<table class="widefat" aria-label="<?php esc_html_e( 'Results Table', 'quiz-master-next' ); ?>">
|
454 |
+
<thead>
|
455 |
+
<tr>
|
456 |
+
<th><input type="checkbox" id="qmn_check_all" /></th>
|
457 |
+
<th><?php esc_html_e( 'Quiz Name', 'quiz-master-next' ); ?></th>
|
458 |
+
<?php
|
459 |
+
foreach ( $values as $k => $v ) {
|
460 |
+
if ( ! empty( $v['content'] ) ) {
|
461 |
+
echo '<th' . esc_html( $v['style'] ) . '>' . esc_html( $v['title'] ) . '</th>';
|
462 |
+
}
|
463 |
}
|
464 |
+
?>
|
465 |
+
</tr>
|
466 |
+
</thead>
|
467 |
+
<tbody id="the-list">
|
468 |
+
<?php
|
469 |
+
$co = ! empty( $quiz_infos ) ? count( $quiz_infos ) : 0;
|
470 |
+
if ( $co > 0 ) {
|
471 |
+
for ( $x = 0; $x < $co; $x++ ) {
|
472 |
+
?>
|
473 |
+
<tr>
|
474 |
+
<td><input type="checkbox" class="qmn_delete_checkbox" name="delete_results[]" value="<?php echo esc_attr( $quiz_infos[ $x ]->result_id ); ?>" /></td>
|
475 |
+
<td><span style="font-size:16px;"><?php echo esc_html( $quiz_infos[ $x ]->quiz_name ); ?></span><div class="row-actions"><span style="color:green;font-size:16px;"><a href="admin.php?page=qsm_quiz_result_details&result_id=<?php echo esc_attr( $quiz_infos[ $x ]->result_id ); ?>"><?php esc_html_e( 'View', 'quiz-master-next' ); ?></a> | <a style="color: red;" class="delete_table_quiz_results_item" data-quiz-id="<?php echo esc_attr( $quiz_infos[ $x ]->result_id ); ?>" data-quiz-name="<?php echo esc_attr( $quiz_infos[ $x ]->quiz_name ); ?>" href='#'><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></a></span></div></td>
|
476 |
+
<?php
|
477 |
+
foreach ( $values as $k => $v ) {
|
478 |
+
if ( isset( $v['content'][ $x ] ) ) {
|
479 |
+
echo '<td' . esc_html( $v['style'] ) . '><span style="font-size:16px;">' . wp_kses_post( apply_filters( 'mlw_qmn_admin_results_page_result', $v['content'][ $x ], $quiz_infos[ $x ], $k ) ) . '</span></td>';
|
480 |
+
}
|
481 |
}
|
482 |
+
?>
|
483 |
+
</tr><?php
|
484 |
+
}
|
485 |
+
} else {
|
486 |
+
?>
|
487 |
+
<tr>
|
488 |
+
<td colspan="12" style="text-align: center;"><?php esc_html_e( 'No record found.', 'quiz-master-next' ); ?></td>
|
489 |
+
</tr><?php }
|
490 |
+
?>
|
491 |
+
</tbody>
|
492 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
</form>
|
494 |
+
|
495 |
+
<div id="delete_dialog" title="Delete Results?" style="display:none;">
|
496 |
+
<h3><b><?php esc_html_e( 'Are you sure you want to delete these results?', 'quiz-master-next' ); ?></b></h3>
|
497 |
+
<form action='' method='post'>
|
498 |
+
<?php wp_nonce_field( 'delete_results', 'delete_results_nonce' ); ?>
|
499 |
+
<input type='hidden' id='result_id' name='result_id' value='' />
|
500 |
+
<input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
|
501 |
+
<p class='submit'><input type='submit' class='button-primary' value='<?php esc_html_e( 'Delete Results', 'quiz-master-next' ); ?>' /></p>
|
502 |
+
</form>
|
503 |
+
</div>
|
504 |
+
|
505 |
+
<!-- Popup for screen options -->
|
506 |
+
<div class="qsm-popup qsm-popup-slide" id="modal-results-screen-option" aria-hidden="true">
|
507 |
+
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
508 |
+
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-results-screen-option-title">
|
509 |
+
<header class="qsm-popup__header">
|
510 |
+
<h2 class="qsm-popup__title" id="modal-results-screen-option-title"><?php esc_html_e( 'Choose Columns to hide/show', 'quiz-master-next' ); ?></h2>
|
511 |
+
<a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
|
512 |
+
</header>
|
513 |
+
<main class="qsm-popup__content" id="modal-results-screen-option-content">
|
514 |
+
<form action='' method='post' id="results-screen-option-form" style="display:flex; flex-direction:column;">
|
515 |
+
<label>
|
516 |
+
<input type="checkbox" value="1" name="page_url" <?php checked( $results_screen_option['page_url'], "1", true ) ?>/>
|
517 |
+
<?php esc_html_e( 'Page URL', 'quiz-master-next' ); ?>
|
518 |
+
</label>
|
519 |
+
<label>
|
520 |
+
<input type="checkbox" name="page_name" value="1" <?php checked( $results_screen_option['page_name'], "1", true ) ?>/>
|
521 |
+
<?php esc_html_e( 'Page Name', 'quiz-master-next' ); ?>
|
522 |
+
</label>
|
523 |
+
<label>
|
524 |
+
<input type="checkbox" value="1" name="business" <?php checked( $results_screen_option['business'], "1", true ) ?>/>
|
525 |
+
<?php esc_html_e( 'Business', 'quiz-master-next' ); ?>
|
526 |
+
</label>
|
527 |
+
<label>
|
528 |
+
<input type="checkbox" name="phone" value="1" <?php checked( $results_screen_option['phone'], "1", true ) ?>/>
|
529 |
+
<?php esc_html_e( 'Phone', 'quiz-master-next' ); ?>
|
530 |
+
</label>
|
531 |
+
<label>
|
532 |
+
<input type="checkbox" name="ip_address" value="1" <?php checked( $results_screen_option['ip_address'], "1", true ) ?>/>
|
533 |
+
<?php esc_html_e( 'IP Address', 'quiz-master-next' ); ?>
|
534 |
+
</label>
|
535 |
+
<?php wp_nonce_field( 'results_screen_option', 'results-screen_option_nonce' ); ?>
|
536 |
+
</form>
|
537 |
+
</main>
|
538 |
+
<footer class="qsm-popup__footer">
|
539 |
+
<button id="save-results-screen-option-button"
|
540 |
+
class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Save', 'quiz-master-next' ); ?></button>
|
541 |
+
<button class="qsm-popup__btn" data-micromodal-close
|
542 |
+
aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
543 |
+
</footer>
|
544 |
+
</div>
|
545 |
</div>
|
546 |
</div>
|
|
|
547 |
|
548 |
+
<?php
|
549 |
+
}
|
550 |
+
|
551 |
+
function qsm_reporting_analysis_tabs_content() {
|
552 |
+
?>
|
553 |
+
<div class="qsm-upgrade-box">
|
554 |
+
<div class="qsm-popup-upgrade-warning">
|
555 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/warning.png' ); ?>" alt="warning">
|
556 |
+
<span><?php esc_html_e( 'Reporting & Analysis Addon required', 'quiz-master-next' ) ?></span>
|
557 |
+
</div>
|
558 |
+
<h2><?php esc_html_e( 'Reporting & Analysis', 'quiz-master-next' ); ?></h2>
|
559 |
+
<div class="qsm-upgrade-text qsm-popup-upgrade-text">
|
560 |
+
<?php esc_html_e( 'Transform your quiz/survey results into numbers with QSM Reporting & Analysis! Implement simple & advanced data analysis techniques to measure questions effectiveness and show the user results in the form of Pie Charts. Reporting & Analysis addon by QSM will make your life easier as a question designer by using a variety of charts and graphs and exporting the results in bulk.', 'quiz-master-next' ); ?>
|
561 |
+
</div>
|
562 |
+
<div class="qsm-upgrade-text"></div>
|
563 |
+
<span class="qsm-upgrade-read-icon">
|
564 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/read_icon.png' ); ?>" alt="read">
|
565 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/add-ons/reporting-analysis/', 'quiz-upgrade-box', 'add-ons' ) ); ?>" target="_blank" rel="noopener" >
|
566 |
+
<?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?><span class="dashicons dashicons-arrow-right-alt qsm-upgrade-right-arrow" ></span>
|
567 |
+
</a>
|
568 |
+
</span>
|
569 |
+
<div class="qsm-upgrade-chart"><img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/report_analysis_chart.png' ); ?>" alt="chart"></div>
|
570 |
+
<div class="qsm-popup-upgrade-info">
|
571 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/info.png' ); ?>" alt="information">
|
572 |
+
<span><?php esc_html_e( 'QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today. OR you can buy Reporting & Analysis Addon separately.', 'quiz-master-next' ) ?></span>
|
573 |
+
</div>
|
574 |
+
<div class="qsm-upgrade-buttons qsm-upgrade-buttons-report-analysis">
|
575 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'pricing', 'quiz-list-page' ) ); ?>" target="_blank" class="qsm-popup__btn qsm-popup__btn-primary qsm_bundle" rel="noopener"><?php esc_html_e( 'Upgrade to QSM Pro', 'quiz-master-next' ); ?></a>
|
576 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'downloads/results-analysis', 'quiz-list-page' ) ); ?>" target="_blank" class="qsm_report_analysis" rel="noopener" ><?php esc_html_e( 'Buy Reporting & Analysis Addon', 'quiz-master-next' ); ?></a>
|
577 |
+
</div>
|
578 |
+
</div>
|
579 |
+
<?php
|
580 |
}
|
|
php/admin/functions.php
CHANGED
@@ -1,25 +1,26 @@
|
|
1 |
<?php
|
2 |
$themes_data = array();
|
3 |
global $pro_themes;
|
4 |
-
$pro_themes
|
5 |
|
6 |
/**
|
7 |
* @since 6.4.5
|
8 |
* @param
|
9 |
*/
|
10 |
function qsm_fetch_data_from_xml() {
|
11 |
-
$file
|
12 |
-
$response
|
13 |
|
14 |
if ( is_wp_error( $response ) || 404 === $response['response']['code'] ) {
|
15 |
return '<p>' . __( 'Something went wrong', 'quiz-master-next' ) . '</p>';
|
16 |
} else {
|
17 |
-
$body
|
18 |
-
return $xml
|
19 |
}
|
20 |
}
|
21 |
|
22 |
add_action( 'qmn_quiz_created', 'qsm_redirect_to_edit_page', 10, 1 );
|
|
|
23 |
/**
|
24 |
* @since 6.4.5
|
25 |
* @param int $quiz_id Quiz id.
|
@@ -45,6 +46,7 @@ function link_featured_image( $quiz_id ) {
|
|
45 |
}
|
46 |
|
47 |
add_action( 'admin_init', 'qsm_add_author_column_in_db' );
|
|
|
48 |
/**
|
49 |
* @since 6.4.6
|
50 |
* Insert new column in quiz table
|
@@ -69,10 +71,7 @@ function qsm_add_author_column_in_db() {
|
|
69 |
foreach ( $column_def as $col_name => $col_def ) {
|
70 |
$table_col_obj = $wpdb->get_results(
|
71 |
$wpdb->prepare(
|
72 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
73 |
-
$wpdb->dbname,
|
74 |
-
$table,
|
75 |
-
$col_name
|
76 |
)
|
77 |
);
|
78 |
|
@@ -83,19 +82,15 @@ function qsm_add_author_column_in_db() {
|
|
83 |
}
|
84 |
|
85 |
update_option( 'qsm_update_db_column', '1' );
|
86 |
-
|
87 |
}
|
88 |
|
89 |
// Update result db
|
90 |
if ( 1 !== intval( get_option( 'qsm_update_result_db_column', '' ) ) ) {
|
91 |
global $wpdb;
|
92 |
-
$result_table_name
|
93 |
-
$table_result_col_obj
|
94 |
$wpdb->prepare(
|
95 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
96 |
-
$wpdb->dbname,
|
97 |
-
$result_table_name,
|
98 |
-
'form_type'
|
99 |
)
|
100 |
);
|
101 |
if ( empty( $table_result_col_obj ) ) {
|
@@ -114,13 +109,10 @@ function qsm_add_author_column_in_db() {
|
|
114 |
*/
|
115 |
if ( 1 !== intval( get_option( 'qsm_update_quiz_db_column', '' ) ) ) {
|
116 |
global $wpdb;
|
117 |
-
$quiz_table_name
|
118 |
-
$table_quiz_col_obj
|
119 |
$wpdb->prepare(
|
120 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
121 |
-
$wpdb->dbname,
|
122 |
-
$quiz_table_name,
|
123 |
-
'system'
|
124 |
)
|
125 |
);
|
126 |
if ( ! empty( $table_quiz_col_obj ) ) {
|
@@ -139,15 +131,11 @@ function qsm_add_author_column_in_db() {
|
|
139 |
*/
|
140 |
if ( 1 !== intval( get_option( 'qsm_update_result_db_column_datatype', '' ) ) ) {
|
141 |
global $wpdb;
|
142 |
-
$result_table_name
|
143 |
-
$table_quiz_result_obj
|
144 |
$wpdb->prepare(
|
145 |
-
'SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
146 |
-
|
147 |
-
$result_table_name,
|
148 |
-
'quiz_results'
|
149 |
-
),
|
150 |
-
ARRAY_A
|
151 |
);
|
152 |
if ( isset( $table_quiz_result_obj['DATA_TYPE'] ) && 'text' === $table_quiz_result_obj['DATA_TYPE'] ) {
|
153 |
if ( $wpdb->query( "ALTER TABLE $result_table_name CHANGE `quiz_results` `quiz_results` LONGTEXT;" ) ) {
|
@@ -164,15 +152,12 @@ function qsm_add_author_column_in_db() {
|
|
164 |
* @since 7.0.3
|
165 |
*/
|
166 |
if ( get_option( 'qsm_add_new_column_question_table_table', '1' ) <= 3 ) {
|
167 |
-
$total_count_val
|
168 |
global $wpdb;
|
169 |
-
$question_table_name
|
170 |
-
$table_result_col_obj
|
171 |
$wpdb->prepare(
|
172 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
173 |
-
$wpdb->dbname,
|
174 |
-
$question_table_name,
|
175 |
-
'deleted_question_bank'
|
176 |
)
|
177 |
);
|
178 |
if ( empty( $table_result_col_obj ) ) {
|
@@ -191,13 +176,10 @@ function qsm_add_author_column_in_db() {
|
|
191 |
*/
|
192 |
if ( get_option( 'qsm_update_result_db_column_page_url', '' ) != '1' ) {
|
193 |
global $wpdb;
|
194 |
-
$result_table_name
|
195 |
-
$table_result_col_obj
|
196 |
$wpdb->prepare(
|
197 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
198 |
-
$wpdb->dbname,
|
199 |
-
$result_table_name,
|
200 |
-
'page_url'
|
201 |
)
|
202 |
);
|
203 |
if ( empty( $table_result_col_obj ) ) {
|
@@ -217,13 +199,10 @@ function qsm_add_author_column_in_db() {
|
|
217 |
*/
|
218 |
if ( get_option( 'qsm_update_result_db_column_page_name', '' ) != '1' ) {
|
219 |
global $wpdb;
|
220 |
-
$result_table_name
|
221 |
-
$table_result_col_obj
|
222 |
$wpdb->prepare(
|
223 |
-
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ',
|
224 |
-
$wpdb->dbname,
|
225 |
-
$result_table_name,
|
226 |
-
'page_name'
|
227 |
)
|
228 |
);
|
229 |
if ( empty( $table_result_col_obj ) ) {
|
@@ -237,25 +216,26 @@ function qsm_add_author_column_in_db() {
|
|
237 |
}
|
238 |
|
239 |
add_action( 'admin_init', 'qsm_change_the_post_type' );
|
|
|
240 |
/**
|
241 |
* @since version 6.4.8
|
242 |
* Transfer all quiz post to new cpt 'qsm_quiz'
|
243 |
*/
|
244 |
function qsm_change_the_post_type() {
|
245 |
if ( 1 !== intval( get_option( 'qsm_change_the_post_type', '' ) ) ) {
|
246 |
-
$post_arr
|
247 |
'post_type' => 'quiz',
|
248 |
'posts_per_page' => -1,
|
249 |
'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'trash' ),
|
250 |
);
|
251 |
-
$my_query
|
252 |
|
253 |
if ( $my_query->have_posts() ) {
|
254 |
while ( $my_query->have_posts() ) {
|
255 |
$my_query->the_post();
|
256 |
|
257 |
-
$post_id
|
258 |
-
$post_obj
|
259 |
if ( 'trash' === $post_obj->post_status ) {
|
260 |
$post_obj->post_status = 'draft';
|
261 |
}
|
@@ -274,193 +254,189 @@ function qsm_change_the_post_type() {
|
|
274 |
* @param arr $single_option
|
275 |
*/
|
276 |
function qsm_display_question_option( $key, $single_option ) {
|
277 |
-
$type
|
278 |
-
$show
|
279 |
-
$show_class
|
280 |
if ( $show ) {
|
281 |
foreach ( $show as $show_value ) {
|
282 |
$show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
|
283 |
}
|
284 |
$show_class .= ' qsm_hide_for_other';
|
285 |
}
|
286 |
-
$tooltip
|
287 |
-
$document_text
|
288 |
if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
|
289 |
$tooltip .= '<span class="dashicons dashicons-editor-help qsm-tooltips-icon">';
|
290 |
$tooltip .= '<span class="qsm-tooltips">' . esc_html( $single_option['tooltip'] ) . '</span>';
|
291 |
$tooltip .= '</span>';
|
292 |
}
|
293 |
if ( isset( $single_option['documentation_link'] ) && '' !== $single_option['documentation_link'] ) {
|
294 |
-
$document_text
|
295 |
-
$document_text
|
296 |
-
$document_text
|
297 |
}
|
298 |
switch ( $type ) {
|
299 |
case 'text':
|
300 |
?>
|
301 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
</div>
|
309 |
<?php
|
310 |
break;
|
311 |
|
312 |
case 'number':
|
313 |
?>
|
314 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
</div>
|
322 |
<?php
|
323 |
break;
|
324 |
|
325 |
case 'select':
|
326 |
?>
|
327 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
<?php
|
335 |
-
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
336 |
-
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
337 |
-
foreach ( $single_option['options'] as $okey => $value ) {
|
338 |
-
?>
|
339 |
-
<option value="<?php echo esc_attr( $okey ); ?>" <?php echo ( $okey === $default ) ? 'selected="selected"' : ''; ?>><?php echo esc_attr( $value ); ?></option>
|
340 |
<?php
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
<?php
|
347 |
break;
|
348 |
|
349 |
case 'textarea':
|
350 |
?>
|
351 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
</div>
|
359 |
<?php
|
360 |
break;
|
361 |
|
362 |
case 'category':
|
363 |
?>
|
364 |
-
<div id="category_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
</div>
|
380 |
-
</div>
|
381 |
<?php
|
382 |
break;
|
383 |
|
384 |
case 'multi_category':
|
385 |
?>
|
386 |
-
<div id="multi_category_area" class="qsm-row multi_category_area <?php echo esc_attr( $show_class ); ?>">
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
</div>
|
410 |
<?php
|
411 |
break;
|
412 |
|
413 |
case 'multi_checkbox':
|
414 |
?>
|
415 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
|
|
430 |
}
|
431 |
-
|
432 |
-
|
433 |
-
</div>
|
434 |
<?php
|
435 |
break;
|
436 |
|
437 |
case 'single_checkbox':
|
438 |
?>
|
439 |
-
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
440 |
-
|
441 |
-
<?php
|
442 |
-
$parent_key = $key;
|
443 |
-
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
444 |
-
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
445 |
-
foreach ( $single_option['options'] as $key => $value ) {
|
446 |
-
?>
|
447 |
-
<input name="<?php echo esc_attr( $parent_key ); ?>" id="<?php echo esc_attr( $parent_key ); ?>" type="checkbox"value="<?php echo esc_attr( $key ); ?>" <?php echo ( $key === $default ) ? 'checked' : ''; ?> />
|
448 |
<?php
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
<?php
|
458 |
break;
|
459 |
|
460 |
default:
|
461 |
-
|
462 |
}
|
463 |
-
|
464 |
}
|
465 |
|
466 |
/**
|
@@ -469,9 +445,9 @@ function qsm_display_question_option( $key, $single_option ) {
|
|
469 |
* @param arr $single_option
|
470 |
*/
|
471 |
function qsm_generate_question_option( $key, $single_option ) {
|
472 |
-
$type
|
473 |
-
$show
|
474 |
-
$show_class
|
475 |
if ( in_array( $key, array( 'correct_answer_info', 'comments', 'hint' ), true ) ) {
|
476 |
$show_class .= 'core-option ';
|
477 |
}
|
@@ -481,7 +457,7 @@ function qsm_generate_question_option( $key, $single_option ) {
|
|
481 |
$show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
|
482 |
}
|
483 |
}
|
484 |
-
$tooltip
|
485 |
if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
|
486 |
$tooltip .= '<span class="dashicons dashicons-editor-help qsm-tooltips-icon">';
|
487 |
$tooltip .= '<span class="qsm-tooltips">' . esc_html( $single_option['tooltip'] ) . '</span>';
|
@@ -511,7 +487,7 @@ function qsm_generate_question_option( $key, $single_option ) {
|
|
511 |
foreach ( $single_option['options'] as $key => $value ) {
|
512 |
?>
|
513 |
<label><?php echo wp_kses_post( $value ); ?>
|
514 |
-
<input name="<?php echo esc_attr( $parent_key ); ?>[<?php echo esc_attr( $key ); ?>]" type="text" id="<?php echo esc_attr( $parent_key.'-'
|
515 |
</label>
|
516 |
<br />
|
517 |
<?php
|
@@ -557,8 +533,8 @@ function qsm_generate_question_option( $key, $single_option ) {
|
|
557 |
break;
|
558 |
|
559 |
case 'multi_checkbox':
|
560 |
-
$parent_key
|
561 |
-
$default
|
562 |
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
563 |
foreach ( $single_option['options'] as $key => $value ) {
|
564 |
?>
|
@@ -592,7 +568,7 @@ function qsm_generate_question_option( $key, $single_option ) {
|
|
592 |
break;
|
593 |
|
594 |
default:
|
595 |
-
|
596 |
}
|
597 |
?>
|
598 |
</div>
|
@@ -609,248 +585,243 @@ function qsm_create_new_quiz_wizard() {
|
|
609 |
global $themes_data;
|
610 |
qsm_fetch_theme_data();
|
611 |
?>
|
612 |
-
<div class="qsm-popup qsm-popup-slide" id="model-wizard" aria-hidden="true">
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
|
|
|
|
|
|
|
|
636 |
</div>
|
637 |
-
<
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
<div class="nav-item-label-content">
|
647 |
-
<h4><?php esc_html_e( 'Quiz Setting', 'quiz-master-next' ); ?></h4>
|
648 |
-
<span><?php esc_html_e( 'Fill quiz settings as per preferences', 'quiz-master-next' ); ?></span>
|
649 |
</div>
|
650 |
-
</
|
651 |
-
</
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
</div>
|
661 |
-
</
|
662 |
-
</
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
</div>
|
672 |
-
</
|
673 |
-
</
|
674 |
-
</
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
|
|
|
|
|
|
|
|
690 |
</span>
|
691 |
-
</
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
'
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
'value' => 1,
|
717 |
-
),
|
718 |
-
array(
|
719 |
-
'label' => __( 'No', 'quiz-master-next' ),
|
720 |
-
'value' => 0,
|
721 |
),
|
722 |
),
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
)
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
|
|
|
|
|
|
758 |
}
|
759 |
-
|
760 |
-
|
761 |
-
echo '</div>';
|
762 |
}
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
</div>
|
782 |
-
<div class="theme-wrap" id="downloaded_theme">
|
783 |
-
<?php
|
784 |
qsm_get_installed_theme( 0, 'wizard_theme_list' );
|
785 |
qsm_get_default_wizard_themes();
|
786 |
-
|
|
|
787 |
</div>
|
788 |
</div>
|
789 |
</div>
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
<?php
|
796 |
$popular_addons = qsm_get_widget_data( 'popular_products' );
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
</a>
|
820 |
-
</div>
|
821 |
-
<?php
|
822 |
}
|
823 |
-
|
824 |
-
|
825 |
</div>
|
826 |
</div>
|
827 |
</div>
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
</div>
|
833 |
</div>
|
834 |
-
</
|
835 |
-
</
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
class="button qsm-wizard-borderless"
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
</
|
851 |
</div>
|
852 |
</div>
|
853 |
-
</div>
|
854 |
<?php
|
855 |
}
|
856 |
|
@@ -859,7 +830,7 @@ function qsm_create_new_quiz_wizard() {
|
|
859 |
* @return array Template Variable
|
860 |
*/
|
861 |
function qsm_text_template_variable_list() {
|
862 |
-
$variable_list
|
863 |
'Core' => array(
|
864 |
'%POINT_SCORE%' => __( 'Score for the quiz when using points', 'quiz-master-next' ),
|
865 |
'%MAXIMUM_POINTS%' => __( 'Maximum possible points one can score', 'quiz-master-next' ),
|
@@ -898,7 +869,7 @@ function qsm_text_template_variable_list() {
|
|
898 |
'%TIME_FINISHED%' => __( 'Display time after quiz submission.', 'quiz-master-next' ),
|
899 |
),
|
900 |
);
|
901 |
-
$variable_list
|
902 |
return $variable_list;
|
903 |
}
|
904 |
|
@@ -916,11 +887,10 @@ function qsm_update_question_type_col_val() {
|
|
916 |
|
917 |
if ( version_compare( $mlwQuizMasterNext->version, '6.4.12', '<' ) ) {
|
918 |
if ( 1 !== intval( get_option( 'qsm_upated_question_type_val' ) ) ) {
|
919 |
-
$table_name
|
920 |
-
$status
|
921 |
$wpdb->prepare(
|
922 |
-
'UPDATE ' . $table_name . " SET `question_type_new` = REPLACE( `question_type_new`, 'fill-in-the-blank', %d )",
|
923 |
-
14
|
924 |
)
|
925 |
);
|
926 |
|
@@ -958,8 +928,8 @@ function qsm_check_create_tables() {
|
|
958 |
if ( $install ) {
|
959 |
QSM_Install::install();
|
960 |
}
|
961 |
-
|
962 |
}
|
|
|
963 |
add_action( 'admin_init', 'qsm_check_create_tables' );
|
964 |
|
965 |
/**
|
@@ -973,6 +943,7 @@ function qsm_admin_page_access_func() {
|
|
973 |
exit;
|
974 |
}
|
975 |
}
|
|
|
976 |
add_action( 'admin_page_access_denied', 'qsm_admin_page_access_func' );
|
977 |
|
978 |
function qsm_fetch_theme_data() {
|
@@ -983,8 +954,8 @@ function qsm_fetch_theme_data() {
|
|
983 |
function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
984 |
global $mlwQuizMasterNext;
|
985 |
global $pro_themes;
|
986 |
-
$active_themes
|
987 |
-
$theme_folders
|
988 |
if ( ! empty( $active_themes ) ) {
|
989 |
foreach ( $active_themes as $dir ) {
|
990 |
$theme_dir = WP_PLUGIN_DIR . '/' . $dir['theme'];
|
@@ -995,8 +966,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
995 |
}
|
996 |
?>
|
997 |
<div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
|
998 |
-
<input style="display: none" type="radio" name="quiz_theme_id" value="0"
|
999 |
-
<?php checked( $saved_quiz_theme, '0', true ); ?>>
|
1000 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1001 |
<img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ) . '/assets/screenshot-default-theme.png'; ?>">
|
1002 |
<div class="downloaded-theme-button">
|
@@ -1007,7 +977,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
1007 |
<h2 class="theme-name" id="emarket-name"><?php esc_html_e( 'Default Theme', 'quiz-master-next' ); ?></h2>
|
1008 |
<div class="theme-actions">
|
1009 |
<?php if ( 'default' !== $saved_quiz_theme ) { ?>
|
1010 |
-
|
1011 |
<?php } ?>
|
1012 |
</div>
|
1013 |
</div>
|
@@ -1016,17 +986,16 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
1016 |
<?php
|
1017 |
if ( $theme_folders ) {
|
1018 |
foreach ( $theme_folders as $key => $theme ) {
|
1019 |
-
$theme_name
|
1020 |
-
$theme_id
|
1021 |
?>
|
1022 |
<div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
|
1023 |
-
<input style="display: none" type="radio" name="quiz_theme_id" value="<?php echo intval( $theme_id ); ?>"
|
1024 |
-
<?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
|
1025 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1026 |
-
<?php if ( in_array( $theme_name, $pro_themes
|
1027 |
-
<span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
|
1028 |
<?php } ?>
|
1029 |
-
<img alt="" src="<?php echo esc_url( WP_PLUGIN_URL.'/' . $theme_name . '/screenshot.png' ); ?>" />
|
1030 |
<div class="downloaded-theme-button">
|
1031 |
<span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
|
1032 |
</div>
|
@@ -1042,13 +1011,13 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
1042 |
<?php
|
1043 |
} else {
|
1044 |
?>
|
1045 |
-
|
1046 |
<?php
|
1047 |
}
|
1048 |
?>
|
1049 |
<?php } ?>
|
1050 |
<?php if ( $saved_quiz_theme === $theme_id ) { ?>
|
1051 |
-
|
1052 |
<?php } ?>
|
1053 |
</div>
|
1054 |
</div>
|
@@ -1064,13 +1033,13 @@ function qsm_get_default_wizard_themes() {
|
|
1064 |
global $themes_data;
|
1065 |
global $pro_themes;
|
1066 |
$installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
|
1067 |
-
$default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Companion', 'Serene', 'Sigma', 'Fortune' );
|
1068 |
$default_themes_data = array();
|
1069 |
$keys_to_unset = array();
|
1070 |
if ( ! empty( $themes_data ) ) {
|
1071 |
foreach ( $default_themes as $theme ) {
|
1072 |
$key = array_search( $theme, array_column( $installed_themes, 'theme_name' ), true );
|
1073 |
-
if ( false !== $key ) { // installed themes to be removed
|
1074 |
$key_to_unset = array_search( $theme, array_column( $themes_data, 'name' ), true );
|
1075 |
if ( false !== $key_to_unset ) {
|
1076 |
$keys_to_unset[] = $key_to_unset;
|
@@ -1096,26 +1065,22 @@ function qsm_get_default_wizard_themes() {
|
|
1096 |
foreach ( $keys_to_unset as $key ) {
|
1097 |
unset( $themes_data[ $key ] );
|
1098 |
}
|
1099 |
-
|
1100 |
if ( ! empty( $default_themes_data ) ) {
|
1101 |
-
foreach ( $default_themes_data
|
1102 |
-
$theme_name
|
1103 |
-
$theme_url
|
1104 |
-
$theme_screenshot
|
1105 |
-
$theme_demo
|
1106 |
?>
|
1107 |
<div class="theme-wrapper theme market-theme">
|
1108 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1109 |
-
<?php if ( in_array( $theme_name, $pro_themes
|
1110 |
-
<span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
|
1111 |
<?php } ?>
|
1112 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1113 |
<div class="market-theme-url">
|
1114 |
-
<a class="button button-primary" target="_blank" rel="noopener"
|
1115 |
-
|
1116 |
-
<a class="button" target="_blank" rel="noopener"
|
1117 |
-
href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
|
1118 |
-
<?php echo in_array( $theme_name, $pro_themes , true) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ) ; ?>
|
1119 |
</a>
|
1120 |
</div>
|
1121 |
</div>
|
@@ -1129,25 +1094,24 @@ function qsm_get_default_wizard_themes() {
|
|
1129 |
}
|
1130 |
|
1131 |
function qsm_get_market_themes() {
|
1132 |
-
global $themes_data;
|
1133 |
-
global $pro_themes;
|
1134 |
if ( ! empty( $themes_data ) ) {
|
1135 |
-
foreach ( $themes_data
|
1136 |
-
$theme_name
|
1137 |
-
$theme_url
|
1138 |
-
$theme_screenshot
|
1139 |
-
$theme_demo
|
1140 |
?>
|
1141 |
<div class="theme-wrapper theme market-theme">
|
1142 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1143 |
-
<?php if ( in_array( $theme_name, $pro_themes
|
1144 |
-
<span class="qsm-badge"><?php esc_html_e('Pro', 'quiz-master-next'); ?></span>
|
1145 |
<?php } ?>
|
1146 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1147 |
<div class="market-theme-url">
|
1148 |
<a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
|
1149 |
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
|
1150 |
-
<?php echo in_array( $theme_name, $pro_themes
|
1151 |
</a>
|
1152 |
</div>
|
1153 |
</div>
|
@@ -1182,3 +1146,41 @@ function qsm_sanitize_rec_array( $array, $textarea = false ) {
|
|
1182 |
}
|
1183 |
return $array;
|
1184 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
$themes_data = array();
|
3 |
global $pro_themes;
|
4 |
+
$pro_themes = array( 'qsm-theme-pool', 'qsm-theme-breeze', 'qsm-theme-fragrance', 'qsm-theme-ivory', 'qsm-theme-sigma', 'qsm-theme-fortune', 'qsm-theme-pixel', 'qsm-theme-sapience', 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Sigma', 'Fortune', 'Pixel', 'Sapience' );
|
5 |
|
6 |
/**
|
7 |
* @since 6.4.5
|
8 |
* @param
|
9 |
*/
|
10 |
function qsm_fetch_data_from_xml() {
|
11 |
+
$file = esc_url( 'https://quizandsurveymaster.com/addons.xml' );
|
12 |
+
$response = wp_remote_post( $file, array( 'sslverify' => false ) );
|
13 |
|
14 |
if ( is_wp_error( $response ) || 404 === $response['response']['code'] ) {
|
15 |
return '<p>' . __( 'Something went wrong', 'quiz-master-next' ) . '</p>';
|
16 |
} else {
|
17 |
+
$body = wp_remote_retrieve_body( $response );
|
18 |
+
return $xml = simplexml_load_string( $body );
|
19 |
}
|
20 |
}
|
21 |
|
22 |
add_action( 'qmn_quiz_created', 'qsm_redirect_to_edit_page', 10, 1 );
|
23 |
+
|
24 |
/**
|
25 |
* @since 6.4.5
|
26 |
* @param int $quiz_id Quiz id.
|
46 |
}
|
47 |
|
48 |
add_action( 'admin_init', 'qsm_add_author_column_in_db' );
|
49 |
+
|
50 |
/**
|
51 |
* @since 6.4.6
|
52 |
* Insert new column in quiz table
|
71 |
foreach ( $column_def as $col_name => $col_def ) {
|
72 |
$table_col_obj = $wpdb->get_results(
|
73 |
$wpdb->prepare(
|
74 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $table, $col_name
|
|
|
|
|
|
|
75 |
)
|
76 |
);
|
77 |
|
82 |
}
|
83 |
|
84 |
update_option( 'qsm_update_db_column', '1' );
|
|
|
85 |
}
|
86 |
|
87 |
// Update result db
|
88 |
if ( 1 !== intval( get_option( 'qsm_update_result_db_column', '' ) ) ) {
|
89 |
global $wpdb;
|
90 |
+
$result_table_name = $wpdb->prefix . 'mlw_results';
|
91 |
+
$table_result_col_obj = $wpdb->get_results(
|
92 |
$wpdb->prepare(
|
93 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $result_table_name, 'form_type'
|
|
|
|
|
|
|
94 |
)
|
95 |
);
|
96 |
if ( empty( $table_result_col_obj ) ) {
|
109 |
*/
|
110 |
if ( 1 !== intval( get_option( 'qsm_update_quiz_db_column', '' ) ) ) {
|
111 |
global $wpdb;
|
112 |
+
$quiz_table_name = $wpdb->prefix . 'mlw_quizzes';
|
113 |
+
$table_quiz_col_obj = $wpdb->get_results(
|
114 |
$wpdb->prepare(
|
115 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $quiz_table_name, 'system'
|
|
|
|
|
|
|
116 |
)
|
117 |
);
|
118 |
if ( ! empty( $table_quiz_col_obj ) ) {
|
131 |
*/
|
132 |
if ( 1 !== intval( get_option( 'qsm_update_result_db_column_datatype', '' ) ) ) {
|
133 |
global $wpdb;
|
134 |
+
$result_table_name = $wpdb->prefix . 'mlw_results';
|
135 |
+
$table_quiz_result_obj = $wpdb->get_row(
|
136 |
$wpdb->prepare(
|
137 |
+
'SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $result_table_name, 'quiz_results'
|
138 |
+
), ARRAY_A
|
|
|
|
|
|
|
|
|
139 |
);
|
140 |
if ( isset( $table_quiz_result_obj['DATA_TYPE'] ) && 'text' === $table_quiz_result_obj['DATA_TYPE'] ) {
|
141 |
if ( $wpdb->query( "ALTER TABLE $result_table_name CHANGE `quiz_results` `quiz_results` LONGTEXT;" ) ) {
|
152 |
* @since 7.0.3
|
153 |
*/
|
154 |
if ( get_option( 'qsm_add_new_column_question_table_table', '1' ) <= 3 ) {
|
155 |
+
$total_count_val = get_option( 'qsm_add_new_column_question_table_table', '1' );
|
156 |
global $wpdb;
|
157 |
+
$question_table_name = $wpdb->prefix . 'mlw_questions';
|
158 |
+
$table_result_col_obj = $wpdb->get_results(
|
159 |
$wpdb->prepare(
|
160 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $question_table_name, 'deleted_question_bank'
|
|
|
|
|
|
|
161 |
)
|
162 |
);
|
163 |
if ( empty( $table_result_col_obj ) ) {
|
176 |
*/
|
177 |
if ( get_option( 'qsm_update_result_db_column_page_url', '' ) != '1' ) {
|
178 |
global $wpdb;
|
179 |
+
$result_table_name = $wpdb->prefix . 'mlw_results';
|
180 |
+
$table_result_col_obj = $wpdb->get_results(
|
181 |
$wpdb->prepare(
|
182 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $result_table_name, 'page_url'
|
|
|
|
|
|
|
183 |
)
|
184 |
);
|
185 |
if ( empty( $table_result_col_obj ) ) {
|
199 |
*/
|
200 |
if ( get_option( 'qsm_update_result_db_column_page_name', '' ) != '1' ) {
|
201 |
global $wpdb;
|
202 |
+
$result_table_name = $wpdb->prefix . 'mlw_results';
|
203 |
+
$table_result_col_obj = $wpdb->get_results(
|
204 |
$wpdb->prepare(
|
205 |
+
'SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s AND COLUMN_NAME = %s ', $wpdb->dbname, $result_table_name, 'page_name'
|
|
|
|
|
|
|
206 |
)
|
207 |
);
|
208 |
if ( empty( $table_result_col_obj ) ) {
|
216 |
}
|
217 |
|
218 |
add_action( 'admin_init', 'qsm_change_the_post_type' );
|
219 |
+
|
220 |
/**
|
221 |
* @since version 6.4.8
|
222 |
* Transfer all quiz post to new cpt 'qsm_quiz'
|
223 |
*/
|
224 |
function qsm_change_the_post_type() {
|
225 |
if ( 1 !== intval( get_option( 'qsm_change_the_post_type', '' ) ) ) {
|
226 |
+
$post_arr = array(
|
227 |
'post_type' => 'quiz',
|
228 |
'posts_per_page' => -1,
|
229 |
'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'trash' ),
|
230 |
);
|
231 |
+
$my_query = new WP_Query( $post_arr );
|
232 |
|
233 |
if ( $my_query->have_posts() ) {
|
234 |
while ( $my_query->have_posts() ) {
|
235 |
$my_query->the_post();
|
236 |
|
237 |
+
$post_id = get_the_ID();
|
238 |
+
$post_obj = get_post( $post_id );
|
239 |
if ( 'trash' === $post_obj->post_status ) {
|
240 |
$post_obj->post_status = 'draft';
|
241 |
}
|
254 |
* @param arr $single_option
|
255 |
*/
|
256 |
function qsm_display_question_option( $key, $single_option ) {
|
257 |
+
$type = isset( $single_option['type'] ) ? $single_option['type'] : 'text';
|
258 |
+
$show = isset( $single_option['show'] ) ? explode( ',', $single_option['show'] ) : array();
|
259 |
+
$show_class = '';
|
260 |
if ( $show ) {
|
261 |
foreach ( $show as $show_value ) {
|
262 |
$show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
|
263 |
}
|
264 |
$show_class .= ' qsm_hide_for_other';
|
265 |
}
|
266 |
+
$tooltip = '';
|
267 |
+
$document_text = '';
|
268 |
if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
|
269 |
$tooltip .= '<span class="dashicons dashicons-editor-help qsm-tooltips-icon">';
|
270 |
$tooltip .= '<span class="qsm-tooltips">' . esc_html( $single_option['tooltip'] ) . '</span>';
|
271 |
$tooltip .= '</span>';
|
272 |
}
|
273 |
if ( isset( $single_option['documentation_link'] ) && '' !== $single_option['documentation_link'] ) {
|
274 |
+
$document_text .= '<a class="qsm-question-doc" href="' . esc_url( $single_option['documentation_link'] ) . '" target="_blank" title="' . __( 'View Documentation', 'quiz-master-next' ) . '">';
|
275 |
+
$document_text .= '<span class="dashicons dashicons-editor-help"></span>';
|
276 |
+
$document_text .= '</a>';
|
277 |
}
|
278 |
switch ( $type ) {
|
279 |
case 'text':
|
280 |
?>
|
281 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
282 |
+
<label>
|
283 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
284 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
285 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
286 |
+
</label>
|
287 |
+
<input type="text" name="<?php echo esc_attr( $key ); ?>" value="<?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?>" id="<?php echo esc_attr( $key ); ?>" />
|
288 |
+
</div>
|
289 |
<?php
|
290 |
break;
|
291 |
|
292 |
case 'number':
|
293 |
?>
|
294 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
295 |
+
<label>
|
296 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
297 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
298 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
299 |
+
</label>
|
300 |
+
<input type="number" name="<?php echo esc_attr( $key ); ?>" value="<?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?>" id="<?php echo esc_attr( $key ); ?>" />
|
301 |
+
</div>
|
302 |
<?php
|
303 |
break;
|
304 |
|
305 |
case 'select':
|
306 |
?>
|
307 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
308 |
+
<label>
|
309 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
310 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
311 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
312 |
+
</label>
|
313 |
+
<select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
<?php
|
315 |
+
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
316 |
+
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
317 |
+
foreach ( $single_option['options'] as $okey => $value ) {
|
318 |
+
?>
|
319 |
+
<option value="<?php echo esc_attr( $okey ); ?>" <?php echo ( $okey === $default ) ? 'selected="selected"' : ''; ?>><?php echo esc_attr( $value ); ?></option>
|
320 |
+
<?php
|
321 |
+
}
|
322 |
+
}
|
323 |
+
?>
|
324 |
+
</select>
|
325 |
+
</div>
|
326 |
<?php
|
327 |
break;
|
328 |
|
329 |
case 'textarea':
|
330 |
?>
|
331 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
332 |
+
<label>
|
333 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
334 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
335 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
336 |
+
</label>
|
337 |
+
<textarea id="<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $key ); ?>"><?php echo isset( $single_option['default'] ) ? esc_html( $single_option['default'] ) : ''; ?></textarea>
|
338 |
+
</div>
|
339 |
<?php
|
340 |
break;
|
341 |
|
342 |
case 'category':
|
343 |
?>
|
344 |
+
<div id="category_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
345 |
+
<label>
|
346 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
347 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
348 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
349 |
+
</label>
|
350 |
+
<div id="categories">
|
351 |
+
<a id="qsm-category-add-toggle" class="hide-if-no-js">
|
352 |
+
<?php esc_html_e( '+ Add New Category', 'quiz-master-next' ); ?>
|
353 |
+
</a>
|
354 |
+
<p id="qsm-category-add" style="display: none;">
|
355 |
+
<input type="radio" style="display: none;" name="category" class="category-radio" id="new_category_new" value="new_category"><label for="new_category_new"><input type='text' id='new_category' value='' placeholder="Add new category" /></label>
|
356 |
+
</p>
|
357 |
+
</div>
|
358 |
+
</div>
|
|
|
|
|
359 |
<?php
|
360 |
break;
|
361 |
|
362 |
case 'multi_category':
|
363 |
?>
|
364 |
+
<div id="multi_category_area" class="qsm-row multi_category_area <?php echo esc_attr( $show_class ); ?>">
|
365 |
+
<label>
|
366 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
367 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
368 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
369 |
+
</label>
|
370 |
+
<input type='text' class='qsm-category-filter' placeholder=' <?php esc_html_e( ' Search', 'quiz-master-next' ); ?> '>
|
371 |
+
<div id="multi_categories_wrapper" class="categorydiv qsm_categories_list">
|
372 |
+
<ul id=" multicategories_checklist" class="qsm_category_checklist categorychecklist form-no-clear">
|
373 |
+
<?php
|
374 |
+
wp_terms_checklist(
|
375 |
+
0, array(
|
376 |
+
'taxonomy' => 'qsm_category',
|
377 |
+
'descendants_and_self' => 0,
|
378 |
+
'selected_cats' => false,
|
379 |
+
'echo' => true,
|
380 |
+
)
|
381 |
+
);
|
382 |
+
?>
|
383 |
+
</ul>
|
384 |
+
</div>
|
385 |
+
<a href='javascript:void(0)' class='add-multiple-category'><?php esc_html_e( '+ Add New Category ', 'quiz-master-next' ); ?></a>
|
386 |
+
</div>
|
|
|
387 |
<?php
|
388 |
break;
|
389 |
|
390 |
case 'multi_checkbox':
|
391 |
?>
|
392 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
393 |
+
<label>
|
394 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
395 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
396 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
397 |
+
</label>
|
398 |
+
<?php
|
399 |
+
$parent_key = $key;
|
400 |
+
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
401 |
+
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
402 |
+
foreach ( $single_option['options'] as $key => $value ) {
|
403 |
+
?>
|
404 |
+
<input name="<?php echo esc_attr( $parent_key ); ?>[]" type="checkbox" value="<?php echo esc_attr( $key ); ?>" <?php echo ( $key === $default ) ? 'checked' : ''; ?> />
|
405 |
+
<?php echo esc_attr( $value ); ?><br />
|
406 |
+
<?php
|
407 |
+
}
|
408 |
}
|
409 |
+
?>
|
410 |
+
</div>
|
|
|
411 |
<?php
|
412 |
break;
|
413 |
|
414 |
case 'single_checkbox':
|
415 |
?>
|
416 |
+
<div id="<?php echo esc_attr( $key ); ?>_area" class="qsm-row <?php echo esc_attr( $show_class ); ?>">
|
417 |
+
<label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
<?php
|
419 |
+
$parent_key = $key;
|
420 |
+
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
421 |
+
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
422 |
+
foreach ( $single_option['options'] as $key => $value ) {
|
423 |
+
?>
|
424 |
+
<input name="<?php echo esc_attr( $parent_key ); ?>" id="<?php echo esc_attr( $parent_key ); ?>" type="checkbox"value="<?php echo esc_attr( $key ); ?>" <?php echo ( $key === $default ) ? 'checked' : ''; ?> />
|
425 |
+
<?php
|
426 |
+
}
|
427 |
+
}
|
428 |
+
?>
|
429 |
+
<?php echo isset( $single_option['label'] ) ? wp_kses_post( $single_option['label'] ) : ''; ?>
|
430 |
+
<?php echo wp_kses_post( $tooltip ); ?>
|
431 |
+
<?php echo wp_kses_post( $document_text ); ?>
|
432 |
+
</label>
|
433 |
+
</div>
|
434 |
<?php
|
435 |
break;
|
436 |
|
437 |
default:
|
438 |
+
// Do nothing
|
439 |
}
|
|
|
440 |
}
|
441 |
|
442 |
/**
|
445 |
* @param arr $single_option
|
446 |
*/
|
447 |
function qsm_generate_question_option( $key, $single_option ) {
|
448 |
+
$type = isset( $single_option['type'] ) ? $single_option['type'] : 'text';
|
449 |
+
$show = isset( $single_option['show'] ) ? explode( ',', $single_option['show'] ) : array();
|
450 |
+
$show_class = '';
|
451 |
if ( in_array( $key, array( 'correct_answer_info', 'comments', 'hint' ), true ) ) {
|
452 |
$show_class .= 'core-option ';
|
453 |
}
|
457 |
$show_class .= 'qsm_show_question_type_' . trim( $show_value ) . ' ';
|
458 |
}
|
459 |
}
|
460 |
+
$tooltip = '';
|
461 |
if ( isset( $single_option['tooltip'] ) && '' !== $single_option['tooltip'] ) {
|
462 |
$tooltip .= '<span class="dashicons dashicons-editor-help qsm-tooltips-icon">';
|
463 |
$tooltip .= '<span class="qsm-tooltips">' . esc_html( $single_option['tooltip'] ) . '</span>';
|
487 |
foreach ( $single_option['options'] as $key => $value ) {
|
488 |
?>
|
489 |
<label><?php echo wp_kses_post( $value ); ?>
|
490 |
+
<input name="<?php echo esc_attr( $parent_key ); ?>[<?php echo esc_attr( $key ); ?>]" type="text" id="<?php echo esc_attr( $parent_key . '-' . $key ); ?>" />
|
491 |
</label>
|
492 |
<br />
|
493 |
<?php
|
533 |
break;
|
534 |
|
535 |
case 'multi_checkbox':
|
536 |
+
$parent_key = $key;
|
537 |
+
$default = isset( $single_option['default'] ) ? $single_option['default'] : '';
|
538 |
if ( isset( $single_option['options'] ) && is_array( $single_option['options'] ) ) {
|
539 |
foreach ( $single_option['options'] as $key => $value ) {
|
540 |
?>
|
568 |
break;
|
569 |
|
570 |
default:
|
571 |
+
// Do nothing
|
572 |
}
|
573 |
?>
|
574 |
</div>
|
585 |
global $themes_data;
|
586 |
qsm_fetch_theme_data();
|
587 |
?>
|
588 |
+
<div class="qsm-popup qsm-popup-slide" id="model-wizard" aria-hidden="true">
|
589 |
+
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
590 |
+
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-2-title">
|
591 |
+
<header class="qsm-popup__header">
|
592 |
+
<h2 class="qsm-popup__title" id="modal-2-title">
|
593 |
+
<?php esc_html_e( 'Create New Quiz Or Survey', 'quiz-master-next' ); ?></h2>
|
594 |
+
<a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
|
595 |
+
</header>
|
596 |
+
<form action="" method="post" id="new-quiz-form">
|
597 |
+
<?php wp_nonce_field( 'qsm_new_quiz', 'qsm_new_quiz_nonce' ); ?>
|
598 |
+
<main class="qsm-popup__content" id="modal-2-content">
|
599 |
+
<div class="qsm-wizard-menu">
|
600 |
+
<div class="qsm-logo"><img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ); ?>/assets/icon-128x128.png">
|
601 |
+
</div>
|
602 |
+
<div class="qsm-wizard-wrap active" data-show="select_themes">
|
603 |
+
<span
|
604 |
+
class="qsm-wizard-step-text"><?php esc_html_e( 'Select theme', 'quiz-master-next' ); ?></span>
|
605 |
+
</div>
|
606 |
+
<div class="qsm-wizard-wrap" data-show="quiz_settings">
|
607 |
+
<span
|
608 |
+
class="qsm-wizard-step-text"><?php esc_html_e( 'Quiz Settings', 'quiz-master-next' ); ?></span>
|
609 |
+
</div>
|
610 |
+
<div class="qsm-wizard-wrap" data-show="addons_list">
|
611 |
+
<span class="qsm-wizard-step-text"><?php esc_html_e( 'Addons', 'quiz-master-next' ); ?></span>
|
612 |
+
</div>
|
613 |
+
<span class="qsm-wizard-step-text-optional">
|
614 |
+
<?php esc_html_e( '(Optional)', 'quiz-master-next' ); ?>
|
615 |
+
</span>
|
616 |
</div>
|
617 |
+
<ul style="display: none;" class="qsm-new_menu_tab_items">
|
618 |
+
<li class="qsm-new_menu_tab_li active" data-show="quiz_settings">
|
619 |
+
<a href="javascript:void(0)">
|
620 |
+
<div class="nav-item-label">
|
621 |
+
<span class="nav-item-label-icon dashicons dashicons-admin-generic "></span>
|
622 |
+
<div class="nav-item-label-content">
|
623 |
+
<h4><?php esc_html_e( 'Quiz Setting', 'quiz-master-next' ); ?></h4>
|
624 |
+
<span><?php esc_html_e( 'Fill quiz settings as per preferences', 'quiz-master-next' ); ?></span>
|
625 |
+
</div>
|
|
|
|
|
|
|
626 |
</div>
|
627 |
+
</a>
|
628 |
+
</li>
|
629 |
+
<li class="qsm-new_menu_tab_li" data-show="select_themes">
|
630 |
+
<a href="javascript:void(0)">
|
631 |
+
<div class="nav-item-label">
|
632 |
+
<span class="nav-item-label-icon dashicons dashicons-layout"></span>
|
633 |
+
<div class="nav-item-label-content">
|
634 |
+
<h4><?php esc_html_e( 'Select Themes', 'quiz-master-next' ); ?></h4>
|
635 |
+
<span><?php esc_html_e( 'Use pre-made theme to speed up the things.', 'quiz-master-next' ); ?></span>
|
636 |
+
</div>
|
637 |
</div>
|
638 |
+
</a>
|
639 |
+
</li>
|
640 |
+
<li class="qsm-new_menu_tab_li" data-show="addons_list">
|
641 |
+
<a href="javascript:void(0)">
|
642 |
+
<div class="nav-item-label">
|
643 |
+
<span class="nav-item-label-icon dashicons dashicons-welcome-add-page"></span>
|
644 |
+
<div class="nav-item-label-content">
|
645 |
+
<h4><?php esc_html_e( 'Addons', 'quiz-master-next' ); ?></h4>
|
646 |
+
<span><?php esc_html_e( 'Use 40+ addons to customize the quiz.', 'quiz-master-next' ); ?></span>
|
647 |
+
</div>
|
648 |
</div>
|
649 |
+
</a>
|
650 |
+
</li>
|
651 |
+
</ul>
|
652 |
+
<div id="quiz_settings" class="qsm-new-menu-elements" style="display: none;">
|
653 |
+
<div class="input-group">
|
654 |
+
<label for="quiz_name"><?php esc_html_e( 'Quiz Name', 'quiz-master-next' ); ?>
|
655 |
+
<span style="color:red">*</span>
|
656 |
+
<span
|
657 |
+
class="qsm-opt-desc"><?php esc_html_e( 'Enter a name for this Quiz.', 'quiz-master-next' ); ?></span>
|
658 |
+
</label>
|
659 |
+
<input type="text" class="quiz_name" name="quiz_name" value="" required="">
|
660 |
+
</div>
|
661 |
+
<div class="input-group featured_image">
|
662 |
+
<label for="quiz_name"><?php esc_html_e( 'Quiz Featured Image', 'quiz-master-next' ); ?>
|
663 |
+
<span class="qsm-opt-desc">
|
664 |
+
<?php esc_html_e( 'Enter an external URL or Choose from Media Library.', 'quiz-master-next' ); ?>
|
665 |
+
<?php esc_html_e( 'Can be changed further from style tab', 'quiz-master-next' ); ?>
|
666 |
+
</span>
|
667 |
+
</label>
|
668 |
+
<span id="qsm_span">
|
669 |
+
<input type="text" class="quiz_featured_image" name="quiz_featured_image" value="">
|
670 |
+
<a id="set_featured_image" class="button "><?php esc_html_e( 'Set Featured Image', 'quiz-master-next' ); ?></a>
|
671 |
</span>
|
672 |
+
</div>
|
673 |
+
<?php
|
674 |
+
$all_settings = $mlwQuizMasterNext->quiz_settings->load_setting_fields( 'quiz_options' );
|
675 |
+
global $globalQuizsetting;
|
676 |
+
$quiz_setting_option = array(
|
677 |
+
'form_type' => array(
|
678 |
+
'option_name' => __( 'Form Type', 'quiz-master-next' ),
|
679 |
+
'value' => $globalQuizsetting['form_type'],
|
680 |
+
),
|
681 |
+
'system' => array(
|
682 |
+
'option_name' => __( 'Grading System', 'quiz-master-next' ),
|
683 |
+
'value' => $globalQuizsetting['system'],
|
684 |
+
),
|
685 |
+
'enable_contact_form' => array(
|
686 |
+
'option_name' => __( 'Enable Contact Form', 'quiz-master-next' ),
|
687 |
+
'value' => 0,
|
688 |
+
'options' => array(
|
689 |
+
array(
|
690 |
+
'label' => __( 'Yes', 'quiz-master-next' ),
|
691 |
+
'value' => 1,
|
692 |
+
),
|
693 |
+
array(
|
694 |
+
'label' => __( 'No', 'quiz-master-next' ),
|
695 |
+
'value' => 0,
|
696 |
+
),
|
|
|
|
|
|
|
|
|
|
|
697 |
),
|
698 |
),
|
699 |
+
'timer_limit' => array(
|
700 |
+
'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ),
|
701 |
+
'value' => $globalQuizsetting['timer_limit'],
|
702 |
+
),
|
703 |
+
'require_log_in' => array(
|
704 |
+
'option_name' => __( 'Require User Login', 'quiz-master-next' ),
|
705 |
+
'value' => $globalQuizsetting['require_log_in'],
|
706 |
+
),
|
707 |
+
'disable_first_page' => array(
|
708 |
+
'option_name' => __( 'Disable first page on quiz', 'quiz-master-next' ),
|
709 |
+
'value' => $globalQuizsetting['disable_first_page'],
|
710 |
+
),
|
711 |
+
'comment_section' => array(
|
712 |
+
'option_name' => __( 'Enable Comment box', 'quiz-master-next' ),
|
713 |
+
'value' => $globalQuizsetting['comment_section'],
|
714 |
+
),
|
715 |
+
);
|
716 |
+
$quiz_setting_option = apply_filters( 'qsm_quiz_wizard_settings_option', $quiz_setting_option );
|
717 |
+
if ( $quiz_setting_option ) {
|
718 |
+
foreach ( $quiz_setting_option as $key => $single_setting ) {
|
719 |
+
$index = array_search( $key, array_column( $all_settings, 'id' ), true );
|
720 |
+
if ( is_int( $index ) && isset( $all_settings[ $index ] ) ) {
|
721 |
+
$field = $all_settings[ $index ];
|
722 |
+
$field['label'] = $single_setting['option_name'];
|
723 |
+
$field['default'] = $single_setting['value'];
|
724 |
+
} else {
|
725 |
+
$field = array(
|
726 |
+
'id' => $key,
|
727 |
+
'label' => $single_setting['option_name'],
|
728 |
+
'type' => isset( $single_setting['type'] ) ? $single_setting['type'] : 'radio',
|
729 |
+
'options' => isset( $single_setting['options'] ) ? $single_setting['options'] : array(),
|
730 |
+
'default' => $single_setting['value'],
|
731 |
+
'help' => __( 'Display a contact form before quiz', 'quiz-master-next' ),
|
732 |
+
);
|
733 |
+
}
|
734 |
+
echo '<div class="input-group">';
|
735 |
+
QSM_Fields::generate_field( $field, $single_setting['value'] );
|
736 |
+
echo '</div>';
|
737 |
}
|
738 |
+
} else {
|
739 |
+
esc_html_e( 'No settings found!', 'quiz-master-next' );
|
|
|
740 |
}
|
741 |
+
?>
|
742 |
+
</div>
|
743 |
+
<div id="select_themes" class="qsm-new-menu-elements">
|
744 |
+
<div class="theme-browser rendered">
|
745 |
+
<div class="themes wp-clearfix">
|
746 |
+
<ul class="theme-sub-menu">
|
747 |
+
<li class="active">
|
748 |
+
<a data-show="downloaded_theme" href="javascript:void(0)"><?php esc_html_e( 'Themes', 'quiz-master-next' ); ?></a></li>
|
749 |
+
<?php if ( ! empty( $themes_data ) ) { ?>
|
750 |
+
<li>
|
751 |
+
<a data-show="browse_themes" href="javascript:void(0)"><?php esc_html_e( 'Explore Marketplace', 'quiz-master-next' ); ?></a></li>
|
752 |
+
<?php } ?>
|
753 |
+
</ul>
|
754 |
+
<div class="theme-wrap" id="browse_themes" style="display: none;">
|
755 |
+
<?php qsm_get_market_themes(); ?>
|
756 |
+
</div>
|
757 |
+
<div class="theme-wrap" id="downloaded_theme">
|
758 |
+
<?php
|
|
|
|
|
|
|
759 |
qsm_get_installed_theme( 0, 'wizard_theme_list' );
|
760 |
qsm_get_default_wizard_themes();
|
761 |
+
?>
|
762 |
+
</div>
|
763 |
</div>
|
764 |
</div>
|
765 |
</div>
|
766 |
+
<div id="addons_list" class="qsm-new-menu-elements" style="display: none;">
|
767 |
+
<div class="qsm-addon-setting-wrap">
|
768 |
+
<div id="qsm_add_addons" class="qsm-primary-acnhor">
|
769 |
+
<div class="qsm-quiz-page-addon qsm-addon-page-list">
|
770 |
+
<?php
|
|
|
771 |
$popular_addons = qsm_get_widget_data( 'popular_products' );
|
772 |
+
?>
|
773 |
+
<div class="qsm_popular_addons" id="qsm_popular_addons">
|
774 |
+
<div class="popuar-addon-ul">
|
775 |
+
<?php
|
776 |
+
if ( $popular_addons ) {
|
777 |
+
foreach ( $popular_addons as $key => $single_arr ) {
|
778 |
+
?>
|
779 |
+
<div>
|
780 |
+
<a href="<?php echo esc_url( $single_arr['link'] ); ?>?utm_source=wizard&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin" target="_blank" rel="noopener">
|
781 |
+
<span class="addon-itd-wrap">
|
782 |
+
<img alt="" src="<?php echo esc_url( $single_arr['img'] ); ?>" />
|
783 |
+
</span>
|
784 |
+
</a>
|
785 |
+
<a class="addon-get-link" href="<?php echo esc_url( $single_arr['link'] ); ?>?utm_source=wizard&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin" target="_blank" rel="noopener">
|
786 |
+
<?php
|
787 |
+
esc_html_e( 'Buy now', 'quiz-master-next' );
|
788 |
+
echo ' : $ ' . esc_html( array_values( $single_arr['price'] )[0] );
|
789 |
+
?>
|
790 |
+
</a>
|
791 |
+
</div>
|
792 |
+
<?php
|
793 |
+
}
|
|
|
|
|
|
|
794 |
}
|
795 |
+
?>
|
796 |
+
</div>
|
797 |
</div>
|
798 |
</div>
|
799 |
</div>
|
800 |
+
<div class="qsm-addon-list-right">
|
801 |
+
<span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
|
802 |
+
<a style="text-decoration: none; font-size: 15px;" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link( 'addons', 'qsm-addons-page', 'all-addons-top' ) ) ?>" target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
|
803 |
+
</div>
|
804 |
</div>
|
805 |
</div>
|
806 |
+
</main>
|
807 |
+
</form>
|
808 |
+
<footer class="qsm-popup__footer">
|
809 |
+
<button id="prev-theme-button"
|
810 |
+
class="button qsm-wizard-borderless"><?php esc_html_e( 'Back', 'quiz-master-next' ); ?></button>
|
811 |
+
<button id="prev-quiz-button"
|
812 |
+
class="button qsm-wizard-borderless"></span><?php esc_html_e( 'Back', 'quiz-master-next' ); ?></button>
|
813 |
+
<button class="button qsm-wizard-borderless" data-micromodal-close
|
814 |
+
aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
815 |
+
<button id="next-quiz-button"
|
816 |
+
class="button button-primary"><?php esc_html_e( 'Next', 'quiz-master-next' ); ?></button>
|
817 |
+
<button id="choose-addons-button"
|
818 |
+
class="button button-primary"><?php esc_html_e( 'Next', 'quiz-master-next' ); ?></button>
|
819 |
+
<button id="create-quiz-button"
|
820 |
+
class="button button-primary"><?php esc_html_e( 'Create Quiz', 'quiz-master-next' ); ?></button>
|
821 |
+
</footer>
|
822 |
+
</div>
|
823 |
</div>
|
824 |
</div>
|
|
|
825 |
<?php
|
826 |
}
|
827 |
|
830 |
* @return array Template Variable
|
831 |
*/
|
832 |
function qsm_text_template_variable_list() {
|
833 |
+
$variable_list = array(
|
834 |
'Core' => array(
|
835 |
'%POINT_SCORE%' => __( 'Score for the quiz when using points', 'quiz-master-next' ),
|
836 |
'%MAXIMUM_POINTS%' => __( 'Maximum possible points one can score', 'quiz-master-next' ),
|
869 |
'%TIME_FINISHED%' => __( 'Display time after quiz submission.', 'quiz-master-next' ),
|
870 |
),
|
871 |
);
|
872 |
+
$variable_list = apply_filters( 'qsm_text_variable_list', $variable_list );
|
873 |
return $variable_list;
|
874 |
}
|
875 |
|
887 |
|
888 |
if ( version_compare( $mlwQuizMasterNext->version, '6.4.12', '<' ) ) {
|
889 |
if ( 1 !== intval( get_option( 'qsm_upated_question_type_val' ) ) ) {
|
890 |
+
$table_name = $wpdb->prefix . 'mlw_questions';
|
891 |
+
$status = $wpdb->query(
|
892 |
$wpdb->prepare(
|
893 |
+
'UPDATE ' . $table_name . " SET `question_type_new` = REPLACE( `question_type_new`, 'fill-in-the-blank', %d )", 14
|
|
|
894 |
)
|
895 |
);
|
896 |
|
928 |
if ( $install ) {
|
929 |
QSM_Install::install();
|
930 |
}
|
|
|
931 |
}
|
932 |
+
|
933 |
add_action( 'admin_init', 'qsm_check_create_tables' );
|
934 |
|
935 |
/**
|
943 |
exit;
|
944 |
}
|
945 |
}
|
946 |
+
|
947 |
add_action( 'admin_page_access_denied', 'qsm_admin_page_access_func' );
|
948 |
|
949 |
function qsm_fetch_theme_data() {
|
954 |
function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
955 |
global $mlwQuizMasterNext;
|
956 |
global $pro_themes;
|
957 |
+
$active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
|
958 |
+
$theme_folders = array();
|
959 |
if ( ! empty( $active_themes ) ) {
|
960 |
foreach ( $active_themes as $dir ) {
|
961 |
$theme_dir = WP_PLUGIN_DIR . '/' . $dir['theme'];
|
966 |
}
|
967 |
?>
|
968 |
<div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
|
969 |
+
<input style="display: none" type="radio" name="quiz_theme_id" value="0" <?php checked( $saved_quiz_theme, '0', true ); ?>>
|
|
|
970 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
971 |
<img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ) . '/assets/screenshot-default-theme.png'; ?>">
|
972 |
<div class="downloaded-theme-button">
|
977 |
<h2 class="theme-name" id="emarket-name"><?php esc_html_e( 'Default Theme', 'quiz-master-next' ); ?></h2>
|
978 |
<div class="theme-actions">
|
979 |
<?php if ( 'default' !== $saved_quiz_theme ) { ?>
|
980 |
+
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
981 |
<?php } ?>
|
982 |
</div>
|
983 |
</div>
|
986 |
<?php
|
987 |
if ( $theme_folders ) {
|
988 |
foreach ( $theme_folders as $key => $theme ) {
|
989 |
+
$theme_name = $theme['theme'];
|
990 |
+
$theme_id = $theme['id'];
|
991 |
?>
|
992 |
<div class="theme-wrapper theme <?php echo '' !== $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
|
993 |
+
<input style="display: none" type="radio" name="quiz_theme_id" value="<?php echo intval( $theme_id ); ?>" <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
|
|
|
994 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
995 |
+
<?php if ( in_array( $theme_name, $pro_themes, true ) ) { ?>
|
996 |
+
<span class="qsm-badge"><?php esc_html_e( 'Pro', 'quiz-master-next' ); ?></span>
|
997 |
<?php } ?>
|
998 |
+
<img alt="" src="<?php echo esc_url( WP_PLUGIN_URL . '/' . $theme_name . '/screenshot.png' ); ?>" />
|
999 |
<div class="downloaded-theme-button">
|
1000 |
<span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
|
1001 |
</div>
|
1011 |
<?php
|
1012 |
} else {
|
1013 |
?>
|
1014 |
+
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
1015 |
<?php
|
1016 |
}
|
1017 |
?>
|
1018 |
<?php } ?>
|
1019 |
<?php if ( $saved_quiz_theme === $theme_id ) { ?>
|
1020 |
+
<a class="button button-primary qsm-customize-color-settings" href="javascript:void(0)"><?php esc_html_e( 'Customize', 'quiz-master-next' ); ?></a>
|
1021 |
<?php } ?>
|
1022 |
</div>
|
1023 |
</div>
|
1033 |
global $themes_data;
|
1034 |
global $pro_themes;
|
1035 |
$installed_themes = $mlwQuizMasterNext->theme_settings->get_installed_themes();
|
1036 |
+
$default_themes = array( 'Breeze', 'Fragrance', 'Pool', 'Ivory', 'Companion', 'Serene', 'Sigma', 'Fortune', 'Pixel', 'Sapience' );
|
1037 |
$default_themes_data = array();
|
1038 |
$keys_to_unset = array();
|
1039 |
if ( ! empty( $themes_data ) ) {
|
1040 |
foreach ( $default_themes as $theme ) {
|
1041 |
$key = array_search( $theme, array_column( $installed_themes, 'theme_name' ), true );
|
1042 |
+
if ( false !== $key && $installed_themes[ $key ]['theme_active'] && file_exists( WP_PLUGIN_DIR . '/' . $installed_themes[ $key ]['theme'] ) ) { // installed themes to be removed
|
1043 |
$key_to_unset = array_search( $theme, array_column( $themes_data, 'name' ), true );
|
1044 |
if ( false !== $key_to_unset ) {
|
1045 |
$keys_to_unset[] = $key_to_unset;
|
1065 |
foreach ( $keys_to_unset as $key ) {
|
1066 |
unset( $themes_data[ $key ] );
|
1067 |
}
|
|
|
1068 |
if ( ! empty( $default_themes_data ) ) {
|
1069 |
+
foreach ( $default_themes_data as $key => $theme ) {
|
1070 |
+
$theme_name = $theme['name'];
|
1071 |
+
$theme_url = $theme['link'];
|
1072 |
+
$theme_screenshot = $theme['img'];
|
1073 |
+
$theme_demo = $theme['demo'];
|
1074 |
?>
|
1075 |
<div class="theme-wrapper theme market-theme">
|
1076 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1077 |
+
<?php if ( in_array( $theme_name, $pro_themes, true ) ) { ?>
|
1078 |
+
<span class="qsm-badge"><?php esc_html_e( 'Pro', 'quiz-master-next' ); ?></span>
|
1079 |
<?php } ?>
|
1080 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1081 |
<div class="market-theme-url">
|
1082 |
+
<a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
|
1083 |
+
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard"><?php echo in_array( $theme_name, $pro_themes, true ) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ); ?>
|
|
|
|
|
|
|
1084 |
</a>
|
1085 |
</div>
|
1086 |
</div>
|
1094 |
}
|
1095 |
|
1096 |
function qsm_get_market_themes() {
|
1097 |
+
global $themes_data, $pro_themes;
|
|
|
1098 |
if ( ! empty( $themes_data ) ) {
|
1099 |
+
foreach ( $themes_data as $key => $theme ) {
|
1100 |
+
$theme_name = $theme['name'];
|
1101 |
+
$theme_url = $theme['link'];
|
1102 |
+
$theme_screenshot = $theme['img'];
|
1103 |
+
$theme_demo = $theme['demo'];
|
1104 |
?>
|
1105 |
<div class="theme-wrapper theme market-theme">
|
1106 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1107 |
+
<?php if ( in_array( $theme_name, $pro_themes, true ) ) { ?>
|
1108 |
+
<span class="qsm-badge"><?php esc_html_e( 'Pro', 'quiz-master-next' ); ?></span>
|
1109 |
<?php } ?>
|
1110 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1111 |
<div class="market-theme-url">
|
1112 |
<a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>?utm_source=plugin&utm_medium=wizard"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
|
1113 |
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>?utm_source=plugin&utm_medium=wizard">
|
1114 |
+
<?php echo in_array( $theme_name, $pro_themes, true ) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ); ?>
|
1115 |
</a>
|
1116 |
</div>
|
1117 |
</div>
|
1146 |
}
|
1147 |
return $array;
|
1148 |
}
|
1149 |
+
|
1150 |
+
function qsm_admin_upgrade_popup( $qsm_pop_up_arguments ) {
|
1151 |
+
?>
|
1152 |
+
<div class="qsm-popup qsm-popup-slide qsm-standard-popup qsm-popup-upgrade" id="<?php echo esc_attr( $qsm_pop_up_arguments['popup_id'] ); ?>" aria-hidden="false" style="display:none">
|
1153 |
+
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
1154 |
+
<div class="qsm-popup__container qsm-upgrade-box" role="dialog" aria-modal="true">
|
1155 |
+
<header class="qsm-popup__header qsm-question-bank-header">
|
1156 |
+
<div class="qsm-popup__title" id="modal-2-title">
|
1157 |
+
<?php echo esc_html( $qsm_pop_up_arguments['popup_title'] ); ?>
|
1158 |
+
<h5><?php esc_html_e( 'PREMIUM', 'quiz-master-next' ); ?></h5>
|
1159 |
+
</div>
|
1160 |
+
<a class="qsm-popup__close qsm-popup-upgrade-close" aria-label="Close modal" data-micromodal-close></a>
|
1161 |
+
</header>
|
1162 |
+
<main class="qsm-popup__content" id="modal-2-content">
|
1163 |
+
<div class="qsm-upgrade-text qsm-popup-upgrade-text">
|
1164 |
+
<?php echo esc_html( $qsm_pop_up_arguments['popup_description'] ); ?>
|
1165 |
+
</div>
|
1166 |
+
<span class="qsm-upgrade-read-icon">
|
1167 |
+
<img src= <?php echo esc_url( QSM_PLUGIN_URL . 'php/images/read_icon.png' ); ?> alt="read">
|
1168 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/' . $qsm_pop_up_arguments['popup_doc_link'], 'quiz-upgrade-box', 'add-ons' ) ); ?>" target="_blank" rel="noopener" >
|
1169 |
+
<?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?><span class="dashicons dashicons-arrow-right-alt qsm-upgrade-right-arrow" ></span>
|
1170 |
+
</a>
|
1171 |
+
</span>
|
1172 |
+
<div class="qsm-upgrade-chart"><img src= <?php echo esc_url( $qsm_pop_up_arguments['popup_chart_image'] ); ?> alt="chart"></div>
|
1173 |
+
<div class="qsm-popup-upgrade-info">
|
1174 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/info.png' ); ?>" alt="information">
|
1175 |
+
<span><?php echo esc_html( $qsm_pop_up_arguments['popup_information'] ); ?></span>
|
1176 |
+
</div>
|
1177 |
+
<div class="qsm-upgrade-buttons">
|
1178 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'pricing', 'quiz-upgrade-box' ) ); ?>" target="_blank" class="qsm-popup__btn qsm-popup__btn-primary qsm_bundle" rel="noopener"><?php esc_html_e( 'Upgrade to QSM Pro', 'quiz-master-next' ); ?></a>
|
1179 |
+
<a href="<?php echo esc_url( $qsm_pop_up_arguments['popup_addon_link'] ); ?>" target="_blank" class="qsm_export_import" rel="noopener" ><?php echo esc_html( $qsm_pop_up_arguments['popup_addon_name'] ); ?></a>
|
1180 |
+
</div>
|
1181 |
+
</main>
|
1182 |
+
</div>
|
1183 |
+
</div>
|
1184 |
+
</div>
|
1185 |
+
<?php
|
1186 |
+
}
|
php/admin/options-page-questions-tab.php
CHANGED
@@ -482,10 +482,11 @@ function qsm_options_questions_tab_content() {
|
|
482 |
<optgroup label="<?php echo esc_attr( $category_name ) ?>">
|
483 |
<?php
|
484 |
foreach ( $category_items as $type ) {
|
485 |
-
if ( isset( $type['
|
486 |
-
echo '<option disabled
|
|
|
|
|
487 |
}
|
488 |
-
echo '<option value="' . esc_attr( $type['slug'] ) . '">' . esc_html( $type['name'] ) . '</option>';
|
489 |
}
|
490 |
?>
|
491 |
</optgroup>
|
482 |
<optgroup label="<?php echo esc_attr( $category_name ) ?>">
|
483 |
<?php
|
484 |
foreach ( $category_items as $type ) {
|
485 |
+
if ( isset( $type['disabled'] ) && true === $type['disabled'] ) {
|
486 |
+
echo '<option disabled value="' . esc_attr( $type['slug'] ) . '">' . esc_html( $type['name'] ) . '</option>';
|
487 |
+
} else {
|
488 |
+
echo '<option value="' . esc_attr( $type['slug'] ) . '">' . esc_html( $type['name'] ) . '</option>';
|
489 |
}
|
|
|
490 |
}
|
491 |
?>
|
492 |
</optgroup>
|
php/admin/options-page-style-tab.php
CHANGED
@@ -168,7 +168,11 @@ function qsm_options_styling_tab_content() {
|
|
168 |
</style>
|
169 |
<div class="theme-browser rendered current">
|
170 |
<div class="themes wp-clearfix">
|
171 |
-
<?php
|
|
|
|
|
|
|
|
|
172 |
</div>
|
173 |
</div>
|
174 |
<div class="theme-featured-image" style="display:none;">
|
@@ -277,18 +281,25 @@ function qsm_options_styling_tab_content() {
|
|
277 |
<td>
|
278 |
<?php
|
279 |
switch ( $theme_val['type'] ) {
|
280 |
-
case 'image':
|
281 |
?>
|
282 |
<input class="quiz_background_image" name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" >
|
283 |
<a class="set_background_image button" href="javascript:void(0);"><?php esc_html_e( 'Select Image', 'quiz-master-next' ); ?></a>
|
284 |
<?php
|
285 |
break;
|
286 |
-
case 'color':
|
287 |
?>
|
288 |
<input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" data-default-color="<?php echo esc_attr( $theme_val['default'] ); ?>" class="my-color-field" />
|
289 |
<?php
|
290 |
break;
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
?>
|
293 |
<input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>"/>
|
294 |
<?php
|
168 |
</style>
|
169 |
<div class="theme-browser rendered current">
|
170 |
<div class="themes wp-clearfix">
|
171 |
+
<?php
|
172 |
+
qsm_get_installed_theme( $saved_quiz_theme );
|
173 |
+
qsm_fetch_theme_data();
|
174 |
+
qsm_get_default_wizard_themes();
|
175 |
+
?>
|
176 |
</div>
|
177 |
</div>
|
178 |
<div class="theme-featured-image" style="display:none;">
|
281 |
<td>
|
282 |
<?php
|
283 |
switch ( $theme_val['type'] ) {
|
284 |
+
case 'image':
|
285 |
?>
|
286 |
<input class="quiz_background_image" name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" >
|
287 |
<a class="set_background_image button" href="javascript:void(0);"><?php esc_html_e( 'Select Image', 'quiz-master-next' ); ?></a>
|
288 |
<?php
|
289 |
break;
|
290 |
+
case 'color':
|
291 |
?>
|
292 |
<input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>" data-default-color="<?php echo esc_attr( $theme_val['default'] ); ?>" class="my-color-field" />
|
293 |
<?php
|
294 |
break;
|
295 |
+
case 'checkbox':
|
296 |
+
$theme_val['default'] = ! empty($theme_val['default']) ? $theme_val['default'] : 0;
|
297 |
+
?>
|
298 |
+
<input type="hidden" name="settings[<?php echo esc_attr( $key ); ?>][value]" value="<?php echo esc_attr( $theme_val['value'] ); ?>">
|
299 |
+
<input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="checkbox" value="<?php echo esc_attr( $theme_val['value'] ); ?>" <?php echo $theme_val['value'] === $theme_val['default'] ? "checked" : ""; ?> />
|
300 |
+
<?php
|
301 |
+
break;
|
302 |
+
default:
|
303 |
?>
|
304 |
<input name="settings[<?php echo esc_attr( $key ); ?>][default]" type="text" value="<?php echo esc_attr( $theme_val['default'] ); ?>"/>
|
305 |
<?php
|
php/admin/quiz-options-page.php
CHANGED
@@ -271,7 +271,24 @@ function qsm_generate_quiz_options() {
|
|
271 |
</div><!-- Backbone Views -->
|
272 |
<script type="text/javascript">jQuery(document).ready(function(){jQuery(".qsm-alerts-placeholder").length>0&&jQuery(".qsm-alerts").length>0&&jQuery(".qsm-alerts-placeholder").replaceWith(jQuery(".qsm-alerts"))});</script>
|
273 |
<?php
|
274 |
-
add_action(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
}
|
276 |
|
277 |
/**
|
@@ -288,5 +305,4 @@ function qsm_quiz_options_notice_template() {
|
|
288 |
</div>
|
289 |
</script>
|
290 |
<?php
|
291 |
-
}
|
292 |
-
?>
|
271 |
</div><!-- Backbone Views -->
|
272 |
<script type="text/javascript">jQuery(document).ready(function(){jQuery(".qsm-alerts-placeholder").length>0&&jQuery(".qsm-alerts").length>0&&jQuery(".qsm-alerts-placeholder").replaceWith(jQuery(".qsm-alerts"))});</script>
|
273 |
<?php
|
274 |
+
add_action('admin_footer', 'qsm_quiz_options_notice_template');?>
|
275 |
+
<!--Div for the upgrade popup of advanced question type -->
|
276 |
+
<?php
|
277 |
+
if ( ! class_exists('QSM_Advance_Question') ) {
|
278 |
+
$qsm_pop_up_arguments = array(
|
279 |
+
"popup_id" => 'modal-advanced-question-type',
|
280 |
+
"popup_title" => __('Advanced Question Types', 'quiz-master-next'),
|
281 |
+
"popup_description" => __('Create better quizzes and surveys with the Advanced Questions addon. Incorporate precise question types like Matching Pairs, Radio Grid, and Checkbox Grid questions in your quizzes and surveys.', 'quiz-master-next'),
|
282 |
+
"popup_doc_link" => "question-types/",
|
283 |
+
"popup_chart_image" => plugins_url('', dirname(__FILE__)) . '/images/advanced_question_type.png',
|
284 |
+
"popup_information" => __('QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today OR you can buy Advanced Question Addon separately.', 'quiz-master-next'),
|
285 |
+
"popup_addon_name" => __('Buy Advanced Questions Addon', 'quiz-master-next'),
|
286 |
+
"popup_addon_link" => qsm_get_plugin_link( 'downloads/advanced-question-types', 'quiz-upgrade-box' ),
|
287 |
+
);
|
288 |
+
qsm_admin_upgrade_popup($qsm_pop_up_arguments);
|
289 |
+
}
|
290 |
+
?>
|
291 |
+
<?php
|
292 |
}
|
293 |
|
294 |
/**
|
305 |
</div>
|
306 |
</script>
|
307 |
<?php
|
308 |
+
}
|
|
php/admin/quizzes-page.php
CHANGED
@@ -341,7 +341,7 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
341 |
<!-- Popup for new quiz -->
|
342 |
<?php qsm_create_new_quiz_wizard(); ?>
|
343 |
<!-- Popup for duplicate quiz -->
|
344 |
-
<div class="qsm-popup qsm-popup-slide" id="modal-4" aria-hidden="true">
|
345 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
346 |
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-4-title">
|
347 |
<header class="qsm-popup__header">
|
@@ -359,17 +359,15 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
359 |
<?php wp_nonce_field( 'qsm_duplicate_quiz', 'qsm_duplicate_quiz_nonce' ); ?>
|
360 |
</form>
|
361 |
</main>
|
362 |
-
<footer class="qsm-popup__footer">
|
363 |
-
<button
|
364 |
-
|
365 |
-
<button class="qsm-popup__btn" data-micromodal-close
|
366 |
-
aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
367 |
</footer>
|
368 |
</div>
|
369 |
</div>
|
370 |
</div>
|
371 |
<!-- Popup for delete quiz -->
|
372 |
-
<div class="qsm-popup qsm-popup-slide" id="modal-5" aria-hidden="true">
|
373 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
374 |
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
|
375 |
<header class="qsm-popup__header">
|
@@ -378,8 +376,7 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
378 |
</header>
|
379 |
<main class="qsm-popup__content" id="modal-5-content">
|
380 |
<form action='' method='post' id="delete-quiz-form" style="display:flex; flex-direction:column;">
|
381 |
-
<h3><strong><?php esc_html_e( 'Are you sure you want to delete this quiz or survey?', 'quiz-master-next' ); ?></strong>
|
382 |
-
</h3>
|
383 |
<label>
|
384 |
<input type="checkbox" value="1" name="qsm_delete_question_from_qb" />
|
385 |
<?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
|
@@ -393,11 +390,9 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
393 |
<input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
|
394 |
</form>
|
395 |
</main>
|
396 |
-
<footer class="qsm-popup__footer">
|
397 |
-
<button
|
398 |
-
|
399 |
-
<button class="qsm-popup__btn" data-micromodal-close
|
400 |
-
aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
401 |
</footer>
|
402 |
</div>
|
403 |
</div>
|
@@ -434,25 +429,18 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
434 |
</div>
|
435 |
</div>
|
436 |
<!-- Popup for export import upsell -->
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
<footer class="qsm-popup__footer">
|
450 |
-
<a style="color: white;text-decoration: none;" href="<?php echo esc_url( qsm_get_plugin_link('downloads/export-import', 'quiz-list-page') );?>" target="_blank" class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Buy Now', 'quiz-master-next' ); ?></a>
|
451 |
-
<button class="qsm-popup__btn" data-micromodal-close aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
452 |
-
</footer>
|
453 |
-
</div>
|
454 |
-
</div>
|
455 |
-
</div>
|
456 |
<!-- Popup for delete quiz -->
|
457 |
<div class="qsm-popup qsm-popup-slide" id="modal-6" aria-hidden="true">
|
458 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
@@ -496,6 +484,8 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
496 |
}
|
497 |
}
|
498 |
|
|
|
|
|
499 |
}
|
500 |
|
501 |
}
|
341 |
<!-- Popup for new quiz -->
|
342 |
<?php qsm_create_new_quiz_wizard(); ?>
|
343 |
<!-- Popup for duplicate quiz -->
|
344 |
+
<div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-4" aria-hidden="true">
|
345 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
346 |
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-4-title">
|
347 |
<header class="qsm-popup__header">
|
359 |
<?php wp_nonce_field( 'qsm_duplicate_quiz', 'qsm_duplicate_quiz_nonce' ); ?>
|
360 |
</form>
|
361 |
</main>
|
362 |
+
<footer class="qsm-popup__footer qsm-popup__footer_with_btns">
|
363 |
+
<button class="qsm-popup__btn" data-micromodal-close aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
364 |
+
<button id="duplicate-quiz-button" class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Duplicate', 'quiz-master-next' ); ?></button>
|
|
|
|
|
365 |
</footer>
|
366 |
</div>
|
367 |
</div>
|
368 |
</div>
|
369 |
<!-- Popup for delete quiz -->
|
370 |
+
<div class="qsm-popup qsm-popup-slide qsm-standard-popup" id="modal-5" aria-hidden="true">
|
371 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
372 |
<div class="qsm-popup__container" role="dialog" aria-modal="true" aria-labelledby="modal-5-title">
|
373 |
<header class="qsm-popup__header">
|
376 |
</header>
|
377 |
<main class="qsm-popup__content" id="modal-5-content">
|
378 |
<form action='' method='post' id="delete-quiz-form" style="display:flex; flex-direction:column;">
|
379 |
+
<h3 style="margin-top: 0;"><strong><?php esc_html_e( 'Are you sure you want to delete this quiz or survey?', 'quiz-master-next' ); ?></strong></h3>
|
|
|
380 |
<label>
|
381 |
<input type="checkbox" value="1" name="qsm_delete_question_from_qb" />
|
382 |
<?php esc_html_e( 'Delete question from question bank?', 'quiz-master-next' ); ?>
|
390 |
<input type='hidden' id='delete_quiz_name' name='delete_quiz_name' value='' />
|
391 |
</form>
|
392 |
</main>
|
393 |
+
<footer class="qsm-popup__footer qsm-popup__footer_with_btns">
|
394 |
+
<button class="qsm-popup__btn" data-micromodal-close aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
395 |
+
<button id="delete-quiz-button" class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Delete', 'quiz-master-next' ); ?></button>
|
|
|
|
|
396 |
</footer>
|
397 |
</div>
|
398 |
</div>
|
429 |
</div>
|
430 |
</div>
|
431 |
<!-- Popup for export import upsell -->
|
432 |
+
<?php
|
433 |
+
$qsm_pop_up_arguments = array(
|
434 |
+
"popup_id" => 'modal-export-import',
|
435 |
+
"popup_title" => __('Export & Import', 'quiz-master-next'),
|
436 |
+
"popup_description" => __('Wondering how to import quizzes or survey data from one website and export it to another? Easily export and import data with this premium add-on.', 'quiz-master-next'),
|
437 |
+
"popup_doc_link" => "add-ons/export-import/",
|
438 |
+
"popup_chart_image" => plugins_url('', dirname(__FILE__)) . '/images/export_import_chart.png',
|
439 |
+
"popup_information" => __('QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today OR you can buy Export & Import Addon separately.', 'quiz-master-next'),
|
440 |
+
"popup_addon_name" => __('Buy Export & Import Addon', 'quiz-master-next'),
|
441 |
+
"popup_addon_link" => qsm_get_plugin_link( 'downloads/export-import', 'quiz-upgrade-box' ),
|
442 |
+
);
|
443 |
+
qsm_admin_upgrade_popup($qsm_pop_up_arguments); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
<!-- Popup for delete quiz -->
|
445 |
<div class="qsm-popup qsm-popup-slide" id="modal-6" aria-hidden="true">
|
446 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
484 |
}
|
485 |
}
|
486 |
|
487 |
+
|
488 |
+
|
489 |
}
|
490 |
|
491 |
}
|
php/admin/settings-page.php
CHANGED
@@ -170,7 +170,7 @@ class QMNGlobalSettingsPage {
|
|
170 |
add_settings_field( 'limit-number-of-questions', __( 'Limit number of Questions', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
171 |
add_settings_field( 'limit-number-of-questions-per-category', __( 'Limit number of Questions Per Category', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions_per_category' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
172 |
add_settings_field( 'quiz-dates', __( 'Quiz Dates', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_dates' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
173 |
-
add_settings_field( 'can-submit-after-end-date',
|
174 |
add_settings_field( 'random-questions', __( 'Random Questions', 'quiz-master-next' ), array( $this, 'qsm_global_random_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
175 |
add_settings_field( 'contact-form-position', __( 'Contact form position', 'quiz-master-next' ), array( $this, 'qsm_global_contact_form_position' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
|
176 |
add_settings_field( 'show-contact-form-to-logged-in-users', __( 'Show contact form to logged in users', 'quiz-master-next' ), array( $this, 'qsm_global_show_contact_form_to_logged_in_users' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
|
@@ -1268,8 +1268,9 @@ class QMNGlobalSettingsPage {
|
|
1268 |
public function qsm_global_do_not_allow_quiz_submission_after_the_end_datetime() {
|
1269 |
global $globalQuizsetting;
|
1270 |
$qsm_not_allow_after_expired_time = ( isset( $globalQuizsetting['not_allow_after_expired_time'] ) && '' !== $globalQuizsetting['not_allow_after_expired_time'] ? $globalQuizsetting['not_allow_after_expired_time'] : '' );
|
1271 |
-
echo '<fieldset class="buttonset buttonset-hide" >
|
1272 |
-
<input type="checkbox" id="not_allow_after_expired_time-1" name="qsm-quiz-settings[not_allow_after_expired_time]" value="1" ' . checked(
|
|
|
1273 |
<br>
|
1274 |
</fieldset>';
|
1275 |
}
|
170 |
add_settings_field( 'limit-number-of-questions', __( 'Limit number of Questions', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
171 |
add_settings_field( 'limit-number-of-questions-per-category', __( 'Limit number of Questions Per Category', 'quiz-master-next' ), array( $this, 'qsm_global_limit_number_of_questions_per_category' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
172 |
add_settings_field( 'quiz-dates', __( 'Quiz Dates', 'quiz-master-next' ), array( $this, 'qsm_global_quiz_dates' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
173 |
+
add_settings_field( 'can-submit-after-end-date', "", array( $this, 'qsm_global_do_not_allow_quiz_submission_after_the_end_datetime' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
174 |
add_settings_field( 'random-questions', __( 'Random Questions', 'quiz-master-next' ), array( $this, 'qsm_global_random_questions' ), 'qsm_default_global_option_general', 'qmn-global-section' );
|
175 |
add_settings_field( 'contact-form-position', __( 'Contact form position', 'quiz-master-next' ), array( $this, 'qsm_global_contact_form_position' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
|
176 |
add_settings_field( 'show-contact-form-to-logged-in-users', __( 'Show contact form to logged in users', 'quiz-master-next' ), array( $this, 'qsm_global_show_contact_form_to_logged_in_users' ), 'qsm_default_global_option_contact', 'qmn-global-section' );
|
1268 |
public function qsm_global_do_not_allow_quiz_submission_after_the_end_datetime() {
|
1269 |
global $globalQuizsetting;
|
1270 |
$qsm_not_allow_after_expired_time = ( isset( $globalQuizsetting['not_allow_after_expired_time'] ) && '' !== $globalQuizsetting['not_allow_after_expired_time'] ? $globalQuizsetting['not_allow_after_expired_time'] : '' );
|
1271 |
+
echo '<fieldset class="buttonset buttonset-hide not_allow_after_expired_time" >
|
1272 |
+
<input type="checkbox" id="not_allow_after_expired_time-1" name="qsm-quiz-settings[not_allow_after_expired_time]" value="1" ' . checked($qsm_not_allow_after_expired_time, '1', false) . '>
|
1273 |
+
<label for="not_allow_after_expired_time-1"> '.esc_html__("Do not allow quiz submission after the end date/time", "quiz-master-next").'</label>
|
1274 |
<br>
|
1275 |
</fieldset>';
|
1276 |
}
|
php/classes/class-qmn-plugin-helper.php
CHANGED
@@ -1063,31 +1063,23 @@ class QMNPluginHelper {
|
|
1063 |
/** */
|
1064 |
public function categorize_question_types() {
|
1065 |
$question_type_categorized = array();
|
1066 |
-
$question_type_others = array();
|
1067 |
$question_type_uncategorized = array();
|
1068 |
foreach ( $this->question_types as $question_type ) {
|
1069 |
$is_categorized = isset( $question_type ['category'] ) && '' !== $question_type ['category'];
|
1070 |
if ( $is_categorized ) {
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
} else {
|
1077 |
-
$question_type_categorized[ $question_type ['category'] ] [ $question_type['slug'] ] = array(
|
1078 |
-
'slug' => $question_type['slug'],
|
1079 |
-
'name' => $question_type['name'],
|
1080 |
-
);
|
1081 |
-
}
|
1082 |
} else {
|
1083 |
$question_type_uncategorized['uncategorized'][ $question_type['slug'] ] = array(
|
1084 |
-
'slug'
|
1085 |
-
'name'
|
|
|
1086 |
);
|
1087 |
-
|
1088 |
}
|
1089 |
}
|
1090 |
-
$question_type_categorized = array_merge( $question_type_categorized, $question_type_others );
|
1091 |
$question_type_categorized = array_merge( $question_type_categorized, $question_type_uncategorized );
|
1092 |
return $question_type_categorized;
|
1093 |
}
|
1063 |
/** */
|
1064 |
public function categorize_question_types() {
|
1065 |
$question_type_categorized = array();
|
|
|
1066 |
$question_type_uncategorized = array();
|
1067 |
foreach ( $this->question_types as $question_type ) {
|
1068 |
$is_categorized = isset( $question_type ['category'] ) && '' !== $question_type ['category'];
|
1069 |
if ( $is_categorized ) {
|
1070 |
+
$question_type_categorized[ $question_type ['category'] ] [ $question_type['slug'] ] = array(
|
1071 |
+
'slug' => $question_type['slug'],
|
1072 |
+
'name' => $question_type['name'],
|
1073 |
+
'disabled' => (isset( $question_type['display'] ) && '-1' == $question_type['display']) ? true : false,
|
1074 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
1075 |
} else {
|
1076 |
$question_type_uncategorized['uncategorized'][ $question_type['slug'] ] = array(
|
1077 |
+
'slug' => $question_type['slug'],
|
1078 |
+
'name' => $question_type['name'],
|
1079 |
+
'disabled' => (isset( $question_type['display'] ) && '-1' == $question_type['display']) ? true : false,
|
1080 |
);
|
|
|
1081 |
}
|
1082 |
}
|
|
|
1083 |
$question_type_categorized = array_merge( $question_type_categorized, $question_type_uncategorized );
|
1084 |
return $question_type_categorized;
|
1085 |
}
|
php/classes/class-qmn-quiz-manager.php
CHANGED
@@ -408,7 +408,7 @@ class QMNQuizManager {
|
|
408 |
$saved_quiz_theme = $mlwQuizMasterNext->theme_settings->get_active_quiz_theme_path( $quiz );
|
409 |
$folder_name = QSM_THEME_PATH . $saved_quiz_theme . '/';
|
410 |
if ( file_exists( $folder_name . 'functions.php' ) ) {
|
411 |
-
|
412 |
}
|
413 |
do_action( 'qsm_enqueue_script_style', $qmn_quiz_options );
|
414 |
|
@@ -1214,6 +1214,7 @@ class QMNQuizManager {
|
|
1214 |
$animation_effect = isset( $qmn_quiz_options->quiz_animation ) && '' !== $qmn_quiz_options->quiz_animation ? ' animated ' . $qmn_quiz_options->quiz_animation : '';
|
1215 |
$enable_pagination_quiz = isset( $qmn_quiz_options->enable_pagination_quiz ) && $qmn_quiz_options->enable_pagination_quiz ? $qmn_quiz_options->enable_pagination_quiz : 0;
|
1216 |
$pagination_option = $qmn_quiz_options->pagination;
|
|
|
1217 |
if ( $enable_pagination_quiz && $pagination_option ) {
|
1218 |
$total_pages_count = count( $qmn_quiz_questions );
|
1219 |
$total_pagination = ceil( $total_pages_count / $pagination_option );
|
@@ -1428,8 +1429,16 @@ class QMNQuizManager {
|
|
1428 |
$timezone = isset( $_POST['currentuserTimeZone'] ) ? sanitize_text_field( wp_unslash( $_POST['currentuserTimeZone'] ) ) : '';
|
1429 |
$dtUtcDate = strtotime( $dateStr . ' ' . $timezone );
|
1430 |
|
1431 |
-
if ( '1' === $qsm_option['quiz_options']['not_allow_after_expired_time'] && isset( $_POST['currentuserTime'] ) && sanitize_text_field( wp_unslash( $_POST['currentuserTime'] ) ) > $dtUtcDate ) {
|
1432 |
-
echo wp_json_encode(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1433 |
die();
|
1434 |
}
|
1435 |
$data = array(
|
@@ -1438,27 +1447,6 @@ class QMNQuizManager {
|
|
1438 |
'quiz_system' => $options->system,
|
1439 |
'quiz_payment_id' => isset( $_POST['main_payment_id'] ) ? sanitize_text_field( wp_unslash( $_POST['main_payment_id'] ) ) : '',
|
1440 |
);
|
1441 |
-
$post_data = array(
|
1442 |
-
'g-recaptcha-response' => isset( $_POST['g-recaptcha-response'] ) ? sanitize_textarea_field( wp_unslash( $_POST['g-recaptcha-response'] ) ) : '',
|
1443 |
-
);
|
1444 |
-
if ( class_exists( 'QSM_Recaptcha' ) ) {
|
1445 |
-
$recaptcha_data = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'recaptcha_integration_settings' );
|
1446 |
-
if ( isset( $recaptcha_data['enable_recaptcha'] ) && 'no' !== $recaptcha_data['enable_recaptcha'] ) {
|
1447 |
-
$verified = qsm_verify_recaptcha( $post_data );
|
1448 |
-
if ( ! $verified ) {
|
1449 |
-
echo wp_json_encode(
|
1450 |
-
array(
|
1451 |
-
'display' => htmlspecialchars_decode( 'ReCaptcha Validation failed!' ),
|
1452 |
-
'redirect' => false,
|
1453 |
-
'result_status' => array(
|
1454 |
-
'save_response' => false,
|
1455 |
-
),
|
1456 |
-
)
|
1457 |
-
);
|
1458 |
-
exit;
|
1459 |
-
}
|
1460 |
-
}
|
1461 |
-
}
|
1462 |
echo wp_json_encode( $this->submit_results( $options, $data ) );
|
1463 |
die();
|
1464 |
}
|
@@ -1492,7 +1480,7 @@ class QMNQuizManager {
|
|
1492 |
public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) {
|
1493 |
global $wpdb, $qmn_allowed_visit;
|
1494 |
$result_display = '';
|
1495 |
-
|
1496 |
$qmn_array_for_variables['user_ip'] = $this->get_user_ip();
|
1497 |
|
1498 |
$result_display = apply_filters( 'qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
|
408 |
$saved_quiz_theme = $mlwQuizMasterNext->theme_settings->get_active_quiz_theme_path( $quiz );
|
409 |
$folder_name = QSM_THEME_PATH . $saved_quiz_theme . '/';
|
410 |
if ( file_exists( $folder_name . 'functions.php' ) ) {
|
411 |
+
include_once $folder_name . 'functions.php';
|
412 |
}
|
413 |
do_action( 'qsm_enqueue_script_style', $qmn_quiz_options );
|
414 |
|
1214 |
$animation_effect = isset( $qmn_quiz_options->quiz_animation ) && '' !== $qmn_quiz_options->quiz_animation ? ' animated ' . $qmn_quiz_options->quiz_animation : '';
|
1215 |
$enable_pagination_quiz = isset( $qmn_quiz_options->enable_pagination_quiz ) && $qmn_quiz_options->enable_pagination_quiz ? $qmn_quiz_options->enable_pagination_quiz : 0;
|
1216 |
$pagination_option = $qmn_quiz_options->pagination;
|
1217 |
+
$total_pagination = $total_pages_count = 1;
|
1218 |
if ( $enable_pagination_quiz && $pagination_option ) {
|
1219 |
$total_pages_count = count( $qmn_quiz_questions );
|
1220 |
$total_pagination = ceil( $total_pages_count / $pagination_option );
|
1429 |
$timezone = isset( $_POST['currentuserTimeZone'] ) ? sanitize_text_field( wp_unslash( $_POST['currentuserTimeZone'] ) ) : '';
|
1430 |
$dtUtcDate = strtotime( $dateStr . ' ' . $timezone );
|
1431 |
|
1432 |
+
if ( '1' === $qsm_option['quiz_options']['not_allow_after_expired_time'] && isset( $_POST['currentuserTime'] ) && sanitize_text_field( wp_unslash( $_POST['currentuserTime'] ) ) > $dtUtcDate && ! empty($dateStr) ) {
|
1433 |
+
echo wp_json_encode(
|
1434 |
+
array(
|
1435 |
+
'display' => htmlspecialchars_decode( 'Quiz Expired!' ),
|
1436 |
+
'redirect' => false,
|
1437 |
+
'result_status' => array(
|
1438 |
+
'save_response' => false,
|
1439 |
+
),
|
1440 |
+
)
|
1441 |
+
);
|
1442 |
die();
|
1443 |
}
|
1444 |
$data = array(
|
1447 |
'quiz_system' => $options->system,
|
1448 |
'quiz_payment_id' => isset( $_POST['main_payment_id'] ) ? sanitize_text_field( wp_unslash( $_POST['main_payment_id'] ) ) : '',
|
1449 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1450 |
echo wp_json_encode( $this->submit_results( $options, $data ) );
|
1451 |
die();
|
1452 |
}
|
1480 |
public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) {
|
1481 |
global $wpdb, $qmn_allowed_visit;
|
1482 |
$result_display = '';
|
1483 |
+
do_action( 'qsm_submit_results_before', $qmn_quiz_options, $qmn_array_for_variables );
|
1484 |
$qmn_array_for_variables['user_ip'] = $this->get_user_ip();
|
1485 |
|
1486 |
$result_display = apply_filters( 'qmn_begin_results', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
|
php/classes/class-qsm-contact-manager.php
CHANGED
@@ -220,18 +220,20 @@ class QSM_Contact_Manager {
|
|
220 |
} elseif ( ! empty( $fields ) && is_array( $fields ) ) {
|
221 |
$total_fields = count( $fields );
|
222 |
for ( $i = 0; $i < $total_fields; $i++ ) {
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
233 |
}
|
234 |
-
$responses[] = $field_array;
|
235 |
}
|
236 |
}
|
237 |
|
220 |
} elseif ( ! empty( $fields ) && is_array( $fields ) ) {
|
221 |
$total_fields = count( $fields );
|
222 |
for ( $i = 0; $i < $total_fields; $i++ ) {
|
223 |
+
if ( 'true' === $fields[ $i ]["enable"] || true === $fields[ $i ]["enable"] ) {
|
224 |
+
$field_label = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $fields[ $i ]['label'], "quiz_contact_field_text-{$i}-{$options->quiz_id}" );
|
225 |
+
$field_array = array(
|
226 |
+
'label' => $field_label,
|
227 |
+
'value' => isset( $_POST[ "contact_field_$i" ] ) ? htmlentities( sanitize_text_field( wp_unslash( $_POST[ "contact_field_$i" ] ) ) ) : 'None',
|
228 |
+
);
|
229 |
+
if ( isset( $fields[ $i ]['use'] ) ) {
|
230 |
+
$field_array['use'] = $fields[ $i ]['use'];
|
231 |
+
}
|
232 |
+
if ( isset( $fields[ $i ]['type'] ) ) {
|
233 |
+
$field_array['type'] = $fields[ $i ]['type'];
|
234 |
+
}
|
235 |
+
$responses[] = $field_array;
|
236 |
}
|
|
|
237 |
}
|
238 |
}
|
239 |
|
php/classes/class-qsm-fields.php
CHANGED
@@ -732,6 +732,9 @@ class QSM_Fields {
|
|
732 |
</th>
|
733 |
<td>
|
734 |
<fieldset class="buttonset buttonset-hide" data-hide='1'>
|
|
|
|
|
|
|
735 |
<?php
|
736 |
foreach ( $field["options"] as $option ) {
|
737 |
?>
|
732 |
</th>
|
733 |
<td>
|
734 |
<fieldset class="buttonset buttonset-hide" data-hide='1'>
|
735 |
+
<?php if ( isset($field['ph_text']) && '' !== $field['ph_text'] ) { ?>
|
736 |
+
<span><?php echo wp_kses_post( $field['ph_text'] ); ?></span>
|
737 |
+
<?php } ?>
|
738 |
<?php
|
739 |
foreach ( $field["options"] as $option ) {
|
740 |
?>
|
php/classes/class-qsm-install.php
CHANGED
@@ -369,16 +369,16 @@ class QSM_Install {
|
|
369 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
370 |
$field_array = array(
|
371 |
'id' => 'not_allow_after_expired_time',
|
372 |
-
'label' =>
|
373 |
'type' => 'checkbox',
|
374 |
'options' => array(
|
375 |
array(
|
376 |
'value' => 1,
|
|
|
377 |
),
|
378 |
),
|
379 |
'default' => 0,
|
380 |
-
'
|
381 |
-
'option_tab' => 'quiz_submission',
|
382 |
);
|
383 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
384 |
|
@@ -1102,6 +1102,7 @@ class QSM_Install {
|
|
1102 |
'%QUESTION_MAX_POINTS%',
|
1103 |
),
|
1104 |
);
|
|
|
1105 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
|
1106 |
|
1107 |
// Registers question_answer_template setting
|
369 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
370 |
$field_array = array(
|
371 |
'id' => 'not_allow_after_expired_time',
|
372 |
+
'label' => '',
|
373 |
'type' => 'checkbox',
|
374 |
'options' => array(
|
375 |
array(
|
376 |
'value' => 1,
|
377 |
+
'label' => __( 'Do not allow quiz submission after the end date/time', 'quiz-master-next' ),
|
378 |
),
|
379 |
),
|
380 |
'default' => 0,
|
381 |
+
'option_tab' => 'general',
|
|
|
382 |
);
|
383 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
384 |
|
1102 |
'%QUESTION_MAX_POINTS%',
|
1103 |
),
|
1104 |
);
|
1105 |
+
$field_array = apply_filters( 'qsm_text_fieldarray_list', $field_array);
|
1106 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
|
1107 |
|
1108 |
// Registers question_answer_template setting
|
php/classes/class-qsm-theme-settings.php
CHANGED
@@ -152,7 +152,7 @@ class QSM_Theme_Settings {
|
|
152 |
*/
|
153 |
public function get_installed_themes() {
|
154 |
global $wpdb;
|
155 |
-
$query = "SELECT theme, theme_name FROM {$wpdb->prefix}$this->themes_table";
|
156 |
return $results = $wpdb->get_results( $query, ARRAY_A );
|
157 |
}
|
158 |
|
@@ -221,9 +221,22 @@ class QSM_Theme_Settings {
|
|
221 |
*/
|
222 |
public function get_active_quiz_theme_path( $quiz_id ) {
|
223 |
global $wpdb;
|
|
|
224 |
$query = $wpdb->prepare( "SELECT a.theme FROM {$wpdb->prefix}$this->themes_table AS a, {$wpdb->prefix}$this->settings_table AS b WHERE b.quiz_id = %d AND b.active_theme = 1 AND b.theme_id = a.id", $quiz_id );
|
225 |
$result = $wpdb->get_var( $query );
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
|
229 |
/**
|
152 |
*/
|
153 |
public function get_installed_themes() {
|
154 |
global $wpdb;
|
155 |
+
$query = "SELECT theme, theme_name, theme_active FROM {$wpdb->prefix}$this->themes_table";
|
156 |
return $results = $wpdb->get_results( $query, ARRAY_A );
|
157 |
}
|
158 |
|
221 |
*/
|
222 |
public function get_active_quiz_theme_path( $quiz_id ) {
|
223 |
global $wpdb;
|
224 |
+
global $mlwQuizMasterNext;
|
225 |
$query = $wpdb->prepare( "SELECT a.theme FROM {$wpdb->prefix}$this->themes_table AS a, {$wpdb->prefix}$this->settings_table AS b WHERE b.quiz_id = %d AND b.active_theme = 1 AND b.theme_id = a.id", $quiz_id );
|
226 |
$result = $wpdb->get_var( $query );
|
227 |
+
$active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
|
228 |
+
$themes = array();
|
229 |
+
if ( ! empty( $active_themes ) ) {
|
230 |
+
foreach ( $active_themes as $dir ) {
|
231 |
+
$themes[] = $dir['theme'];
|
232 |
+
}
|
233 |
+
}
|
234 |
+
if ( empty($result) || ! in_array($result, $themes, true) ) {
|
235 |
+
return 'default';
|
236 |
+
}
|
237 |
+
else {
|
238 |
+
return $result;
|
239 |
+
}
|
240 |
}
|
241 |
|
242 |
/**
|
php/classes/class-qsm-tracking.php
CHANGED
@@ -114,7 +114,7 @@ class QSM_Tracking {
|
|
114 |
|
115 |
// Retrieve current plugin information
|
116 |
if ( ! function_exists( 'get_plugins' ) ) {
|
117 |
-
|
118 |
}
|
119 |
$plugins = array_keys( get_plugins() );
|
120 |
$active_plugins = get_option( 'active_plugins', array() );
|
114 |
|
115 |
// Retrieve current plugin information
|
116 |
if ( ! function_exists( 'get_plugins' ) ) {
|
117 |
+
include_once ABSPATH . '/wp-admin/includes/plugin.php';
|
118 |
}
|
119 |
$plugins = array_keys( get_plugins() );
|
120 |
$active_plugins = get_option( 'active_plugins', array() );
|
php/images/advanced_question_type.png
ADDED
Binary file
|
php/images/export_import_chart.png
ADDED
Binary file
|
php/images/info.png
ADDED
Binary file
|
php/images/read_icon.png
ADDED
Binary file
|
php/images/report_analysis_chart.png
ADDED
Binary file
|
php/images/warning.png
ADDED
Binary file
|
php/question-types.php
CHANGED
@@ -1,64 +1,47 @@
|
|
1 |
<?php
|
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
|
4 |
}
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
add_action( 'plugins_loaded', 'qmn_question_type_multiple_choice' );
|
8 |
-
//
|
9 |
-
include 'question-types/qsm-question-type-multiple-response.php';
|
10 |
add_action( 'plugins_loaded', 'qmn_question_type_multiple_response' );
|
11 |
-
//
|
12 |
-
include 'question-types/qsm-question-type-multiple-choice-horizontal.php';
|
13 |
add_action( 'plugins_loaded', 'qmn_question_type_horizontal_multiple_choice' );
|
14 |
-
//
|
15 |
-
include 'question-types/qsm-question-type-multiple-response-horizontal.php';
|
16 |
add_action( 'plugins_loaded', 'qmn_question_type_horizontal_multiple_response' );
|
17 |
-
//
|
18 |
-
include 'question-types/qsm-question-type-dropdown.php';
|
19 |
add_action( 'plugins_loaded', 'qmn_question_type_drop_down' );
|
20 |
-
|
21 |
-
|
22 |
-
add_action( 'plugins_loaded', 'qmn_question_type_fill_blank' );
|
23 |
-
//
|
24 |
-
include 'question-types/qsm-question-type-file-upload.php';
|
25 |
-
add_action( 'plugins_loaded', 'qmn_question_type_file_upload' );
|
26 |
-
//
|
27 |
-
include 'question-types/qsm-question-type-date.php';
|
28 |
add_action( 'plugins_loaded', 'qmn_question_type_date' );
|
29 |
-
|
30 |
-
include 'question-types/qsm-question-type-short-answer.php';
|
31 |
add_action( 'plugins_loaded', 'qmn_question_type_small_open' );
|
32 |
-
//
|
33 |
-
include 'question-types/qsm-question-type-paragraph.php';
|
34 |
add_action( 'plugins_loaded', 'qmn_question_type_large_open' );
|
35 |
-
|
36 |
-
|
37 |
add_action( 'plugins_loaded', 'qmn_question_type_text_block' );
|
38 |
-
//
|
39 |
-
include 'question-types/qsm-question-type-number.php';
|
40 |
-
add_action( 'plugins_loaded', 'qmn_question_type_number' );
|
41 |
-
//
|
42 |
-
include 'question-types/qsm-question-type-polar.php';
|
43 |
-
add_action( 'plugins_loaded', 'qmn_question_type_polar' );
|
44 |
-
//
|
45 |
-
include 'question-types/qsm-question-type-opt-in.php';
|
46 |
-
add_action( 'plugins_loaded', 'qmn_question_type_accept' );
|
47 |
-
//
|
48 |
-
include 'question-types/qsm-question-type-captcha.php';
|
49 |
add_action( 'plugins_loaded', 'qmn_question_type_captcha' );
|
50 |
-
|
51 |
-
include 'question-types/qsm-question-title.php';
|
52 |
-
//
|
53 |
-
include 'classes/question-types/class-question-review.php';
|
54 |
-
//
|
55 |
-
include 'classes/question-types/class-question-review-fill-in-blanks.php';
|
56 |
-
//
|
57 |
-
include 'classes/question-types/class-question-review-file-upload.php';
|
58 |
-
//
|
59 |
-
include 'classes/question-types/class-question-review-choice.php';
|
60 |
-
//
|
61 |
-
include 'classes/question-types/class-question-review-text.php';
|
62 |
/**
|
63 |
* Registers the multiple choice type
|
64 |
*
|
@@ -66,35 +49,25 @@ include 'classes/question-types/class-question-review-text.php';
|
|
66 |
* @since 4.4.0
|
67 |
*/
|
68 |
function qmn_question_type_multiple_choice() {
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
}
|
74 |
-
/**
|
75 |
-
* Registers the file upload type
|
76 |
-
*
|
77 |
-
* @return void
|
78 |
-
* @since 6.3.7
|
79 |
-
*/
|
80 |
-
function qmn_question_type_file_upload() {
|
81 |
-
global $mlwQuizMasterNext;
|
82 |
-
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'File Upload', 'quiz-master-next' ), 'qmn_file_upload_display', true, 'qmn_file_upload_review', null, null, 11 );
|
83 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 11, 'input_field', 'attachment' );
|
84 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 11, 'category', 'Others' );
|
85 |
}
|
|
|
86 |
/**
|
87 |
-
*
|
88 |
*
|
89 |
* @return void
|
90 |
-
* @since
|
91 |
*/
|
92 |
-
function
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
}
|
|
|
98 |
/**
|
99 |
* This function registers the horizontal multiple choice type.
|
100 |
*
|
@@ -102,78 +75,86 @@ function qmn_question_type_date() {
|
|
102 |
* @since 4.4.0
|
103 |
*/
|
104 |
function qmn_question_type_horizontal_multiple_choice() {
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
}
|
|
|
110 |
/**
|
111 |
-
* This function registers the
|
112 |
*
|
113 |
* @return void
|
114 |
* @since 4.4.0
|
115 |
*/
|
116 |
-
function
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
}
|
|
|
122 |
/**
|
123 |
-
* This function registers the
|
124 |
*
|
125 |
* @return void
|
126 |
* @since 4.4.0
|
127 |
*/
|
128 |
-
function
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
}
|
|
|
134 |
/**
|
135 |
-
* This function registers the
|
136 |
*
|
137 |
* @return void
|
138 |
-
* @since
|
139 |
*/
|
140 |
-
function
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
}
|
|
|
146 |
/**
|
147 |
-
* This function registers the
|
148 |
*
|
149 |
-
* @
|
|
|
150 |
*/
|
151 |
-
function
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
|
|
157 |
/**
|
158 |
-
*
|
159 |
*
|
160 |
* @return void
|
161 |
-
* @since
|
162 |
*/
|
163 |
-
function
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
),
|
169 |
-
'information' => '',
|
170 |
-
'extra_inputs' => array(),
|
171 |
-
'function' => '',
|
172 |
-
);
|
173 |
-
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Text/HTML Section', 'quiz-master-next' ), 'qmn_text_block_display', false, null, $edit_args, null, 6 );
|
174 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 6, 'input_field', 'NA' );
|
175 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 6, 'category', 'Others' );
|
176 |
}
|
|
|
177 |
/**
|
178 |
* This function registers the number question type
|
179 |
*
|
@@ -184,99 +165,129 @@ function qmn_question_type_text_block() {
|
|
184 |
* @since 4.4.0
|
185 |
*/
|
186 |
function qmn_question_type_number() {
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
}
|
|
|
192 |
/**
|
193 |
-
* This function registers the
|
194 |
*
|
195 |
-
* @return void
|
196 |
* @since 4.4.0
|
197 |
*/
|
198 |
-
function
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
'required',
|
204 |
-
),
|
205 |
-
'information' => '',
|
206 |
-
'extra_inputs' => array(),
|
207 |
-
'function' => '',
|
208 |
-
);
|
209 |
-
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Opt-in', 'quiz-master-next' ), 'qmn_accept_display', false, 'qmn_opt_in_review', $edit_args, null, 8 );
|
210 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'input_field', 'Checkbox' );
|
211 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'category', 'Choice' );
|
212 |
}
|
|
|
213 |
/**
|
214 |
-
* This function registers the
|
215 |
*
|
216 |
* @since 4.4.0
|
217 |
*/
|
218 |
-
function
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
'required',
|
224 |
-
),
|
225 |
-
'information' => '',
|
226 |
-
'extra_inputs' => array(),
|
227 |
-
'function' => '',
|
228 |
-
);
|
229 |
-
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Captcha', 'quiz-master-next' ), 'qmn_captcha_display', false, null, $edit_args, null, 9 );
|
230 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 9, 'input_field', 'NA' );
|
231 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 9, 'category', 'Others' );
|
232 |
}
|
|
|
233 |
/**
|
234 |
-
* This function registers the
|
235 |
*
|
236 |
* @return void
|
237 |
* @since 4.4.0
|
238 |
*/
|
239 |
-
function
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
}
|
|
|
245 |
/**
|
246 |
-
*
|
247 |
*
|
248 |
* @return void
|
249 |
-
* @since
|
250 |
*/
|
251 |
-
function
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
'answer',
|
257 |
-
'hint',
|
258 |
-
'correct_info',
|
259 |
-
'comments',
|
260 |
-
'category',
|
261 |
-
'required',
|
262 |
-
),
|
263 |
-
'information' => __( 'For fill in the blank types, use %BLANK% to represent where to put the text box in your text.', 'quiz-master-next' ),
|
264 |
-
'extra_inputs' => array(),
|
265 |
-
'function' => '',
|
266 |
-
);
|
267 |
-
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Fill In The Blank', 'quiz-master-next' ), 'qmn_fill_blank_display', true, 'qmn_fill_blank_review', $edit_args, null, 14 );
|
268 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 14, 'input_field', 'text' );
|
269 |
-
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 14, 'category', 'Others' );
|
270 |
}
|
|
|
271 |
/**
|
272 |
-
* This function registers the
|
273 |
*
|
274 |
* @return void
|
275 |
-
* @since
|
276 |
*/
|
277 |
-
function
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
1 |
<?php
|
2 |
+
|
3 |
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
}
|
6 |
+
|
7 |
+
include_once 'question-types/qsm-question-type-multiple-choice.php';
|
8 |
+
include_once 'question-types/qsm-question-type-multiple-response.php';
|
9 |
+
include_once 'question-types/qsm-question-type-multiple-choice-horizontal.php';
|
10 |
+
include_once 'question-types/qsm-question-type-multiple-response-horizontal.php';
|
11 |
+
include_once 'question-types/qsm-question-type-dropdown.php';
|
12 |
+
include_once 'question-types/qsm-question-type-polar.php';
|
13 |
+
include_once 'question-types/qsm-question-type-opt-in.php';
|
14 |
+
include_once 'question-types/qsm-question-type-date.php';
|
15 |
+
include_once 'question-types/qsm-question-type-number.php';
|
16 |
+
include_once 'question-types/qsm-question-type-short-answer.php';
|
17 |
+
include_once 'question-types/qsm-question-type-paragraph.php';
|
18 |
+
include_once 'question-types/qsm-question-type-fill-in-the-blanks.php';
|
19 |
+
include_once 'question-types/qsm-question-type-file-upload.php';
|
20 |
+
include_once 'question-types/qsm-question-type-text-or-html.php';
|
21 |
+
include_once 'question-types/qsm-question-type-captcha.php';
|
22 |
+
include_once 'question-types/qsm-question-title.php';
|
23 |
+
include_once 'classes/question-types/class-question-review.php';
|
24 |
+
include_once 'classes/question-types/class-question-review-text.php';
|
25 |
+
include_once 'classes/question-types/class-question-review-fill-in-blanks.php';
|
26 |
+
include_once 'classes/question-types/class-question-review-file-upload.php';
|
27 |
+
include_once 'classes/question-types/class-question-review-choice.php';
|
28 |
+
|
29 |
add_action( 'plugins_loaded', 'qmn_question_type_multiple_choice' );
|
|
|
|
|
30 |
add_action( 'plugins_loaded', 'qmn_question_type_multiple_response' );
|
|
|
|
|
31 |
add_action( 'plugins_loaded', 'qmn_question_type_horizontal_multiple_choice' );
|
|
|
|
|
32 |
add_action( 'plugins_loaded', 'qmn_question_type_horizontal_multiple_response' );
|
|
|
|
|
33 |
add_action( 'plugins_loaded', 'qmn_question_type_drop_down' );
|
34 |
+
add_action( 'plugins_loaded', 'qmn_question_type_polar' );
|
35 |
+
add_action( 'plugins_loaded', 'qmn_question_type_accept' );
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
add_action( 'plugins_loaded', 'qmn_question_type_date' );
|
37 |
+
add_action( 'plugins_loaded', 'qmn_question_type_number' );
|
|
|
38 |
add_action( 'plugins_loaded', 'qmn_question_type_small_open' );
|
|
|
|
|
39 |
add_action( 'plugins_loaded', 'qmn_question_type_large_open' );
|
40 |
+
add_action( 'plugins_loaded', 'qmn_question_type_fill_blank' );
|
41 |
+
add_action( 'plugins_loaded', 'qmn_question_type_file_upload' );
|
42 |
add_action( 'plugins_loaded', 'qmn_question_type_text_block' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
add_action( 'plugins_loaded', 'qmn_question_type_captcha' );
|
44 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* Registers the multiple choice type
|
47 |
*
|
49 |
* @since 4.4.0
|
50 |
*/
|
51 |
function qmn_question_type_multiple_choice() {
|
52 |
+
global $mlwQuizMasterNext;
|
53 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Multiple Choice', 'quiz-master-next' ), 'qmn_multiple_choice_display', true, 'qmn_multiple_choice_review', null, null, 0 );
|
54 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 0, 'input_field', 'radio' );
|
55 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 0, 'category', 'Choice' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
+
|
58 |
/**
|
59 |
+
* This function registers the multiple response question type
|
60 |
*
|
61 |
* @return void
|
62 |
+
* @since 4.4.0
|
63 |
*/
|
64 |
+
function qmn_question_type_multiple_response() {
|
65 |
+
global $mlwQuizMasterNext;
|
66 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Multiple Response', 'quiz-master-next' ), 'qmn_multiple_response_display', true, 'qmn_multiple_response_review', null, null, 4 );
|
67 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 4, 'input_field', 'checkbox' );
|
68 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 4, 'category', 'Choice' );
|
69 |
}
|
70 |
+
|
71 |
/**
|
72 |
* This function registers the horizontal multiple choice type.
|
73 |
*
|
75 |
* @since 4.4.0
|
76 |
*/
|
77 |
function qmn_question_type_horizontal_multiple_choice() {
|
78 |
+
global $mlwQuizMasterNext;
|
79 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Multiple Choice (Horizontal)', 'quiz-master-next' ), 'qmn_horizontal_multiple_choice_display', true, 'qmn_horizontal_multiple_choice_review', null, null, 1 );
|
80 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 1, 'input_field', 'radio' );
|
81 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 1, 'category', 'Choice' );
|
82 |
}
|
83 |
+
|
84 |
/**
|
85 |
+
* This function registers the horizontal multiple response question
|
86 |
*
|
87 |
* @return void
|
88 |
* @since 4.4.0
|
89 |
*/
|
90 |
+
function qmn_question_type_horizontal_multiple_response() {
|
91 |
+
global $mlwQuizMasterNext;
|
92 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Multiple Response (Horizontal)', 'quiz-master-next' ), 'qmn_horizontal_multiple_response_display', true, 'qmn_horizontal_multiple_response_review', null, null, 10 );
|
93 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 10, 'input_field', 'checkbox' );
|
94 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 10, 'category', 'Choice' );
|
95 |
}
|
96 |
+
|
97 |
/**
|
98 |
+
* This function registers the drop down question type
|
99 |
*
|
100 |
* @return void
|
101 |
* @since 4.4.0
|
102 |
*/
|
103 |
+
function qmn_question_type_drop_down() {
|
104 |
+
global $mlwQuizMasterNext;
|
105 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Drop Down', 'quiz-master-next' ), 'qmn_drop_down_display', true, 'qmn_drop_down_review', null, null, 2 );
|
106 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 2, 'input_field', 'select' );
|
107 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 2, 'category', 'Choice' );
|
108 |
}
|
109 |
+
|
110 |
/**
|
111 |
+
* This function registers the polar question type
|
112 |
*
|
113 |
* @return void
|
114 |
+
* @since 6.4.1
|
115 |
*/
|
116 |
+
function qmn_question_type_polar() {
|
117 |
+
global $mlwQuizMasterNext;
|
118 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Polar', 'quiz-master-next' ), 'qmn_polar_display', true, 'qmn_polar_review', null, null, 13 );
|
119 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 13, 'input_field', 'slider' );
|
120 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 13, 'category', 'Choice' );
|
121 |
}
|
122 |
+
|
123 |
/**
|
124 |
+
* This function registers the accept question type.
|
125 |
*
|
126 |
+
* @return void Description
|
127 |
+
* @since 4.4.0
|
128 |
*/
|
129 |
+
function qmn_question_type_accept() {
|
130 |
+
global $mlwQuizMasterNext;
|
131 |
+
$edit_args = array(
|
132 |
+
'inputs' => array(
|
133 |
+
'question',
|
134 |
+
'required',
|
135 |
+
),
|
136 |
+
'information' => '',
|
137 |
+
'extra_inputs' => array(),
|
138 |
+
'function' => '',
|
139 |
+
);
|
140 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Opt-in', 'quiz-master-next' ), 'qmn_accept_display', false, 'qmn_opt_in_review', $edit_args, null, 8 );
|
141 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'input_field', 'Checkbox' );
|
142 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 8, 'category', 'Choice' );
|
143 |
}
|
144 |
+
|
145 |
/**
|
146 |
+
* Registers the date type
|
147 |
*
|
148 |
* @return void
|
149 |
+
* @since 6.3.7
|
150 |
*/
|
151 |
+
function qmn_question_type_date() {
|
152 |
+
global $mlwQuizMasterNext;
|
153 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Date', 'quiz-master-next' ), 'qmn_date_display', true, 'qmn_date_review', null, null, 12 );
|
154 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 12, 'input_field', 'text' );
|
155 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 12, 'category', 'Number' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
+
|
158 |
/**
|
159 |
* This function registers the number question type
|
160 |
*
|
165 |
* @since 4.4.0
|
166 |
*/
|
167 |
function qmn_question_type_number() {
|
168 |
+
global $mlwQuizMasterNext;
|
169 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Number', 'quiz-master-next' ), 'qmn_number_display', true, 'qmn_number_review', null, null, 7 );
|
170 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 7, 'input_field', 'text' );
|
171 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 7, 'category', 'Number' );
|
172 |
}
|
173 |
+
|
174 |
/**
|
175 |
+
* This function registers the small open question type
|
176 |
*
|
177 |
+
* @return void
|
178 |
* @since 4.4.0
|
179 |
*/
|
180 |
+
function qmn_question_type_small_open() {
|
181 |
+
global $mlwQuizMasterNext;
|
182 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Short Answer', 'quiz-master-next' ), 'qmn_small_open_display', true, 'qmn_small_open_review', null, null, 3 );
|
183 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 3, 'input_field', 'text' );
|
184 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 3, 'category', 'Text' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
+
|
187 |
/**
|
188 |
+
* This function registers the large open question type.
|
189 |
*
|
190 |
* @since 4.4.0
|
191 |
*/
|
192 |
+
function qmn_question_type_large_open() {
|
193 |
+
global $mlwQuizMasterNext;
|
194 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Paragraph', 'quiz-master-next' ), 'qmn_large_open_display', true, 'qmn_large_open_review', null, null, 5 );
|
195 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 5, 'input_field', 'text_area' );
|
196 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 5, 'category', 'Text' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
+
|
199 |
/**
|
200 |
+
* This function registers the fill in the blank question type
|
201 |
*
|
202 |
* @return void
|
203 |
* @since 4.4.0
|
204 |
*/
|
205 |
+
function qmn_question_type_fill_blank() {
|
206 |
+
global $mlwQuizMasterNext;
|
207 |
+
$edit_args = array(
|
208 |
+
'inputs' => array(
|
209 |
+
'question',
|
210 |
+
'answer',
|
211 |
+
'hint',
|
212 |
+
'correct_info',
|
213 |
+
'comments',
|
214 |
+
'category',
|
215 |
+
'required',
|
216 |
+
),
|
217 |
+
'information' => __( 'For fill in the blank types, use %BLANK% to represent where to put the text box in your text.', 'quiz-master-next' ),
|
218 |
+
'extra_inputs' => array(),
|
219 |
+
'function' => '',
|
220 |
+
);
|
221 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Fill In The Blank', 'quiz-master-next' ), 'qmn_fill_blank_display', true, 'qmn_fill_blank_review', $edit_args, null, 14 );
|
222 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 14, 'input_field', 'text' );
|
223 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 14, 'category', 'Others' );
|
224 |
}
|
225 |
+
|
226 |
/**
|
227 |
+
* Registers the file upload type
|
228 |
*
|
229 |
* @return void
|
230 |
+
* @since 6.3.7
|
231 |
*/
|
232 |
+
function qmn_question_type_file_upload() {
|
233 |
+
global $mlwQuizMasterNext;
|
234 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'File Upload', 'quiz-master-next' ), 'qmn_file_upload_display', true, 'qmn_file_upload_review', null, null, 11 );
|
235 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 11, 'input_field', 'attachment' );
|
236 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 11, 'category', 'Others' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
+
|
239 |
/**
|
240 |
+
* This function registers the text block question type
|
241 |
*
|
242 |
* @return void
|
243 |
+
* @since 4.4.0
|
244 |
*/
|
245 |
+
function qmn_question_type_text_block() {
|
246 |
+
global $mlwQuizMasterNext;
|
247 |
+
$edit_args = array(
|
248 |
+
'inputs' => array(
|
249 |
+
'question',
|
250 |
+
),
|
251 |
+
'information' => '',
|
252 |
+
'extra_inputs' => array(),
|
253 |
+
'function' => '',
|
254 |
+
);
|
255 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Text/HTML Section', 'quiz-master-next' ), 'qmn_text_block_display', false, null, $edit_args, null, 6 );
|
256 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 6, 'input_field', 'NA' );
|
257 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 6, 'category', 'Others' );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* This function registers the captcha question
|
262 |
+
*
|
263 |
+
* @since 4.4.0
|
264 |
+
*/
|
265 |
+
function qmn_question_type_captcha() {
|
266 |
+
global $mlwQuizMasterNext;
|
267 |
+
$edit_args = array(
|
268 |
+
'inputs' => array(
|
269 |
+
'question',
|
270 |
+
'required',
|
271 |
+
),
|
272 |
+
'information' => '',
|
273 |
+
'extra_inputs' => array(),
|
274 |
+
'function' => '',
|
275 |
+
);
|
276 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Captcha', 'quiz-master-next' ), 'qmn_captcha_display', false, null, $edit_args, null, 9 );
|
277 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 9, 'input_field', 'NA' );
|
278 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 9, 'category', 'Others' );
|
279 |
+
}
|
280 |
+
|
281 |
+
|
282 |
+
add_action( 'plugins_loaded', 'qmn_extra_question_types' );
|
283 |
+
function qmn_extra_question_types() {
|
284 |
+
global $mlwQuizMasterNext;
|
285 |
+
if ( ! class_exists( 'QSM_Advance_Question' ) ) {
|
286 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type( __( 'Matching Pairs', 'quiz-master-next' ), 'qmn_matching_pair_display', false, null, null, null, 15 );
|
287 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 15, 'category', 'Advanced' );
|
288 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type(__('Radio Grid', 'quiz-master-next'), 'qmn_radio_grid_display', false, null, null, null, 16);
|
289 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta( 16, 'category', 'Advanced' );
|
290 |
+
$mlwQuizMasterNext->pluginHelper->register_question_type(__('Checkbox Grid', 'quiz-master-next'), 'qmn_checkbox_grid_display', false, null, null, null, 17);
|
291 |
+
$mlwQuizMasterNext->pluginHelper->set_question_type_meta(17, 'category', 'Advanced');
|
292 |
+
}
|
293 |
}
|
php/question-types/qsm-question-type-multiple-choice-horizontal.php
CHANGED
@@ -21,18 +21,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
|
22 |
global $mlwQuizMasterNext;
|
23 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
|
|
24 |
if ( 0 == $required ) {
|
25 |
-
$
|
26 |
-
} else {
|
27 |
-
$mlw_require_class = '';
|
28 |
}
|
|
|
29 |
$answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
|
30 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
31 |
$image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
|
32 |
$image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
|
33 |
qsm_question_title_func( $question, 'horizontal_multiple_choice', $new_question_title, $id );
|
34 |
?>
|
35 |
-
<div class="qmn_radio_answers qmn_radio_horizontal_answers <?php echo esc_attr( $
|
36 |
<?php
|
37 |
if ( is_array( $answers ) ) {
|
38 |
$mlw_answer_total = 0;
|
@@ -40,7 +40,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
|
|
40 |
$mlw_answer_total++;
|
41 |
if ( '' !== $answer[0] ) {
|
42 |
$answer_class = apply_filters( 'qsm_answer_wrapper_class', '', $answer, $id );
|
43 |
-
$answer_class
|
44 |
?>
|
45 |
<span class="mlw_horizontal_choice <?php echo esc_attr( $answer_class ); ?>">
|
46 |
<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 ); ?>" />
|
@@ -72,7 +72,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
|
|
72 |
?>
|
73 |
</label>
|
74 |
<?php
|
75 |
-
echo apply_filters( 'qsm_multiple_choice_horizontal_display_loop', '', $id, $question, $
|
76 |
?>
|
77 |
</span>
|
78 |
<?php
|
21 |
function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
|
22 |
global $mlwQuizMasterNext;
|
23 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
24 |
+
$mlw_class = '';
|
25 |
if ( 0 == $required ) {
|
26 |
+
$mlw_class = 'mlwRequiredRadio';
|
|
|
|
|
27 |
}
|
28 |
+
$mlw_class .= apply_filters( 'qsm_horizontal_multiple_choice_classes', $mlw_class, $id );
|
29 |
$answerEditor = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'answerEditor' );
|
30 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
31 |
$image_width = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-width' );
|
32 |
$image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
|
33 |
qsm_question_title_func( $question, 'horizontal_multiple_choice', $new_question_title, $id );
|
34 |
?>
|
35 |
+
<div class="qmn_radio_answers qmn_radio_horizontal_answers <?php echo esc_attr( $mlw_class ); ?>">
|
36 |
<?php
|
37 |
if ( is_array( $answers ) ) {
|
38 |
$mlw_answer_total = 0;
|
40 |
$mlw_answer_total++;
|
41 |
if ( '' !== $answer[0] ) {
|
42 |
$answer_class = apply_filters( 'qsm_answer_wrapper_class', '', $answer, $id );
|
43 |
+
$answer_class .= 'image' === $answerEditor ? ' qmn_image_option' : '';
|
44 |
?>
|
45 |
<span class="mlw_horizontal_choice <?php echo esc_attr( $answer_class ); ?>">
|
46 |
<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 ); ?>" />
|
72 |
?>
|
73 |
</label>
|
74 |
<?php
|
75 |
+
echo apply_filters( 'qsm_multiple_choice_horizontal_display_loop', '', $id, $question, $answer, $mlw_answer_total );
|
76 |
?>
|
77 |
</span>
|
78 |
<?php
|
php/question-types/qsm-question-type-multiple-response-horizontal.php
CHANGED
@@ -14,11 +14,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
15 |
global $mlwQuizMasterNext;
|
16 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
|
|
17 |
if ( 0 == $required ) {
|
18 |
-
$
|
19 |
-
} else {
|
20 |
-
$mlw_require_class = '';
|
21 |
}
|
|
|
22 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
23 |
$limit_mr_text = '';
|
24 |
if ( $limit_multiple_response > 0 ) {
|
@@ -30,7 +30,7 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
|
30 |
$image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
|
31 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
32 |
?>
|
33 |
-
<div class="qmn_check_answers qmn_multiple_horizontal_check <?php echo esc_attr( $
|
34 |
<?php
|
35 |
if ( is_array( $answers ) ) {
|
36 |
$mlw_answer_total = 0;
|
@@ -67,6 +67,9 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
|
67 |
}
|
68 |
?>
|
69 |
</label>
|
|
|
|
|
|
|
70 |
</span>
|
71 |
<?php
|
72 |
}
|
14 |
function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
|
15 |
global $mlwQuizMasterNext;
|
16 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
17 |
+
$mlw_class = '';
|
18 |
if ( 0 == $required ) {
|
19 |
+
$mlw_class = 'mlwRequiredRadio';
|
|
|
|
|
20 |
}
|
21 |
+
$mlw_class .= apply_filters( 'qsm_horizontal_multiple_response_classes', $mlw_class, $id );
|
22 |
$limit_multiple_response = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_multiple_response' );
|
23 |
$limit_mr_text = '';
|
24 |
if ( $limit_multiple_response > 0 ) {
|
30 |
$image_height = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'image_size-height' );
|
31 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
32 |
?>
|
33 |
+
<div class="qmn_check_answers qmn_multiple_horizontal_check <?php echo esc_attr( $mlw_class ); ?>">
|
34 |
<?php
|
35 |
if ( is_array( $answers ) ) {
|
36 |
$mlw_answer_total = 0;
|
67 |
}
|
68 |
?>
|
69 |
</label>
|
70 |
+
<?php
|
71 |
+
echo apply_filters( 'qsm_multiple_response_horizontal_display_loop', '', $id, $question, $answer, $mlw_answer_total);
|
72 |
+
?>
|
73 |
</span>
|
74 |
<?php
|
75 |
}
|
php/question-types/qsm-question-type-number.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.
|
@@ -25,7 +25,7 @@ function qmn_number_display( $id, $question, $answers ) {
|
|
25 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
26 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
27 |
?>
|
28 |
-
<input type="number" class="mlw_answer_number <?php echo esc_attr( $mlw_require_class ); ?>" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>" oninput="
|
29 |
<?php
|
30 |
echo apply_filters( 'qmn_number_display_front', '', $id, $question, $answers );
|
31 |
}
|
@@ -48,7 +48,7 @@ function qmn_number_review( $id, $question, $answers ) {
|
|
48 |
$return_array['correct'] = $current_question->get_answer_status();
|
49 |
$return_array['points'] = $current_question->get_points();
|
50 |
$return_array['user_answer'] = $user_text_array;
|
51 |
-
$return_array['correct_answer'] = $correct_text_array ;
|
52 |
/**
|
53 |
* Hook to filter answers array
|
54 |
*/
|
1 |
<?php
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
+
}
|
5 |
|
6 |
/**
|
7 |
* This function shows the content of the multiple choice question.
|
25 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
26 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
27 |
?>
|
28 |
+
<input type="number" class="mlw_answer_number <?php echo esc_attr( $mlw_require_class ); ?>" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>" oninput="checkMaxLength(this)" <?php endif; ?> />
|
29 |
<?php
|
30 |
echo apply_filters( 'qmn_number_display_front', '', $id, $question, $answers );
|
31 |
}
|
48 |
$return_array['correct'] = $current_question->get_answer_status();
|
49 |
$return_array['points'] = $current_question->get_points();
|
50 |
$return_array['user_answer'] = $user_text_array;
|
51 |
+
$return_array['correct_answer'] = $correct_text_array ;
|
52 |
/**
|
53 |
* Hook to filter answers array
|
54 |
*/
|
php/question-types/qsm-question-type-opt-in.php
CHANGED
@@ -22,10 +22,13 @@ function qmn_accept_display( $id, $question, $answers ) {
|
|
22 |
}
|
23 |
?>
|
24 |
<div class="qmn_accept_answers">
|
25 |
-
<input type="checkbox" id="mlwAcceptance" name="<?php echo esc_attr( 'question' . $id ); ?>" class="<?php echo esc_attr( $mlw_require_class ); ?>" />
|
26 |
-
<label class="qsm-input-label" for="mlwAcceptance">
|
27 |
<span class="qmn_accept_text">
|
28 |
<?php
|
|
|
|
|
|
|
29 |
$question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question, ENT_QUOTES ), "question-description-{$id}", 'QSM Questions' );
|
30 |
echo do_shortcode( wp_kses_post( $question ) );
|
31 |
?>
|
22 |
}
|
23 |
?>
|
24 |
<div class="qmn_accept_answers">
|
25 |
+
<input type="checkbox" id="mlwAcceptance<?php echo esc_attr( $id ); ?>" name="<?php echo esc_attr( 'question' . $id ); ?>" class="<?php echo esc_attr( $mlw_require_class ); ?>" />
|
26 |
+
<label class="qsm-input-label" for="mlwAcceptance<?php echo esc_attr( $id ); ?>">
|
27 |
<span class="qmn_accept_text">
|
28 |
<?php
|
29 |
+
if ( empty($question) ) {
|
30 |
+
$question = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
31 |
+
}
|
32 |
$question = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $question, ENT_QUOTES ), "question-description-{$id}", 'QSM Questions' );
|
33 |
echo do_shortcode( wp_kses_post( $question ) );
|
34 |
?>
|
php/template-variables.php
CHANGED
@@ -1234,6 +1234,12 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1234 |
$qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
|
1235 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
|
1236 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
1237 |
$user_answer_new = $answer[1];
|
1238 |
$is_choice_question_type = 0 == $answer['question_type'] || 1 == $answer['question_type'] || 2 == $answer['question_type'] || 4 == $answer['question_type'] || 10 == $answer['question_type'];
|
1239 |
if ( $is_choice_question_type && '' === $answer[1] ) {
|
@@ -1241,21 +1247,41 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1241 |
}
|
1242 |
if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && '' !== $user_answer_new ) {
|
1243 |
$image_url = htmlspecialchars_decode( $user_answer_new, ENT_QUOTES );
|
1244 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1245 |
} elseif ( 5 == $answer['question_type'] || 3 == $answer['question_type'] ) {
|
1246 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . nl2br( htmlspecialchars_decode( $user_answer_new, ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
|
1247 |
} else {
|
1248 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . do_shortcode( $user_answer_new ) . $close_span_with_br, $mlw_question_answer_display );
|
1249 |
}
|
1250 |
-
|
1251 |
$answer_2 = ! empty( $answer[2] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[2], 'answer-' . $answer[2], 'QSM Answers' ) : 'NA';
|
1252 |
if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
|
1253 |
$qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
|
1254 |
$qsm_correct_ans = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qsm_correct_ans, 'answer-' . $qsm_correct_ans, 'QSM Answers' );
|
1255 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
|
1256 |
} elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
|
|
|
|
|
|
|
|
|
|
|
1257 |
$image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
|
1258 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1259 |
} else {
|
1260 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '' . do_shortcode( $answer_2 ) . '<br/>', $mlw_question_answer_display );
|
1261 |
}
|
1234 |
$qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
|
1235 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
|
1236 |
} else {
|
1237 |
+
$total_answers = isset( $questions[ $answer['id'] ]['answers'] ) ? $questions[ $answer['id'] ]['answers'] : array();
|
1238 |
+
foreach ( $total_answers as $key => $single_answer ) {
|
1239 |
+
if ( ! empty($single_answer[3]) ) {
|
1240 |
+
$image_list[ $single_answer[3] ] = $single_answer[0];
|
1241 |
+
}
|
1242 |
+
}
|
1243 |
$user_answer_new = $answer[1];
|
1244 |
$is_choice_question_type = 0 == $answer['question_type'] || 1 == $answer['question_type'] || 2 == $answer['question_type'] || 4 == $answer['question_type'] || 10 == $answer['question_type'];
|
1245 |
if ( $is_choice_question_type && '' === $answer[1] ) {
|
1247 |
}
|
1248 |
if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && '' !== $user_answer_new ) {
|
1249 |
$image_url = htmlspecialchars_decode( $user_answer_new, ENT_QUOTES );
|
1250 |
+
$caption = "";
|
1251 |
+
if ( ! empty($single_answer[3]) ) {
|
1252 |
+
$caption_name = array_search($image_url, $image_list, true);
|
1253 |
+
$caption = '<span class="qsm_image_result_caption">'.$caption_name.'</span>';
|
1254 |
+
|
1255 |
+
}
|
1256 |
+
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag<img src='$image_url'/>$close_span_with_br$caption ", $mlw_question_answer_display );
|
1257 |
+
|
1258 |
+
|
1259 |
} elseif ( 5 == $answer['question_type'] || 3 == $answer['question_type'] ) {
|
1260 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . nl2br( htmlspecialchars_decode( $user_answer_new, ENT_QUOTES ) ) . $close_span_with_br, $mlw_question_answer_display );
|
1261 |
} else {
|
1262 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', "$open_span_tag" . do_shortcode( $user_answer_new ) . $close_span_with_br, $mlw_question_answer_display );
|
1263 |
}
|
1264 |
+
}
|
1265 |
$answer_2 = ! empty( $answer[2] ) ? $mlwQuizMasterNext->pluginHelper->qsm_language_support( $answer[2], 'answer-' . $answer[2], 'QSM Answers' ) : 'NA';
|
1266 |
if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
|
1267 |
$qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
|
1268 |
$qsm_correct_ans = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $qsm_correct_ans, 'answer-' . $qsm_correct_ans, 'QSM Answers' );
|
1269 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
|
1270 |
} elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
|
1271 |
+
$total_answers = isset( $questions[ $answer['id'] ]['answers'] ) ? $questions[ $answer['id'] ]['answers'] : array();
|
1272 |
+
foreach ( $total_answers as $key => $single_answer ) {
|
1273 |
+
$image_list[ $single_answer[3] ] = $single_answer[0];
|
1274 |
+
}
|
1275 |
+
|
1276 |
$image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
|
1277 |
+
$caption = "";
|
1278 |
+
if ( ! empty($single_answer[3]) ) {
|
1279 |
+
$caption_name = array_search($image_url, $image_list, true);
|
1280 |
+
$caption = '<span class="qsm_image_result_caption">'.$caption_name.'</span>';
|
1281 |
+
|
1282 |
+
}
|
1283 |
+
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '<br/><img src="' . $image_url . '"/>'.$caption, $mlw_question_answer_display );
|
1284 |
+
|
1285 |
} else {
|
1286 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '' . do_shortcode( $answer_2 ) . '<br/>', $mlw_question_answer_display );
|
1287 |
}
|
php/template-variables/qsm-tempvar-question-answers.php
CHANGED
@@ -29,6 +29,7 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
|
|
29 |
$is_user_answer = true;
|
30 |
}
|
31 |
$image_class = '';
|
|
|
32 |
if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] ) {
|
33 |
$size_style = '';
|
34 |
if ( ! empty($question_settings['image_size-width']) ) {
|
@@ -37,27 +38,31 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
|
|
37 |
if ( ! empty($question_settings['image_size-height']) ) {
|
38 |
$size_style .= ' height:'.$question_settings['image_size-height'].'px !important;';
|
39 |
}
|
|
|
|
|
|
|
40 |
$show_user_answer = '<img src="' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '" style="' . esc_attr( $size_style ) . '" />';
|
41 |
$image_class = 'qmn_image_option';
|
42 |
} else {
|
43 |
$show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' );
|
44 |
$image_class = '';
|
45 |
}
|
|
|
46 |
if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
|
47 |
if ( $is_user_answer && $is_answer_correct ) {
|
48 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
49 |
} elseif ( ! $is_user_answer && $is_answer_correct ) {
|
50 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
51 |
} elseif ( $is_user_answer && ! $is_answer_correct ) {
|
52 |
-
$question_with_answer_text .= '<span class="qsm-text-wrong-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
53 |
} else {
|
54 |
-
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
55 |
}
|
56 |
} else {
|
57 |
if ( $is_user_answer ) {
|
58 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
59 |
} else {
|
60 |
-
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer
|
61 |
}
|
62 |
}
|
63 |
}
|
29 |
$is_user_answer = true;
|
30 |
}
|
31 |
$image_class = '';
|
32 |
+
$caption = '';
|
33 |
if ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] ) {
|
34 |
$size_style = '';
|
35 |
if ( ! empty($question_settings['image_size-width']) ) {
|
38 |
if ( ! empty($question_settings['image_size-height']) ) {
|
39 |
$size_style .= ' height:'.$question_settings['image_size-height'].'px !important;';
|
40 |
}
|
41 |
+
if ( ! empty($single_answer[3]) ) {
|
42 |
+
$caption = ' <span class="qsm_image_result_caption_default">'.$single_answer[3].'</span>';
|
43 |
+
}
|
44 |
$show_user_answer = '<img src="' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '" style="' . esc_attr( $size_style ) . '" />';
|
45 |
$image_class = 'qmn_image_option';
|
46 |
} else {
|
47 |
$show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' );
|
48 |
$image_class = '';
|
49 |
}
|
50 |
+
$close_span = '</span>';
|
51 |
if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
|
52 |
if ( $is_user_answer && $is_answer_correct ) {
|
53 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
54 |
} elseif ( ! $is_user_answer && $is_answer_correct ) {
|
55 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
56 |
} elseif ( $is_user_answer && ! $is_answer_correct ) {
|
57 |
+
$question_with_answer_text .= '<span class="qsm-text-wrong-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
58 |
} else {
|
59 |
+
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
60 |
}
|
61 |
} else {
|
62 |
if ( $is_user_answer ) {
|
63 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
64 |
} else {
|
65 |
+
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $hide . ' ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
66 |
}
|
67 |
}
|
68 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress q
|
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 8.0.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -163,6 +163,15 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
163 |
18. Database
|
164 |
|
165 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
= 8.0.3 (July 26, 2022) =
|
167 |
* Feature: Added option to enable/disable case sensitive answer for fill-in blank question
|
168 |
* Feature: Added option to enable/disable MathJax
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 8.0.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
163 |
18. Database
|
164 |
|
165 |
== Changelog ==
|
166 |
+
= 8.0.4 (September 29, 2022) =
|
167 |
+
* Feature: Added captions for image answer on result page
|
168 |
+
* Bug: Fixed issue with themes list in style tab
|
169 |
+
* Bug: Fixed issue with quiz end date
|
170 |
+
* Bug: Fixed issue with labels for opt-in question type
|
171 |
+
* Bug: Fixed PHP warning and errors with inactive quiz themes
|
172 |
+
* Enhancement: Minor UI improvements
|
173 |
+
* Enhancement: Improved Image alignment in image type answers
|
174 |
+
|
175 |
= 8.0.3 (July 26, 2022) =
|
176 |
* Feature: Added option to enable/disable case sensitive answer for fill-in blank question
|
177 |
* Feature: Added option to enable/disable MathJax
|
templates/qmn_primary.css
CHANGED
@@ -84,7 +84,6 @@
|
|
84 |
display: block;
|
85 |
margin-bottom: 20px;
|
86 |
padding-bottom: 10px;
|
87 |
-
border-bottom: 1px solid #f3f3f3;
|
88 |
}
|
89 |
|
90 |
.mlw_qmn_message_before p {
|
@@ -228,10 +227,7 @@ label.inline .mlw_qmn_question,
|
|
228 |
width: 100%;
|
229 |
height: 100%;
|
230 |
object-fit: cover;
|
231 |
-
|
232 |
-
|
233 |
-
.qsm-results-page .qmn_image_option img {
|
234 |
-
overflow: hidden;
|
235 |
}
|
236 |
|
237 |
.qmn_fill_blank {
|
@@ -388,7 +384,6 @@ label.inline .mlw_qmn_question,
|
|
388 |
align-items: stretch;
|
389 |
flex-direction: column;
|
390 |
padding: 15px 0 15px 0;
|
391 |
-
border-top: 1px solid #f3f3f3;
|
392 |
}
|
393 |
|
394 |
@media screen and (min-width: 500px) {
|
84 |
display: block;
|
85 |
margin-bottom: 20px;
|
86 |
padding-bottom: 10px;
|
|
|
87 |
}
|
88 |
|
89 |
.mlw_qmn_message_before p {
|
227 |
width: 100%;
|
228 |
height: 100%;
|
229 |
object-fit: cover;
|
230 |
+
max-width: 100%;
|
|
|
|
|
|
|
231 |
}
|
232 |
|
233 |
.qmn_fill_blank {
|
384 |
align-items: stretch;
|
385 |
flex-direction: column;
|
386 |
padding: 15px 0 15px 0;
|
|
|
387 |
}
|
388 |
|
389 |
@media screen and (min-width: 500px) {
|