Version Description
(March 14, 2022) = * Bug: Fixed issue with comments field UI * Bug: Fixed issue with support Link * Bug: Fixed issue with %CATEGORY_SCORE_X% template variable * Bug: Fixed issue while using multiple quiz shortcodes * Bug: Fixed issue with qmn_register_my_templates hook * Bug: Fixed issue with answer text limit * Bug: Fixed issue while using limit questions with random questions * Feature: Added option to customize the label of Retake Quiz Button
Download this release
Release Info
Developer | expresstech |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 7.3.13 |
Comparing to | |
See all releases |
Code changes from version 7.3.12 to 7.3.13
- data/parsing_script.json +1 -1
- js/qsm-quiz.js +66 -61
- mlw_quizmaster2.php +3 -3
- php/admin/admin-dashboard.php +2 -2
- php/admin/admin-results-details-page.php +3 -3
- php/classes/class-qmn-plugin-helper.php +1 -0
- php/classes/class-qmn-quiz-manager.php +28 -29
- php/classes/class-qsm-install.php +10 -2
- php/question-types/qsm-question-title.php +1 -1
- php/question-types/qsm-question-type-number.php +1 -2
- php/question-types/qsm-question-type-paragraph.php +1 -2
- php/question-types/qsm-question-type-polar.php +0 -5
- php/question-types/qsm-question-type-short-answer.php +1 -2
- php/template-variables.php +55 -94
- readme.txt +15 -3
data/parsing_script.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"change_log":[""," Checked compatibility with WordPress 5.9\n"," Bug: Fixed UI issues in QSM dashboard banner\n"," Bug: Fixed CURRENT_DATE template variable with certificate addon\n"," Bug: Fixed CATEGORY_SCORE_X template variable\n"," Bug: Fixed incorrectly marked answers in survey & simple form\n"," Bug: Fixed translation issues\n"," Bug: Fixed issues with global default settings\n"," Bug: Fixed issues with multiple response question type"],"products":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053"},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426"}],"new_addons":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Ivoryv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Fragrancev2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Breezev2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":""},{"name":"Premium Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/premium-bundle-qsm-scaled.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=275059","price":{"1site":"147.00","3sites":"197.00","25sites":"297.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"ActiveCampaign Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/07\/ActiveCampaign_Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=141594","price":{"1site":"19.00","2-5sites":"29.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/how-to-create-a-wellness-quiz-with-qsm\/","title":"How to create an accurate wellness quiz with QSM in 4 simple steps?","excerpt":"<p>A wellness quiz is a medium to understand your wellness type and you would be able to find them all over the internet these days. Every one of us has started to take our health regime seriously and it is only right of us to do. Along the same lines, the wellness quizlets are gaining […]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/who-do-you-kin-in-haikyuu-quiz-using-qsm\/","title":"Create Haikyuu Quiz for true anime fans in 5 steps!","excerpt":"<p>If we talk about anime quizzes and do not mention a Haikyuu quiz, the conversation does not conclude. Drawing the fact that Haikyuu anime is of the most underrated and non-typical anime of the new gen, it is only safe to say, the fandom does justice to the Haikyuu kin quizzes on the internet. Creating […]<\/p>\n"}],"popular_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "},{"name":"Paypal and Stripe Payment Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Paypal-and-Stripe-Payment-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63522","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "},{"name":"Simple Popups","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Simple-Popups.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=38572","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"},{"name":"Google Analytics Tracking","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Google-Analytics-Tracking.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=34421","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimited":"87.00"},"description":"Track your quiz and survey submissions in Google Analytics."},{"name":"Logic","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Logic.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=8071","price":{"personal1site":"49.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":""},{"name":"Reporting And Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."},{"name":"MailPoet Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/MailPoet-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/mailpoet-integration\/","price":{"personal1site":"25.00","business2-5sites":"40.00","developerunlimitedsites":"62.00"},"description":"Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"}],"on_sale_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "}],"bundles":[{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"desc":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle.","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PRO.png"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"desc":"14+ addons to add useful features to your quiz and surveys. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Plus.png"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"desc":"All the right addons to get you started with QSM premium features. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic.png"}],"themes":[{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-pool.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-ivory.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-fragrance.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/fragrance-qsm-theme-demo"},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-breeze.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/breeze-qsm-theme-demo"}]}
|
1 |
+
{"change_log":["Bug: Fixed issue with comments field UI", "Bug: Fixed issue with support Link", "Bug: Fixed issue with %CATEGORY_SCORE_X% template variable", "Bug: Fixed issue while using multiple quiz shortcodes", "Bug: Fixed issue with qmn_register_my_templates hook", "Bug: Fixed issue with answer text limit", "Bug: Fixed issue while using limit questions with random questions", "Feature: Added option to customize the label of Retake Quiz Button"],"products":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053"},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426"}],"new_addons":[{"name":"Advanced Question Types","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2022\/01\/x-2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=429053","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"79.00"},"description":""},{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"description":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle."},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"description":"14+ addons to add useful features to your quiz and surveys. "},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"description":"All the right addons to get you started with QSM premium features. "},{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Poolv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Ivoryv2-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Fragrancev2.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":""}],"blog_post":[{"link":"https:\/\/quizandsurveymaster.com\/how-to-create-a-geography-quiz-using-qsm\/","title":"Geography Quiz Simplified using QSM! (5 easy steps)","excerpt":"<p>Remember those years when you thought the earth was flat? And then you grew up and got to know about geography… Well, some people are still stuck with the old thoughts. Just kidding, the geography quizzes that we used to take in our school times are very similar to what we have now but the […]<\/p>\n"},{"link":"https:\/\/quizandsurveymaster.com\/looking-for-the-best-questionnaire-plugin-for-wordpress\/","title":"10+ Best WordPress Questionnaire Plugins of 2022 [Compared]","excerpt":"<p>In this article, we have discussed 10 WordPress Questionnaire Plugins that are multipurpose meaning can be used to create quizzes, surveys, polls, user forms, exam, etc., and have explained their features, and their uses.<\/p>\n"}],"popular_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "},{"name":"Paypal and Stripe Payment Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Paypal-and-Stripe-Payment-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=63522","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"Add payment wall for quiz and surveys using this addon. Integrate Paypal or Stripe and start receiving payments. "},{"name":"Simple Popups","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Simple-Popups.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=38572","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"Have you ever wanted to have your quiz or survey inside of a popup? With this easy to use addon, now you can!"},{"name":"Google Analytics Tracking","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Google-Analytics-Tracking.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=34421","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimited":"87.00"},"description":"Track your quiz and survey submissions in Google Analytics."},{"name":"Logic","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Logic.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=8071","price":{"personal1site":"49.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":""},{"name":"Reporting And Analysis","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Reporting-And-Analysis.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=3437","price":{"personal1site":"39.00","business2-5sites":"59.00","developerunlimitedsites":"99.00"},"description":"Analyze your results by visualizing the data in a variety of different graphs, filter the data, and export the data."},{"name":"Zapier Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Zapier-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=2809","price":{"personal1site":"35.00","business2-5sites":"56.00","developerunlimitedsites":"87.00"},"description":"With Zapier Integration, Quiz And Survey Master can sends results to over 700 different websites and services using Zapier."},{"name":"Export Results","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/Export-Results.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/export-results\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to export your quiz results as a CSV file which can be imported into spreadsheet programs such as Excel and Google Sheets."},{"name":"User Dashboard","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/User-Dashboard.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/user-dashboard\/","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimitedsites":"59.00"},"description":"This add-on gives you the ability to set up a page where users can review their results from all the quizzes they have taken."},{"name":"MailPoet Integration","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/04\/MailPoet-Integration.jpg","link":"https:\/\/quizandsurveymaster.com\/downloads\/mailpoet-integration\/","price":{"personal1site":"25.00","business2-5sites":"40.00","developerunlimitedsites":"62.00"},"description":"Grow your list of subscribers in MailPoet by using this addon to add users who take your quizzes and surveys!"}],"on_sale_products":[{"name":"Google Sheet Connector","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2020\/03\/first-1.jpg","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=83375","price":{"personal1site":"29.00","business2-5sites":"39.00","developerunlimited":"59.00"},"description":"Sync your surveys with Google Sheets. "}],"bundles":[{"name":"Pro Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Pro.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306210","price":{"yearly":"199.00","lifetime":"597.00"},"desc":"All QSM Addons in one single and affordable package. Over 34 addons are included in this package and new addons are added automatically. Save over $1600 by buying our bundle.","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PRO.png"},{"name":"Plus Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/PLUS.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=306190","price":{"yearly":"179.00","lifetime":"537.00"},"desc":"14+ addons to add useful features to your quiz and surveys. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Plus.png"},{"name":"Basic Bundle","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic-1.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=305426","price":{"yearly":"129.00","lifetime":"387.00"},"desc":"All the right addons to get you started with QSM premium features. ","icon":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/Basic.png"}],"themes":[{"name":"Pool","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-pool.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302299","price":{"1site":"19.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Ivory","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-ivory.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=302297","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/ivory-qsm-theme-demo"},{"name":"Fragrance","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-fragrance.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300658","price":{"1site":"14.00","2-5sites":"24.00","unlimited":"49.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/fragrance-qsm-theme-demo"},{"name":"Breeze","img":"https:\/\/quizandsurveymaster.com\/wp-content\/uploads\/edd\/2021\/06\/theme-breeze.png","link":"https:\/\/quizandsurveymaster.com\/?post_type=download&p=300513","price":{"1site":"24.00","2-5sites":"39.00","unlimited":"44.00"},"description":"","demo":"https:\/\/themes.quizandsurveymaster.com\/breeze-qsm-theme-demo"}]}
|
js/qsm-quiz.js
CHANGED
@@ -942,72 +942,74 @@ function qmnDisplayResults(results, quiz_form_id, $container) {
|
|
942 |
|
943 |
function qmnInit() {
|
944 |
if (typeof qmn_quiz_data != 'undefined' && qmn_quiz_data) {
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
if (answer[
|
956 |
-
|
|
|
|
|
957 |
}
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
}
|
962 |
-
}
|
963 |
-
}
|
964 |
});
|
965 |
-
}
|
966 |
-
}
|
967 |
|
968 |
-
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
|
988 |
-
if(localStorage.getItem("disable_answer")){
|
989 |
-
let disabledAnswer = JSON.parse(localStorage.getItem("disable_answer"));
|
990 |
-
if(disabledAnswer[key]){
|
991 |
-
disabledAnswer[key].forEach(element => {
|
992 |
-
let element1=element[1].replaceAll(' ','-');
|
993 |
-
jQuery('#'+element[0]+'-'+element1+' input').prop('checked', true).trigger('change');
|
994 |
-
});
|
995 |
-
}
|
996 |
-
}
|
997 |
-
jQuery(document).on('qsm_after_quiz_submit',function(event, quiz_form_id ){
|
998 |
-
event.preventDefault();
|
999 |
if(localStorage.getItem("disable_answer")){
|
1000 |
-
let
|
1001 |
-
if(
|
1002 |
-
|
1003 |
-
|
|
|
|
|
|
|
1004 |
}
|
1005 |
-
|
1006 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1007 |
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
|
|
1011 |
}
|
1012 |
}
|
1013 |
|
@@ -1192,7 +1194,8 @@ function qmnUpdatePageNumber(amount, quiz_form_id) {
|
|
1192 |
|
1193 |
function qmnInitPagination(quiz_id) {
|
1194 |
var qmn_section_total = +qmn_quiz_data[quiz_id].pagination.total_questions;
|
1195 |
-
var
|
|
|
1196 |
|
1197 |
qmn_total_pages = qmn_total_pages + 1; //quiz begin
|
1198 |
qmn_total_pages = qmn_total_pages + 1; //quiz end
|
@@ -1243,7 +1246,7 @@ function qmnInitPagination(quiz_id) {
|
|
1243 |
jQuery(document).trigger('qsm_init_progressbar_after', [quiz_id, qmn_quiz_data]);
|
1244 |
}
|
1245 |
|
1246 |
-
jQuery(".mlw_next").click(function (event) {
|
1247 |
event.preventDefault();
|
1248 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1249 |
jQuery(document).trigger('qsm_auto_next_button_click_before', [quiz_id]);
|
@@ -1253,7 +1256,7 @@ function qmnInitPagination(quiz_id) {
|
|
1253 |
jQuery(document).trigger('qsm_next_button_click_after', [quiz_id]);
|
1254 |
});
|
1255 |
|
1256 |
-
jQuery(".mlw_previous").click(function (event) {
|
1257 |
event.preventDefault();
|
1258 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1259 |
qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
@@ -1410,11 +1413,13 @@ jQuery(function () {
|
|
1410 |
var data = jQuery.parseJSON(response);
|
1411 |
$this.find('.quick-question-res-p').remove();
|
1412 |
$this.find('.qsm-inline-correct-info').remove();
|
|
|
1413 |
if (data.success == 'correct') {
|
1414 |
} else if (data.success == 'incorrect') {
|
1415 |
$this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
|
1416 |
$this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
|
1417 |
setTimeout(function () {
|
|
|
1418 |
$quizForm.closest('.qmn_quiz_container').find('.qsm-submit-btn').trigger('click');
|
1419 |
}, 1000);
|
1420 |
}
|
942 |
|
943 |
function qmnInit() {
|
944 |
if (typeof qmn_quiz_data != 'undefined' && qmn_quiz_data) {
|
945 |
+
_.each(qmn_quiz_data, function (quiz) {
|
946 |
+
let key = parseInt(quiz.quiz_id);
|
947 |
+
if (qmn_quiz_data[key].ajax_show_correct === '1') {
|
948 |
+
jQuery('#quizForm' + qmn_quiz_data[key].quiz_id + ' .qmn_quiz_radio').change(function () {
|
949 |
+
var chosen_answer = jQuery(this).val();
|
950 |
+
var question_id = jQuery(this).attr('name').replace(/question/i, '');
|
951 |
+
var chosen_id = jQuery(this).attr('id');
|
952 |
+
jQuery.each(qmn_quiz_data[key].question_list, function (i, value) {
|
953 |
+
if (question_id == value.question_id) {
|
954 |
+
jQuery.each(value.answers, function (j, answer) {
|
955 |
+
if (answer[0] === chosen_answer) {
|
956 |
+
if (answer[2] !== 1) {
|
957 |
+
jQuery('#' + chosen_id).parent().addClass("qmn_incorrect_answer");
|
958 |
+
}
|
959 |
}
|
960 |
+
if (answer[2] === 1) {
|
961 |
+
jQuery(':radio[name=question' + question_id + '][value="' + answer[0] + '"]').parent().addClass("qmn_correct_answer");
|
962 |
+
}
|
963 |
+
});
|
964 |
+
}
|
965 |
+
});
|
966 |
});
|
967 |
+
}
|
|
|
968 |
|
969 |
+
if (qmn_quiz_data[key].disable_answer === '1') {
|
970 |
|
971 |
+
jQuery('#quizForm' + qmn_quiz_data[key].quiz_id + ' .qmn_quiz_radio').change(function () {
|
972 |
+
var radio_group = jQuery(this).attr('name');
|
973 |
+
jQuery('input[type=radio][name=' + radio_group + ']').prop('disabled', true);
|
974 |
+
let radio_value =jQuery(this).val();
|
975 |
+
let disableAnswer = {};
|
976 |
+
if ( localStorage.getItem( "disable_answer" ) ){
|
977 |
+
disableAnswer = JSON.parse(localStorage.getItem("disable_answer"));
|
978 |
+
}
|
979 |
+
if (!disableAnswer[key]){
|
980 |
+
disableAnswer[key]=[];
|
981 |
+
}
|
982 |
+
let disabledQuestions = disableAnswer[key].map(element => element[0]);
|
983 |
+
if (! disabledQuestions.includes(radio_group) ){
|
984 |
+
disableAnswer[key].push([radio_group, radio_value]);
|
985 |
+
}
|
986 |
+
localStorage.setItem("disable_answer",JSON.stringify(disableAnswer));
|
987 |
+
});
|
988 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
989 |
if(localStorage.getItem("disable_answer")){
|
990 |
+
let disabledAnswer = JSON.parse(localStorage.getItem("disable_answer"));
|
991 |
+
if(disabledAnswer[key]){
|
992 |
+
disabledAnswer[key].forEach(element => {
|
993 |
+
let element1=element[1].replaceAll(' ','-');
|
994 |
+
jQuery('#'+element[0]+'-'+element1+' input').prop('checked', true).trigger('change');
|
995 |
+
});
|
996 |
+
}
|
997 |
}
|
998 |
+
jQuery(document).on('qsm_after_quiz_submit',function(event, quiz_form_id ){
|
999 |
+
event.preventDefault();
|
1000 |
+
if(localStorage.getItem("disable_answer")){
|
1001 |
+
let disabledAnswer2 = JSON.parse(localStorage.getItem("disable_answer"));
|
1002 |
+
if(disabledAnswer2[key]){
|
1003 |
+
delete disabledAnswer2[key];
|
1004 |
+
localStorage.setItem("disable_answer",JSON.stringify(disabledAnswer2)); }
|
1005 |
+
}
|
1006 |
+
});
|
1007 |
+
}
|
1008 |
|
1009 |
+
if (qmn_quiz_data[key].hasOwnProperty('pagination')) {
|
1010 |
+
qmnInitPagination(qmn_quiz_data[key].quiz_id);
|
1011 |
+
}
|
1012 |
+
});
|
1013 |
}
|
1014 |
}
|
1015 |
|
1194 |
|
1195 |
function qmnInitPagination(quiz_id) {
|
1196 |
var qmn_section_total = +qmn_quiz_data[quiz_id].pagination.total_questions;
|
1197 |
+
var qmn_total_questions = jQuery('#quizForm' + quiz_id).find('#total_questions').val();
|
1198 |
+
var qmn_total_pages = Math.ceil(qmn_total_questions / +qmn_quiz_data[quiz_id].pagination.amount);
|
1199 |
|
1200 |
qmn_total_pages = qmn_total_pages + 1; //quiz begin
|
1201 |
qmn_total_pages = qmn_total_pages + 1; //quiz end
|
1246 |
jQuery(document).trigger('qsm_init_progressbar_after', [quiz_id, qmn_quiz_data]);
|
1247 |
}
|
1248 |
|
1249 |
+
jQuery(".mlw_next").unbind().click(function (event) {
|
1250 |
event.preventDefault();
|
1251 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1252 |
jQuery(document).trigger('qsm_auto_next_button_click_before', [quiz_id]);
|
1256 |
jQuery(document).trigger('qsm_next_button_click_after', [quiz_id]);
|
1257 |
});
|
1258 |
|
1259 |
+
jQuery(".mlw_previous").unbind().click(function (event) {
|
1260 |
event.preventDefault();
|
1261 |
var quiz_id = +jQuery(this).closest('.qmn_quiz_container').find('.qmn_quiz_id').val();
|
1262 |
qmnPrevSlide(qmn_quiz_data[quiz_id].pagination.amount, 1, '#quizForm' + quiz_id);
|
1413 |
var data = jQuery.parseJSON(response);
|
1414 |
$this.find('.quick-question-res-p').remove();
|
1415 |
$this.find('.qsm-inline-correct-info').remove();
|
1416 |
+
jQuery(document).trigger('qsm_after_answer_input', [data.success, $this, $quizForm]);
|
1417 |
if (data.success == 'correct') {
|
1418 |
} else if (data.success == 'incorrect') {
|
1419 |
$this.append('<div style="color: red" class="quick-question-res-p">' + qmn_quiz_data[quizID].quick_result_wrong_answer_text + '</div>')
|
1420 |
$this.append('<div class="qsm-inline-correct-info">' + data.message + '</div>');
|
1421 |
setTimeout(function () {
|
1422 |
+
$quizForm.closest('.qmn_quiz_container').find('[class*="Required"]').removeClass();
|
1423 |
$quizForm.closest('.qmn_quiz_container').find('.qsm-submit-btn').trigger('click');
|
1424 |
}, 1000);
|
1425 |
}
|
mlw_quizmaster2.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
-
* Version: 7.3.
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author QSM Team
|
12 |
-
* @version 7.3.
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
@@ -44,7 +44,7 @@ class MLWQuizMasterNext {
|
|
44 |
* @var string
|
45 |
* @since 4.0.0
|
46 |
*/
|
47 |
-
public $version = '7.3.
|
48 |
|
49 |
/**
|
50 |
* QSM Alert Manager Object
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
+
* Version: 7.3.13
|
6 |
* Author: ExpressTech
|
7 |
* Author URI: https://quizandsurveymaster.com/
|
8 |
* Plugin URI: https://expresstech.io/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author QSM Team
|
12 |
+
* @version 7.3.13
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
44 |
* @var string
|
45 |
* @since 4.0.0
|
46 |
*/
|
47 |
+
public $version = '7.3.13';
|
48 |
|
49 |
/**
|
50 |
* QSM Alert Manager Object
|
php/admin/admin-dashboard.php
CHANGED
@@ -562,8 +562,8 @@ function qsm_dashboard_chagelog( $widget_id ) {
|
|
562 |
break;
|
563 |
}
|
564 |
$expload_str = explode( ':', $single_change_log );
|
565 |
-
$cl_type = $expload_str[0];
|
566 |
-
$cl_str = $expload_str[1];
|
567 |
if ( empty( $cl_str ) ) {
|
568 |
$cl_str = $cl_type;
|
569 |
$cl_type = '';
|
562 |
break;
|
563 |
}
|
564 |
$expload_str = explode( ':', $single_change_log );
|
565 |
+
$cl_type = isset( $expload_str[1] ) ? $expload_str[0] : '';
|
566 |
+
$cl_str = isset( $expload_str[1] ) ? $expload_str[1] : $expload_str[0];
|
567 |
if ( empty( $cl_str ) ) {
|
568 |
$cl_str = $cl_type;
|
569 |
$cl_type = '';
|
php/admin/admin-results-details-page.php
CHANGED
@@ -171,11 +171,11 @@ function qsm_generate_results_details_tab() {
|
|
171 |
if ( isset( $results_data->form_type ) && 0 === intval( $results_data->form_type ) ) {
|
172 |
//Scoreboard design
|
173 |
$template .= '<div class="candidate-detail-wrap overview-inner-wrap">';
|
174 |
-
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>Scorecard</span></h2>';
|
175 |
$template .= '<div class="inside">';
|
176 |
$template .= $span_start. __( 'Correct Answers:', 'quiz-master-next' ) .'</label><span>%AMOUNT_CORRECT% Out of %TOTAL_QUESTIONS%</span></span>';
|
177 |
-
$template .= $span_start. __( 'Points:', 'quiz-master-next' ) .'</label><span>%POINT_SCORE% </span></span>';
|
178 |
-
$template .= $span_start. __( 'Percentage:', 'quiz-master-next' ) .'</label><span>%CORRECT_SCORE%%</span></span>';
|
179 |
$template .= '</div>';
|
180 |
$template .= '</div>';
|
181 |
$template .= '</div>';
|
171 |
if ( isset( $results_data->form_type ) && 0 === intval( $results_data->form_type ) ) {
|
172 |
//Scoreboard design
|
173 |
$template .= '<div class="candidate-detail-wrap overview-inner-wrap">';
|
174 |
+
$template .= '<div id="submitdiv" class="postbox qsm-scorecard-box"><h2 class="hndle ui-sortable-handle"><span>Scorecard</span></h2>';
|
175 |
$template .= '<div class="inside">';
|
176 |
$template .= $span_start. __( 'Correct Answers:', 'quiz-master-next' ) .'</label><span>%AMOUNT_CORRECT% Out of %TOTAL_QUESTIONS%</span></span>';
|
177 |
+
$template .= $span_start. __( 'Points:', 'quiz-master-next' ) .'</label><span class="qsm-total-point">%POINT_SCORE% </span></span>';
|
178 |
+
$template .= $span_start. __( 'Percentage:', 'quiz-master-next' ) .'</label><span class="qsm-total-percentage">%CORRECT_SCORE%%</span></span>';
|
179 |
$template .= '</div>';
|
180 |
$template .= '</div>';
|
181 |
$template .= '</div>';
|
php/classes/class-qmn-plugin-helper.php
CHANGED
@@ -440,6 +440,7 @@ class QMNPluginHelper {
|
|
440 |
}
|
441 |
}
|
442 |
call_user_func( $type['display'], intval( $question_id ), $question->question_name, $answers );
|
|
|
443 |
}
|
444 |
}
|
445 |
}
|
440 |
}
|
441 |
}
|
442 |
call_user_func( $type['display'], intval( $question_id ), $question->question_name, $answers );
|
443 |
+
do_action( 'qsm_after_question', $question );
|
444 |
}
|
445 |
}
|
446 |
}
|
php/classes/class-qmn-quiz-manager.php
CHANGED
@@ -312,17 +312,15 @@ class QMNQuizManager {
|
|
312 |
* @return string The content for the shortcode
|
313 |
*/
|
314 |
public function display_shortcode( $atts ) {
|
315 |
-
|
316 |
-
$args = shortcode_atts(
|
317 |
array(
|
318 |
'quiz' => 0,
|
319 |
'question_amount' => 0,
|
320 |
),
|
321 |
$atts
|
322 |
);
|
323 |
-
|
324 |
-
$
|
325 |
-
$question_amount = intval( $args['question_amount'] );
|
326 |
|
327 |
ob_start();
|
328 |
if ( isset( $_GET['result_id'] ) && '' !== $_GET['result_id'] ) {
|
@@ -391,7 +389,7 @@ class QMNQuizManager {
|
|
391 |
wp_enqueue_style( 'qmn_quiz_template', $registered_template['path'], array(), $mlwQuizMasterNext->version );
|
392 |
} elseif ( $registered_template && file_exists( plugin_dir_path( __FILE__ ) . '../../templates/' . $registered_template['path'] ) ) {
|
393 |
wp_enqueue_style( 'qmn_quiz_template', plugins_url( '../../templates/' . $registered_template['path'], __FILE__ ), array(), $mlwQuizMasterNext->version );
|
394 |
-
} elseif ( $registered_template && file_exists(
|
395 |
wp_enqueue_style( 'qmn_quiz_template', get_stylesheet_directory_uri() . '/templates/' . $registered_template['path'], array(), $mlwQuizMasterNext->version );
|
396 |
} else {
|
397 |
echo "<style type='text/css'>" . wp_kses_post( htmlspecialchars_decode( $qmn_quiz_options->quiz_stye ) ) . '</style>';
|
@@ -452,22 +450,22 @@ class QMNQuizManager {
|
|
452 |
'scheduled_time_end' => strtotime( $qmn_quiz_options->scheduled_time_end ),
|
453 |
);
|
454 |
|
455 |
-
$return_display = apply_filters( 'qmn_begin_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables, $
|
456 |
|
457 |
// Checks if we should be showing quiz or results page.
|
458 |
if ( $qmn_allowed_visit && ! isset( $_POST['complete_quiz'] ) && ! empty( $qmn_quiz_options->quiz_name ) ) {
|
459 |
-
$return_display .= $this->display_quiz( $qmn_quiz_options, $qmn_array_for_variables, $question_amount );
|
460 |
} elseif ( isset( $_POST['complete_quiz'], $_POST['qmn_quiz_id'] ) && 'confirmation' == sanitize_text_field( wp_unslash( $_POST['complete_quiz'] ) ) && sanitize_text_field( wp_unslash( $_POST['qmn_quiz_id'] ) ) == $qmn_array_for_variables['quiz_id'] ) {
|
461 |
$return_display .= $this->display_results( $qmn_quiz_options, $qmn_array_for_variables );
|
462 |
}
|
463 |
|
464 |
-
$qmn_filtered_json = apply_filters( 'qmn_json_data', $qmn_json_data, $qmn_quiz_options, $qmn_array_for_variables, $
|
465 |
|
466 |
$return_display .= '<script>window.qmn_quiz_data["' . $qmn_json_data['quiz_id'] . '"] = ' . wp_json_encode( $qmn_filtered_json ) . '
|
467 |
</script>';
|
468 |
|
469 |
$return_display .= ob_get_clean();
|
470 |
-
$return_display = apply_filters( 'qmn_end_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables, $
|
471 |
|
472 |
}
|
473 |
return $return_display;
|
@@ -751,7 +749,7 @@ class QMNQuizManager {
|
|
751 |
* @uses QMNQuizManager:display_end_section() Creates display for end section
|
752 |
* @return string The content for the quiz page section
|
753 |
*/
|
754 |
-
public function display_quiz( $options, $quiz_data, $question_amount ) {
|
755 |
|
756 |
global $qmn_allowed_visit;
|
757 |
global $mlwQuizMasterNext;
|
@@ -870,8 +868,9 @@ class QMNQuizManager {
|
|
870 |
<?php
|
871 |
}
|
872 |
echo apply_filters( 'qmn_end_quiz_form', '', $options, $quiz_data );
|
|
|
873 |
?>
|
874 |
-
|
875 |
</div>
|
876 |
<?php
|
877 |
|
@@ -1032,12 +1031,12 @@ class QMNQuizManager {
|
|
1032 |
$mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
|
1033 |
if ( 0 == $question['comments'] ) {
|
1034 |
?>
|
1035 |
-
<input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" />
|
1036 |
<?php
|
1037 |
}
|
1038 |
if ( 2 == $question['comments'] ) {
|
1039 |
?>
|
1040 |
-
<textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" ></textarea>
|
1041 |
<?php
|
1042 |
}
|
1043 |
// Checks if a hint is entered.
|
@@ -1186,22 +1185,22 @@ class QMNQuizManager {
|
|
1186 |
$question_id_list = '';
|
1187 |
$animation_effect = isset( $qmn_quiz_options->quiz_animation ) && '' !== $qmn_quiz_options->quiz_animation ? ' animated ' . $qmn_quiz_options->quiz_animation : '';
|
1188 |
$enable_pagination_quiz = isset( $qmn_quiz_options->enable_pagination_quiz ) && $qmn_quiz_options->enable_pagination_quiz ? $qmn_quiz_options->enable_pagination_quiz : 0;
|
1189 |
-
$
|
1190 |
-
if ( $enable_pagination_quiz && $
|
1191 |
$total_pages_count = count( $qmn_quiz_questions );
|
1192 |
-
$total_pagination = ceil( $total_pages_count / $
|
1193 |
}
|
1194 |
$pages_count = 1;
|
1195 |
$current_page_number = 1;
|
1196 |
foreach ( $qmn_quiz_questions as $mlw_question ) {
|
1197 |
-
if ( 0 != $
|
1198 |
-
if ( 1 == $
|
1199 |
?>
|
1200 |
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
|
1201 |
<?php
|
1202 |
$current_page_number++;
|
1203 |
} else {
|
1204 |
-
if ( 1 == $pages_count % $
|
1205 |
?>
|
1206 |
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
|
1207 |
<?php
|
@@ -1243,12 +1242,12 @@ class QMNQuizManager {
|
|
1243 |
?>
|
1244 |
</div><!-- .quiz_section -->
|
1245 |
<?php
|
1246 |
-
if ( 0
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
}
|
1253 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
1254 |
$pages_count++;
|
@@ -1312,10 +1311,10 @@ class QMNQuizManager {
|
|
1312 |
global $mlw_qmn_section_count;
|
1313 |
$section_display = '';
|
1314 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
1315 |
-
$
|
1316 |
|
1317 |
do_action( 'mlw_qmn_end_quiz_section' );
|
1318 |
-
$qsm_d_none = 0
|
1319 |
if ( ! empty( $qmn_quiz_options->message_end_template ) || ( 1 === intval( $qmn_quiz_options->contact_info_location ) && ! empty( QSM_Contact_Manager::display_fields( $qmn_quiz_options ) ) ) ) {
|
1320 |
?>
|
1321 |
<br />
|
@@ -1640,7 +1639,7 @@ class QMNQuizManager {
|
|
1640 |
if ( 1 == $qmn_quiz_options->enable_retake_quiz_button ) {
|
1641 |
$result_display .= '<form method="POST">';
|
1642 |
$result_display .= '<input type="hidden" value="' . $qmn_array_for_variables['quiz_id'] . '" name="qsm_retake_quiz_id" />';
|
1643 |
-
$result_display .= '<input type="submit" value="' . apply_filters( 'qsm_retake_quiz_text',
|
1644 |
$result_display .= '</form>';
|
1645 |
}
|
1646 |
|
312 |
* @return string The content for the shortcode
|
313 |
*/
|
314 |
public function display_shortcode( $atts ) {
|
315 |
+
$shortcode_args = shortcode_atts(
|
|
|
316 |
array(
|
317 |
'quiz' => 0,
|
318 |
'question_amount' => 0,
|
319 |
),
|
320 |
$atts
|
321 |
);
|
322 |
+
$quiz = intval( $shortcode_args['quiz'] );
|
323 |
+
$question_amount = intval( $shortcode_args['question_amount'] );
|
|
|
324 |
|
325 |
ob_start();
|
326 |
if ( isset( $_GET['result_id'] ) && '' !== $_GET['result_id'] ) {
|
389 |
wp_enqueue_style( 'qmn_quiz_template', $registered_template['path'], array(), $mlwQuizMasterNext->version );
|
390 |
} elseif ( $registered_template && file_exists( plugin_dir_path( __FILE__ ) . '../../templates/' . $registered_template['path'] ) ) {
|
391 |
wp_enqueue_style( 'qmn_quiz_template', plugins_url( '../../templates/' . $registered_template['path'], __FILE__ ), array(), $mlwQuizMasterNext->version );
|
392 |
+
} elseif ( $registered_template && file_exists( get_theme_file_path( '/templates/' . $registered_template['path'] ) ) ) {
|
393 |
wp_enqueue_style( 'qmn_quiz_template', get_stylesheet_directory_uri() . '/templates/' . $registered_template['path'], array(), $mlwQuizMasterNext->version );
|
394 |
} else {
|
395 |
echo "<style type='text/css'>" . wp_kses_post( htmlspecialchars_decode( $qmn_quiz_options->quiz_stye ) ) . '</style>';
|
450 |
'scheduled_time_end' => strtotime( $qmn_quiz_options->scheduled_time_end ),
|
451 |
);
|
452 |
|
453 |
+
$return_display = apply_filters( 'qmn_begin_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables, $shortcode_args );
|
454 |
|
455 |
// Checks if we should be showing quiz or results page.
|
456 |
if ( $qmn_allowed_visit && ! isset( $_POST['complete_quiz'] ) && ! empty( $qmn_quiz_options->quiz_name ) ) {
|
457 |
+
$return_display .= $this->display_quiz( $qmn_quiz_options, $qmn_array_for_variables, $question_amount, $shortcode_args );
|
458 |
} elseif ( isset( $_POST['complete_quiz'], $_POST['qmn_quiz_id'] ) && 'confirmation' == sanitize_text_field( wp_unslash( $_POST['complete_quiz'] ) ) && sanitize_text_field( wp_unslash( $_POST['qmn_quiz_id'] ) ) == $qmn_array_for_variables['quiz_id'] ) {
|
459 |
$return_display .= $this->display_results( $qmn_quiz_options, $qmn_array_for_variables );
|
460 |
}
|
461 |
|
462 |
+
$qmn_filtered_json = apply_filters( 'qmn_json_data', $qmn_json_data, $qmn_quiz_options, $qmn_array_for_variables, $shortcode_args );
|
463 |
|
464 |
$return_display .= '<script>window.qmn_quiz_data["' . $qmn_json_data['quiz_id'] . '"] = ' . wp_json_encode( $qmn_filtered_json ) . '
|
465 |
</script>';
|
466 |
|
467 |
$return_display .= ob_get_clean();
|
468 |
+
$return_display = apply_filters( 'qmn_end_shortcode', $return_display, $qmn_quiz_options, $qmn_array_for_variables, $shortcode_args );
|
469 |
|
470 |
}
|
471 |
return $return_display;
|
749 |
* @uses QMNQuizManager:display_end_section() Creates display for end section
|
750 |
* @return string The content for the quiz page section
|
751 |
*/
|
752 |
+
public function display_quiz( $options, $quiz_data, $question_amount, $shortcode_args = array() ) {
|
753 |
|
754 |
global $qmn_allowed_visit;
|
755 |
global $mlwQuizMasterNext;
|
868 |
<?php
|
869 |
}
|
870 |
echo apply_filters( 'qmn_end_quiz_form', '', $options, $quiz_data );
|
871 |
+
do_action( 'qsm_before_end_quiz_form', $options, $quiz_data, $shortcode_args );
|
872 |
?>
|
873 |
+
</form>
|
874 |
</div>
|
875 |
<?php
|
876 |
|
1031 |
$mlwQuizMasterNext->pluginHelper->display_question( $question['question_type_new'], $question_id, $options );
|
1032 |
if ( 0 == $question['comments'] ) {
|
1033 |
?>
|
1034 |
+
<input type="text" class="qsm-question-comment qsm-question-comment-small mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" />
|
1035 |
<?php
|
1036 |
}
|
1037 |
if ( 2 == $question['comments'] ) {
|
1038 |
?>
|
1039 |
+
<textarea class="qsm-question-comment qsm-question-comment-large mlw_qmn_question_comment" id="mlwComment<?php echo esc_attr( $question_id ); ?>" name="mlwComment<?php echo esc_attr( $question_id ); ?>" placeholder="<?php echo esc_attr( $options->comment_field_text ); ?>" onclick="qmnClearField(this)" ></textarea>
|
1040 |
<?php
|
1041 |
}
|
1042 |
// Checks if a hint is entered.
|
1185 |
$question_id_list = '';
|
1186 |
$animation_effect = isset( $qmn_quiz_options->quiz_animation ) && '' !== $qmn_quiz_options->quiz_animation ? ' animated ' . $qmn_quiz_options->quiz_animation : '';
|
1187 |
$enable_pagination_quiz = isset( $qmn_quiz_options->enable_pagination_quiz ) && $qmn_quiz_options->enable_pagination_quiz ? $qmn_quiz_options->enable_pagination_quiz : 0;
|
1188 |
+
$pagination_option = $qmn_quiz_options->pagination;
|
1189 |
+
if ( $enable_pagination_quiz && $pagination_option ) {
|
1190 |
$total_pages_count = count( $qmn_quiz_questions );
|
1191 |
+
$total_pagination = ceil( $total_pages_count / $pagination_option );
|
1192 |
}
|
1193 |
$pages_count = 1;
|
1194 |
$current_page_number = 1;
|
1195 |
foreach ( $qmn_quiz_questions as $mlw_question ) {
|
1196 |
+
if ( 0 != $pagination_option ) {
|
1197 |
+
if ( 1 == $pagination_option ) {
|
1198 |
?>
|
1199 |
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
|
1200 |
<?php
|
1201 |
$current_page_number++;
|
1202 |
} else {
|
1203 |
+
if ( 1 == $pages_count % $pagination_option || 1 == $pages_count ) { // beginning of the row or first.
|
1204 |
?>
|
1205 |
<div class="qsm-auto-page-row qsm-apc-<?php echo esc_attr( $current_page_number ); ?>" style="display: none;">
|
1206 |
<?php
|
1242 |
?>
|
1243 |
</div><!-- .quiz_section -->
|
1244 |
<?php
|
1245 |
+
if ( 0 != $pagination_option ) {
|
1246 |
+
if ( 1 == $pagination_option || 0 == $pages_count % $pagination_option || count( $qmn_quiz_questions ) == $pages_count ) { // end of the row or last
|
1247 |
+
?>
|
1248 |
+
</div><!-- .qsm-auto-page-row -->
|
1249 |
+
<?php
|
1250 |
+
}
|
1251 |
}
|
1252 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
1253 |
$pages_count++;
|
1311 |
global $mlw_qmn_section_count;
|
1312 |
$section_display = '';
|
1313 |
$mlw_qmn_section_count = $mlw_qmn_section_count + 1;
|
1314 |
+
$pagination_option = $qmn_quiz_options->pagination;
|
1315 |
|
1316 |
do_action( 'mlw_qmn_end_quiz_section' );
|
1317 |
+
$qsm_d_none = 0 < intval( $pagination_option ) ? 'qsm-d-none' : '';
|
1318 |
if ( ! empty( $qmn_quiz_options->message_end_template ) || ( 1 === intval( $qmn_quiz_options->contact_info_location ) && ! empty( QSM_Contact_Manager::display_fields( $qmn_quiz_options ) ) ) ) {
|
1319 |
?>
|
1320 |
<br />
|
1639 |
if ( 1 == $qmn_quiz_options->enable_retake_quiz_button ) {
|
1640 |
$result_display .= '<form method="POST">';
|
1641 |
$result_display .= '<input type="hidden" value="' . $qmn_array_for_variables['quiz_id'] . '" name="qsm_retake_quiz_id" />';
|
1642 |
+
$result_display .= '<input type="submit" value="' . apply_filters( 'qsm_retake_quiz_text', $qmn_quiz_options->retake_quiz_button_text ) . '" name="qsm_retake_button" />';
|
1643 |
$result_display .= '</form>';
|
1644 |
}
|
1645 |
|
php/classes/class-qsm-install.php
CHANGED
@@ -259,7 +259,7 @@ class QSM_Install {
|
|
259 |
'label' => __( 'Questions Categories', 'quiz-master-next' ),
|
260 |
'type' => 'category',
|
261 |
'default' => '',
|
262 |
-
'help' => __( 'Questions will load only from selected categories.
|
263 |
);
|
264 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
265 |
|
@@ -1058,6 +1058,14 @@ class QSM_Install {
|
|
1058 |
);
|
1059 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
|
1060 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
// Registers previous_button_text setting
|
1062 |
$field_array = array(
|
1063 |
'id' => 'previous_button_text',
|
@@ -1917,7 +1925,7 @@ class QSM_Install {
|
|
1917 |
if ( QSM_PLUGIN_BASENAME === $file ) {
|
1918 |
$row_meta = array(
|
1919 |
'docs' => '<a href="' . esc_url( 'https://quizandsurveymaster.com/docs/' ) . '" title="' . esc_attr( __( 'View Documentation', 'quiz-master-next' ) ) . '">' . __( 'Documentation', 'quiz-master-next' ) . '</a>',
|
1920 |
-
'support' => '<a href="' . admin_url( 'admin.php?page=
|
1921 |
);
|
1922 |
return array_merge( $links, $row_meta );
|
1923 |
}
|
259 |
'label' => __( 'Questions Categories', 'quiz-master-next' ),
|
260 |
'type' => 'category',
|
261 |
'default' => '',
|
262 |
+
'help' => __( 'Questions will load only from selected categories.', 'quiz-master-next' ),
|
263 |
);
|
264 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' );
|
265 |
|
1058 |
);
|
1059 |
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
|
1060 |
|
1061 |
+
$field_array = array(
|
1062 |
+
'id' => 'retake_quiz_button_text',
|
1063 |
+
'label' => __( 'Retake Quiz Button', 'quiz-master-next' ),
|
1064 |
+
'type' => 'text',
|
1065 |
+
'default' => 'Retake Quiz',
|
1066 |
+
);
|
1067 |
+
$mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' );
|
1068 |
+
|
1069 |
// Registers previous_button_text setting
|
1070 |
$field_array = array(
|
1071 |
'id' => 'previous_button_text',
|
1925 |
if ( QSM_PLUGIN_BASENAME === $file ) {
|
1926 |
$row_meta = array(
|
1927 |
'docs' => '<a href="' . esc_url( 'https://quizandsurveymaster.com/docs/' ) . '" title="' . esc_attr( __( 'View Documentation', 'quiz-master-next' ) ) . '">' . __( 'Documentation', 'quiz-master-next' ) . '</a>',
|
1928 |
+
'support' => '<a href="' . admin_url( 'admin.php?page=qsm_quiz_about&tab=help' ) . '" title="' . esc_attr( __( 'Create Support Ticket', 'quiz-master-next' ) ) . '">' . __( 'Support', 'quiz-master-next' ) . '</a>',
|
1929 |
);
|
1930 |
return array_merge( $links, $row_meta );
|
1931 |
}
|
php/question-types/qsm-question-title.php
CHANGED
@@ -15,7 +15,7 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_
|
|
15 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
16 |
$deselect_answer = '';
|
17 |
if ( isset( $qmn_quiz_options->enable_deselect_option ) && 1 == $qmn_quiz_options->enable_deselect_option && ( 'multiple_choice' === $question_type || 'horizontal_multiple_choice' === $question_type ) ) {
|
18 |
-
$deselect_answer = '<a href="#" class="qsm-deselect-answer">Deselect Answer</a>';
|
19 |
}
|
20 |
|
21 |
if ( $question_id ) {
|
15 |
$qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
16 |
$deselect_answer = '';
|
17 |
if ( isset( $qmn_quiz_options->enable_deselect_option ) && 1 == $qmn_quiz_options->enable_deselect_option && ( 'multiple_choice' === $question_type || 'horizontal_multiple_choice' === $question_type ) ) {
|
18 |
+
$deselect_answer = '<a href="#" class="qsm-deselect-answer">'.__( 'Deselect Answer', 'quiz-master-next' ).'</a>';
|
19 |
}
|
20 |
|
21 |
if ( $question_id ) {
|
php/question-types/qsm-question-type-number.php
CHANGED
@@ -16,7 +16,6 @@ function qmn_number_display( $id, $question, $answers ) {
|
|
16 |
global $mlwQuizMasterNext;
|
17 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
18 |
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
19 |
-
$limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' oninput='javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);'" : '';
|
20 |
if ( 0 == $required ) {
|
21 |
$mlw_require_class = 'mlwRequiredNumber';
|
22 |
} else {
|
@@ -26,7 +25,7 @@ function qmn_number_display( $id, $question, $answers ) {
|
|
26 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
27 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
28 |
?>
|
29 |
-
<input type="number" <?php echo esc_attr( $
|
30 |
<?php
|
31 |
echo apply_filters( 'qmn_number_display_front', '', $id, $question, $answers );
|
32 |
}
|
16 |
global $mlwQuizMasterNext;
|
17 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
18 |
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
|
|
19 |
if ( 0 == $required ) {
|
20 |
$mlw_require_class = 'mlwRequiredNumber';
|
21 |
} else {
|
25 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
26 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
27 |
?>
|
28 |
+
<input type="number" class="mlw_answer_number <?php echo esc_attr( $mlw_require_class ); ?>" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"<?php endif; ?> />
|
29 |
<?php
|
30 |
echo apply_filters( 'qmn_number_display_front', '', $id, $question, $answers );
|
31 |
}
|
php/question-types/qsm-question-type-paragraph.php
CHANGED
@@ -21,12 +21,11 @@ function qmn_large_open_display( $id, $question, $answers ) {
|
|
21 |
} else {
|
22 |
$mlw_require_class = '';
|
23 |
}
|
24 |
-
$limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
|
25 |
// $question_title = apply_filters('the_content', $question);
|
26 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
27 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
28 |
?>
|
29 |
-
|
30 |
<?php
|
31 |
echo apply_filters( 'qmn_large_open_display_front', '', $id, $question, $answers );
|
32 |
}
|
21 |
} else {
|
22 |
$mlw_require_class = '';
|
23 |
}
|
|
|
24 |
// $question_title = apply_filters('the_content', $question);
|
25 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
26 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
27 |
?>
|
28 |
+
<textarea class="mlw_answer_open_text <?php echo esc_attr( $mlw_require_class ); ?>" cols="70" rows="5" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>"<?php endif; ?> /></textarea>
|
29 |
<?php
|
30 |
echo apply_filters( 'qmn_large_open_display_front', '', $id, $question, $answers );
|
31 |
}
|
php/question-types/qsm-question-type-polar.php
CHANGED
@@ -14,11 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
function qmn_polar_display( $id, $question, $answers ) {
|
15 |
global $mlwQuizMasterNext;
|
16 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
17 |
-
$autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
|
18 |
-
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
19 |
-
$autofill_att = $autofill ? "autocomplete='off' " : '';
|
20 |
-
$limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
|
21 |
-
$input_text = '';
|
22 |
$first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
|
23 |
$second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
|
24 |
$is_reverse = false;
|
14 |
function qmn_polar_display( $id, $question, $answers ) {
|
15 |
global $mlwQuizMasterNext;
|
16 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
|
|
|
|
|
|
|
|
|
|
17 |
$first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
|
18 |
$second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
|
19 |
$is_reverse = false;
|
php/question-types/qsm-question-type-short-answer.php
CHANGED
@@ -18,7 +18,6 @@ function qmn_small_open_display( $id, $question, $answers ) {
|
|
18 |
$autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
|
19 |
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
20 |
$autofill_att = $autofill ? "autocomplete='off' " : '';
|
21 |
-
$limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
|
22 |
if ( 0 == $required ) {
|
23 |
$mlw_require_class = 'mlwRequiredText';
|
24 |
} else {
|
@@ -28,7 +27,7 @@ function qmn_small_open_display( $id, $question, $answers ) {
|
|
28 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
29 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
30 |
?>
|
31 |
-
<input <?php echo esc_attr( $autofill_att
|
32 |
<?php
|
33 |
echo apply_filters( 'qmn_small_open_display_front', '', $id, $question, $answers );
|
34 |
}
|
18 |
$autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
|
19 |
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
20 |
$autofill_att = $autofill ? "autocomplete='off' " : '';
|
|
|
21 |
if ( 0 == $required ) {
|
22 |
$mlw_require_class = 'mlwRequiredText';
|
23 |
} else {
|
27 |
$new_question_title = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'question_title' );
|
28 |
qsm_question_title_func( $question, '', $new_question_title, $id );
|
29 |
?>
|
30 |
+
<input <?php echo esc_attr( $autofill_att ); ?> type="text" class="mlw_answer_open_text <?php echo esc_attr( $mlw_require_class ); ?>" name="question<?php echo esc_attr( $id ); ?>" <?php if ( $limit_text ) : ?>maxlength="<?php echo esc_attr( $limit_text ); ?>"<?php endif; ?> />
|
31 |
<?php
|
32 |
echo apply_filters( 'qmn_small_open_display_front', '', $id, $question, $answers );
|
33 |
}
|
php/template-variables.php
CHANGED
@@ -11,10 +11,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
-
//Template variable files
|
15 |
-
|
16 |
-
//Template variable files for backward compatibility ( @since QSM 7.3.8 )
|
17 |
-
|
18 |
|
19 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_all_contact_fields_variable', 10, 2 );
|
20 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_contact_field_variable', 10, 2 );
|
@@ -62,8 +62,8 @@ add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_variable_minimum_poin
|
|
62 |
* Changed the display structure to new structure.
|
63 |
*
|
64 |
* @since 6.4.11
|
65 |
-
* @param string
|
66 |
-
* @param array
|
67 |
* Show particular question answer.
|
68 |
*/
|
69 |
function qsm_variable_single_question_answer( $content, $mlw_quiz_array ) {
|
@@ -82,18 +82,16 @@ function qsm_variable_single_question_answer( $content, $mlw_quiz_array ) {
|
|
82 |
global $mlwQuizMasterNext;
|
83 |
$answer = $question_answers_array[ $key ];
|
84 |
if ( isset( $mlw_quiz_array['email_processed'] ) && 'yes' === $mlw_quiz_array['email_processed'] ) {
|
|
|
85 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
86 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
87 |
-
$qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $
|
88 |
-
} else {
|
89 |
-
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_email_template', '%QUESTION%<br/>Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%' );
|
90 |
}
|
91 |
} else {
|
|
|
92 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
93 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
94 |
-
$qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $
|
95 |
-
} else {
|
96 |
-
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
|
97 |
}
|
98 |
}
|
99 |
$mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
|
@@ -146,7 +144,7 @@ function qsm_variable_total_attempted_questions( $content, $mlw_quiz_array ) {
|
|
146 |
* Show poll result
|
147 |
*
|
148 |
* @param string $content
|
149 |
-
* @param array
|
150 |
*/
|
151 |
function qsm_variable_poll_result( $content, $mlw_quiz_array ) {
|
152 |
$quiz_id = is_object( $mlw_quiz_array ) ? $mlw_quiz_array->quiz_id : $mlw_quiz_array['quiz_id'];
|
@@ -195,7 +193,7 @@ function qsm_variable_poll_result( $content, $mlw_quiz_array ) {
|
|
195 |
* Show Answer type evaluated
|
196 |
*
|
197 |
* @param string $answer
|
198 |
-
* @param array
|
199 |
*/
|
200 |
function qsm_answers_type_evaluated( $answer, $question_settings ) {
|
201 |
if ( 'rich' === $question_settings['answerEditor'] ) {
|
@@ -443,7 +441,7 @@ function qsm_all_contact_fields_variable( $content, $results ) {
|
|
443 |
*/
|
444 |
function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
|
445 |
global $mlwQuizMasterNext;
|
446 |
-
$quiz_id
|
447 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
|
448 |
$logic_rules = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'logic_rules' );
|
449 |
$logic_rules = qmn_sanitize_input_data( $logic_rules );
|
@@ -521,7 +519,7 @@ function mlw_qmn_variable_timer_seconds( $content, $mlw_quiz_array ) {
|
|
521 |
* @return string Returns the contents for the results page
|
522 |
*/
|
523 |
function mlw_qmn_variable_date( $content, $results ) {
|
524 |
-
$date
|
525 |
$content = str_replace( '%CURRENT_DATE%', $date, $content );
|
526 |
return $content;
|
527 |
}
|
@@ -534,7 +532,7 @@ function mlw_qmn_variable_date( $content, $results ) {
|
|
534 |
* @return string Returns the contents for the results page
|
535 |
*/
|
536 |
function mlw_qmn_variable_finished_time( $content, $mlw_quiz_array ) {
|
537 |
-
$date
|
538 |
$content = str_replace( '%TIME_FINISHED%', $date, $content );
|
539 |
return $content;
|
540 |
}
|
@@ -549,7 +547,7 @@ function mlw_qmn_variable_finished_time( $content, $mlw_quiz_array ) {
|
|
549 |
function mlw_qmn_variable_date_taken( $content, $mlw_quiz_array ) {
|
550 |
global $mlwQuizMasterNext;
|
551 |
|
552 |
-
$date
|
553 |
$quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
554 |
$qsm_quiz_settings = maybe_unserialize( $quiz_options->quiz_settings );
|
555 |
$qsm_quiz_options = maybe_unserialize( $qsm_quiz_settings['quiz_options'] );
|
@@ -584,16 +582,10 @@ function mlw_qmn_variable_date_taken( $content, $mlw_quiz_array ) {
|
|
584 |
*/
|
585 |
function qmn_variable_category_points( $content, $mlw_quiz_array ) {
|
586 |
$return_points = 0;
|
587 |
-
while (
|
588 |
$total_questions = 0;
|
589 |
$return_points = 0;
|
590 |
-
|
591 |
-
if ( empty( $answer_text ) ) {
|
592 |
-
$category_name = mlw_qmn_get_string_between( $content, '%CATEGORY_POINTS_', '%' );
|
593 |
-
} else {
|
594 |
-
$category_name = $answer_text[1];
|
595 |
-
}
|
596 |
-
|
597 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
598 |
if ( is_array( $answer['multicategories'] ) ) {
|
599 |
foreach ( $answer['multicategories'] as $category ) {
|
@@ -606,15 +598,11 @@ function qmn_variable_category_points( $content, $mlw_quiz_array ) {
|
|
606 |
}
|
607 |
}
|
608 |
if ( 0 != $total_questions ) {
|
609 |
-
|
610 |
} else {
|
611 |
$return_points = 0;
|
612 |
}
|
613 |
-
|
614 |
-
$content = str_replace( '%CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
|
615 |
-
} else {
|
616 |
-
$content = str_replace( $answer_text[0], $return_points, $content );
|
617 |
-
}
|
618 |
}
|
619 |
return $content;
|
620 |
}
|
@@ -631,15 +619,10 @@ function qmn_variable_category_points( $content, $mlw_quiz_array ) {
|
|
631 |
*/
|
632 |
function qmn_variable_average_category_points( $content, $mlw_quiz_array ) {
|
633 |
$return_points = 0;
|
634 |
-
while (
|
635 |
$return_points = 0;
|
636 |
$total_questions = 0;
|
637 |
-
|
638 |
-
if ( empty( $answer_text ) ) {
|
639 |
-
$category_name = mlw_qmn_get_string_between( $content, '%AVERAGE_CATEGORY_POINTS_', '%' );
|
640 |
-
} else {
|
641 |
-
$category_name = $answer_text[1];
|
642 |
-
}
|
643 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
644 |
if ( is_array( $answer['multicategories'] ) ) {
|
645 |
foreach ( $answer['multicategories'] as $category ) {
|
@@ -661,11 +644,7 @@ function qmn_variable_average_category_points( $content, $mlw_quiz_array ) {
|
|
661 |
} else {
|
662 |
$return_points = 0;
|
663 |
}
|
664 |
-
|
665 |
-
$content = str_replace( '%AVERAGE_CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
|
666 |
-
} else {
|
667 |
-
$content = str_replace( $answer_text[0], $return_points, $content );
|
668 |
-
}
|
669 |
}
|
670 |
return $content;
|
671 |
}
|
@@ -686,32 +665,24 @@ function qmn_variable_category_score( $content, $mlw_quiz_array ) {
|
|
686 |
$total_questions = 0;
|
687 |
$amount_correct = 0;
|
688 |
|
689 |
-
while (
|
690 |
$return_score = 0;
|
691 |
$total_questions = 0;
|
692 |
$amount_correct = 0;
|
693 |
-
|
694 |
-
|
695 |
-
$category_name = mlw_qmn_get_string_between( $content, '%CATEGORY_SCORE_', '%' );
|
696 |
-
} else {
|
697 |
-
$category_name = $answer_text[1];
|
698 |
-
|
699 |
-
}
|
700 |
-
|
701 |
-
$category_data = $mlwQuizMasterNext->migrationHelper->get_category_data( $category_name );
|
702 |
|
703 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
704 |
if ( $category_data['migrated'] ) {
|
705 |
-
$
|
706 |
-
|
707 |
-
|
708 |
-
$
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
$amount_correct += 1;
|
715 |
}
|
716 |
}
|
717 |
} else {
|
@@ -734,11 +705,7 @@ function qmn_variable_category_score( $content, $mlw_quiz_array ) {
|
|
734 |
$return_score = 0;
|
735 |
}
|
736 |
|
737 |
-
|
738 |
-
$content = str_replace( '%CATEGORY_SCORE_' . $category_name . '%', $return_score, $content );
|
739 |
-
} else {
|
740 |
-
$content = str_replace( $answer_text[0], $return_score, $content );
|
741 |
-
}
|
742 |
}
|
743 |
return $content;
|
744 |
}
|
@@ -898,11 +865,11 @@ add_filter( 'wp_kses_allowed_html', 'qsm_custom_wpkses_post_tags', 10, 2 );
|
|
898 |
*
|
899 |
* @since 7.1.3
|
900 |
*
|
901 |
-
* @param array
|
902 |
* @param string $qmn_question_answer_template
|
903 |
* @param string $answer
|
904 |
-
* @param int
|
905 |
-
* @param int
|
906 |
* @return string
|
907 |
*/
|
908 |
function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt ) {
|
@@ -934,29 +901,29 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
934 |
if ( isset( $mlw_quiz_array['form_type'] ) && 0 == $mlw_quiz_array['form_type'] ) {
|
935 |
if ( 0 == $mlw_quiz_array['quiz_system'] || 3 == $mlw_quiz_array['quiz_system'] ) {
|
936 |
if ( 'correct' === $answer['correct'] ) {
|
937 |
-
$user_answer_class
|
938 |
$question_answer_class = 'qmn_question_answer_correct';
|
939 |
} else {
|
940 |
-
$user_answer_class
|
941 |
$question_answer_class = 'qmn_question_answer_incorrect';
|
942 |
}
|
943 |
}
|
944 |
}
|
945 |
} else {
|
946 |
if ( isset( $mlw_quiz_array['form_type'] ) && '1' === $mlw_quiz_array['form_type'] || '2' === $mlw_quiz_array['form_type'] ) {
|
947 |
-
$user_answer_class
|
948 |
$question_answer_class = 'qmn_question_answer_correct';
|
949 |
} else {
|
950 |
if ( 'correct' === $answer['correct'] ) {
|
951 |
-
$user_answer_class
|
952 |
$question_answer_class = 'qmn_question_answer_correct';
|
953 |
} else {
|
954 |
-
$user_answer_class
|
955 |
$question_answer_class = 'qmn_question_answer_incorrect';
|
956 |
}
|
957 |
}
|
958 |
}
|
959 |
-
$open_span_tag
|
960 |
$mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
|
961 |
$disable_description_on_result = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'disable_description_on_result' );
|
962 |
// Get question setting
|
@@ -981,7 +948,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
981 |
$remove_border = false;
|
982 |
$question_with_answer_text = '';
|
983 |
$extra_border_bottom_class = 'qsm-add-border-bottom';
|
984 |
-
$question_with_text_input
|
985 |
3,
|
986 |
12,
|
987 |
5,
|
@@ -1035,7 +1002,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1035 |
}
|
1036 |
}
|
1037 |
} else {
|
1038 |
-
$user_given_answer
|
1039 |
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
|
1040 |
}
|
1041 |
}
|
@@ -1137,11 +1104,10 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1137 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_points( $total_answers, $answer, $question_settings );
|
1138 |
}
|
1139 |
} elseif ( 13 == $answer['question_type'] ) {
|
1140 |
-
$questionid
|
1141 |
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1142 |
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1143 |
-
$
|
1144 |
-
$question_type = $answer['question_type'];
|
1145 |
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1146 |
} else {
|
1147 |
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
|
@@ -1180,8 +1146,8 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1180 |
$qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
|
1181 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
|
1182 |
} else {
|
1183 |
-
$user_answer_new
|
1184 |
-
$is_choice_question_type = 0 == $answer['question_type'] || 1 == $answer['question_type'] || 2 == $answer['question_type'] || 4 == $answer['question_type'] || 10 == $answer['question_type']
|
1185 |
if ( $is_choice_question_type && '' === $answer[1] ) {
|
1186 |
$user_answer_new = __( 'No Answer Provided', 'quiz-master-next' );
|
1187 |
}
|
@@ -1196,8 +1162,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
|
|
1196 |
}
|
1197 |
$answer_2 = ! empty( $answer[2] ) ? $answer[2] : 'NA';
|
1198 |
if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
|
1199 |
-
$
|
1200 |
-
$qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questionid, $answer );
|
1201 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
|
1202 |
} elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
|
1203 |
$image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
|
@@ -1290,10 +1255,6 @@ function qmn_polar_display_on_resultspage( $id, $question, $answers, $answer ) {
|
|
1290 |
$question_display = '';
|
1291 |
global $mlwQuizMasterNext;
|
1292 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
1293 |
-
$autofill = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'autofill' );
|
1294 |
-
$limit_text = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'limit_text' );
|
1295 |
-
$autofill_att = $autofill ? "autocomplete='off' " : '';
|
1296 |
-
$limit_text_att = $limit_text ? "maxlength='" . $limit_text . "' " : '';
|
1297 |
$input_text = '';
|
1298 |
$first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
|
1299 |
$second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
|
@@ -1411,10 +1372,10 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
|
|
1411 |
$deselect_answer = '<a href="#" class="qsm-deselect-answer">Deselect Answer</a>';
|
1412 |
}
|
1413 |
|
1414 |
-
$question_numbering
|
1415 |
$qmn_total_questions += 1;
|
1416 |
if ( isset( $qmn_quiz_options->question_numbering ) && 1 == $qmn_quiz_options->question_numbering ) {
|
1417 |
-
$question_numbering = '<span class="mlw_qmn_question_number">'.esc_html( $qmn_total_questions ).'. </span>';
|
1418 |
}
|
1419 |
|
1420 |
if ( $question_id ) {
|
@@ -1428,6 +1389,6 @@ function qsm_varibale_question_title_func( $question, $question_type = '', $new_
|
|
1428 |
$polar_extra_class .= ' qsm_remove_bold';
|
1429 |
}
|
1430 |
|
1431 |
-
$question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >"
|
1432 |
return $question_display;
|
1433 |
}
|
11 |
exit;
|
12 |
}
|
13 |
|
14 |
+
// Template variable files
|
15 |
+
require 'template-variables/qsm-tempvar-question-answers.php';
|
16 |
+
// Template variable files for backward compatibility ( @since QSM 7.3.8 )
|
17 |
+
require 'backward-compatibility/qsm-backward-compatibility-template-variables.php';
|
18 |
|
19 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_all_contact_fields_variable', 10, 2 );
|
20 |
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_contact_field_variable', 10, 2 );
|
62 |
* Changed the display structure to new structure.
|
63 |
*
|
64 |
* @since 6.4.11
|
65 |
+
* @param string $content
|
66 |
+
* @param array $mlw_quiz_array
|
67 |
* Show particular question answer.
|
68 |
*/
|
69 |
function qsm_variable_single_question_answer( $content, $mlw_quiz_array ) {
|
82 |
global $mlwQuizMasterNext;
|
83 |
$answer = $question_answers_array[ $key ];
|
84 |
if ( isset( $mlw_quiz_array['email_processed'] ) && 'yes' === $mlw_quiz_array['email_processed'] ) {
|
85 |
+
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_email_template', '%QUESTION%<br/>Answer Provided: %USER_ANSWER%<br/>Correct Answer: %CORRECT_ANSWER%<br/>Comments Entered: %USER_COMMENTS%' );
|
86 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
87 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
88 |
+
$qmn_question_answer_template = isset( $quiz_text_settings['question_answer_email_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_email_template'] ) : $qmn_question_answer_template;
|
|
|
|
|
89 |
}
|
90 |
} else {
|
91 |
+
$qmn_question_answer_template = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'question_answer_template', '%QUESTION%<br/>%USER_ANSWERS_DEFAULT%' );
|
92 |
if ( isset( $mlw_quiz_array['quiz_settings'] ) && ! empty( $mlw_quiz_array['quiz_settings'] ) ) {
|
93 |
$quiz_text_settings = isset( $mlw_quiz_array['quiz_settings']['quiz_text'] ) ? qmn_sanitize_input_data( $mlw_quiz_array['quiz_settings']['quiz_text'], true ) : array();
|
94 |
+
$qmn_question_answer_template = isset( $quiz_text_settings['question_answer_template'] ) ? apply_filters( 'qsm_section_setting_text', $quiz_text_settings['question_answer_template'] ) : $qmn_question_answer_template;
|
|
|
|
|
95 |
}
|
96 |
}
|
97 |
$mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
|
144 |
* Show poll result
|
145 |
*
|
146 |
* @param string $content
|
147 |
+
* @param array $mlw_quiz_array
|
148 |
*/
|
149 |
function qsm_variable_poll_result( $content, $mlw_quiz_array ) {
|
150 |
$quiz_id = is_object( $mlw_quiz_array ) ? $mlw_quiz_array->quiz_id : $mlw_quiz_array['quiz_id'];
|
193 |
* Show Answer type evaluated
|
194 |
*
|
195 |
* @param string $answer
|
196 |
+
* @param array $question_settings
|
197 |
*/
|
198 |
function qsm_answers_type_evaluated( $answer, $question_settings ) {
|
199 |
if ( 'rich' === $question_settings['answerEditor'] ) {
|
441 |
*/
|
442 |
function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
|
443 |
global $mlwQuizMasterNext;
|
444 |
+
$quiz_id = is_object( $mlw_quiz_array ) ? $mlw_quiz_array->quiz_id : $mlw_quiz_array['quiz_id'];
|
445 |
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
|
446 |
$logic_rules = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'logic_rules' );
|
447 |
$logic_rules = qmn_sanitize_input_data( $logic_rules );
|
519 |
* @return string Returns the contents for the results page
|
520 |
*/
|
521 |
function mlw_qmn_variable_date( $content, $results ) {
|
522 |
+
$date = date_i18n( get_option( 'date_format' ), current_time( 'h:i:s A m/d/Y' ) );
|
523 |
$content = str_replace( '%CURRENT_DATE%', $date, $content );
|
524 |
return $content;
|
525 |
}
|
532 |
* @return string Returns the contents for the results page
|
533 |
*/
|
534 |
function mlw_qmn_variable_finished_time( $content, $mlw_quiz_array ) {
|
535 |
+
$date = date_i18n( get_option( 'time_format' ), $mlw_quiz_array['time_taken'] );
|
536 |
$content = str_replace( '%TIME_FINISHED%', $date, $content );
|
537 |
return $content;
|
538 |
}
|
547 |
function mlw_qmn_variable_date_taken( $content, $mlw_quiz_array ) {
|
548 |
global $mlwQuizMasterNext;
|
549 |
|
550 |
+
$date = '';
|
551 |
$quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options();
|
552 |
$qsm_quiz_settings = maybe_unserialize( $quiz_options->quiz_settings );
|
553 |
$qsm_quiz_options = maybe_unserialize( $qsm_quiz_settings['quiz_options'] );
|
582 |
*/
|
583 |
function qmn_variable_category_points( $content, $mlw_quiz_array ) {
|
584 |
$return_points = 0;
|
585 |
+
while ( false !== strpos( $content, '%CATEGORY_POINTS_' ) ) {
|
586 |
$total_questions = 0;
|
587 |
$return_points = 0;
|
588 |
+
$category_name = mlw_qmn_get_string_between( $content, '%CATEGORY_POINTS_', '%' );
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
590 |
if ( is_array( $answer['multicategories'] ) ) {
|
591 |
foreach ( $answer['multicategories'] as $category ) {
|
598 |
}
|
599 |
}
|
600 |
if ( 0 != $total_questions ) {
|
601 |
+
$return_points = strval( $return_points );
|
602 |
} else {
|
603 |
$return_points = 0;
|
604 |
}
|
605 |
+
$content = str_replace( '%CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
|
|
|
|
|
|
|
|
|
606 |
}
|
607 |
return $content;
|
608 |
}
|
619 |
*/
|
620 |
function qmn_variable_average_category_points( $content, $mlw_quiz_array ) {
|
621 |
$return_points = 0;
|
622 |
+
while ( false !== strpos( $content, '%AVERAGE_CATEGORY_POINTS_' ) ) {
|
623 |
$return_points = 0;
|
624 |
$total_questions = 0;
|
625 |
+
$category_name = mlw_qmn_get_string_between( $content, '%AVERAGE_CATEGORY_POINTS_', '%' );
|
|
|
|
|
|
|
|
|
|
|
626 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
627 |
if ( is_array( $answer['multicategories'] ) ) {
|
628 |
foreach ( $answer['multicategories'] as $category ) {
|
644 |
} else {
|
645 |
$return_points = 0;
|
646 |
}
|
647 |
+
$content = str_replace( '%AVERAGE_CATEGORY_POINTS_' . $category_name . '%', $return_points, $content );
|
|
|
|
|
|
|
|
|
648 |
}
|
649 |
return $content;
|
650 |
}
|
665 |
$total_questions = 0;
|
666 |
$amount_correct = 0;
|
667 |
|
668 |
+
while ( false !== strpos( $content, '%CATEGORY_SCORE_' ) ) {
|
669 |
$return_score = 0;
|
670 |
$total_questions = 0;
|
671 |
$amount_correct = 0;
|
672 |
+
$category_name = mlw_qmn_get_string_between( $content, '%CATEGORY_SCORE_', '%' );
|
673 |
+
$category_data = $mlwQuizMasterNext->migrationHelper->get_category_data( $category_name );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
|
675 |
foreach ( $mlw_quiz_array['question_answers_array'] as $answer ) {
|
676 |
if ( $category_data['migrated'] ) {
|
677 |
+
if ( is_array( $answer['multicategories'] ) ) {
|
678 |
+
foreach ( $answer['multicategories'] as $category ) {
|
679 |
+
$category_name_object = get_term_by( 'ID', $category, 'qsm_category' );
|
680 |
+
if ( $category_name_object->name == $category_name && '11' !== $answer['question_type'] ) {
|
681 |
+
$total_questions += 1;
|
682 |
+
if ( 'correct' == $answer['correct'] ) {
|
683 |
+
$amount_correct += 1;
|
684 |
+
}
|
685 |
+
}
|
|
|
686 |
}
|
687 |
}
|
688 |
} else {
|
705 |
$return_score = 0;
|
706 |
}
|
707 |
|
708 |
+
$content = str_replace( '%CATEGORY_SCORE_' . $category_name . '%', $return_score, $content );
|
|
|
|
|
|
|
|
|
709 |
}
|
710 |
return $content;
|
711 |
}
|
865 |
*
|
866 |
* @since 7.1.3
|
867 |
*
|
868 |
+
* @param array $mlw_quiz_array
|
869 |
* @param string $qmn_question_answer_template
|
870 |
* @param string $answer
|
871 |
+
* @param int $qsm_question_cnt
|
872 |
+
* @param int $total_question_cnt
|
873 |
* @return string
|
874 |
*/
|
875 |
function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt ) {
|
901 |
if ( isset( $mlw_quiz_array['form_type'] ) && 0 == $mlw_quiz_array['form_type'] ) {
|
902 |
if ( 0 == $mlw_quiz_array['quiz_system'] || 3 == $mlw_quiz_array['quiz_system'] ) {
|
903 |
if ( 'correct' === $answer['correct'] ) {
|
904 |
+
$user_answer_class = 'qmn_user_correct_answer';
|
905 |
$question_answer_class = 'qmn_question_answer_correct';
|
906 |
} else {
|
907 |
+
$user_answer_class = 'qmn_user_incorrect_answer';
|
908 |
$question_answer_class = 'qmn_question_answer_incorrect';
|
909 |
}
|
910 |
}
|
911 |
}
|
912 |
} else {
|
913 |
if ( isset( $mlw_quiz_array['form_type'] ) && '1' === $mlw_quiz_array['form_type'] || '2' === $mlw_quiz_array['form_type'] ) {
|
914 |
+
$user_answer_class = 'qmn_user_correct_answer';
|
915 |
$question_answer_class = 'qmn_question_answer_correct';
|
916 |
} else {
|
917 |
if ( 'correct' === $answer['correct'] ) {
|
918 |
+
$user_answer_class = 'qmn_user_correct_answer qsm-text-correct-option qsm-text-user-correct-answer';
|
919 |
$question_answer_class = 'qmn_question_answer_correct';
|
920 |
} else {
|
921 |
+
$user_answer_class = 'qmn_user_incorrect_answer';
|
922 |
$question_answer_class = 'qmn_question_answer_incorrect';
|
923 |
}
|
924 |
}
|
925 |
}
|
926 |
+
$open_span_tag = '<span class="' . $user_answer_class . '">';
|
927 |
$mlw_question_answer_display = htmlspecialchars_decode( $qmn_question_answer_template, ENT_QUOTES );
|
928 |
$disable_description_on_result = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'disable_description_on_result' );
|
929 |
// Get question setting
|
948 |
$remove_border = false;
|
949 |
$question_with_answer_text = '';
|
950 |
$extra_border_bottom_class = 'qsm-add-border-bottom';
|
951 |
+
$question_with_text_input = array(
|
952 |
3,
|
953 |
12,
|
954 |
5,
|
1002 |
}
|
1003 |
}
|
1004 |
} else {
|
1005 |
+
$user_given_answer = '' === $answer[1] ? __( 'No answer provided', 'quiz-master-next' ) : $answer[1];
|
1006 |
$question_with_answer_text .= '<span class="qsm-text-simple-option">' . htmlspecialchars_decode( $user_given_answer, ENT_QUOTES ) . '</span>';
|
1007 |
}
|
1008 |
}
|
1104 |
$question_with_answer_text .= qsm_bckcmp_tempvar_qa_text_qt_multi_choice_points( $total_answers, $answer, $question_settings );
|
1105 |
}
|
1106 |
} elseif ( 13 == $answer['question_type'] ) {
|
1107 |
+
$questionid = $questions[ $answer['id'] ]['question_id'];
|
1108 |
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
|
1109 |
} elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
|
1110 |
+
$question_type = $answer['question_type'];
|
|
|
1111 |
$question_with_answer_text .= apply_filters( 'qsm_result_page_custom_default_template', $total_answers, $questions, $answer );
|
1112 |
} else {
|
1113 |
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
|
1146 |
$qsm_user_ans = apply_filters( 'qsm_result_page_custom_user_answer_template', $questions, $answer );
|
1147 |
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $qsm_user_ans, $mlw_question_answer_display );
|
1148 |
} else {
|
1149 |
+
$user_answer_new = $answer[1];
|
1150 |
+
$is_choice_question_type = 0 == $answer['question_type'] || 1 == $answer['question_type'] || 2 == $answer['question_type'] || 4 == $answer['question_type'] || 10 == $answer['question_type'];
|
1151 |
if ( $is_choice_question_type && '' === $answer[1] ) {
|
1152 |
$user_answer_new = __( 'No Answer Provided', 'quiz-master-next' );
|
1153 |
}
|
1162 |
}
|
1163 |
$answer_2 = ! empty( $answer[2] ) ? $answer[2] : 'NA';
|
1164 |
if ( in_array( $answer['question_type'], $use_custom_correct_answer_template, true ) ) {
|
1165 |
+
$qsm_correct_ans = apply_filters( 'qsm_result_page_custom_correct_answer_template', $questions, $answer );
|
|
|
1166 |
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', $qsm_correct_ans, $mlw_question_answer_display );
|
1167 |
} elseif ( isset( $question_settings['answerEditor'] ) && 'image' === $question_settings['answerEditor'] && 'NA' !== $answer_2 ) {
|
1168 |
$image_url = htmlspecialchars_decode( $answer_2, ENT_QUOTES );
|
1255 |
$question_display = '';
|
1256 |
global $mlwQuizMasterNext;
|
1257 |
$required = $mlwQuizMasterNext->pluginHelper->get_question_setting( $id, 'required' );
|
|
|
|
|
|
|
|
|
1258 |
$input_text = '';
|
1259 |
$first_point = isset( $answers[0][1] ) ? intval( $answers[0][1] ) : 0;
|
1260 |
$second_point = isset( $answers[1][1] ) ? intval( $answers[1][1] ) : 0;
|
1372 |
$deselect_answer = '<a href="#" class="qsm-deselect-answer">Deselect Answer</a>';
|
1373 |
}
|
1374 |
|
1375 |
+
$question_numbering = '';
|
1376 |
$qmn_total_questions += 1;
|
1377 |
if ( isset( $qmn_quiz_options->question_numbering ) && 1 == $qmn_quiz_options->question_numbering ) {
|
1378 |
+
$question_numbering = '<span class="mlw_qmn_question_number">' . esc_html( $qmn_total_questions ) . '. </span>';
|
1379 |
}
|
1380 |
|
1381 |
if ( $question_id ) {
|
1389 |
$polar_extra_class .= ' qsm_remove_bold';
|
1390 |
}
|
1391 |
|
1392 |
+
$question_display .= "<div class='mlw_qmn_question {$polar_extra_class}' >" . $question_numbering . do_shortcode( htmlspecialchars_decode( $question_title, ENT_QUOTES ) ) . $deselect_answer . '</div>';
|
1393 |
return $question_display;
|
1394 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question,wordpress q
|
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 7.3.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -100,9 +100,11 @@ Quiz And Survey Master is fully functional and is packed with tons of features t
|
|
100 |
* Join our [official FB group](https://www.facebook.com/groups/516958552587745).
|
101 |
* Quiz And Survey Master on [GitHub](https://github.com/QuizandSurveyMaster/quiz_master_next/)!
|
102 |
|
103 |
-
🌐Our
|
104 |
|
105 |
-
If you like this plugin, consider exploring our other plugins:
|
|
|
|
|
106 |
|
107 |
☰ [Responsive Menu](https://wordpress.org/plugins/responsive-menu/) - Best WordPress Menu Builder Plugin to create awesome and interactive mobile & desktop menus for WordPress websites.
|
108 |
|
@@ -160,6 +162,16 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
160 |
18. Database
|
161 |
|
162 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
= 7.3.12 (February 18, 2022) =
|
164 |
* Hotfix: Fixed compatibility issues with php 8
|
165 |
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 7.3.13
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
100 |
* Join our [official FB group](https://www.facebook.com/groups/516958552587745).
|
101 |
* Quiz And Survey Master on [GitHub](https://github.com/QuizandSurveyMaster/quiz_master_next/)!
|
102 |
|
103 |
+
🌐Our themes and plugins
|
104 |
|
105 |
+
If you like this plugin, consider exploring our other themes and plugins:
|
106 |
+
|
107 |
+
🧱 [Gutena] (https://wordpress.org/themes/gutena/) - Block Based Theme for WordPress includes over 50 free block patterns with new patterns added every week.
|
108 |
|
109 |
☰ [Responsive Menu](https://wordpress.org/plugins/responsive-menu/) - Best WordPress Menu Builder Plugin to create awesome and interactive mobile & desktop menus for WordPress websites.
|
110 |
|
162 |
18. Database
|
163 |
|
164 |
== Changelog ==
|
165 |
+
= 7.3.13 (March 14, 2022) =
|
166 |
+
* Bug: Fixed issue with comments field UI
|
167 |
+
* Bug: Fixed issue with support Link
|
168 |
+
* Bug: Fixed issue with %CATEGORY_SCORE_X% template variable
|
169 |
+
* Bug: Fixed issue while using multiple quiz shortcodes
|
170 |
+
* Bug: Fixed issue with qmn_register_my_templates hook
|
171 |
+
* Bug: Fixed issue with answer text limit
|
172 |
+
* Bug: Fixed issue while using limit questions with random questions
|
173 |
+
* Feature: Added option to customize the label of Retake Quiz Button
|
174 |
+
|
175 |
= 7.3.12 (February 18, 2022) =
|
176 |
* Hotfix: Fixed compatibility issues with php 8
|
177 |
|