Version Description
(Oct 20, 2022) = * Bug: Fixed issue with random question and answers * Bug: Fixed issue with quiz timer * Bug: Fixed issue with file size limit * Bug: Fixed security and Vulnerability issues. * Enhancement: Improved UI for required fields validation message * Enhancement: Improved UI in polar question * Enhancement: Improved UI in Opt-in question
Download this release
Release Info
Developer | expresstech |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 8.0.5 |
Comparing to | |
See all releases |
Code changes from version 8.0.4 to 8.0.5
- css/admin-dashboard.css +1 -1
- css/common.css +2 -0
- css/qsm-admin.css +107 -25
- js/qsm-admin.js +40 -4
- js/qsm-quiz.js +8 -6
- mlw_quizmaster2.php +3 -2
- php/admin/about-page.php +3 -4
- php/admin/addons-page.php +38 -48
- php/admin/admin-dashboard.php +11 -12
- php/admin/admin-results-page.php +39 -43
- php/admin/functions.php +141 -44
- php/admin/options-page-questions-tab.php +13 -13
- php/admin/options-page-style-tab.php +9 -4
- php/admin/quiz-options-page.php +17 -16
- php/admin/quizzes-page.php +15 -11
- php/classes/class-qmn-plugin-helper.php +27 -3
- php/classes/class-qmn-quiz-manager.php +24 -4
- php/classes/class-qsm-install.php +40 -5
- php/classes/question-types/class-question-review-file-upload.php +1 -1
- php/classes/question-types/class-question-review.php +1 -1
- php/images/export_results.png +0 -0
- php/images/report_analysis_chart.png +0 -0
- php/question-types/qsm-question-type-file-upload.php +15 -12
- php/question-types/qsm-question-type-number.php +1 -1
- php/template-variables.php +20 -16
- php/template-variables/qsm-tempvar-question-answers.php +6 -17
- readme.txt +10 -1
- templates/qmn_amethyst.css +23 -23
- templates/qmn_base.css +23 -23
- templates/qmn_emerald.css +23 -23
- templates/qmn_gray.css +23 -23
- templates/qmn_primary.css +32 -32
- templates/qmn_turquoise.css +23 -23
css/admin-dashboard.css
CHANGED
@@ -944,7 +944,7 @@ h2.hndle.ui-sortable-handle {
|
|
944 |
display: flex;
|
945 |
background: #fff;
|
946 |
position: absolute;
|
947 |
-
z-index:
|
948 |
border-bottom: 1px solid #dfd4d4;
|
949 |
justify-content: center;
|
950 |
}
|
944 |
display: flex;
|
945 |
background: #fff;
|
946 |
position: absolute;
|
947 |
+
z-index: 10;
|
948 |
border-bottom: 1px solid #dfd4d4;
|
949 |
justify-content: center;
|
950 |
}
|
css/common.css
CHANGED
@@ -206,6 +206,7 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
|
|
206 |
*/
|
207 |
|
208 |
.mlw_qmn_question .qmn_user_incorrect_answer{
|
|
|
209 |
color: #dc3232;
|
210 |
margin-bottom: 5px;
|
211 |
padding-left: 10px;
|
@@ -220,6 +221,7 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover{
|
|
220 |
}
|
221 |
|
222 |
.mlw_qmn_question .qmn_user_correct_answer{
|
|
|
223 |
color: green;
|
224 |
margin-bottom: 5px;
|
225 |
padding-left: 10px;
|
206 |
*/
|
207 |
|
208 |
.mlw_qmn_question .qmn_user_incorrect_answer{
|
209 |
+
display: block;
|
210 |
color: #dc3232;
|
211 |
margin-bottom: 5px;
|
212 |
padding-left: 10px;
|
221 |
}
|
222 |
|
223 |
.mlw_qmn_question .qmn_user_correct_answer{
|
224 |
+
display: block;
|
225 |
color: green;
|
226 |
margin-bottom: 5px;
|
227 |
padding-left: 10px;
|
css/qsm-admin.css
CHANGED
@@ -846,6 +846,9 @@ ul.changelog li.update div.two:before {
|
|
846 |
color: #2271b1;
|
847 |
box-sizing: border-box;
|
848 |
}
|
|
|
|
|
|
|
849 |
.qsm-popup__close {
|
850 |
background: transparent;
|
851 |
border: 0;
|
@@ -915,7 +918,8 @@ body .qsm-popup__btn-primary {
|
|
915 |
transform: translateY(-10%);
|
916 |
}
|
917 |
}
|
918 |
-
.qsm-popup-slide
|
|
|
919 |
display: none;
|
920 |
}
|
921 |
.qsm-popup-slide.is-open {
|
@@ -1330,7 +1334,7 @@ td.scheduled_time_start {
|
|
1330 |
}
|
1331 |
.qsm-text-label-wrapper>h2 {
|
1332 |
font-size: 24px;
|
1333 |
-
border-bottom: 1px solid #ccc
|
1334 |
padding-bottom: 10px;
|
1335 |
line-height: normal;
|
1336 |
}
|
@@ -1665,37 +1669,39 @@ td.scheduled_time_start {
|
|
1665 |
.popup-template-span-wrap .popup-copied-des span.dashicons {
|
1666 |
line-height: 28px;
|
1667 |
}
|
1668 |
-
.
|
1669 |
-
/* display: none;
|
1670 |
-
*/
|
1671 |
-
}
|
1672 |
.qsm-standard-popup .qsm-popup__container{
|
1673 |
padding: 0;
|
1674 |
margin: 0;
|
1675 |
position: relative;
|
1676 |
-
min-width:
|
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 |
-
|
|
|
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:
|
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 |
}
|
@@ -1736,6 +1742,16 @@ td.scheduled_time_start {
|
|
1736 |
display: inline-block;
|
1737 |
margin-right: 5px;
|
1738 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1739 |
.qsm-upgrade-box{
|
1740 |
display: inline-block;
|
1741 |
width: 100%;
|
@@ -1743,6 +1759,7 @@ td.scheduled_time_start {
|
|
1743 |
padding: 10px;
|
1744 |
max-width: 800px;
|
1745 |
}
|
|
|
1746 |
.qsm-popup-upgrade-close{
|
1747 |
border:none;
|
1748 |
padding:0px;
|
@@ -1753,16 +1770,7 @@ td.scheduled_time_start {
|
|
1753 |
margin: 15px 0 10px;
|
1754 |
letter-spacing: 1px;
|
1755 |
}
|
1756 |
-
|
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;
|
@@ -1839,14 +1847,16 @@ td.scheduled_time_start {
|
|
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
|
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
|
|
|
|
|
1850 |
/** * Style tab design */
|
1851 |
.wp-upload-form {
|
1852 |
background: #fafafa;
|
@@ -1889,7 +1899,7 @@ td.scheduled_time_start {
|
|
1889 |
}
|
1890 |
}
|
1891 |
@media screen and (max-width: 767px) {
|
1892 |
-
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-upgrade-buttons
|
1893 |
.qsm-quiz-row td:nth-of-type(2n) {
|
1894 |
display: none;
|
1895 |
}
|
@@ -2272,7 +2282,7 @@ input#duplicate_questions {
|
|
2272 |
}
|
2273 |
.qsm-badge {
|
2274 |
background: linear-gradient(225deg, #344ad6, #42d96b);
|
2275 |
-
z-index:
|
2276 |
position: absolute;
|
2277 |
color: #fff;
|
2278 |
right: 5px;
|
@@ -2492,4 +2502,76 @@ input#duplicate_questions {
|
|
2492 |
width: 100%;
|
2493 |
max-width: 100%;
|
2494 |
min-width: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2495 |
}
|
846 |
color: #2271b1;
|
847 |
box-sizing: border-box;
|
848 |
}
|
849 |
+
.qsm-theme-color-settings .qsm-popup__content label{
|
850 |
+
font-weight: 400;
|
851 |
+
}
|
852 |
.qsm-popup__close {
|
853 |
background: transparent;
|
854 |
border: 0;
|
918 |
transform: translateY(-10%);
|
919 |
}
|
920 |
}
|
921 |
+
.qsm-popup-slide,
|
922 |
+
.qsm-d-none{
|
923 |
display: none;
|
924 |
}
|
925 |
.qsm-popup-slide.is-open {
|
1334 |
}
|
1335 |
.qsm-text-label-wrapper>h2 {
|
1336 |
font-size: 24px;
|
1337 |
+
/*border-bottom: 1px solid #ccc;*/
|
1338 |
padding-bottom: 10px;
|
1339 |
line-height: normal;
|
1340 |
}
|
1669 |
.popup-template-span-wrap .popup-copied-des span.dashicons {
|
1670 |
line-height: 28px;
|
1671 |
}
|
1672 |
+
.qsm-theme-color-settings .qsm-popup__container,
|
|
|
|
|
|
|
1673 |
.qsm-standard-popup .qsm-popup__container{
|
1674 |
padding: 0;
|
1675 |
margin: 0;
|
1676 |
position: relative;
|
1677 |
+
min-width: 525px;
|
1678 |
max-width: 100%;
|
1679 |
+
max-height: 90vh;
|
1680 |
}
|
1681 |
+
.qsm-theme-color-settings .qsm-popup__header .qsm-popup__title,
|
1682 |
.qsm-standard-popup .qsm-popup__header .qsm-popup__title{
|
1683 |
padding: 10px 20px;
|
1684 |
}
|
1685 |
+
.qsm-standard-popup .qsm-popup__header .qsm-popup__close,
|
1686 |
+
.qsm-theme-color-settings .qsm-popup__header .qsm-popup__close{
|
1687 |
position: relative;
|
1688 |
font-size: 22px;
|
1689 |
border: 1px solid #ddd;
|
1690 |
padding: 15px;
|
1691 |
cursor: pointer;
|
1692 |
}
|
1693 |
+
.qsm-standard-popup .qsm-popup__content,
|
1694 |
+
.qsm-theme-color-settings .qsm-popup__content{
|
1695 |
+
padding: 20px;
|
1696 |
margin: 0;
|
1697 |
box-shadow: inset 0 0 10px 1px #ddd;
|
1698 |
}
|
1699 |
+
.qsm-standard-popup .qsm-popup__content a{outline: none;box-shadow: none;text-decoration: none;}
|
1700 |
.qsm-standard-popup .qsm-popup__content table{
|
1701 |
width: 100%;
|
1702 |
border-spacing: 0 5px;
|
1703 |
}
|
1704 |
+
.qsm-theme-color-settings .qsm-popup__footer,
|
1705 |
.qsm-standard-popup .qsm-popup__footer{
|
1706 |
padding: 12px 20px;
|
1707 |
}
|
1742 |
display: inline-block;
|
1743 |
margin-right: 5px;
|
1744 |
}
|
1745 |
+
.qsm-standard-popup .qsm-popup__header .qsm-popup__title .title-tag{
|
1746 |
+
background: #D0DAFF;
|
1747 |
+
border-radius:5px;
|
1748 |
+
padding: 4px 10px;
|
1749 |
+
display: inline-block;
|
1750 |
+
font-size: 11px;
|
1751 |
+
letter-spacing: 1px;
|
1752 |
+
vertical-align: middle;
|
1753 |
+
margin: 0 5px;
|
1754 |
+
}
|
1755 |
.qsm-upgrade-box{
|
1756 |
display: inline-block;
|
1757 |
width: 100%;
|
1759 |
padding: 10px;
|
1760 |
max-width: 800px;
|
1761 |
}
|
1762 |
+
.qsm-popup-upgrade .qsm-upgrade-box{padding: 0;}
|
1763 |
.qsm-popup-upgrade-close{
|
1764 |
border:none;
|
1765 |
padding:0px;
|
1770 |
margin: 15px 0 10px;
|
1771 |
letter-spacing: 1px;
|
1772 |
}
|
1773 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1774 |
.qsm-upgrade-box .qsm-upgrade-text{
|
1775 |
font-size: 16px;
|
1776 |
line-height: 22px;
|
1847 |
.qsm-upgrade-box .qsm-upgrade-buttons a.qsm_bundle{
|
1848 |
padding: 10px 20px;
|
1849 |
}
|
1850 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-page-upgrade-buttons{
|
1851 |
display: flex;
|
1852 |
flex-direction: row;
|
1853 |
flex-wrap: wrap;
|
1854 |
align-content: center;
|
1855 |
align-items: center;
|
1856 |
}
|
1857 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-page-upgrade-buttons a{
|
1858 |
+
width: auto;margin-right: 10px;font-weight: 500;font-size: 14px;padding: 10px 20px;
|
1859 |
+
}
|
1860 |
/** * Style tab design */
|
1861 |
.wp-upload-form {
|
1862 |
background: #fafafa;
|
1899 |
}
|
1900 |
}
|
1901 |
@media screen and (max-width: 767px) {
|
1902 |
+
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-page-upgrade-buttons a{width: 100%;margin-right: 0;}
|
1903 |
.qsm-quiz-row td:nth-of-type(2n) {
|
1904 |
display: none;
|
1905 |
}
|
2282 |
}
|
2283 |
.qsm-badge {
|
2284 |
background: linear-gradient(225deg, #344ad6, #42d96b);
|
2285 |
+
z-index: 9;
|
2286 |
position: absolute;
|
2287 |
color: #fff;
|
2288 |
right: 5px;
|
2502 |
width: 100%;
|
2503 |
max-width: 100%;
|
2504 |
min-width: auto;
|
2505 |
+
}
|
2506 |
+
/*QSM quiz theme setting tabs start*/
|
2507 |
+
.qsm-quiz-theme-option-subheading {
|
2508 |
+
margin-bottom: 0;
|
2509 |
+
color: #2f87cc;
|
2510 |
+
font-size: 15px;
|
2511 |
+
}
|
2512 |
+
.qsm-theme-color-settings .quiz-theme-option-image-button {
|
2513 |
+
padding: 3px 9px;
|
2514 |
+
font-size: 11px;
|
2515 |
+
}
|
2516 |
+
.qsm-theme-color-settings .quiz-theme-option-image-button .dashicons{
|
2517 |
+
line-height: 24px;
|
2518 |
+
}
|
2519 |
+
.qsm-theme-color-settings .wp-picker-container .wp-color-result.button,
|
2520 |
+
.qsm-theme-color-settings footer.qsm-popup__footer .button{
|
2521 |
+
margin: 0 0 0 10px;
|
2522 |
+
}
|
2523 |
+
.qsm-theme-option-image,
|
2524 |
+
.qsm-theme-color-settings .wp-picker-container {
|
2525 |
+
position: relative;
|
2526 |
+
}
|
2527 |
+
.qsm-theme-color-settings .wp-picker-holder {
|
2528 |
+
position: absolute;
|
2529 |
+
z-index: 9999;
|
2530 |
+
top: 61px;
|
2531 |
+
left: -136px;
|
2532 |
+
}
|
2533 |
+
.qsm-theme-color-settings .wp-picker-container label{
|
2534 |
+
width: 195px;
|
2535 |
+
}
|
2536 |
+
.qsm-theme-color-settings .wp-picker-input-wrap {
|
2537 |
+
position: absolute;
|
2538 |
+
width: 258px;
|
2539 |
+
top: 37px;
|
2540 |
+
left: -136px;
|
2541 |
+
z-index: 9999;
|
2542 |
+
}
|
2543 |
+
.qsm-theme-color-settings .qsm-popup__content{
|
2544 |
+
max-height: 70vh;
|
2545 |
+
overflow-x: auto;
|
2546 |
+
}
|
2547 |
+
.qsm-theme-color-settings span.wp-color-result-text {
|
2548 |
+
min-width: 64px;
|
2549 |
+
}
|
2550 |
+
.qsm-theme-option-image{
|
2551 |
+
width: 112px;
|
2552 |
+
}
|
2553 |
+
.qsm-theme-color-settings .quiz-theme-option-image-thumbnail {
|
2554 |
+
max-width: 100%;
|
2555 |
+
margin-top: 10px;
|
2556 |
+
border: 1px solid #868686bd;
|
2557 |
+
border-radius: 2px;
|
2558 |
+
}
|
2559 |
+
.qsm-theme-option-image-remove {
|
2560 |
+
position: absolute;
|
2561 |
+
right: 25px;
|
2562 |
+
top: calc(50% - 10px);
|
2563 |
+
opacity: 0;
|
2564 |
+
}
|
2565 |
+
.qsm-theme-color-settings .qsm-theme-option-image:hover .qsm-theme-option-image-remove{
|
2566 |
+
opacity: 1;
|
2567 |
+
}
|
2568 |
+
.qsm-theme-color-settings hr {
|
2569 |
+
margin: 25px 0;
|
2570 |
+
}
|
2571 |
+
.qsm-theme-color-settings footer.qsm-popup__footer {
|
2572 |
+
text-align: right;
|
2573 |
+
}
|
2574 |
+
/*QSM quiz theme setting tabs end*/
|
2575 |
+
.qsm-row input[type=text]{
|
2576 |
+
border-radius: 4px;
|
2577 |
}
|
js/qsm-admin.js
CHANGED
@@ -391,6 +391,35 @@ var QSMAdmin;
|
|
391 |
}).open();
|
392 |
});
|
393 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
$(document).on('change', '.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]', function () {
|
395 |
var value = $(this).val();
|
396 |
if (value == '0') {
|
@@ -604,8 +633,14 @@ if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
|
|
604 |
jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
|
605 |
e.preventDefault();
|
606 |
MicroModal.show('qsm-theme-color-settings');
|
607 |
-
if (jQuery('.
|
608 |
-
jQuery('.
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
}
|
610 |
});
|
611 |
});
|
@@ -2628,6 +2663,7 @@ var import_button;
|
|
2628 |
if (13 == question_val) {
|
2629 |
QSMQuestion.prepareEditPolarQuestion(question_val);
|
2630 |
}
|
|
|
2631 |
});
|
2632 |
|
2633 |
// Adds event handlers for searching questions
|
@@ -2698,7 +2734,7 @@ var import_button;
|
|
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,7 +2754,7 @@ var import_button;
|
|
2718 |
}
|
2719 |
});
|
2720 |
|
2721 |
-
|
2722 |
|
2723 |
//Add new category
|
2724 |
$(document).on('click', '#qsm-category-add-toggle', function () {
|
391 |
}).open();
|
392 |
});
|
393 |
|
394 |
+
//theme option setting image start
|
395 |
+
$(document).on('click', '.quiz-theme-option-image-button', function (e) {
|
396 |
+
let button = $(this);
|
397 |
+
e.preventDefault();
|
398 |
+
custom_uploader = wp.media({
|
399 |
+
library: {
|
400 |
+
type: 'image'
|
401 |
+
},
|
402 |
+
button: {
|
403 |
+
text: qsm_admin_messages.use_img // button label text
|
404 |
+
},
|
405 |
+
multiple: false
|
406 |
+
}).on('select', function () { // it also has "open" and "close" events
|
407 |
+
let attachment = custom_uploader.state().get('selection').first().toJSON();
|
408 |
+
button.prev('.quiz-theme-option-image-input').val(attachment.url);
|
409 |
+
button.next('.qsm-theme-option-image').fadeIn();
|
410 |
+
button.hide();
|
411 |
+
button.next('.qsm-theme-option-image').find('.quiz-theme-option-image-thumbnail').attr('src', attachment.url);
|
412 |
+
}).open();
|
413 |
+
});
|
414 |
+
jQuery(document).on('click', '.qsm-theme-option-image-remove', function () {
|
415 |
+
let button = $(this);
|
416 |
+
button.parents('.qsm-theme-option-image').hide();
|
417 |
+
button.parents('.qsm-theme-option-image').prevAll('.quiz-theme-option-image-input').val("");
|
418 |
+
button.parents('.qsm-theme-option-image').prevAll('.quiz-theme-option-image-button').fadeIn();
|
419 |
+
|
420 |
+
});
|
421 |
+
//theme option setting image end
|
422 |
+
|
423 |
$(document).on('change', '.global_form_type_settiong select[name="qsm-quiz-settings[form_type]"]', function () {
|
424 |
var value = $(this).val();
|
425 |
if (value == '0') {
|
633 |
jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
|
634 |
e.preventDefault();
|
635 |
MicroModal.show('qsm-theme-color-settings');
|
636 |
+
if (jQuery('.qsm-color-field').length > 0) {
|
637 |
+
jQuery('.qsm-color-field').wpColorPicker();
|
638 |
+
jQuery('.qsm-color-field').each(function () {
|
639 |
+
if (jQuery(this).attr('data-label')) {
|
640 |
+
jQuery(this).parents('.wp-picker-container').find('.wp-color-result-text').html( jQuery(this).attr('data-label') );
|
641 |
+
}
|
642 |
+
});
|
643 |
+
|
644 |
}
|
645 |
});
|
646 |
});
|
2663 |
if (13 == question_val) {
|
2664 |
QSMQuestion.prepareEditPolarQuestion(question_val);
|
2665 |
}
|
2666 |
+
jQuery(document).trigger('qsm-change-answer-editor-after');
|
2667 |
});
|
2668 |
|
2669 |
// Adds event handlers for searching questions
|
2734 |
MicroModal.show('modal-advanced-question-type');
|
2735 |
$('#question_type').val(previous_question_val);
|
2736 |
return false;
|
2737 |
+
}
|
2738 |
// show points field only for polar in survey and simple form
|
2739 |
if (qsmQuestionSettings.form_type != 0) {
|
2740 |
if (13 == question_val) {
|
2754 |
}
|
2755 |
});
|
2756 |
|
2757 |
+
|
2758 |
|
2759 |
//Add new category
|
2760 |
$(document).on('click', '#qsm-category-add-toggle', function () {
|
js/qsm-quiz.js
CHANGED
@@ -25,8 +25,7 @@ var qsmTimerInterval = [];
|
|
25 |
quizID = parseInt(quiz.quiz_id);
|
26 |
QSM.initPagination(quizID);
|
27 |
qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
|
28 |
-
|
29 |
-
if ( ( quiz.hasOwnProperty('pagination') || ( quiz.qpages.hasOwnProperty(2) && !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);
|
@@ -763,12 +762,17 @@ function qsmScrollTo($element) {
|
|
763 |
function qmnDisplayError(message, field, quiz_form_id) {
|
764 |
jQuery('#' + quiz_form_id + ' .qmn_error_message_section').addClass('qmn_error_message');
|
765 |
jQuery('#' + quiz_form_id + ' .qmn_error_message').text(message);
|
766 |
-
field.
|
|
|
|
|
|
|
|
|
767 |
}
|
768 |
|
769 |
function qmnResetError(quiz_form_id) {
|
770 |
jQuery('#' + quiz_form_id + ' .qmn_error_message').text('');
|
771 |
jQuery('#' + quiz_form_id + ' .qmn_error_message_section').removeClass('qmn_error_message');
|
|
|
772 |
jQuery('#' + quiz_form_id + ' .quiz_section').removeClass('qmn_error');
|
773 |
}
|
774 |
|
@@ -1522,7 +1526,7 @@ jQuery(function () {
|
|
1522 |
var form_data = new FormData();
|
1523 |
form_data.append('file', file_data);
|
1524 |
form_data.append('action', 'qsm_upload_image_fd_question');
|
1525 |
-
var question_id = $this.parent('.quiz_section').find('.
|
1526 |
form_data.append('question_id', question_id);
|
1527 |
$this.next('.loading-uploaded-file').show();
|
1528 |
jQuery.ajax({
|
@@ -1537,7 +1541,6 @@ jQuery(function () {
|
|
1537 |
$this.next('.loading-uploaded-file').hide();
|
1538 |
if (obj.type == 'success') {
|
1539 |
$this.next().next('.remove-uploaded-file').show();
|
1540 |
-
$this.next().next().next('.mlw_file_upload_hidden_value').val(obj.file_url);
|
1541 |
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val(obj.file_path);
|
1542 |
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val(obj.media_id);
|
1543 |
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').hide();
|
@@ -1571,7 +1574,6 @@ jQuery(function () {
|
|
1571 |
var obj = jQuery.parseJSON(response);
|
1572 |
if (obj.type == 'success') {
|
1573 |
$this.hide();
|
1574 |
-
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_value').val('');
|
1575 |
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val('');
|
1576 |
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val('');
|
1577 |
$this.parent('.quiz_section').find('.mlw_answer_file_upload').val('');
|
25 |
quizID = parseInt(quiz.quiz_id);
|
26 |
QSM.initPagination(quizID);
|
27 |
qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
|
28 |
+
if ( ( quiz.hasOwnProperty('pagination') || ( _.keys(quiz.qpages).length > 1 && !jQuery('.qsm-quiz-container-'+quizID+' .qsm-auto-page-row').length ) ) ) {
|
|
|
29 |
qsmEndTimeTakenTimer(quizID);
|
30 |
jQuery('.qsm-quiz-container-' + quizID + ' #timer').val(0);
|
31 |
jQuery(".qsm-quiz-container-" + quizID + " input[name='timer_ms']").val(0);
|
762 |
function qmnDisplayError(message, field, quiz_form_id) {
|
763 |
jQuery('#' + quiz_form_id + ' .qmn_error_message_section').addClass('qmn_error_message');
|
764 |
jQuery('#' + quiz_form_id + ' .qmn_error_message').text(message);
|
765 |
+
if (field.parents('.qsm_contact_div').length) {
|
766 |
+
field.parents('.qsm_contact_div').addClass('qmn_error');
|
767 |
+
} else {
|
768 |
+
field.closest('.quiz_section').addClass('qmn_error');
|
769 |
+
}
|
770 |
}
|
771 |
|
772 |
function qmnResetError(quiz_form_id) {
|
773 |
jQuery('#' + quiz_form_id + ' .qmn_error_message').text('');
|
774 |
jQuery('#' + quiz_form_id + ' .qmn_error_message_section').removeClass('qmn_error_message');
|
775 |
+
jQuery('#' + quiz_form_id + ' .qsm_contact_div').removeClass('qmn_error');
|
776 |
jQuery('#' + quiz_form_id + ' .quiz_section').removeClass('qmn_error');
|
777 |
}
|
778 |
|
1526 |
var form_data = new FormData();
|
1527 |
form_data.append('file', file_data);
|
1528 |
form_data.append('action', 'qsm_upload_image_fd_question');
|
1529 |
+
var question_id = $this.parent('.quiz_section').find('.mlw_file_upload_media_id').attr("name").replace('question', '');
|
1530 |
form_data.append('question_id', question_id);
|
1531 |
$this.next('.loading-uploaded-file').show();
|
1532 |
jQuery.ajax({
|
1541 |
$this.next('.loading-uploaded-file').hide();
|
1542 |
if (obj.type == 'success') {
|
1543 |
$this.next().next('.remove-uploaded-file').show();
|
|
|
1544 |
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val(obj.file_path);
|
1545 |
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val(obj.media_id);
|
1546 |
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').hide();
|
1574 |
var obj = jQuery.parseJSON(response);
|
1575 |
if (obj.type == 'success') {
|
1576 |
$this.hide();
|
|
|
1577 |
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val('');
|
1578 |
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val('');
|
1579 |
$this.parent('.quiz_section').find('.mlw_answer_file_upload').val('');
|
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
|
@@ -392,6 +392,7 @@ class MLWQuizMasterNext {
|
|
392 |
'duplicating_question' => __('Duplicating question...', 'quiz-master-next'),
|
393 |
'saving_question' => __('Saving question...', 'quiz-master-next'),
|
394 |
'question_saved' => __('Question was saved!', 'quiz-master-next'),
|
|
|
395 |
'loading_question' => __('Loading questions...', 'quiz-master-next'),
|
396 |
'no_question_selected' => __('No question is selected.', 'quiz-master-next'),
|
397 |
'question_reset_message' => __('All answer will be reset, Do you want to still continue?', 'quiz-master-next'),
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
+
* Version: 8.0.5
|
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.5';
|
47 |
|
48 |
/**
|
49 |
* QSM Alert Manager Object
|
392 |
'duplicating_question' => __('Duplicating question...', 'quiz-master-next'),
|
393 |
'saving_question' => __('Saving question...', 'quiz-master-next'),
|
394 |
'question_saved' => __('Question was saved!', 'quiz-master-next'),
|
395 |
+
'load_more_quetions' => __('Load more questions', 'quiz-master-next'),
|
396 |
'loading_question' => __('Loading questions...', 'quiz-master-next'),
|
397 |
'no_question_selected' => __('No question is selected.', 'quiz-master-next'),
|
398 |
'question_reset_message' => __('All answer will be reset, Do you want to still continue?', 'quiz-master-next'),
|
php/admin/about-page.php
CHANGED
@@ -114,8 +114,7 @@ function qsm_generate_about_page() {
|
|
114 |
echo wp_kses_post( $contributor_list );
|
115 |
}
|
116 |
?>
|
117 |
-
<a href="https://github.com/QuizandSurveyMaster/quiz_master_next" rel="noopener" target="_blank"
|
118 |
-
class="button-primary">View GitHub Repo</a>
|
119 |
</div>
|
120 |
<?php
|
121 |
}
|
@@ -135,8 +134,8 @@ function qsm_documentation_meta_box_content() {
|
|
135 |
?>
|
136 |
<p><?php esc_html_e( 'Need help with the plugin? Try any of the following:', 'quiz-master-next' ); ?></p>
|
137 |
<ul>
|
138 |
-
<li>For assistance in using the plugin, read our <a href="<?php echo esc_url( qsm_get_plugin_link('docs', 'qsm
|
139 |
-
<li>For support, fill out the form on our <a href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'qsm
|
140 |
</ul>
|
141 |
<?php
|
142 |
}
|
114 |
echo wp_kses_post( $contributor_list );
|
115 |
}
|
116 |
?>
|
117 |
+
<a href="<?php echo esc_url( qsm_get_utm_link( 'https://github.com/QuizandSurveyMaster/quiz_master_next', 'qsm', 'about', 'about_git_repo' ) );?>" rel="noopener" target="_blank" class="button-primary">View GitHub Repo</a>
|
|
|
118 |
</div>
|
119 |
<?php
|
120 |
}
|
134 |
?>
|
135 |
<p><?php esc_html_e( 'Need help with the plugin? Try any of the following:', 'quiz-master-next' ); ?></p>
|
136 |
<ul>
|
137 |
+
<li>For assistance in using the plugin, read our <a href="<?php echo esc_url( qsm_get_plugin_link( 'docs', 'qsm', 'help', 'about_help_documentation' ) );?>" rel="noopener" target="_blank">documentation</a></li>
|
138 |
+
<li>For support, fill out the form on our <a href="<?php echo esc_url( qsm_get_plugin_link( 'contact-support', 'qsm', 'help', 'about_help_contact-us' ) );?>" rel="noopener" target="_blank">Contact Us Page</a></li>
|
139 |
</ul>
|
140 |
<?php
|
141 |
}
|
php/admin/addons-page.php
CHANGED
@@ -90,7 +90,7 @@ function qsm_generate_featured_addons() {
|
|
90 |
</div>
|
91 |
<div class="qsm-addon-list-right">
|
92 |
<span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
|
93 |
-
<a rel="noopener" style="text-decoration: none; font-size: 15px;" href="<?php echo esc_url( qsm_get_plugin_link('addons', '
|
94 |
</div>
|
95 |
</div>
|
96 |
<div id="qsm_installed_addons" class="qsm-active-addons qsm-primary-acnhor">
|
@@ -141,35 +141,32 @@ function qsm_generate_featured_addons() {
|
|
141 |
<?php
|
142 |
if ( $popular_addons ) {
|
143 |
foreach ( $popular_addons as $key => $single_arr ) {
|
|
|
144 |
?>
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
</div>
|
162 |
-
|
163 |
-
<div class="addon-price">
|
164 |
-
<button
|
165 |
-
class="button button-primary addon-price-btn"><?php echo esc_html( $price ); ?>$<?php echo esc_html( array_values( $single_arr['price'] )[0] ); ?></button>
|
166 |
-
<a class="button button-primary addon-get-link" rel="noopener"
|
167 |
-
href="<?php echo esc_url( $single_arr['link'] ); ?>?utm_source=qsm-addons-page&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin"
|
168 |
-
target="_blank"><?php echo esc_html( $get_addon ); ?> <span
|
169 |
-
class="dashicons dashicons-arrow-right-alt2"></span></a>
|
170 |
-
</div>
|
171 |
-
</div>
|
172 |
-
<?php
|
173 |
}
|
174 |
}
|
175 |
?>
|
@@ -183,13 +180,14 @@ function qsm_generate_featured_addons() {
|
|
183 |
<?php
|
184 |
if ( $qsm_onsale_addons ) {
|
185 |
foreach ( $qsm_onsale_addons as $key => $single_arr ) {
|
|
|
186 |
?>
|
187 |
<div>
|
188 |
<div class="addon-itd-wrap">
|
189 |
<div class="addon-image" style="background-image: url('<?php echo esc_url( $single_arr['img'] ); ?>')">
|
190 |
</div>
|
191 |
<div class="addon-title-descption">
|
192 |
-
<a class="addon-title" href="<?php echo esc_url( $
|
193 |
<?php echo wp_kses_post( $single_arr['name'] ); ?>
|
194 |
</a>
|
195 |
<span class="description">
|
@@ -197,18 +195,14 @@ function qsm_generate_featured_addons() {
|
|
197 |
</span>
|
198 |
<?php
|
199 |
if ( str_word_count( $single_arr['description'] ) > 9 ) {
|
200 |
-
echo '<a class="read-more read-more-2" href="' . esc_url( $
|
201 |
}
|
202 |
?>
|
203 |
</div>
|
204 |
</div>
|
205 |
<div class="addon-price">
|
206 |
-
<button
|
207 |
-
|
208 |
-
<a class="button button-primary addon-get-link" rel="noopener"
|
209 |
-
href="<?php echo esc_url( $single_arr['link'] ); ?>?utm_source=qsm-addons-page&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin"
|
210 |
-
target="_blank"><?php echo esc_html( $get_addon ); ?> <span
|
211 |
-
class="dashicons dashicons-arrow-right-alt2"></span></a>
|
212 |
</div>
|
213 |
</div>
|
214 |
<?php
|
@@ -228,13 +222,14 @@ function qsm_generate_featured_addons() {
|
|
228 |
if ( 'Starter Bundle' === trim( $single_arr['name'] ) || 'Premium Bundle' === trim( $single_arr['name'] ) ) {
|
229 |
continue;
|
230 |
}
|
|
|
231 |
?>
|
232 |
<div>
|
233 |
<div class="addon-itd-wrap">
|
234 |
<div class="addon-image" style="background-image: url('<?php echo esc_url( $single_arr['img'] ); ?>')">
|
235 |
</div>
|
236 |
<div class="addon-title-descption">
|
237 |
-
<a class="addon-title" href="<?php echo esc_url( $
|
238 |
<?php echo wp_kses_post( $single_arr['name'] ); ?>
|
239 |
</a>
|
240 |
<span class="description">
|
@@ -242,18 +237,14 @@ function qsm_generate_featured_addons() {
|
|
242 |
</span>
|
243 |
<?php
|
244 |
if ( str_word_count( $single_arr['description'] ) > 9 ) {
|
245 |
-
echo '<a class="read-more read-more-3" href="' . esc_url( $
|
246 |
}
|
247 |
?>
|
248 |
</div>
|
249 |
</div>
|
250 |
<div class="addon-price">
|
251 |
-
<button
|
252 |
-
|
253 |
-
<a class="button button-primary addon-get-link" rel="noopener"
|
254 |
-
href="<?php echo esc_url( $single_arr['link'] ); ?>?utm_source=qsm-addons-page&utm_medium=plugin&utm_content=all-addons-top&utm_campaign=qsm_plugin"
|
255 |
-
target="_blank"><?php echo esc_html( $get_addon ); ?> <span
|
256 |
-
class="dashicons dashicons-arrow-right-alt2"></span></a>
|
257 |
</div>
|
258 |
</div>
|
259 |
<?php
|
@@ -273,6 +264,7 @@ function qsm_generate_featured_addons() {
|
|
273 |
<h3 class="qsm-news-ads-title"><?php esc_html_e( 'SAVE WITH OUR BUNDLES', 'quiz-master-next' ); ?></h3>
|
274 |
<?php
|
275 |
foreach ( $bundles as $key => $bundles_arr ) {
|
|
|
276 |
?>
|
277 |
<div class="qsm-info-widget">
|
278 |
<div class="bundle-icon">
|
@@ -284,8 +276,7 @@ function qsm_generate_featured_addons() {
|
|
284 |
</div>
|
285 |
<h3><?php echo wp_kses_post( $bundles_arr['name'] ); ?></h3>
|
286 |
<p><?php echo wp_kses_post( $bundles_arr['desc'] ); ?></p>
|
287 |
-
<a href="<?php echo esc_url( $
|
288 |
-
target="_blank" class="button button-primary addon-bundle-btn" rel="noopener">
|
289 |
<?php esc_html_e( 'Get now', 'quiz-master-next' ); ?>
|
290 |
$<?php echo esc_html( array_values( $bundles_arr['price'] )[0] ); ?>
|
291 |
<span class="dashicons dashicons-arrow-right-alt2"></span>
|
@@ -425,8 +416,7 @@ function qsm_display_optin_page() {
|
|
425 |
style="font-size:14px; text-align:center; font-family:Helvetica, sans-serif; color:#333; background-color:transparent; border-width:px;">
|
426 |
<div class="sib-text-form-block">
|
427 |
<p>
|
428 |
-
<a href="https://
|
429 |
-
target="_blank"><?php esc_html_e( 'Terms & Privacy policy', 'quiz-master-next' ); ?></a>
|
430 |
</p>
|
431 |
</div>
|
432 |
</div>
|
90 |
</div>
|
91 |
<div class="qsm-addon-list-right">
|
92 |
<span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
|
93 |
+
<a rel="noopener" style="text-decoration: none; font-size: 15px;" href="<?php echo esc_url( qsm_get_plugin_link('addons', 'addon_setting', 'all_addons', 'addon-settings_qsm_addons') );?>" target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
|
94 |
</div>
|
95 |
</div>
|
96 |
<div id="qsm_installed_addons" class="qsm-active-addons qsm-primary-acnhor">
|
141 |
<?php
|
142 |
if ( $popular_addons ) {
|
143 |
foreach ( $popular_addons as $key => $single_arr ) {
|
144 |
+
$addon_link = qsm_get_utm_link( $single_arr['link'], 'addon_setting', 'popular_addon', 'addon-settings_' . sanitize_title( $single_arr['name'] ) );
|
145 |
?>
|
146 |
+
<div>
|
147 |
+
<div class="addon-itd-wrap">
|
148 |
+
<div class="addon-image" style="background-image: url('<?php echo esc_url( $single_arr['img'] ); ?>')">
|
149 |
+
</div>
|
150 |
+
<div class="addon-title-descption">
|
151 |
+
<a class="addon-title" href="<?php echo esc_url( $addon_link ); ?>" target="_blank" rel="noopener">
|
152 |
+
<?php echo wp_kses_post( $single_arr['name'] ); ?>
|
153 |
+
</a>
|
154 |
+
<span class="description">
|
155 |
+
<?php echo esc_html( wp_trim_words( $single_arr['description'], 8 ) ); ?>
|
156 |
+
</span>
|
157 |
+
<?php
|
158 |
+
if ( str_word_count( $single_arr['description'] ) > 9 ) {
|
159 |
+
echo '<a class="read-more read-more-1" href="' . esc_url( $addon_link ) . '">' . esc_html( $show_more ) . '</a>';
|
160 |
+
}
|
161 |
+
?>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
<div class="addon-price">
|
165 |
+
<button class="button button-primary addon-price-btn"><?php echo esc_html( $price ); ?>$<?php echo esc_html( array_values( $single_arr['price'] )[0] ); ?></button>
|
166 |
+
<a class="button button-primary addon-get-link" rel="noopener" href="<?php echo esc_url( $addon_link ); ?>" target="_blank"><?php echo esc_html( $get_addon ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a>
|
167 |
+
</div>
|
168 |
</div>
|
169 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
}
|
172 |
?>
|
180 |
<?php
|
181 |
if ( $qsm_onsale_addons ) {
|
182 |
foreach ( $qsm_onsale_addons as $key => $single_arr ) {
|
183 |
+
$addon_link = qsm_get_utm_link( $single_arr['link'], 'addon_setting', 'on_sale', 'addon-settings_' . sanitize_title( $single_arr['name'] ) );
|
184 |
?>
|
185 |
<div>
|
186 |
<div class="addon-itd-wrap">
|
187 |
<div class="addon-image" style="background-image: url('<?php echo esc_url( $single_arr['img'] ); ?>')">
|
188 |
</div>
|
189 |
<div class="addon-title-descption">
|
190 |
+
<a class="addon-title" href="<?php echo esc_url( $addon_link ); ?>" target="_blank" rel="noopener">
|
191 |
<?php echo wp_kses_post( $single_arr['name'] ); ?>
|
192 |
</a>
|
193 |
<span class="description">
|
195 |
</span>
|
196 |
<?php
|
197 |
if ( str_word_count( $single_arr['description'] ) > 9 ) {
|
198 |
+
echo '<a class="read-more read-more-2" href="' . esc_url( $addon_link ) . '">' . esc_html( $show_more ) . '</a>';
|
199 |
}
|
200 |
?>
|
201 |
</div>
|
202 |
</div>
|
203 |
<div class="addon-price">
|
204 |
+
<button class="button button-primary addon-price-btn"><?php echo esc_html( $price ); ?>$<?php echo esc_html( array_values( $single_arr['price'] )[0] ); ?></button>
|
205 |
+
<a class="button button-primary addon-get-link" rel="noopener" href="<?php echo esc_url( $addon_link ); ?>" target="_blank"><?php echo esc_html( $get_addon ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a>
|
|
|
|
|
|
|
|
|
206 |
</div>
|
207 |
</div>
|
208 |
<?php
|
222 |
if ( 'Starter Bundle' === trim( $single_arr['name'] ) || 'Premium Bundle' === trim( $single_arr['name'] ) ) {
|
223 |
continue;
|
224 |
}
|
225 |
+
$addon_link = qsm_get_utm_link( $single_arr['link'], 'addon_setting', 'new_addons', 'addon-settings_' . sanitize_title( $single_arr['name'] ) );
|
226 |
?>
|
227 |
<div>
|
228 |
<div class="addon-itd-wrap">
|
229 |
<div class="addon-image" style="background-image: url('<?php echo esc_url( $single_arr['img'] ); ?>')">
|
230 |
</div>
|
231 |
<div class="addon-title-descption">
|
232 |
+
<a class="addon-title" href="<?php echo esc_url( $addon_link ); ?>" target="_blank" rel="noopener">
|
233 |
<?php echo wp_kses_post( $single_arr['name'] ); ?>
|
234 |
</a>
|
235 |
<span class="description">
|
237 |
</span>
|
238 |
<?php
|
239 |
if ( str_word_count( $single_arr['description'] ) > 9 ) {
|
240 |
+
echo '<a class="read-more read-more-3" href="' . esc_url( $addon_link ) . '">' . esc_html( $show_more ) . '</a>';
|
241 |
}
|
242 |
?>
|
243 |
</div>
|
244 |
</div>
|
245 |
<div class="addon-price">
|
246 |
+
<button class="button button-primary addon-price-btn"><?php echo esc_html( $price ); ?>$<?php echo esc_html( array_values( $single_arr['price'] )[0] ); ?></button>
|
247 |
+
<a class="button button-primary addon-get-link" rel="noopener" href="<?php echo esc_url( $addon_link ); ?>" target="_blank"><?php echo esc_html( $get_addon ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a>
|
|
|
|
|
|
|
|
|
248 |
</div>
|
249 |
</div>
|
250 |
<?php
|
264 |
<h3 class="qsm-news-ads-title"><?php esc_html_e( 'SAVE WITH OUR BUNDLES', 'quiz-master-next' ); ?></h3>
|
265 |
<?php
|
266 |
foreach ( $bundles as $key => $bundles_arr ) {
|
267 |
+
$bundle_link = qsm_get_utm_link( $bundles_arr['link'], 'addon_setting', 'bundles', 'addon-settings_' . sanitize_title( $bundles_arr['name'] ) );
|
268 |
?>
|
269 |
<div class="qsm-info-widget">
|
270 |
<div class="bundle-icon">
|
276 |
</div>
|
277 |
<h3><?php echo wp_kses_post( $bundles_arr['name'] ); ?></h3>
|
278 |
<p><?php echo wp_kses_post( $bundles_arr['desc'] ); ?></p>
|
279 |
+
<a href="<?php echo esc_url( $bundle_link ); ?>" target="_blank" class="button button-primary addon-bundle-btn" rel="noopener">
|
|
|
280 |
<?php esc_html_e( 'Get now', 'quiz-master-next' ); ?>
|
281 |
$<?php echo esc_html( array_values( $bundles_arr['price'] )[0] ); ?>
|
282 |
<span class="dashicons dashicons-arrow-right-alt2"></span>
|
416 |
style="font-size:14px; text-align:center; font-family:Helvetica, sans-serif; color:#333; background-color:transparent; border-width:px;">
|
417 |
<div class="sib-text-form-block">
|
418 |
<p>
|
419 |
+
<a href="https://quizandsurveymaster.com/add-ons-terms-and-conditions/" rel="noopener" target="_blank"><?php esc_html_e( 'Terms & Privacy policy', 'quiz-master-next' ); ?></a>
|
|
|
420 |
</p>
|
421 |
</div>
|
422 |
</div>
|
php/admin/admin-dashboard.php
CHANGED
@@ -131,19 +131,19 @@ function qsm_generate_dashboard_page() {
|
|
131 |
<div class="welcome-panel-column">
|
132 |
<h3><?php esc_html_e( 'Next Steps', 'quiz-master-next' ); ?></h3>
|
133 |
<ul>
|
134 |
-
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs', 'dashboard') )?>" class="welcome-icon">
|
135 |
<span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?>
|
136 |
</a>
|
137 |
</li>
|
138 |
-
<li><a target="_blank" rel="noopener" href="https://demo.quizandsurveymaster.com
|
139 |
<span class="dashicons dashicons-format-video"></span> <?php esc_html_e( 'See demos', 'quiz-master-next' ); ?>
|
140 |
</a>
|
141 |
</li>
|
142 |
-
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard') )?>" class="welcome-icon">
|
143 |
<span class="dashicons dashicons-plugins-checked"></span> <?php esc_html_e( 'Extend QSM with PRO Addons', 'quiz-master-next' ); ?>
|
144 |
</a>
|
145 |
</li>
|
146 |
-
<li><a target="_blank" rel="noopener" href="https://themes.quizandsurveymaster.com
|
147 |
<span class="dashicons dashicons-admin-appearance"></span> <?php esc_html_e( 'Explore QSM Themes', 'quiz-master-next' ); ?>
|
148 |
</a>
|
149 |
</li>
|
@@ -152,10 +152,10 @@ function qsm_generate_dashboard_page() {
|
|
152 |
<div class="welcome-panel-column welcome-panel-last">
|
153 |
<h3><?php esc_html_e( 'Useful Links', 'quiz-master-next' ); ?></h3>
|
154 |
<ul>
|
155 |
-
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'dashboard') )?>" class="welcome-icon"><span class="dashicons dashicons-admin-users"></span> <?php esc_html_e( 'Contact Support', 'quiz-master-next' ); ?></a></li>
|
156 |
<li><a target="_blank" rel="noopener" href="https://github.com/QuizandSurveyMaster/quiz_master_next" class="welcome-icon"><span class="dashicons dashicons-editor-code"></span> <?php esc_html_e( 'Github Repository', 'quiz-master-next' ); ?></a></li>
|
157 |
<li><a target="_blank" rel="noopener" href="https://www.facebook.com/groups/516958552587745" class="welcome-icon"><span class="dashicons dashicons-facebook"></span> <?php esc_html_e( 'Connect on Facebook', 'quiz-master-next' ); ?></a></li>
|
158 |
-
<li><a target="_blank" rel="noopener" href="https://next.expresstech.io/qsm" class="welcome-icon"><span class="dashicons dashicons-feedback"></span> <?php esc_html_e( 'Roadmap', 'quiz-master-next' ); ?></a></li>
|
159 |
</ul>
|
160 |
</div>
|
161 |
</div>
|
@@ -189,7 +189,7 @@ function qsm_generate_dashboard_page() {
|
|
189 |
'callback' => 'qsm_dashboard_roadmap',
|
190 |
'title' => 'roadmap',
|
191 |
),
|
192 |
-
|
193 |
);
|
194 |
$qsm_dashboard_widget = apply_filters( 'qsm_dashboard_widget', $qsm_dashboard_widget );
|
195 |
update_option( 'qsm_dashboard_widget_arr', $qsm_dashboard_widget );
|
@@ -337,8 +337,7 @@ function qsm_dashboard_popular_addon( $widget_id ) {
|
|
337 |
foreach ( $addon_array as $key => $single_arr ) {
|
338 |
?>
|
339 |
<li>
|
340 |
-
<a href="<?php echo esc_url( $single_arr['link'] );
|
341 |
-
target="_blank" rel="noopener">
|
342 |
<img src="<?php echo esc_url( $single_arr['img'] ); ?>" title="<?php echo esc_attr( $single_arr['name'] ); ?>" alt="<?php echo esc_attr( $single_arr['name'] ); ?>" >
|
343 |
</a>
|
344 |
</li>
|
@@ -348,7 +347,7 @@ function qsm_dashboard_popular_addon( $widget_id ) {
|
|
348 |
?>
|
349 |
</ul>
|
350 |
<div class="pa-all-addon">
|
351 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard') )?>" rel="noopener" target="_blank"><?php esc_html_e( 'SEE ALL ADDONS', 'quiz-master-next' ); ?></a>
|
352 |
</div>
|
353 |
</div>
|
354 |
</div>
|
@@ -496,8 +495,7 @@ function qsm_dashboard_latest_blogs( $widget_id ) {
|
|
496 |
foreach ( $feed_posts_array as $key => $single_feed_arr ) {
|
497 |
?>
|
498 |
<li>
|
499 |
-
<a href="<?php echo esc_url( $single_feed_arr['link'] );
|
500 |
-
target="_blank" rel="noopener">
|
501 |
<?php echo wp_kses_post( $single_feed_arr['title'] ); ?>
|
502 |
</a>
|
503 |
<div class="post-description">
|
@@ -606,6 +604,7 @@ function qsm_create_new_quiz_from_wizard() {
|
|
606 |
'form_type' => isset( $_POST['form_type'] ) ? sanitize_text_field( wp_unslash( $_POST['form_type'] ) ) : '',
|
607 |
'system' => isset( $_POST['system'] ) ? sanitize_text_field( wp_unslash( $_POST['system'] ) ) : '',
|
608 |
'timer_limit' => isset( $_POST['timer_limit'] ) ? sanitize_text_field( wp_unslash( $_POST['timer_limit'] ) ) : '',
|
|
|
609 |
'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
|
610 |
'disable_first_page' => isset( $_POST['disable_first_page'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_first_page'] ) ) : '',
|
611 |
'comment_section' => isset( $_POST['comment_section'] ) ? sanitize_text_field( wp_unslash( $_POST['comment_section'] ) ) : 1,
|
131 |
<div class="welcome-panel-column">
|
132 |
<h3><?php esc_html_e( 'Next Steps', 'quiz-master-next' ); ?></h3>
|
133 |
<ul>
|
134 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs', 'dashboard', 'next_steps', 'dashboard_read_document') )?>" class="welcome-icon">
|
135 |
<span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?>
|
136 |
</a>
|
137 |
</li>
|
138 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_utm_link('https://demo.quizandsurveymaster.com', 'dashboard', 'next_steps', 'dashboard_see_demo') )?>" class="welcome-icon">
|
139 |
<span class="dashicons dashicons-format-video"></span> <?php esc_html_e( 'See demos', 'quiz-master-next' ); ?>
|
140 |
</a>
|
141 |
</li>
|
142 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard', 'next_steps', 'dashboard_pricing') )?>" class="welcome-icon">
|
143 |
<span class="dashicons dashicons-plugins-checked"></span> <?php esc_html_e( 'Extend QSM with PRO Addons', 'quiz-master-next' ); ?>
|
144 |
</a>
|
145 |
</li>
|
146 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_utm_link('https://themes.quizandsurveymaster.com', 'dashboard', 'next_steps', 'dashboard_themes') )?>" class="welcome-icon">
|
147 |
<span class="dashicons dashicons-admin-appearance"></span> <?php esc_html_e( 'Explore QSM Themes', 'quiz-master-next' ); ?>
|
148 |
</a>
|
149 |
</li>
|
152 |
<div class="welcome-panel-column welcome-panel-last">
|
153 |
<h3><?php esc_html_e( 'Useful Links', 'quiz-master-next' ); ?></h3>
|
154 |
<ul>
|
155 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('contact-support', 'dashboard', 'useful_links', 'dashboard_support') )?>" class="welcome-icon"><span class="dashicons dashicons-admin-users"></span> <?php esc_html_e( 'Contact Support', 'quiz-master-next' ); ?></a></li>
|
156 |
<li><a target="_blank" rel="noopener" href="https://github.com/QuizandSurveyMaster/quiz_master_next" class="welcome-icon"><span class="dashicons dashicons-editor-code"></span> <?php esc_html_e( 'Github Repository', 'quiz-master-next' ); ?></a></li>
|
157 |
<li><a target="_blank" rel="noopener" href="https://www.facebook.com/groups/516958552587745" class="welcome-icon"><span class="dashicons dashicons-facebook"></span> <?php esc_html_e( 'Connect on Facebook', 'quiz-master-next' ); ?></a></li>
|
158 |
+
<li><a target="_blank" rel="noopener" href="<?php echo esc_url( qsm_get_utm_link('https://next.expresstech.io/qsm', 'dashboard', 'next_steps', 'dashboard_roadmap') )?>" class="welcome-icon"><span class="dashicons dashicons-feedback"></span> <?php esc_html_e( 'Roadmap', 'quiz-master-next' ); ?></a></li>
|
159 |
</ul>
|
160 |
</div>
|
161 |
</div>
|
189 |
'callback' => 'qsm_dashboard_roadmap',
|
190 |
'title' => 'roadmap',
|
191 |
),
|
192 |
+
|
193 |
);
|
194 |
$qsm_dashboard_widget = apply_filters( 'qsm_dashboard_widget', $qsm_dashboard_widget );
|
195 |
update_option( 'qsm_dashboard_widget_arr', $qsm_dashboard_widget );
|
337 |
foreach ( $addon_array as $key => $single_arr ) {
|
338 |
?>
|
339 |
<li>
|
340 |
+
<a href="<?php echo esc_url( qsm_get_utm_link( $single_arr['link'], 'dashboard', 'all_addon', sanitize_title( $single_arr['name'] ) ) ); ?>" target="_blank" rel="noopener">
|
|
|
341 |
<img src="<?php echo esc_url( $single_arr['img'] ); ?>" title="<?php echo esc_attr( $single_arr['name'] ); ?>" alt="<?php echo esc_attr( $single_arr['name'] ); ?>" >
|
342 |
</a>
|
343 |
</li>
|
347 |
?>
|
348 |
</ul>
|
349 |
<div class="pa-all-addon">
|
350 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link('pricing', 'dashboard', 'all_addon', 'dashboard_addons') )?>" rel="noopener" target="_blank"><?php esc_html_e( 'SEE ALL ADDONS', 'quiz-master-next' ); ?></a>
|
351 |
</div>
|
352 |
</div>
|
353 |
</div>
|
495 |
foreach ( $feed_posts_array as $key => $single_feed_arr ) {
|
496 |
?>
|
497 |
<li>
|
498 |
+
<a href="<?php echo esc_url( qsm_get_utm_link( $single_feed_arr['link'], 'dashboard', 'latest-blog', sanitize_title( $single_feed_arr['title'] ) ) ); ?>" target="_blank" rel="noopener">
|
|
|
499 |
<?php echo wp_kses_post( $single_feed_arr['title'] ); ?>
|
500 |
</a>
|
501 |
<div class="post-description">
|
604 |
'form_type' => isset( $_POST['form_type'] ) ? sanitize_text_field( wp_unslash( $_POST['form_type'] ) ) : '',
|
605 |
'system' => isset( $_POST['system'] ) ? sanitize_text_field( wp_unslash( $_POST['system'] ) ) : '',
|
606 |
'timer_limit' => isset( $_POST['timer_limit'] ) ? sanitize_text_field( wp_unslash( $_POST['timer_limit'] ) ) : '',
|
607 |
+
'pagination' => isset( $_POST['pagination'] ) ? sanitize_text_field( wp_unslash( $_POST['pagination'] ) ) : '',
|
608 |
'require_log_in' => isset( $_POST['require_log_in'] ) ? sanitize_text_field( wp_unslash( $_POST['require_log_in'] ) ) : '',
|
609 |
'disable_first_page' => isset( $_POST['disable_first_page'] ) ? sanitize_text_field( wp_unslash( $_POST['disable_first_page'] ) ) : '',
|
610 |
'comment_section' => isset( $_POST['comment_section'] ) ? sanitize_text_field( wp_unslash( $_POST['comment_section'] ) ) : 1,
|
php/admin/admin-results-page.php
CHANGED
@@ -67,9 +67,12 @@ function qsm_generate_admin_results_page() {
|
|
67 |
*/
|
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 |
|
@@ -197,13 +200,8 @@ function qsm_results_overview_tab_content() {
|
|
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 |
-
|
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">
|
@@ -335,8 +333,8 @@ function qsm_results_overview_tab_content() {
|
|
335 |
|
336 |
$values = $quiz_infos = [];
|
337 |
foreach ( $th_elements as $key => $th ) {
|
338 |
-
$values[ $key ]['title']
|
339 |
-
$values[ $key ]['style']
|
340 |
}
|
341 |
|
342 |
$display_none = ' style=display:none; ';
|
@@ -536,10 +534,8 @@ function qsm_results_overview_tab_content() {
|
|
536 |
</form>
|
537 |
</main>
|
538 |
<footer class="qsm-popup__footer">
|
539 |
-
<button id="save-results-screen-option-button"
|
540 |
-
|
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>
|
@@ -548,33 +544,33 @@ function qsm_results_overview_tab_content() {
|
|
548 |
<?php
|
549 |
}
|
550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
551 |
function qsm_reporting_analysis_tabs_content() {
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
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 |
}
|
67 |
*/
|
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', 1 );
|
71 |
+
if ( ! class_exists( 'QSM_Exporting' ) ) {
|
72 |
+
$mlwQuizMasterNext->pluginHelper->register_admin_results_tab( __( 'Export Results', 'quiz-master-next' ), 'qsm_export_results_tabs_content', 5 );
|
73 |
+
}
|
74 |
if ( ! class_exists( 'QSM_Analysis' ) ) {
|
75 |
+
$mlwQuizMasterNext->pluginHelper->register_admin_results_tab( __( 'Reporting And Analysis', 'quiz-master-next' ), 'qsm_reporting_analysis_tabs_content', 10 );
|
76 |
}
|
77 |
}
|
78 |
|
200 |
?>
|
201 |
<div class="tablenav top">
|
202 |
<div class="alignleft actions bulkactions">
|
203 |
+
<a id="result_bulkaction" href="javascript: void(0);" onclick="if ( confirm( 'Are you sure?' ) ) { document.bulk_delete_form.submit(); }" class="button action">Bulk Delete</a>
|
204 |
+
<a href="javascript: void(0);" onclick="if ( confirm( 'Are you sure?' ) ) { document.getElementById( 'bulk_permanent_delete' ).value = '1'; document.bulk_delete_form.submit(); }" class="button action">Bulk Permanent Delete</a>
|
|
|
|
|
|
|
|
|
|
|
205 |
</div>
|
206 |
<div class="tablenav-pages">
|
207 |
<span class="displaying-num">
|
333 |
|
334 |
$values = $quiz_infos = [];
|
335 |
foreach ( $th_elements as $key => $th ) {
|
336 |
+
$values[ $key ]['title'] = $th;
|
337 |
+
$values[ $key ]['style'] = "";
|
338 |
}
|
339 |
|
340 |
$display_none = ' style=display:none; ';
|
534 |
</form>
|
535 |
</main>
|
536 |
<footer class="qsm-popup__footer">
|
537 |
+
<button id="save-results-screen-option-button" class="qsm-popup__btn qsm-popup__btn-primary"><?php esc_html_e( 'Save', 'quiz-master-next' ); ?></button>
|
538 |
+
<button class="qsm-popup__btn" data-micromodal-close aria-label="Close this dialog window"><?php esc_html_e( 'Cancel', 'quiz-master-next' ); ?></button>
|
|
|
|
|
539 |
</footer>
|
540 |
</div>
|
541 |
</div>
|
544 |
<?php
|
545 |
}
|
546 |
|
547 |
+
function qsm_export_results_tabs_content() {
|
548 |
+
$args = array(
|
549 |
+
"id" => 'export-results',
|
550 |
+
"title" => __( 'Export Results', 'quiz-master-next' ),
|
551 |
+
"description" => __( 'As the quiz creator, you will want to export your quiz results in order to keep track of responses and provide an accurate record of who has completed the quiz. The Export Results addon provides an intuitive and flexible interface for exporting just the right results.', 'quiz-master-next' ),
|
552 |
+
"chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/export_results.png',
|
553 |
+
"warning" => __( 'Export Results Addon required', 'quiz-master-next' ),
|
554 |
+
"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 Results Addon separately.', 'quiz-master-next' ),
|
555 |
+
"buy_btn_text" => __( 'Buy Export Results Addon', 'quiz-master-next' ),
|
556 |
+
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/export-results', 'result_page', 'export_results', 'result-exportresults-upsell_read_documentation', 'qsm_plugin_upsell' ),
|
557 |
+
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'result_page', 'export_results', 'result-exportresults-upsell_upgrade', 'qsm_plugin_upsell' ),
|
558 |
+
"addon_link" => qsm_get_plugin_link( 'downloads/export-results', 'result_page', 'export_results', 'result-exportresults-upsell_buy_addon', 'qsm_plugin_upsell' ),
|
559 |
+
);
|
560 |
+
qsm_admin_upgrade_content( $args, 'page' );
|
561 |
+
}
|
562 |
function qsm_reporting_analysis_tabs_content() {
|
563 |
+
$args = array(
|
564 |
+
"id" => 'reporting-analysis',
|
565 |
+
"title" => __( 'Reporting & Analysis', 'quiz-master-next' ),
|
566 |
+
"description" => __( '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' ),
|
567 |
+
"chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/report_analysis_chart.png',
|
568 |
+
"warning" => __( 'Reporting & Analysis Addon required', 'quiz-master-next' ),
|
569 |
+
"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 Reporting & Analysis Addon separately.', 'quiz-master-next' ),
|
570 |
+
"buy_btn_text" => __( 'Buy Reporting & Analysis Addon', 'quiz-master-next' ),
|
571 |
+
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/reporting-analysis', 'result_page', 'result_analysis', 'result-reportanalysis-upsell_read_documentation', 'qsm_plugin_upsell' ),
|
572 |
+
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'result_page', 'result_analysis', 'result-reportanalysis-upsell_upgrade', 'qsm_plugin_upsell' ),
|
573 |
+
"addon_link" => qsm_get_plugin_link( 'downloads/results-analysis', 'result_page', 'result_analysis', 'result-reportanalysis-ups_buy_addon', 'qsm_plugin_upsell' ),
|
574 |
+
);
|
575 |
+
qsm_admin_upgrade_content( $args, 'page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
}
|
php/admin/functions.php
CHANGED
@@ -700,6 +700,10 @@ function qsm_create_new_quiz_wizard() {
|
|
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'],
|
@@ -775,14 +779,15 @@ function qsm_create_new_quiz_wizard() {
|
|
775 |
<?php
|
776 |
if ( $popular_addons ) {
|
777 |
foreach ( $popular_addons as $key => $single_arr ) {
|
|
|
778 |
?>
|
779 |
<div>
|
780 |
-
<a href="<?php echo esc_url( $
|
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( $
|
786 |
<?php
|
787 |
esc_html_e( 'Buy now', 'quiz-master-next' );
|
788 |
echo ' : $ ' . esc_html( array_values( $single_arr['price'] )[0] );
|
@@ -799,7 +804,7 @@ function qsm_create_new_quiz_wizard() {
|
|
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', '
|
803 |
</div>
|
804 |
</div>
|
805 |
</div>
|
@@ -965,7 +970,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
965 |
}
|
966 |
}
|
967 |
?>
|
968 |
-
<div class="theme-wrapper theme <?php echo ''
|
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'; ?>">
|
@@ -976,7 +981,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
976 |
<div class="theme-id-container">
|
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 ( '
|
980 |
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
981 |
<?php } ?>
|
982 |
</div>
|
@@ -989,12 +994,9 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
989 |
$theme_name = $theme['theme'];
|
990 |
$theme_id = $theme['id'];
|
991 |
?>
|
992 |
-
<div class="theme-wrapper
|
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>
|
@@ -1006,10 +1008,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
|
|
1006 |
<div class="theme-actions">
|
1007 |
<?php
|
1008 |
if ( $saved_quiz_theme != $theme_id ) {
|
1009 |
-
if ( 'wizard_theme_list'
|
1010 |
-
?>
|
1011 |
-
<?php
|
1012 |
-
} else {
|
1013 |
?>
|
1014 |
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
1015 |
<?php
|
@@ -1068,9 +1067,9 @@ function qsm_get_default_wizard_themes() {
|
|
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 |
-
$
|
|
|
1074 |
?>
|
1075 |
<div class="theme-wrapper theme market-theme">
|
1076 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
@@ -1079,8 +1078,8 @@ function qsm_get_default_wizard_themes() {
|
|
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 );
|
1083 |
-
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url );
|
1084 |
</a>
|
1085 |
</div>
|
1086 |
</div>
|
@@ -1098,9 +1097,9 @@ function qsm_get_market_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 |
-
$
|
|
|
1104 |
?>
|
1105 |
<div class="theme-wrapper theme market-theme">
|
1106 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
@@ -1109,8 +1108,8 @@ function qsm_get_market_themes() {
|
|
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 );
|
1113 |
-
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url );
|
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>
|
@@ -1147,40 +1146,138 @@ function qsm_sanitize_rec_array( $array, $textarea = false ) {
|
|
1147 |
return $array;
|
1148 |
}
|
1149 |
|
1150 |
-
function qsm_admin_upgrade_popup( $
|
1151 |
?>
|
1152 |
-
<div class="qsm-popup qsm-popup-slide qsm-standard-popup qsm-popup-upgrade" id="<?php echo esc_attr( $
|
1153 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
1154 |
-
<div class="qsm-popup__container
|
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( $
|
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 |
-
|
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 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ),
|
701 |
'value' => $globalQuizsetting['timer_limit'],
|
702 |
),
|
703 |
+
'pagination' => array(
|
704 |
+
'option_name' => __( 'Questions Per Page', 'quiz-master-next' ),
|
705 |
+
'value' => $globalQuizsetting['pagination'],
|
706 |
+
),
|
707 |
'require_log_in' => array(
|
708 |
'option_name' => __( 'Require User Login', 'quiz-master-next' ),
|
709 |
'value' => $globalQuizsetting['require_log_in'],
|
779 |
<?php
|
780 |
if ( $popular_addons ) {
|
781 |
foreach ( $popular_addons as $key => $single_arr ) {
|
782 |
+
$link = qsm_get_utm_link( $single_arr['link'], 'new_quiz', 'addons', 'quizsurvey_' . sanitize_title( $single_arr['name'] ) );
|
783 |
?>
|
784 |
<div>
|
785 |
+
<a href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noopener">
|
786 |
<span class="addon-itd-wrap">
|
787 |
<img alt="" src="<?php echo esc_url( $single_arr['img'] ); ?>" />
|
788 |
</span>
|
789 |
</a>
|
790 |
+
<a class="addon-get-link" href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noopener">
|
791 |
<?php
|
792 |
esc_html_e( 'Buy now', 'quiz-master-next' );
|
793 |
echo ' : $ ' . esc_html( array_values( $single_arr['price'] )[0] );
|
804 |
</div>
|
805 |
<div class="qsm-addon-list-right">
|
806 |
<span><?php esc_html_e( '40+ addons available', 'quiz-master-next' ); ?></span>
|
807 |
+
<a style="text-decoration: none; font-size: 15px;" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link( 'addons', 'new_quiz', 'addons', 'quizsurvey_all_addons' ) ) ?>" target="_blank"><?php esc_html_e( 'Browse All Addons', 'quiz-master-next' ); ?></a>
|
808 |
</div>
|
809 |
</div>
|
810 |
</div>
|
970 |
}
|
971 |
}
|
972 |
?>
|
973 |
+
<div class="theme-wrapper qsm-default-theme theme <?php echo '' == $saved_quiz_theme || 0 == $saved_quiz_theme ? 'active' : ''; ?>">
|
974 |
<input style="display: none" type="radio" name="quiz_theme_id" value="0" <?php checked( $saved_quiz_theme, '0', true ); ?>>
|
975 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
976 |
<img alt="" src="<?php echo esc_url( QSM_PLUGIN_URL ) . '/assets/screenshot-default-theme.png'; ?>">
|
981 |
<div class="theme-id-container">
|
982 |
<h2 class="theme-name" id="emarket-name"><?php esc_html_e( 'Default Theme', 'quiz-master-next' ); ?></h2>
|
983 |
<div class="theme-actions">
|
984 |
+
<?php if ( 0 !== $saved_quiz_theme && '' !== $saved_quiz_theme ) { ?>
|
985 |
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
986 |
<?php } ?>
|
987 |
</div>
|
994 |
$theme_name = $theme['theme'];
|
995 |
$theme_id = $theme['id'];
|
996 |
?>
|
997 |
+
<div class="theme-wrapper <?php echo esc_attr( $theme_name ); ?> theme <?php echo $theme_id == $saved_quiz_theme ? 'active' : ''; ?>">
|
998 |
<input style="display: none" type="radio" name="quiz_theme_id" value="<?php echo intval( $theme_id ); ?>" <?php checked( $saved_quiz_theme, $theme_id, true ); ?>>
|
999 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
|
|
|
|
|
|
1000 |
<img alt="" src="<?php echo esc_url( WP_PLUGIN_URL . '/' . $theme_name . '/screenshot.png' ); ?>" />
|
1001 |
<div class="downloaded-theme-button">
|
1002 |
<span class="button button-primary"><?php esc_html_e( 'Select', 'quiz-master-next' ); ?></span>
|
1008 |
<div class="theme-actions">
|
1009 |
<?php
|
1010 |
if ( $saved_quiz_theme != $theme_id ) {
|
1011 |
+
if ( 'wizard_theme_list' !== $wizard_theme_list ) {
|
|
|
|
|
|
|
1012 |
?>
|
1013 |
<button class="button qsm-activate-theme"><?php esc_html_e( 'Activate', 'quiz-master-next' ); ?></button>
|
1014 |
<?php
|
1067 |
if ( ! empty( $default_themes_data ) ) {
|
1068 |
foreach ( $default_themes_data as $key => $theme ) {
|
1069 |
$theme_name = $theme['name'];
|
|
|
1070 |
$theme_screenshot = $theme['img'];
|
1071 |
+
$theme_url = qsm_get_utm_link( $theme['link'], 'new_quiz', 'themes', 'quizsurvey_buy_' . sanitize_title( $theme_name ) );
|
1072 |
+
$theme_demo = qsm_get_utm_link( $theme['demo'], 'new_quiz', 'themes', 'quizsurvey_preview_' . sanitize_title( $theme_name ) );
|
1073 |
?>
|
1074 |
<div class="theme-wrapper theme market-theme">
|
1075 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1078 |
<?php } ?>
|
1079 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1080 |
<div class="market-theme-url">
|
1081 |
+
<a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
|
1082 |
+
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>"><?php echo in_array( $theme_name, $pro_themes, true ) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ); ?>
|
1083 |
</a>
|
1084 |
</div>
|
1085 |
</div>
|
1097 |
if ( ! empty( $themes_data ) ) {
|
1098 |
foreach ( $themes_data as $key => $theme ) {
|
1099 |
$theme_name = $theme['name'];
|
|
|
1100 |
$theme_screenshot = $theme['img'];
|
1101 |
+
$theme_url = qsm_get_utm_link( $theme['link'], 'new_quiz', 'themes', 'quizsurvey_buy_' . sanitize_title( $theme_name ) );
|
1102 |
+
$theme_demo = qsm_get_utm_link( $theme['demo'], 'new_quiz', 'themes', 'quizsurvey_preview_' . sanitize_title( $theme_name ) );
|
1103 |
?>
|
1104 |
<div class="theme-wrapper theme market-theme">
|
1105 |
<div class="theme-screenshot" id="qsm-theme-screenshot">
|
1108 |
<?php } ?>
|
1109 |
<img alt="" src="<?php echo esc_url( $theme_screenshot ); ?>" />
|
1110 |
<div class="market-theme-url">
|
1111 |
+
<a class="button button-primary" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_demo ); ?>"><?php esc_html_e( 'Live Preview', 'quiz-master-next' ); ?></a>
|
1112 |
+
<a class="button" target="_blank" rel="noopener" href="<?php echo esc_url( $theme_url ); ?>">
|
1113 |
<?php echo in_array( $theme_name, $pro_themes, true ) ? esc_html__( 'Buy Now', 'quiz-master-next' ) : esc_html__( 'Download', 'quiz-master-next' ); ?>
|
1114 |
</a>
|
1115 |
</div>
|
1146 |
return $array;
|
1147 |
}
|
1148 |
|
1149 |
+
function qsm_admin_upgrade_popup( $args = array() ) {
|
1150 |
?>
|
1151 |
+
<div class="qsm-popup qsm-popup-slide qsm-standard-popup qsm-popup-upgrade" id="<?php echo esc_attr( $args['id'] ); ?>" aria-hidden="false" style="display:none">
|
1152 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
1153 |
+
<div class="qsm-popup__container" role="dialog" aria-modal="true">
|
1154 |
<header class="qsm-popup__header qsm-question-bank-header">
|
1155 |
<div class="qsm-popup__title" id="modal-2-title">
|
1156 |
+
<?php echo esc_html( $args['title'] ); ?>
|
1157 |
+
<h5 class="title-tag"><?php esc_html_e( 'PREMIUM', 'quiz-master-next' ); ?></h5>
|
1158 |
</div>
|
1159 |
<a class="qsm-popup__close qsm-popup-upgrade-close" aria-label="Close modal" data-micromodal-close></a>
|
1160 |
</header>
|
1161 |
<main class="qsm-popup__content" id="modal-2-content">
|
1162 |
+
<?php qsm_admin_upgrade_content( $args ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1163 |
</main>
|
1164 |
</div>
|
1165 |
</div>
|
1166 |
</div>
|
1167 |
<?php
|
1168 |
}
|
1169 |
+
|
1170 |
+
function qsm_admin_upgrade_content( $args = array(), $type = 'popup' ) {
|
1171 |
+
$defaults = array(
|
1172 |
+
"id" => '',
|
1173 |
+
"title" => '',
|
1174 |
+
"description" => '',
|
1175 |
+
"chart_image" => '',
|
1176 |
+
"warning" => '',
|
1177 |
+
"information" => '',
|
1178 |
+
"buy_btn_text" => __( 'Buy Addon', 'quiz-master-next' ),
|
1179 |
+
"doc_link" => qsm_get_plugin_link( 'docs/add-ons', 'qsm', 'upgrade-box', 'read_documentation', 'qsm_plugin_upsell' ),
|
1180 |
+
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'qsm', 'upgrade-box', 'upgrade', 'qsm_plugin_upsell' ),
|
1181 |
+
"addon_link" => qsm_get_plugin_link( 'addons', 'qsm', 'upgrade-box', 'buy_addon', 'qsm_plugin_upsell' ),
|
1182 |
+
);
|
1183 |
+
$args = wp_parse_args( $args, $defaults );
|
1184 |
+
?>
|
1185 |
+
<div class="qsm-upgrade-box">
|
1186 |
+
<?php
|
1187 |
+
if ( ! empty( $args['warning'] ) ) {
|
1188 |
+
?><div class="qsm-popup-upgrade-warning">
|
1189 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/warning.png' ); ?>" alt="warning">
|
1190 |
+
<span><?php echo esc_html( $args['warning'] ) ?></span>
|
1191 |
+
</div><?php
|
1192 |
+
}
|
1193 |
+
if ( ! empty( $args['title'] ) && 'popup' != $type ) {
|
1194 |
+
?><h2><?php echo esc_html( $args['title'] ); ?></h2><?php
|
1195 |
+
}
|
1196 |
+
if ( ! empty( $args['description'] ) ) {
|
1197 |
+
?><div class="qsm-upgrade-text qsm-popup-upgrade-text"><?php echo esc_html( $args['description'] ); ?></div><?php
|
1198 |
+
}
|
1199 |
+
if ( ! empty( $args['doc_link'] ) ) {
|
1200 |
+
?><span class="qsm-upgrade-read-icon">
|
1201 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/read_icon.png' ); ?>" alt="read">
|
1202 |
+
<a href="<?php echo esc_url( $args['doc_link'] ); ?>" target="_blank" rel="noopener" >
|
1203 |
+
<?php esc_html_e( 'Read Documentation', 'quiz-master-next' ); ?><span class="dashicons dashicons-arrow-right-alt qsm-upgrade-right-arrow" ></span>
|
1204 |
+
</a>
|
1205 |
+
</span><?php
|
1206 |
+
}
|
1207 |
+
if ( ! empty( $args['chart_image'] ) ) {
|
1208 |
+
?><div class="qsm-upgrade-chart"><img src="<?php echo esc_url( $args['chart_image'] ); ?>" alt="chart"></div><?php
|
1209 |
+
}
|
1210 |
+
if ( ! empty( $args['information'] ) ) {
|
1211 |
+
?><div class="qsm-popup-upgrade-info">
|
1212 |
+
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/info.png' ); ?>" alt="information">
|
1213 |
+
<span><?php echo esc_html( $args['information'] ); ?></span>
|
1214 |
+
</div><?php
|
1215 |
+
}
|
1216 |
+
?>
|
1217 |
+
<div class="qsm-upgrade-buttons qsm-<?php echo esc_attr( $type ); ?>-upgrade-buttons">
|
1218 |
+
<a href="<?php echo esc_url( $args['upgrade_link'] ); ?>" 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>
|
1219 |
+
<?php if ( ! empty( $args['addon_link'] ) ) : ?>
|
1220 |
+
<a href="<?php echo esc_url( $args['addon_link'] ); ?>" target="_blank" class="qsm_export_import" rel="noopener" ><?php echo esc_html( $args['buy_btn_text'] ); ?></a>
|
1221 |
+
<?php endif; ?>
|
1222 |
+
</div>
|
1223 |
+
</div>
|
1224 |
+
<?php
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
/**
|
1228 |
+
* Generates theme setting feilds
|
1229 |
+
*
|
1230 |
+
* @since 8.0.5
|
1231 |
+
* @param string $type input type
|
1232 |
+
* @return string $label input label
|
1233 |
+
* @return string $name input name
|
1234 |
+
* @return string $value value
|
1235 |
+
* @return string $default_value default value
|
1236 |
+
* @return string $options other options array
|
1237 |
+
* @return html
|
1238 |
+
*/
|
1239 |
+
function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ) ) {
|
1240 |
+
?>
|
1241 |
+
<tr valign="top">
|
1242 |
+
<th scope="row" class="qsm-opt-tr">
|
1243 |
+
<label for="form_type"><?php echo esc_attr( $label ); ?></label>
|
1244 |
+
</th>
|
1245 |
+
<td align ="right">
|
1246 |
+
<?php
|
1247 |
+
switch ( $type ) {
|
1248 |
+
case 'image':
|
1249 |
+
?>
|
1250 |
+
<input class="quiz-theme-option-image-input" name="settings[<?php echo esc_attr( $name ); ?>]" type="hidden" value="<?php echo esc_attr( $value ); ?>" >
|
1251 |
+
<a class="quiz-theme-option-image-button button" <?php echo ! empty( $value ) ? 'style="display:none"' : ''; ?> href="javascript:void(0);"><span class="dashicons dashicons-format-image"></span> <?php esc_html_e( 'Select Image', 'quiz-master-next' ); ?></a>
|
1252 |
+
<div class="qsm-theme-option-image <?php echo empty( $value ) ? 'qsm-d-none' : ''; ?>">
|
1253 |
+
<img src="<?php echo esc_attr( $value ); ?>" alt="<?php echo esc_attr( $name ); ?>" class="quiz-theme-option-image-thumbnail"><br/>
|
1254 |
+
<a class="button button-small qsm-theme-option-image-remove" href="javascript:void(0)"><?php esc_html_e('Remove', 'quiz-master-next'); ?></a>
|
1255 |
+
</div>
|
1256 |
+
<?php
|
1257 |
+
break;
|
1258 |
+
case 'color':
|
1259 |
+
?>
|
1260 |
+
<input name="settings[<?php echo esc_attr( $name ); ?>]" type="text" value="<?php echo esc_attr( $value ); ?>" data-default-color="<?php echo esc_attr( $default_value ); ?>" class="qsm-color-field" data-label="<?php echo esc_attr( $options['button_text'] ); ?>" />
|
1261 |
+
<?php
|
1262 |
+
break;
|
1263 |
+
case 'hover_color':
|
1264 |
+
?>
|
1265 |
+
<input name="settings[<?php echo esc_attr( $name ); ?>]" type="text" value="<?php echo esc_attr( $value ); ?>" data-default-color="<?php echo esc_attr( $default_value ); ?>" class="qsm-color-field" data-label="<?php echo esc_attr( $options['button_text'] ); ?>" />
|
1266 |
+
<input name="settings[<?php echo esc_attr( $options['hover_name'] ); ?>]" type="text" value="<?php echo esc_attr( $options['hover_value'] ); ?>" data-default-color="<?php echo esc_attr( $options['hover_default_value'] ); ?>" class="qsm-color-field" data-label="<?php echo esc_attr( $options['hover_button_text'] ); ?>" />
|
1267 |
+
<?php
|
1268 |
+
break;
|
1269 |
+
case 'checkbox':
|
1270 |
+
?>
|
1271 |
+
<input name="settings[<?php echo esc_attr( $name ); ?>]" type="checkbox" value="<?php echo esc_attr( $value ); ?>" <?php echo $value ? "checked" : ""; ?> />
|
1272 |
+
<?php
|
1273 |
+
break;
|
1274 |
+
default:
|
1275 |
+
?>
|
1276 |
+
<input name="settings[<?php echo esc_attr( $name ); ?>]" type="text" value="<?php echo esc_attr( $value ); ?>"/>
|
1277 |
+
<?php
|
1278 |
+
break;
|
1279 |
+
} ?>
|
1280 |
+
</td>
|
1281 |
+
</tr>
|
1282 |
+
<?php
|
1283 |
+
}
|
php/admin/options-page-questions-tab.php
CHANGED
@@ -343,7 +343,7 @@ function qsm_options_questions_tab_content() {
|
|
343 |
'default' => '',
|
344 |
'priority' => '2',
|
345 |
'show' => '0,1,2,3,4,5,7,10,12,14' . $polar_question_use . $show_correct_answer_info,
|
346 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
347 |
),
|
348 |
'image_size' => array(
|
349 |
'heading' => __( 'Set custom image size', 'quiz-master-next' ),
|
@@ -368,7 +368,7 @@ function qsm_options_questions_tab_content() {
|
|
368 |
'1' => __( 'None', 'quiz-master-next' ),
|
369 |
),
|
370 |
'default' => '1',
|
371 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
372 |
),
|
373 |
'hint' => array(
|
374 |
'heading' => __( 'Hint', 'quiz-master-next' ),
|
@@ -376,7 +376,7 @@ function qsm_options_questions_tab_content() {
|
|
376 |
'type' => 'text',
|
377 |
'default' => '',
|
378 |
'priority' => '4',
|
379 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
380 |
),
|
381 |
'autofill' => array(
|
382 |
'heading' => __( 'Autofill', 'quiz-master-next' ),
|
@@ -388,7 +388,7 @@ function qsm_options_questions_tab_content() {
|
|
388 |
),
|
389 |
'default' => '0',
|
390 |
'show' => '3, 14' . $show_autofill,
|
391 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
392 |
),
|
393 |
'case_sensitive' => array(
|
394 |
'heading' => __( 'Case Sensitivity', 'quiz-master-next' ),
|
@@ -409,7 +409,7 @@ function qsm_options_questions_tab_content() {
|
|
409 |
'priority' => '7',
|
410 |
'default' => '',
|
411 |
'show' => '3, 5, 7, 14' . $show_limit_text,
|
412 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
413 |
),
|
414 |
'limit_multiple_response' => array(
|
415 |
'heading' => __( 'Limit Multiple choice', 'quiz-master-next' ),
|
@@ -418,7 +418,7 @@ function qsm_options_questions_tab_content() {
|
|
418 |
'priority' => '8',
|
419 |
'default' => '',
|
420 |
'show' => '4,10' . $show_limit_multiple_response,
|
421 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
422 |
),
|
423 |
'file_upload_limit' => array(
|
424 |
'heading' => __( 'File upload limit ( in MB )', 'quiz-master-next' ),
|
@@ -426,7 +426,7 @@ function qsm_options_questions_tab_content() {
|
|
426 |
'priority' => '9',
|
427 |
'default' => '',
|
428 |
'show' => '11' . $show_file_upload_limit,
|
429 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
430 |
),
|
431 |
'file_upload_type' => array(
|
432 |
'heading' => __( 'Allow File type', 'quiz-master-next' ),
|
@@ -442,7 +442,7 @@ function qsm_options_questions_tab_content() {
|
|
442 |
),
|
443 |
'default' => 'image',
|
444 |
'show' => '11' . $show_file_upload_type,
|
445 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
446 |
),
|
447 |
);
|
448 |
$advanced_question_option = apply_filters( 'qsm_question_advanced_option', $advanced_question_option );
|
@@ -470,7 +470,7 @@ function qsm_options_questions_tab_content() {
|
|
470 |
<label>
|
471 |
<?php esc_html_e( 'Question Type', 'quiz-master-next' ); ?>
|
472 |
<?php
|
473 |
-
echo '<a class="qsm-question-doc" href="' . esc_url( qsm_get_plugin_link( 'docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
474 |
echo '<span class="dashicons dashicons-editor-help"></span>';
|
475 |
echo '</a>';
|
476 |
?>
|
@@ -495,7 +495,7 @@ function qsm_options_questions_tab_content() {
|
|
495 |
?>
|
496 |
</select>
|
497 |
<a class="question_info_tag hidden" target="_blank" rel="noopener"
|
498 |
-
href="<?php echo esc_url( qsm_get_plugin_link( 'docs/about-quiz-survey-master/question-types/', '
|
499 |
<p class="hidden" id="question_type_info"></p>
|
500 |
</div>
|
501 |
<?php
|
@@ -524,7 +524,7 @@ function qsm_options_questions_tab_content() {
|
|
524 |
'default' => 'text',
|
525 |
'show' => '0,1,4,13' . $show_change_answer_editor,
|
526 |
// 'tooltip' => __('You can use text and rich answer for question answers.', 'quiz-master-next'),.
|
527 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
528 |
),
|
529 |
'match-answer' => array(
|
530 |
'label' => __( 'Match Answer', 'quiz-master-next' ),
|
@@ -569,7 +569,7 @@ function qsm_options_questions_tab_content() {
|
|
569 |
<div id="categorydiv" class="postbox">
|
570 |
<h2 class="hndle ui-sortable-handle">
|
571 |
<span><?php esc_html_e( 'Select Category', 'quiz-master-next' ); ?></span>
|
572 |
-
<a class="qsm-question-doc" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
573 |
</h2>
|
574 |
<div class="inside">
|
575 |
<?php
|
@@ -590,7 +590,7 @@ function qsm_options_questions_tab_content() {
|
|
590 |
'type' => 'category',
|
591 |
'priority' => '5',
|
592 |
'default' => '',
|
593 |
-
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', '
|
594 |
),
|
595 |
);
|
596 |
}
|
343 |
'default' => '',
|
344 |
'priority' => '2',
|
345 |
'show' => '0,1,2,3,4,5,7,10,12,14' . $polar_question_use . $show_correct_answer_info,
|
346 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'correct_answer_info', 'quizsurvey-correct_answer_info_doc'),
|
347 |
),
|
348 |
'image_size' => array(
|
349 |
'heading' => __( 'Set custom image size', 'quiz-master-next' ),
|
368 |
'1' => __( 'None', 'quiz-master-next' ),
|
369 |
),
|
370 |
'default' => '1',
|
371 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'comment-box', 'quizsurvey-comment-box_doc'),
|
372 |
),
|
373 |
'hint' => array(
|
374 |
'heading' => __( 'Hint', 'quiz-master-next' ),
|
376 |
'type' => 'text',
|
377 |
'default' => '',
|
378 |
'priority' => '4',
|
379 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'hints', 'quizsurvey-hints_doc'),
|
380 |
),
|
381 |
'autofill' => array(
|
382 |
'heading' => __( 'Autofill', 'quiz-master-next' ),
|
388 |
),
|
389 |
'default' => '0',
|
390 |
'show' => '3, 14' . $show_autofill,
|
391 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'autofill', 'quizsurvey-autofill_doc'),
|
392 |
),
|
393 |
'case_sensitive' => array(
|
394 |
'heading' => __( 'Case Sensitivity', 'quiz-master-next' ),
|
409 |
'priority' => '7',
|
410 |
'default' => '',
|
411 |
'show' => '3, 5, 7, 14' . $show_limit_text,
|
412 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'limit_text', 'quizsurvey-limit_text_doc'),
|
413 |
),
|
414 |
'limit_multiple_response' => array(
|
415 |
'heading' => __( 'Limit Multiple choice', 'quiz-master-next' ),
|
418 |
'priority' => '8',
|
419 |
'default' => '',
|
420 |
'show' => '4,10' . $show_limit_multiple_response,
|
421 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'limit_multiple_response', 'quizsurvey-limit_multiple_response_doc'),
|
422 |
),
|
423 |
'file_upload_limit' => array(
|
424 |
'heading' => __( 'File upload limit ( in MB )', 'quiz-master-next' ),
|
426 |
'priority' => '9',
|
427 |
'default' => '',
|
428 |
'show' => '11' . $show_file_upload_limit,
|
429 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'file_upload_limit', 'quizsurvey-file_upload_limit_doc'),
|
430 |
),
|
431 |
'file_upload_type' => array(
|
432 |
'heading' => __( 'Allow File type', 'quiz-master-next' ),
|
442 |
),
|
443 |
'default' => 'image',
|
444 |
'show' => '11' . $show_file_upload_type,
|
445 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'file_upload_type', 'quizsurvey-file_upload_type_doc'),
|
446 |
),
|
447 |
);
|
448 |
$advanced_question_option = apply_filters( 'qsm_question_advanced_option', $advanced_question_option );
|
470 |
<label>
|
471 |
<?php esc_html_e( 'Question Type', 'quiz-master-next' ); ?>
|
472 |
<?php
|
473 |
+
echo '<a class="qsm-question-doc" href="' . esc_url( qsm_get_plugin_link( 'docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'question_type', 'quizsurvey-question-type_doc' ) ) . '" target="_blank" title="' . esc_html__( 'View Documentation', 'quiz-master-next' ) . '">';
|
474 |
echo '<span class="dashicons dashicons-editor-help"></span>';
|
475 |
echo '</a>';
|
476 |
?>
|
495 |
?>
|
496 |
</select>
|
497 |
<a class="question_info_tag hidden" target="_blank" rel="noopener"
|
498 |
+
href="<?php echo esc_url( qsm_get_plugin_link( 'docs/about-quiz-survey-master/question-types/', 'quiz_editor', 'question_type', 'quizsurvey-question-type_doc' ) );?>"><?php esc_html_e( 'How to use this option?', 'quiz-master-next' ); ?></a>
|
499 |
<p class="hidden" id="question_type_info"></p>
|
500 |
</div>
|
501 |
<?php
|
524 |
'default' => 'text',
|
525 |
'show' => '0,1,4,13' . $show_change_answer_editor,
|
526 |
// 'tooltip' => __('You can use text and rich answer for question answers.', 'quiz-master-next'),.
|
527 |
+
'documentation_link' => qsm_get_plugin_link( 'docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'answer_type', 'quizsurvey-answer-type_doc' ),
|
528 |
),
|
529 |
'match-answer' => array(
|
530 |
'label' => __( 'Match Answer', 'quiz-master-next' ),
|
569 |
<div id="categorydiv" class="postbox">
|
570 |
<h2 class="hndle ui-sortable-handle">
|
571 |
<span><?php esc_html_e( 'Select Category', 'quiz-master-next' ); ?></span>
|
572 |
+
<a class="qsm-question-doc" rel="noopener" href="<?php echo esc_url( qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'category', 'quizsurvey-category_doc') );?>" target="_blank" title="View Documentation"><span class="dashicons dashicons-editor-help"></span></a>
|
573 |
</h2>
|
574 |
<div class="inside">
|
575 |
<?php
|
590 |
'type' => 'category',
|
591 |
'priority' => '5',
|
592 |
'default' => '',
|
593 |
+
'documentation_link' => qsm_get_plugin_link('docs/creating-quizzes-and-surveys/adding-and-editing-questions/', 'quiz_editor', 'category', 'quizsurvey-category_doc'),
|
594 |
),
|
595 |
);
|
596 |
}
|
php/admin/options-page-style-tab.php
CHANGED
@@ -250,7 +250,7 @@ function qsm_options_styling_tab_content() {
|
|
250 |
<form action="" method="post" class="qsm-theme-settings-frm">
|
251 |
<header class="qsm-popup__header">
|
252 |
<h2 class="qsm-popup__title" id="modal-2-title">
|
253 |
-
<?php esc_html_e( '
|
254 |
</h2>
|
255 |
<a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
|
256 |
</header>
|
@@ -260,11 +260,15 @@ function qsm_options_styling_tab_content() {
|
|
260 |
<?php
|
261 |
global $wpdb;
|
262 |
$get_theme_settings = $mlwQuizMasterNext->theme_settings->get_active_theme_settings( $quiz_id, $saved_quiz_theme );
|
263 |
-
$get_theme_default_settings = $wpdb->get_var( $wpdb->prepare( "SELECT default_settings from
|
264 |
$get_theme_settings = maybe_unserialize($get_theme_settings);
|
265 |
$get_theme_default_settings = maybe_unserialize($get_theme_default_settings);
|
|
|
266 |
if ( $get_theme_settings ) {
|
267 |
foreach ( $get_theme_settings as $key => $theme_val ) {
|
|
|
|
|
|
|
268 |
if ( '' === $theme_val ) {
|
269 |
$theme_val = $get_theme_default_settings[ $key ];
|
270 |
}
|
@@ -289,7 +293,7 @@ function qsm_options_styling_tab_content() {
|
|
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="
|
293 |
<?php
|
294 |
break;
|
295 |
case 'checkbox':
|
@@ -320,6 +324,7 @@ function qsm_options_styling_tab_content() {
|
|
320 |
}
|
321 |
?>
|
322 |
</table>
|
|
|
323 |
</main>
|
324 |
<footer class="qsm-popup__footer">
|
325 |
<button type="submit" id="qsm-save-theme-settings"
|
@@ -383,7 +388,7 @@ function qsm_display_theme_settings() {
|
|
383 |
</th>
|
384 |
<td>
|
385 |
<input name="<?php echo esc_attr( $theme_val['id'] ); ?>" type="text" value="<?php echo esc_attr( $setting_val ); ?>"
|
386 |
-
data-default-color="<?php echo esc_attr( $setting_val ); ?>" class="
|
387 |
</td>
|
388 |
</tr>
|
389 |
<?php
|
250 |
<form action="" method="post" class="qsm-theme-settings-frm">
|
251 |
<header class="qsm-popup__header">
|
252 |
<h2 class="qsm-popup__title" id="modal-2-title">
|
253 |
+
<?php esc_html_e( 'Theme Settings', 'quiz-master-next' ); ?>
|
254 |
</h2>
|
255 |
<a class="qsm-popup__close" aria-label="Close modal" data-micromodal-close></a>
|
256 |
</header>
|
260 |
<?php
|
261 |
global $wpdb;
|
262 |
$get_theme_settings = $mlwQuizMasterNext->theme_settings->get_active_theme_settings( $quiz_id, $saved_quiz_theme );
|
263 |
+
$get_theme_default_settings = $wpdb->get_var( $wpdb->prepare( "SELECT default_settings from {$wpdb->prefix}mlw_themes WHERE id = %d", $saved_quiz_theme ) );
|
264 |
$get_theme_settings = maybe_unserialize($get_theme_settings);
|
265 |
$get_theme_default_settings = maybe_unserialize($get_theme_default_settings);
|
266 |
+
do_action( 'qsm_theme_option_before', $quiz_id, $saved_quiz_theme, $get_theme_settings, $get_theme_default_settings );
|
267 |
if ( $get_theme_settings ) {
|
268 |
foreach ( $get_theme_settings as $key => $theme_val ) {
|
269 |
+
if ( empty( $theme_val['type'] ) ) {
|
270 |
+
continue;
|
271 |
+
}
|
272 |
if ( '' === $theme_val ) {
|
273 |
$theme_val = $get_theme_default_settings[ $key ];
|
274 |
}
|
293 |
break;
|
294 |
case 'color':
|
295 |
?>
|
296 |
+
<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="qsm-color-field" />
|
297 |
<?php
|
298 |
break;
|
299 |
case 'checkbox':
|
324 |
}
|
325 |
?>
|
326 |
</table>
|
327 |
+
<?php do_action( 'qsm_theme_option_end', $quiz_id, $saved_quiz_theme, $get_theme_settings, $get_theme_default_settings ); ?>
|
328 |
</main>
|
329 |
<footer class="qsm-popup__footer">
|
330 |
<button type="submit" id="qsm-save-theme-settings"
|
388 |
</th>
|
389 |
<td>
|
390 |
<input name="<?php echo esc_attr( $theme_val['id'] ); ?>" type="text" value="<?php echo esc_attr( $setting_val ); ?>"
|
391 |
+
data-default-color="<?php echo esc_attr( $setting_val ); ?>" class="qsm-color-field" />
|
392 |
</td>
|
393 |
</tr>
|
394 |
<?php
|
php/admin/quiz-options-page.php
CHANGED
@@ -129,14 +129,14 @@ function qsm_generate_quiz_options() {
|
|
129 |
</a>
|
130 |
<div class="qsm-help-tab-dropdown-list">
|
131 |
<h3><?php esc_html_e( 'Useful Resources', 'quiz-master-next' ); ?></h3>
|
132 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('contact-support', '
|
133 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/about-quiz-survey-master', '
|
134 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/creating-quizzes-and-surveys', '
|
135 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/question-types', '
|
136 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/advanced-topics', '
|
137 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/qsm-themes', '
|
138 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs/add-ons', '
|
139 |
-
<a href="<?php echo esc_url( qsm_get_plugin_link('docs', '
|
140 |
</div>
|
141 |
</div>
|
142 |
</div>
|
@@ -276,14 +276,15 @@ function qsm_generate_quiz_options() {
|
|
276 |
<?php
|
277 |
if ( ! class_exists('QSM_Advance_Question') ) {
|
278 |
$qsm_pop_up_arguments = array(
|
279 |
-
"
|
280 |
-
"
|
281 |
-
"
|
282 |
-
"
|
283 |
-
"
|
284 |
-
"
|
285 |
-
"
|
286 |
-
"
|
|
|
287 |
);
|
288 |
qsm_admin_upgrade_popup($qsm_pop_up_arguments);
|
289 |
}
|
129 |
</a>
|
130 |
<div class="qsm-help-tab-dropdown-list">
|
131 |
<h3><?php esc_html_e( 'Useful Resources', 'quiz-master-next' ); ?></h3>
|
132 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'contact-support', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_support' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><img class="qsm-help-tab-icon" alt="" src="<?php echo esc_url( QSM_PLUGIN_URL . 'assets/Support.svg' ) ?>"> <?php esc_html_e( 'Get support', 'quiz-master-next' ); ?></a>
|
133 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/about-quiz-survey-master', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_overview' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Overview', 'quiz-master-next' ); ?></a>
|
134 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/creating-quizzes-and-surveys', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_create_quiz' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Creating Quizzes', 'quiz-master-next' ); ?></a>
|
135 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/question-types', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_que_type' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Question Types', 'quiz-master-next' ); ?></a>
|
136 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/advanced-topics', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_adv_topic' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Advanced Topics', 'quiz-master-next' ); ?></a>
|
137 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/qsm-themes', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_themes' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'QSM Themes', 'quiz-master-next' ); ?></a>
|
138 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs/add-ons', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_addons' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'Add-ons', 'quiz-master-next' ); ?></a>
|
139 |
+
<a href="<?php echo esc_url( qsm_get_plugin_link( 'docs', 'quiz_editor', 'help_box', 'quizsurvey-helpbox_all_doc' ) ); ?>" rel="noopener" target="_black" class="qsm-help-tab-item "><span class="dashicons dashicons-media-document"></span> <?php esc_html_e( 'All Docs', 'quiz-master-next' ); ?></a>
|
140 |
</div>
|
141 |
</div>
|
142 |
</div>
|
276 |
<?php
|
277 |
if ( ! class_exists('QSM_Advance_Question') ) {
|
278 |
$qsm_pop_up_arguments = array(
|
279 |
+
"id" => 'modal-advanced-question-type',
|
280 |
+
"title" => __('Advanced Question Types', 'quiz-master-next'),
|
281 |
+
"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 |
+
"chart_image" => plugins_url('', dirname(__FILE__)) . '/images/advanced_question_type.png',
|
283 |
+
"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'),
|
284 |
+
"buy_btn_text" => __('Buy Advanced Questions Addon', 'quiz-master-next'),
|
285 |
+
"doc_link" => qsm_get_plugin_link( 'docs/question-types', 'qsm_list', 'advance-question_type', 'advance-question-upsell_read_documentation', 'qsm_plugin_upsell' ),
|
286 |
+
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'qsm_list', 'advance-question_type', 'advance-question-upsell_upgrade', 'qsm_plugin_upsell' ),
|
287 |
+
"addon_link" => qsm_get_plugin_link( 'downloads/advanced-question-types', 'qsm_list', 'advance-question_type', 'advance-question-upsell_buy_addon', 'qsm_plugin_upsell' ),
|
288 |
);
|
289 |
qsm_admin_upgrade_popup($qsm_pop_up_arguments);
|
290 |
}
|
php/admin/quizzes-page.php
CHANGED
@@ -430,17 +430,21 @@ if ( ! class_exists( 'QSMQuizList' ) ) {
|
|
430 |
</div>
|
431 |
<!-- Popup for export import upsell -->
|
432 |
<?php
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
|
|
|
|
|
|
|
|
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>
|
430 |
</div>
|
431 |
<!-- Popup for export import upsell -->
|
432 |
<?php
|
433 |
+
if ( ! class_exists( 'QSM_Export_Import' ) ) {
|
434 |
+
$qsm_pop_up_arguments = array(
|
435 |
+
"id" => 'modal-export-import',
|
436 |
+
"title" => __('Export & Import', 'quiz-master-next'),
|
437 |
+
"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'),
|
438 |
+
"chart_image" => plugins_url('', dirname(__FILE__)) . '/images/export_import_chart.png',
|
439 |
+
"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 |
+
"buy_btn_text" => __('Buy Export & Import Addon', 'quiz-master-next'),
|
441 |
+
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/export-import/', 'qsm_list', 'importexport_button', 'import-export-upsell_read_documentation', 'qsm_plugin_upsell' ),
|
442 |
+
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'qsm_list', 'importexport_button', 'import-export-upsell_upgrade', 'qsm_plugin_upsell' ),
|
443 |
+
"addon_link" => qsm_get_plugin_link( 'downloads/export-import', 'qsm_list', 'importexport_button', 'import-export-upsell_buy_addon', 'qsm_plugin_upsell' ),
|
444 |
+
);
|
445 |
+
qsm_admin_upgrade_popup($qsm_pop_up_arguments);
|
446 |
+
}
|
447 |
+
?>
|
448 |
<!-- Popup for delete quiz -->
|
449 |
<div class="qsm-popup qsm-popup-slide" id="modal-6" aria-hidden="true">
|
450 |
<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close>
|
php/classes/class-qmn-plugin-helper.php
CHANGED
@@ -411,8 +411,26 @@ class QMNPluginHelper {
|
|
411 |
}
|
412 |
$answers_original = $answers;
|
413 |
if ( 2 === intval( $quiz_options->randomness_order ) || 3 === intval( $quiz_options->randomness_order ) ) {
|
414 |
-
|
415 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
}
|
417 |
|
418 |
// convert answer array into key value pair
|
@@ -793,12 +811,13 @@ class QMNPluginHelper {
|
|
793 |
* @param string $function The function that displays the tab's content
|
794 |
* @return void
|
795 |
*/
|
796 |
-
public function register_admin_results_tab( $title, $function ) {
|
797 |
$slug = strtolower( str_replace( ' ', '-', $title ) );
|
798 |
$new_tab = array(
|
799 |
'title' => $title,
|
800 |
'function' => $function,
|
801 |
'slug' => $slug,
|
|
|
802 |
);
|
803 |
$this->admin_results_tabs[] = $new_tab;
|
804 |
}
|
@@ -812,6 +831,11 @@ class QMNPluginHelper {
|
|
812 |
* @return array The array of registered tabs
|
813 |
*/
|
814 |
public function get_admin_results_tabs() {
|
|
|
|
|
|
|
|
|
|
|
815 |
return $this->admin_results_tabs;
|
816 |
}
|
817 |
|
411 |
}
|
412 |
$answers_original = $answers;
|
413 |
if ( 2 === intval( $quiz_options->randomness_order ) || 3 === intval( $quiz_options->randomness_order ) ) {
|
414 |
+
if ( empty($_COOKIE[ 'answer_ids_'.$question_id ]) ) {
|
415 |
+
$answers = self::qsm_shuffle_assoc( $answers );
|
416 |
+
$answer_ids = array_keys($answers);
|
417 |
+
$answer_ids = implode( ',', $answer_ids );
|
418 |
+
?>
|
419 |
+
<script>
|
420 |
+
var ans_d = new Date();
|
421 |
+
ans_d.setTime(ans_d.getTime() + (365*24*60*60*1000));
|
422 |
+
var ans_expires = "expires="+ ans_d.toUTCString();
|
423 |
+
document.cookie = "answer_ids_<?php echo esc_attr( $question_id ); ?> = <?php echo esc_attr( $answer_ids ) ?>; "+ans_expires+"; path=/";
|
424 |
+
</script>
|
425 |
+
<?php
|
426 |
+
}else {
|
427 |
+
$answer_ids = explode( ',', sanitize_text_field( wp_unslash( $_COOKIE[ 'answer_ids_'.$question_id ] ) ) );
|
428 |
+
$answers_random = array();
|
429 |
+
foreach ( $answer_ids as $key ) {
|
430 |
+
$answers_random[ $key ] = $answers[ $key ];
|
431 |
+
}
|
432 |
+
$answers = $answers_random;
|
433 |
+
}
|
434 |
}
|
435 |
|
436 |
// convert answer array into key value pair
|
811 |
* @param string $function The function that displays the tab's content
|
812 |
* @return void
|
813 |
*/
|
814 |
+
public function register_admin_results_tab( $title, $function, $priority = 10 ) {
|
815 |
$slug = strtolower( str_replace( ' ', '-', $title ) );
|
816 |
$new_tab = array(
|
817 |
'title' => $title,
|
818 |
'function' => $function,
|
819 |
'slug' => $slug,
|
820 |
+
'priority' => $priority,
|
821 |
);
|
822 |
$this->admin_results_tabs[] = $new_tab;
|
823 |
}
|
831 |
* @return array The array of registered tabs
|
832 |
*/
|
833 |
public function get_admin_results_tabs() {
|
834 |
+
/**
|
835 |
+
* Sort tabs by priority
|
836 |
+
*/
|
837 |
+
array_multisort( array_column($this->admin_results_tabs, 'priority'), SORT_ASC, $this->admin_results_tabs);
|
838 |
+
|
839 |
return $this->admin_results_tabs;
|
840 |
}
|
841 |
|
php/classes/class-qmn-quiz-manager.php
CHANGED
@@ -136,7 +136,7 @@ class QMNQuizManager {
|
|
136 |
$file_name = isset( $_FILES['file']['name'] ) ? sanitize_file_name( wp_unslash( $uploaded_file['name'] ) ) : '';
|
137 |
$validate_file = wp_check_filetype( $file_name );
|
138 |
if ( isset( $validate_file['type'] ) && in_array( $validate_file['type'], $mimes, true ) ) {
|
139 |
-
if ( isset( $_FILES['file']['size'] ) && $_FILES['file']['size'] >= $file_upload_limit * 1024 * 1024 ) {
|
140 |
$json['type'] = 'error';
|
141 |
$json['message'] = __( 'File is too large. File must be less than ', 'quiz-master-next' ) . $file_upload_limit . ' MB';
|
142 |
echo wp_json_encode( $json );
|
@@ -334,6 +334,11 @@ class QMNQuizManager {
|
|
334 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $result['quiz_id'] );
|
335 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
336 |
|
|
|
|
|
|
|
|
|
|
|
337 |
wp_enqueue_style( 'qmn_quiz_common_style', $this->common_css, array(), $mlwQuizMasterNext->version );
|
338 |
wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
|
339 |
wp_enqueue_style( 'dashicons' );
|
@@ -363,19 +368,22 @@ class QMNQuizManager {
|
|
363 |
if ( false === $success ) {
|
364 |
return __( 'It appears that this quiz is not set up correctly', 'quiz-master-next' );
|
365 |
}
|
366 |
-
$question_amount = intval( $question_amount );
|
367 |
|
368 |
-
// Legacy variable.
|
369 |
global $mlw_qmn_quiz;
|
370 |
$mlw_qmn_quiz = $quiz;
|
371 |
-
|
372 |
$return_display = '';
|
373 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
|
|
374 |
/**
|
375 |
* Filter Quiz Options before Quiz Display
|
376 |
*/
|
377 |
$qmn_quiz_options = apply_filters( 'qsm_shortcode_quiz_options', $qmn_quiz_options );
|
378 |
|
|
|
|
|
|
|
|
|
|
|
379 |
// If quiz options isn't found, stop function.
|
380 |
if ( is_null( $qmn_quiz_options ) || empty( $qmn_quiz_options->quiz_name ) ) {
|
381 |
return __( 'It appears that this quiz is not set up correctly', 'quiz-master-next' );
|
@@ -1423,6 +1431,18 @@ class QMNQuizManager {
|
|
1423 |
$quiz = isset( $_POST['qmn_quiz_id'] ) ? intval( $_POST['qmn_quiz_id'] ) : '';
|
1424 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz );
|
1425 |
$options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1426 |
$qsm_option = isset( $options->quiz_settings ) ? maybe_unserialize( $options->quiz_settings ) : array();
|
1427 |
$qsm_option = array_map( 'maybe_unserialize', $qsm_option );
|
1428 |
$dateStr = $qsm_option['quiz_options']['scheduled_time_end'];
|
136 |
$file_name = isset( $_FILES['file']['name'] ) ? sanitize_file_name( wp_unslash( $uploaded_file['name'] ) ) : '';
|
137 |
$validate_file = wp_check_filetype( $file_name );
|
138 |
if ( isset( $validate_file['type'] ) && in_array( $validate_file['type'], $mimes, true ) ) {
|
139 |
+
if ( isset( $_FILES['file']['size'] ) && $file_upload_limit > 0 && $_FILES['file']['size'] >= $file_upload_limit * 1024 * 1024 ) {
|
140 |
$json['type'] = 'error';
|
141 |
$json['message'] = __( 'File is too large. File must be less than ', 'quiz-master-next' ) . $file_upload_limit . ' MB';
|
142 |
echo wp_json_encode( $json );
|
334 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $result['quiz_id'] );
|
335 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
336 |
|
337 |
+
// If quiz options isn't found, stop function.
|
338 |
+
if ( is_null( $qmn_quiz_options ) || 1 == $qmn_quiz_options->deleted ) {
|
339 |
+
return __( 'This quiz is no longer available.', 'quiz-master-next' );
|
340 |
+
}
|
341 |
+
|
342 |
wp_enqueue_style( 'qmn_quiz_common_style', $this->common_css, array(), $mlwQuizMasterNext->version );
|
343 |
wp_style_add_data( 'qmn_quiz_common_style', 'rtl', 'replace' );
|
344 |
wp_enqueue_style( 'dashicons' );
|
368 |
if ( false === $success ) {
|
369 |
return __( 'It appears that this quiz is not set up correctly', 'quiz-master-next' );
|
370 |
}
|
|
|
371 |
|
|
|
372 |
global $mlw_qmn_quiz;
|
373 |
$mlw_qmn_quiz = $quiz;
|
|
|
374 |
$return_display = '';
|
375 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
376 |
+
// Legacy variable.
|
377 |
/**
|
378 |
* Filter Quiz Options before Quiz Display
|
379 |
*/
|
380 |
$qmn_quiz_options = apply_filters( 'qsm_shortcode_quiz_options', $qmn_quiz_options );
|
381 |
|
382 |
+
// If quiz options isn't found, stop function.
|
383 |
+
if ( is_null( $qmn_quiz_options ) || 1 == $qmn_quiz_options->deleted ) {
|
384 |
+
return __( 'This quiz is no longer available.', 'quiz-master-next' );
|
385 |
+
}
|
386 |
+
|
387 |
// If quiz options isn't found, stop function.
|
388 |
if ( is_null( $qmn_quiz_options ) || empty( $qmn_quiz_options->quiz_name ) ) {
|
389 |
return __( 'It appears that this quiz is not set up correctly', 'quiz-master-next' );
|
1431 |
$quiz = isset( $_POST['qmn_quiz_id'] ) ? intval( $_POST['qmn_quiz_id'] ) : '';
|
1432 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz );
|
1433 |
$options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
1434 |
+
if ( is_null( $options ) || 1 == $options->deleted ) {
|
1435 |
+
echo wp_json_encode(
|
1436 |
+
array(
|
1437 |
+
'display' => htmlspecialchars_decode( 'This quiz is no longer available.' ),
|
1438 |
+
'redirect' => false,
|
1439 |
+
'result_status' => array(
|
1440 |
+
'save_response' => false,
|
1441 |
+
),
|
1442 |
+
)
|
1443 |
+
);
|
1444 |
+
die();
|
1445 |
+
}
|
1446 |
$qsm_option = isset( $options->quiz_settings ) ? maybe_unserialize( $options->quiz_settings ) : array();
|
1447 |
$qsm_option = array_map( 'maybe_unserialize', $qsm_option );
|
1448 |
$dateStr = $qsm_option['quiz_options']['scheduled_time_end'];
|
php/classes/class-qsm-install.php
CHANGED
@@ -2083,12 +2083,12 @@ class QSM_Install {
|
|
2083 |
|
2084 |
$qsm_install = new QSM_Install();
|
2085 |
|
2086 |
-
if ( ! function_exists( '
|
2087 |
|
2088 |
/**
|
2089 |
* Get Document link
|
2090 |
*/
|
2091 |
-
function qsm_get_plugin_link( $path = '', $source = '', $content = '' ) {
|
2092 |
$link = 'https://quizandsurveymaster.com/';
|
2093 |
if ( ! empty( $path ) ) {
|
2094 |
$link .= $path;
|
@@ -2098,12 +2098,47 @@ if ( ! function_exists( 'qsm_get_document_link' ) ) {
|
|
2098 |
/**
|
2099 |
* Prepare UTM parameters
|
2100 |
*/
|
2101 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2102 |
if ( ! empty( $source ) ) {
|
2103 |
-
$link
|
|
|
|
|
|
|
2104 |
}
|
2105 |
if ( ! empty( $content ) ) {
|
2106 |
-
$link
|
2107 |
}
|
2108 |
|
2109 |
return $link;
|
2083 |
|
2084 |
$qsm_install = new QSM_Install();
|
2085 |
|
2086 |
+
if ( ! function_exists( 'qsm_get_plugin_link' ) ) {
|
2087 |
|
2088 |
/**
|
2089 |
* Get Document link
|
2090 |
*/
|
2091 |
+
function qsm_get_plugin_link( $path = '', $source = '', $medium = '', $content = '', $campaign = 'qsm_plugin' ) {
|
2092 |
$link = 'https://quizandsurveymaster.com/';
|
2093 |
if ( ! empty( $path ) ) {
|
2094 |
$link .= $path;
|
2098 |
/**
|
2099 |
* Prepare UTM parameters
|
2100 |
*/
|
2101 |
+
if ( ! empty( $campaign ) ) {
|
2102 |
+
$link = add_query_arg( 'utm_campaign', $campaign, $link );
|
2103 |
+
}
|
2104 |
+
if ( ! empty( $source ) ) {
|
2105 |
+
$link = add_query_arg( 'utm_source', $source, $link );
|
2106 |
+
}
|
2107 |
+
if ( ! empty( $medium ) ) {
|
2108 |
+
$link = add_query_arg( 'utm_medium', $medium, $link );
|
2109 |
+
}
|
2110 |
+
if ( ! empty( $content ) ) {
|
2111 |
+
$link = add_query_arg( 'utm_content', $content, $link );
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
return $link;
|
2115 |
+
}
|
2116 |
+
}
|
2117 |
+
if ( ! function_exists( 'qsm_get_utm_link' ) ) {
|
2118 |
+
|
2119 |
+
/**
|
2120 |
+
* Get Document link
|
2121 |
+
*/
|
2122 |
+
function qsm_get_utm_link( $link = '', $source = '', $medium = '', $content = '', $campaign = 'qsm_plugin' ) {
|
2123 |
+
if ( empty( $link ) ) {
|
2124 |
+
return $link;
|
2125 |
+
}
|
2126 |
+
$link = trailingslashit( $link );
|
2127 |
+
|
2128 |
+
/**
|
2129 |
+
* Prepare UTM parameters
|
2130 |
+
*/
|
2131 |
+
if ( ! empty( $campaign ) ) {
|
2132 |
+
$link = add_query_arg( 'utm_campaign', $campaign, $link );
|
2133 |
+
}
|
2134 |
if ( ! empty( $source ) ) {
|
2135 |
+
$link = add_query_arg( 'utm_source', $source, $link );
|
2136 |
+
}
|
2137 |
+
if ( ! empty( $medium ) ) {
|
2138 |
+
$link = add_query_arg( 'utm_medium', $medium, $link );
|
2139 |
}
|
2140 |
if ( ! empty( $content ) ) {
|
2141 |
+
$link = add_query_arg( 'utm_content', $content, $link );
|
2142 |
}
|
2143 |
|
2144 |
return $link;
|
php/classes/question-types/class-question-review-file-upload.php
CHANGED
@@ -10,7 +10,7 @@ class QSM_Question_Review_File_Upload extends QSM_Question_Review {
|
|
10 |
|
11 |
public function set_user_answer() {
|
12 |
if ( isset( $_POST[ 'question' . $this->question_id ] ) ) {
|
13 |
-
$user_answer_key = '
|
14 |
$user_answer_value = $this->sanitize_answer_from_post( wp_unslash( $_POST[ 'question' . $this->question_id ] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
15 |
$this->user_answer[ $user_answer_key ] = $user_answer_value;
|
16 |
}
|
10 |
|
11 |
public function set_user_answer() {
|
12 |
if ( isset( $_POST[ 'question' . $this->question_id ] ) ) {
|
13 |
+
$user_answer_key = 'file_id';
|
14 |
$user_answer_value = $this->sanitize_answer_from_post( wp_unslash( $_POST[ 'question' . $this->question_id ] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
15 |
$this->user_answer[ $user_answer_key ] = $user_answer_value;
|
16 |
}
|
php/classes/question-types/class-question-review.php
CHANGED
@@ -49,7 +49,7 @@ abstract class QSM_Question_Review {
|
|
49 |
}
|
50 |
|
51 |
public function decode_response_from_text_field( $data ) {
|
52 |
-
return trim(
|
53 |
}
|
54 |
|
55 |
|
49 |
}
|
50 |
|
51 |
public function decode_response_from_text_field( $data ) {
|
52 |
+
return trim( htmlentities( $data ) );
|
53 |
}
|
54 |
|
55 |
|
php/images/export_results.png
ADDED
Binary file
|
php/images/report_analysis_chart.png
CHANGED
Binary file
|
php/question-types/qsm-question-type-file-upload.php
CHANGED
@@ -24,10 +24,9 @@ function qmn_file_upload_display( $id, $question, $answers ) {
|
|
24 |
?> <div></div><input type="file" class="mlw_answer_file_upload <?php echo esc_attr( $mlw_require_class ); ?>"/>
|
25 |
<div style="display: none;" class="loading-uploaded-file"><img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( get_site_url() . '/wp-includes/images/spinner-2x.gif' ); ?>"></div>
|
26 |
<div style="display: none;" class="remove-uploaded-file"><span class="dashicons dashicons-trash"></span></div>
|
27 |
-
<input class="mlw_file_upload_hidden_value" type="hidden" name="question<?php echo esc_attr( $id ); ?>" value="" />
|
28 |
<span style="display: none;" class='mlw-file-upload-error-msg'></span>
|
29 |
<input class="mlw_file_upload_hidden_path" type="hidden" value="" />
|
30 |
-
<input class="mlw_file_upload_media_id" type="hidden" value="" />
|
31 |
<?php
|
32 |
echo apply_filters( 'qmn_file_upload_display_front', '', $id, $question, $answers );
|
33 |
}
|
@@ -42,16 +41,20 @@ function qmn_file_upload_display( $id, $question, $answers ) {
|
|
42 |
* @since 5.3.7
|
43 |
*/
|
44 |
function qmn_file_upload_review( $id, $question, $answers ) {
|
45 |
-
$current_question
|
46 |
-
$user_text_array
|
47 |
-
$
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$
|
52 |
-
$return_array['
|
53 |
-
$return_array['
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
* Hook to filter answers array
|
56 |
*/
|
57 |
return apply_filters( 'qmn_file_upload_review', $return_array, $answers );
|
24 |
?> <div></div><input type="file" class="mlw_answer_file_upload <?php echo esc_attr( $mlw_require_class ); ?>"/>
|
25 |
<div style="display: none;" class="loading-uploaded-file"><img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( get_site_url() . '/wp-includes/images/spinner-2x.gif' ); ?>"></div>
|
26 |
<div style="display: none;" class="remove-uploaded-file"><span class="dashicons dashicons-trash"></span></div>
|
|
|
27 |
<span style="display: none;" class='mlw-file-upload-error-msg'></span>
|
28 |
<input class="mlw_file_upload_hidden_path" type="hidden" value="" />
|
29 |
+
<input class="mlw_file_upload_media_id" name="question<?php echo esc_attr( $id ); ?>" type="hidden" value="" />
|
30 |
<?php
|
31 |
echo apply_filters( 'qmn_file_upload_display_front', '', $id, $question, $answers );
|
32 |
}
|
41 |
* @since 5.3.7
|
42 |
*/
|
43 |
function qmn_file_upload_review( $id, $question, $answers ) {
|
44 |
+
$current_question = new QSM_Question_Review_File_Upload( $id, $question, $answers );
|
45 |
+
$user_text_array = $current_question->get_user_answer();
|
46 |
+
$file_url = (isset( $user_text_array['url'] ) && ! empty( $user_text_array['url'] )) ? $user_text_array['url'] : false;
|
47 |
+
if ( isset( $user_text_array['file_id'] ) && ! empty( $user_text_array['file_id'] ) ) {
|
48 |
+
$file_url = wp_get_attachment_url( $user_text_array['file_id'] );
|
49 |
+
}
|
50 |
+
$correct_text_array = $current_question->get_correct_answer();
|
51 |
+
$return_array['user_text'] = ($file_url) ? '<a target="_blank" href="' . $file_url . '">' . __( 'Click here to view', 'quiz-master-next' ) . '</a>' : __( 'No file uploaded', 'quiz-master-next' );
|
52 |
+
$return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
|
53 |
+
$return_array['correct'] = $current_question->get_answer_status( 'url' );
|
54 |
+
$return_array['points'] = $current_question->get_points();
|
55 |
+
$return_array['user_answer'] = $user_text_array;
|
56 |
+
$return_array['correct_answer'] = $correct_text_array;
|
57 |
+
/**
|
58 |
* Hook to filter answers array
|
59 |
*/
|
60 |
return apply_filters( 'qmn_file_upload_review', $return_array, $answers );
|
php/question-types/qsm-question-type-number.php
CHANGED
@@ -47,7 +47,7 @@ function qmn_number_review( $id, $question, $answers ) {
|
|
47 |
$return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
|
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
|
47 |
$return_array['correct_text'] = ! empty( $correct_text_array ) ? implode( '.', $correct_text_array ) : '';
|
48 |
$return_array['correct'] = $current_question->get_answer_status();
|
49 |
$return_array['points'] = $current_question->get_points();
|
50 |
+
$return_array['user_answer'] = is_numeric( $user_text_array ) ? $user_text_array : '';
|
51 |
$return_array['correct_answer'] = $correct_text_array ;
|
52 |
/**
|
53 |
* Hook to filter answers array
|
php/template-variables.php
CHANGED
@@ -936,6 +936,10 @@ add_filter( 'wp_kses_allowed_html', 'qsm_custom_wpkses_post_tags', 10, 2 );
|
|
936 |
function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt ) {
|
937 |
global $mlwQuizMasterNext;
|
938 |
$question_types = $mlwQuizMasterNext->pluginHelper->get_question_type_options();
|
|
|
|
|
|
|
|
|
939 |
|
940 |
$use_custom_default_template = array();
|
941 |
foreach ( $question_types as $type ) {
|
@@ -1025,33 +1029,35 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1025 |
$quiz_system = isset( $mlw_quiz_array['quiz_system'] ) ? $mlw_quiz_array['quiz_system'] : 0;
|
1026 |
if ( isset( $answer['id'] ) && isset( $questions[ $answer['id'] ] ) && ! empty( $questions[ $answer['id'] ] ) ) {
|
1027 |
$total_answers = isset( $questions[ $answer['id'] ]['answers'] ) ? $questions[ $answer['id'] ]['answers'] : array();
|
1028 |
-
|
1029 |
-
|
1030 |
-
$
|
1031 |
-
|
1032 |
-
|
|
|
|
|
|
|
1033 |
}
|
1034 |
if ( $total_answers ) {
|
1035 |
if ( isset( $answer['question_type'] ) && in_array( intval( $answer['question_type'] ), $question_with_text_input, true ) ) {
|
1036 |
-
$do_show_wrong
|
|
|
1037 |
foreach ( $total_answers as $single_answer_key => $single_answer ) {
|
1038 |
$current_answer_zero = trim( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) );
|
1039 |
-
|
1040 |
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
|
1041 |
if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
|
1042 |
-
$actual_answer = htmlspecialchars_decode( $answer[1], ENT_QUOTES );
|
1043 |
if ( 5 == $answer['question_type'] ) {
|
1044 |
-
$
|
1045 |
$current_answer_zero = trim( str_replace( ' ', '', preg_replace( '/\s\s+/', '', $current_answer_zero ) ) );
|
1046 |
}
|
1047 |
|
1048 |
-
if ( 0 == strcasecmp( $
|
1049 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' .
|
1050 |
$do_show_wrong = false;
|
1051 |
}
|
1052 |
}
|
1053 |
} else {
|
1054 |
-
if ( isset( $single_answer[2] ) && strcasecmp(
|
1055 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
|
1056 |
$do_show_wrong = false;
|
1057 |
}
|
@@ -1059,8 +1065,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1059 |
}
|
1060 |
if ( $do_show_wrong ) {
|
1061 |
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
|
1062 |
-
$
|
1063 |
-
$question_with_answer_text .= '<span class="qsm-text-wrong-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
|
1064 |
foreach ( $total_answers as $single_answer ) {
|
1065 |
if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
|
1066 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
|
@@ -1068,8 +1073,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1068 |
}
|
1069 |
}
|
1070 |
} else {
|
1071 |
-
$
|
1072 |
-
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
|
1073 |
}
|
1074 |
}
|
1075 |
} elseif ( isset( $answer['question_type'] ) && 11 == $answer['question_type'] ) {
|
936 |
function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt ) {
|
937 |
global $mlwQuizMasterNext;
|
938 |
$question_types = $mlwQuizMasterNext->pluginHelper->get_question_type_options();
|
939 |
+
$quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
940 |
+
if ( 0 == $quiz_options->show_optin && isset($answer['question_type']) && 8 == $answer['question_type'] ) {
|
941 |
+
return '';
|
942 |
+
}
|
943 |
|
944 |
$use_custom_default_template = array();
|
945 |
foreach ( $question_types as $type ) {
|
1029 |
$quiz_system = isset( $mlw_quiz_array['quiz_system'] ) ? $mlw_quiz_array['quiz_system'] : 0;
|
1030 |
if ( isset( $answer['id'] ) && isset( $questions[ $answer['id'] ] ) && ! empty( $questions[ $answer['id'] ] ) ) {
|
1031 |
$total_answers = isset( $questions[ $answer['id'] ]['answers'] ) ? $questions[ $answer['id'] ]['answers'] : array();
|
1032 |
+
if ( ! empty($_COOKIE[ 'answer_ids_'.$answer['id'] ]) ) {
|
1033 |
+
$answer_ids = explode( ',', sanitize_text_field( wp_unslash( $_COOKIE[ 'answer_ids_'.$answer['id'] ] ) ) );
|
1034 |
+
$answers_random = array();
|
1035 |
+
foreach ( $answer_ids as $key ) {
|
1036 |
+
$answers_random[ $key ] = $total_answers[ $key ];
|
1037 |
+
}
|
1038 |
+
$total_answers = $answers_random;
|
1039 |
+
setcookie('answer_ids_'.$answer['id'], "", time() - 36000, "/");
|
1040 |
}
|
1041 |
if ( $total_answers ) {
|
1042 |
if ( isset( $answer['question_type'] ) && in_array( intval( $answer['question_type'] ), $question_with_text_input, true ) ) {
|
1043 |
+
$do_show_wrong = true;
|
1044 |
+
$user_given_answer = '' === $answer[1] ? __( 'No answer provided', 'quiz-master-next' ) : htmlentities( $answer[1] );
|
1045 |
foreach ( $total_answers as $single_answer_key => $single_answer ) {
|
1046 |
$current_answer_zero = trim( $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) );
|
|
|
1047 |
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
|
1048 |
if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
|
|
|
1049 |
if ( 5 == $answer['question_type'] ) {
|
1050 |
+
$user_given_answer = trim( str_replace( ' ', '', preg_replace( '/\s\s+/', '', $user_given_answer ) ) );
|
1051 |
$current_answer_zero = trim( str_replace( ' ', '', preg_replace( '/\s\s+/', '', $current_answer_zero ) ) );
|
1052 |
}
|
1053 |
|
1054 |
+
if ( 0 == strcasecmp( $user_given_answer, $current_answer_zero ) ) {
|
1055 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer">' . $user_given_answer . '</span>';
|
1056 |
$do_show_wrong = false;
|
1057 |
}
|
1058 |
}
|
1059 |
} else {
|
1060 |
+
if ( isset( $single_answer[2] ) && strcasecmp( $user_given_answer, $current_answer_zero ) == 0 ) {
|
1061 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
|
1062 |
$do_show_wrong = false;
|
1063 |
}
|
1065 |
}
|
1066 |
if ( $do_show_wrong ) {
|
1067 |
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
|
1068 |
+
$question_with_answer_text .= '<span class="qsm-text-wrong-option">' . $user_given_answer . '</span>';
|
|
|
1069 |
foreach ( $total_answers as $single_answer ) {
|
1070 |
if ( isset( $single_answer[2] ) && 1 == $single_answer[2] ) {
|
1071 |
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
|
1073 |
}
|
1074 |
}
|
1075 |
} else {
|
1076 |
+
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . $user_given_answer . '</span>';
|
|
|
1077 |
}
|
1078 |
}
|
1079 |
} elseif ( isset( $answer['question_type'] ) && 11 == $answer['question_type'] ) {
|
php/template-variables/qsm-tempvar-question-answers.php
CHANGED
@@ -3,21 +3,10 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
|
|
3 |
global $mlwQuizMasterNext;
|
4 |
$question_with_answer_text = '';
|
5 |
$class = '';
|
6 |
-
$optin = '';
|
7 |
-
$hide = '';
|
8 |
foreach ( $total_answers as $single_answer_key => $single_answer ) {
|
9 |
if ( 8 == $answers_from_response['question_type'] && 'not-opted' == $answers_from_response['user_compare_text'] ) {
|
10 |
$class = 'not-opted';
|
11 |
}
|
12 |
-
if ( 8 == $answers_from_response['question_type'] ) {
|
13 |
-
$quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
14 |
-
$settings_quiz = maybe_unserialize( $quiz_options->quiz_settings );
|
15 |
-
$options_quiz = maybe_unserialize( $settings_quiz['quiz_options'] );
|
16 |
-
$optin = $options_quiz['show_optin'];
|
17 |
-
if ( 0 == $optin ) {
|
18 |
-
$hide = 'hide';
|
19 |
-
}
|
20 |
-
}
|
21 |
$user_answer_array = isset( $answers_from_response['user_answer'] ) && is_array( $answers_from_response['user_answer'] ) ? $answers_from_response['user_answer'] : array();
|
22 |
$user_answer_keys = ! empty( $user_answer_array ) ? array_keys( $user_answer_array ) : array();
|
23 |
$is_answer_correct = false;
|
@@ -50,19 +39,19 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
|
|
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 ' .
|
54 |
} elseif ( ! $is_user_answer && $is_answer_correct ) {
|
55 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option ' .
|
56 |
} elseif ( $is_user_answer && ! $is_answer_correct ) {
|
57 |
-
$question_with_answer_text .= '<span class="qsm-text-wrong-option ' .
|
58 |
} else {
|
59 |
-
$question_with_answer_text .= '<span class="qsm-text-simple-option ' .
|
60 |
}
|
61 |
} else {
|
62 |
if ( $is_user_answer ) {
|
63 |
-
$question_with_answer_text .= '<span class="qsm-text-correct-option ' .
|
64 |
} else {
|
65 |
-
$question_with_answer_text .= '<span class="qsm-text-simple-option ' .
|
66 |
}
|
67 |
}
|
68 |
}
|
3 |
global $mlwQuizMasterNext;
|
4 |
$question_with_answer_text = '';
|
5 |
$class = '';
|
|
|
|
|
6 |
foreach ( $total_answers as $single_answer_key => $single_answer ) {
|
7 |
if ( 8 == $answers_from_response['question_type'] && 'not-opted' == $answers_from_response['user_compare_text'] ) {
|
8 |
$class = 'not-opted';
|
9 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
$user_answer_array = isset( $answers_from_response['user_answer'] ) && is_array( $answers_from_response['user_answer'] ) ? $answers_from_response['user_answer'] : array();
|
11 |
$user_answer_keys = ! empty( $user_answer_array ) ? array_keys( $user_answer_array ) : array();
|
12 |
$is_answer_correct = false;
|
39 |
$close_span = '</span>';
|
40 |
if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
|
41 |
if ( $is_user_answer && $is_answer_correct ) {
|
42 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option qsm-text-user-correct-answer ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
43 |
} elseif ( ! $is_user_answer && $is_answer_correct ) {
|
44 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
45 |
} elseif ( $is_user_answer && ! $is_answer_correct ) {
|
46 |
+
$question_with_answer_text .= '<span class="qsm-text-wrong-option ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
47 |
} else {
|
48 |
+
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
49 |
}
|
50 |
} else {
|
51 |
if ( $is_user_answer ) {
|
52 |
+
$question_with_answer_text .= '<span class="qsm-text-correct-option ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
53 |
} else {
|
54 |
+
$question_with_answer_text .= '<span class="qsm-text-simple-option ' . $class . ' ' . $image_class . '">' . $show_user_answer .$caption.$close_span;
|
55 |
}
|
56 |
}
|
57 |
}
|
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.4 (September 29, 2022) =
|
167 |
* Feature: Added captions for image answer on result page
|
168 |
* Bug: Fixed issue with themes list in style tab
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 8.0.5
|
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.5 (Oct 20, 2022) =
|
167 |
+
* Bug: Fixed issue with random question and answers
|
168 |
+
* Bug: Fixed issue with quiz timer
|
169 |
+
* Bug: Fixed issue with file size limit
|
170 |
+
* Bug: Fixed security and Vulnerability issues.
|
171 |
+
* Enhancement: Improved UI for required fields validation message
|
172 |
+
* Enhancement: Improved UI in polar question
|
173 |
+
* Enhancement: Improved UI in Opt-in question
|
174 |
+
|
175 |
= 8.0.4 (September 29, 2022) =
|
176 |
* Feature: Added captions for image answer on result page
|
177 |
* Bug: Fixed issue with themes list in style tab
|
templates/qmn_amethyst.css
CHANGED
@@ -238,24 +238,24 @@ border: 1px solid #e3e3e3;
|
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
-
.
|
242 |
-
.
|
243 |
-
.
|
244 |
-
.
|
245 |
-
.
|
246 |
-
.
|
247 |
-
.
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
.
|
252 |
-
.
|
253 |
-
.
|
254 |
-
.
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
-
.
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
@@ -264,9 +264,9 @@ border: 1px solid #e3e3e3;
|
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
-
.
|
268 |
|
269 |
-
.
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
@@ -286,9 +286,9 @@ border: 1px solid #e3e3e3;
|
|
286 |
|
287 |
}
|
288 |
|
289 |
-
.
|
290 |
-
.
|
291 |
-
.
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
+
.qsm-quiz-form .qmn_error select,
|
242 |
+
.qsm-quiz-form .qmn_error textarea,
|
243 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
244 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
245 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
246 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
247 |
+
.qsm-quiz-form .qmn_error select:hover,
|
248 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
249 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
250 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
251 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
252 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
253 |
+
.qsm-quiz-form .qmn_error select:focus,
|
254 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
255 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
256 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
257 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
258 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus {
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
+
.qsm-quiz-form .qmn_error { position: relative; }
|
268 |
|
269 |
+
.qsm-quiz-form .qmn_error:after {
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
286 |
|
287 |
}
|
288 |
|
289 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
290 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
291 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
templates/qmn_base.css
CHANGED
@@ -238,24 +238,24 @@ border: 1px solid #e3e3e3;
|
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
-
.
|
242 |
-
.
|
243 |
-
.
|
244 |
-
.
|
245 |
-
.
|
246 |
-
.
|
247 |
-
.
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
.
|
252 |
-
.
|
253 |
-
.
|
254 |
-
.
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
-
.
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
@@ -264,9 +264,9 @@ border: 1px solid #e3e3e3;
|
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
-
.
|
268 |
|
269 |
-
.
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
@@ -286,9 +286,9 @@ border: 1px solid #e3e3e3;
|
|
286 |
|
287 |
}
|
288 |
|
289 |
-
.
|
290 |
-
.
|
291 |
-
.
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
+
.qsm-quiz-form .qmn_error select,
|
242 |
+
.qsm-quiz-form .qmn_error textarea,
|
243 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
244 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
245 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
246 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
247 |
+
.qsm-quiz-form .qmn_error select:hover,
|
248 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
249 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
250 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
251 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
252 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
253 |
+
.qsm-quiz-form .qmn_error select:focus,
|
254 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
255 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
256 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
257 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
258 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus {
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
+
.qsm-quiz-form .qmn_error { position: relative; }
|
268 |
|
269 |
+
.qsm-quiz-form .qmn_error:after {
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
286 |
|
287 |
}
|
288 |
|
289 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
290 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
291 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
templates/qmn_emerald.css
CHANGED
@@ -237,24 +237,24 @@ border: 1px solid #e3e3e3;
|
|
237 |
border-radius: 3px;
|
238 |
}
|
239 |
|
240 |
-
.
|
241 |
-
.
|
242 |
-
.
|
243 |
-
.
|
244 |
-
.
|
245 |
-
.
|
246 |
-
.
|
247 |
-
.
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
.
|
252 |
-
.
|
253 |
-
.
|
254 |
-
.
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
position: relative;
|
259 |
border: 1px solid #da4f49;
|
260 |
background: #F2DEDE;
|
@@ -263,9 +263,9 @@ border: 1px solid #e3e3e3;
|
|
263 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
264 |
}
|
265 |
|
266 |
-
.
|
267 |
|
268 |
-
.
|
269 |
content: '-';
|
270 |
color: #fff;
|
271 |
font-size: 20px;
|
@@ -285,9 +285,9 @@ border: 1px solid #e3e3e3;
|
|
285 |
|
286 |
}
|
287 |
|
288 |
-
.
|
289 |
-
.
|
290 |
-
.
|
291 |
border: 1px solid #da4f49;
|
292 |
background: #F2DEDE;
|
293 |
padding: 5px;
|
237 |
border-radius: 3px;
|
238 |
}
|
239 |
|
240 |
+
.qsm-quiz-form .qmn_error select,
|
241 |
+
.qsm-quiz-form .qmn_error textarea,
|
242 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
243 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
244 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
245 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
246 |
+
.qsm-quiz-form .qmn_error select:hover,
|
247 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
248 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
249 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
250 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
251 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
252 |
+
.qsm-quiz-form .qmn_error select:focus,
|
253 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
254 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
255 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
256 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
257 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus {
|
258 |
position: relative;
|
259 |
border: 1px solid #da4f49;
|
260 |
background: #F2DEDE;
|
263 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
264 |
}
|
265 |
|
266 |
+
.qsm-quiz-form .qmn_error { position: relative; }
|
267 |
|
268 |
+
.qsm-quiz-form .qmn_error:after {
|
269 |
content: '-';
|
270 |
color: #fff;
|
271 |
font-size: 20px;
|
285 |
|
286 |
}
|
287 |
|
288 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
289 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
290 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
291 |
border: 1px solid #da4f49;
|
292 |
background: #F2DEDE;
|
293 |
padding: 5px;
|
templates/qmn_gray.css
CHANGED
@@ -238,24 +238,24 @@ border: 1px solid #e3e3e3;
|
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
-
.
|
242 |
-
.
|
243 |
-
.
|
244 |
-
.
|
245 |
-
.
|
246 |
-
.
|
247 |
-
.
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
.
|
252 |
-
.
|
253 |
-
.
|
254 |
-
.
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
-
.
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
@@ -264,9 +264,9 @@ border: 1px solid #e3e3e3;
|
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
-
.
|
268 |
|
269 |
-
.
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
@@ -286,9 +286,9 @@ border: 1px solid #e3e3e3;
|
|
286 |
|
287 |
}
|
288 |
|
289 |
-
.
|
290 |
-
.
|
291 |
-
.
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
+
.qsm-quiz-form .qmn_error select,
|
242 |
+
.qsm-quiz-form .qmn_error textarea,
|
243 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
244 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
245 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
246 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
247 |
+
.qsm-quiz-form .qmn_error select:hover,
|
248 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
249 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
250 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
251 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
252 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
253 |
+
.qsm-quiz-form .qmn_error select:focus,
|
254 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
255 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
256 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
257 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
258 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus {
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
+
.qsm-quiz-form .qmn_error { position: relative; }
|
268 |
|
269 |
+
.qsm-quiz-form .qmn_error:after {
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
286 |
|
287 |
}
|
288 |
|
289 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
290 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
291 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
templates/qmn_primary.css
CHANGED
@@ -282,33 +282,33 @@ label.inline .mlw_qmn_question,
|
|
282 |
border-radius: 3px;
|
283 |
}
|
284 |
|
285 |
-
.
|
286 |
-
.
|
287 |
-
.
|
288 |
-
.
|
289 |
-
.
|
290 |
-
.
|
291 |
-
.
|
292 |
-
.
|
293 |
-
.
|
294 |
-
.
|
295 |
-
.
|
296 |
-
.
|
297 |
-
.
|
298 |
-
.
|
299 |
-
.
|
300 |
-
.
|
301 |
-
.
|
302 |
-
.
|
303 |
-
.
|
304 |
-
.
|
305 |
-
.
|
306 |
-
.
|
307 |
-
.
|
308 |
-
.
|
309 |
-
.
|
310 |
-
.
|
311 |
-
.
|
312 |
position: relative;
|
313 |
border: 1px solid #da4f49;
|
314 |
background: #F2DEDE;
|
@@ -317,11 +317,11 @@ label.inline .mlw_qmn_question,
|
|
317 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
318 |
}
|
319 |
|
320 |
-
.
|
321 |
position: relative;
|
322 |
}
|
323 |
|
324 |
-
.
|
325 |
content: '-';
|
326 |
color: #fff;
|
327 |
font-size: 20px;
|
@@ -341,9 +341,9 @@ label.inline .mlw_qmn_question,
|
|
341 |
|
342 |
}
|
343 |
|
344 |
-
.
|
345 |
-
.
|
346 |
-
.
|
347 |
border: 1px solid #da4f49;
|
348 |
background: #F2DEDE;
|
349 |
padding: 5px;
|
282 |
border-radius: 3px;
|
283 |
}
|
284 |
|
285 |
+
.qsm-quiz-form .qmn_error select,
|
286 |
+
.qsm-quiz-form .qmn_error textarea,
|
287 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
288 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
289 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
290 |
+
.qsm-quiz-form .qmn_error input[type="url"],
|
291 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
292 |
+
.qsm-quiz-form .qmn_error input[type="file"],
|
293 |
+
.qsm-quiz-form .qmn_error input[type="date"],
|
294 |
+
.qsm-quiz-form .qmn_error select:hover,
|
295 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
296 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
297 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
298 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
299 |
+
.qsm-quiz-form .qmn_error input[type="url"]:hover,
|
300 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
301 |
+
.qsm-quiz-form .qmn_error input[type="file"]:hover,
|
302 |
+
.qsm-quiz-form .qmn_error input[type="date"]:hover,
|
303 |
+
.qsm-quiz-form .qmn_error select:focus,
|
304 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
305 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
306 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
307 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
308 |
+
.qsm-quiz-form .qmn_error input[type="url"]:focus,
|
309 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus,
|
310 |
+
.qsm-quiz-form .qmn_error input[type="file"]:focus
|
311 |
+
.qsm-quiz-form .qmn_error input[type="date"]:focus {
|
312 |
position: relative;
|
313 |
border: 1px solid #da4f49;
|
314 |
background: #F2DEDE;
|
317 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
318 |
}
|
319 |
|
320 |
+
.qsm-quiz-form .qmn_error {
|
321 |
position: relative;
|
322 |
}
|
323 |
|
324 |
+
.qsm-quiz-form .qmn_error:after {
|
325 |
content: '-';
|
326 |
color: #fff;
|
327 |
font-size: 20px;
|
341 |
|
342 |
}
|
343 |
|
344 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
345 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
346 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
347 |
border: 1px solid #da4f49;
|
348 |
background: #F2DEDE;
|
349 |
padding: 5px;
|
templates/qmn_turquoise.css
CHANGED
@@ -238,24 +238,24 @@ border: 1px solid #e3e3e3;
|
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
-
.
|
242 |
-
.
|
243 |
-
.
|
244 |
-
.
|
245 |
-
.
|
246 |
-
.
|
247 |
-
.
|
248 |
-
.
|
249 |
-
.
|
250 |
-
.
|
251 |
-
.
|
252 |
-
.
|
253 |
-
.
|
254 |
-
.
|
255 |
-
.
|
256 |
-
.
|
257 |
-
.
|
258 |
-
.
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
@@ -264,9 +264,9 @@ border: 1px solid #e3e3e3;
|
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
-
.
|
268 |
|
269 |
-
.
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
@@ -286,9 +286,9 @@ border: 1px solid #e3e3e3;
|
|
286 |
|
287 |
}
|
288 |
|
289 |
-
.
|
290 |
-
.
|
291 |
-
.
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|
238 |
border-radius: 3px;
|
239 |
}
|
240 |
|
241 |
+
.qsm-quiz-form .qmn_error select,
|
242 |
+
.qsm-quiz-form .qmn_error textarea,
|
243 |
+
.qsm-quiz-form .qmn_error input[type="text"],
|
244 |
+
.qsm-quiz-form .qmn_error input[type="number"],
|
245 |
+
.qsm-quiz-form .qmn_error input[type="email"],
|
246 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"],
|
247 |
+
.qsm-quiz-form .qmn_error select:hover,
|
248 |
+
.qsm-quiz-form .qmn_error textarea:hover,
|
249 |
+
.qsm-quiz-form .qmn_error input[type="text"]:hover,
|
250 |
+
.qsm-quiz-form .qmn_error input[type="number"]:hover,
|
251 |
+
.qsm-quiz-form .qmn_error input[type="email"]:hover,
|
252 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:hover,
|
253 |
+
.qsm-quiz-form .qmn_error select:focus,
|
254 |
+
.qsm-quiz-form .qmn_error textarea:focus,
|
255 |
+
.qsm-quiz-form .qmn_error input[type="text"]:focus,
|
256 |
+
.qsm-quiz-form .qmn_error input[type="number"]:focus,
|
257 |
+
.qsm-quiz-form .qmn_error input[type="email"]:focus,
|
258 |
+
.qsm-quiz-form .qmn_error input[type="checkbox"]:focus {
|
259 |
position: relative;
|
260 |
border: 1px solid #da4f49;
|
261 |
background: #F2DEDE;
|
264 |
box-shadow: 0 0 10px rgba(218, 79, 73, .35);
|
265 |
}
|
266 |
|
267 |
+
.qsm-quiz-form .qmn_error { position: relative; }
|
268 |
|
269 |
+
.qsm-quiz-form .qmn_error:after {
|
270 |
content: '-';
|
271 |
color: #fff;
|
272 |
font-size: 20px;
|
286 |
|
287 |
}
|
288 |
|
289 |
+
.qsm-quiz-form .qmn_error .qmn_radio_answers,
|
290 |
+
.qsm-quiz-form .qmn_error .qmn_check_answers,
|
291 |
+
.qsm-quiz-form .qmn_error .qmn_accept_answers {
|
292 |
border: 1px solid #da4f49;
|
293 |
background: #F2DEDE;
|
294 |
padding: 5px;
|