Author Archives: admin

WatuPRO Front-End Troubleshooting Guide

This guide is going to help you to resolve any of the following issues that you may encounter using WatuPRO (and not only these):

  • Submit button, next button, start button, or any other button does not work
  • Quiz does not load at all
  • Some question type (usually match/matrix, sortable or slider) does not work

These problems are usually caused by offending code (learn more) on your web page and can be resolved by disabling it. Of course, if you don’t feel comfortable deactivating plugins you can contact us for support (in which case you must provide us URL to see the problem!)* but tech-savvy users can quickly resolve these problems themselves.

If you are using “optimization” plugins that “minify” JavaScript and HTML code on your pages, disable this feature, clean up your browser cache, and check again. Cloudflare may also have minified our JS. These plugins very often cause fatal JavaScript errors because of improper minification. Do this first before trying anything else. You should not use code minification. It doesn’t provide any significant benefit but causes lots of trouble. Do not.

Caching pages with quizzes can cause a lot of problems with the timer, randomization, and paid quizzes. Do not cache pages that have such quizzes. The first thing to check when having problems with such quizzes are your caching and optimization plugins.

It’s fine to use caching on quizzes that do not use randomization, or timer, and are not paid. Make sure to purge the cache when you change the quiz settings as most cache plugins detect changes in posts but not in quizzes.

Step By Step Guide To Resolving

0. If you are familiar with JavaScript you can go to step 3 first.

1. Change your site theme to some of the default WP themes. Yes, I know you like your theme 🙂 This won’t be permanent, just change it for a minute for this step. Reload the page with the quiz. Problems solved? Then they are most likely caused by bad JavaScript in the theme. You need to contact the theme designer or developer to fix their offending code. If they are not responsive we will try to help you instead but please don’t forget it’s not our job, we are also busy and not very keen on doing someone else’s job. Problem not solved? Then switch back to your theme and go to step 2.

2. Deactivate all plugins except WatuPRO. Yes, I know you need most of them. This is temporary. Refresh the page with the quiz. Problem solved? I bet it is. Now let’s see which is the offender. Start re-activating the plugins. Activate one, refresh the page and see. Problem re-appeared? You just found the offender. It was the plugin that you just activated. That’s it, now you should either remove it or let its author know they are causing fatal javascript errors.

That’s all you need to do. If you need help feel free to contact us. The next step is for tech-savvy users only. At the end of this post you will learn why such problems happen and can’t be prevented from our end.

3. If you know what a JavaScript error is you may want to have a quick look at the Firefox error console yourself. Open the page with the quiz in Firefox and press ctrl + shift + K to open the console. See if there is an obvious fatal JS error and whether it helps you understand which plugin (or the theme) is causing it.

What is an Offending Code?

WordPress is a wild space with thousands of competent and not-so-competent developers creating plugins and themes for it. Unfortunately, the WordPress staff cannot test all aspects of all plugins so a lot of buggy code is available for download.

The problem is that a web page is a whole. JavaScript and CSS are shared between all the components of the page. So once a bad code (especially JavaScript code) causes a fatal error on the page it very often breaks all other scripts on it even if they are properly coded. This is usually not intentional but a result of poor testing, but nevertheless the effect is the same.

Scripts that are causing such errors are called offenders and should be fixed or removed. The properly coded scripts cannot do much to prevent offenders from messing up the page. They cannot fix the problem in the offender.

So is Your Plugin Incompatible with my Theme / Plugins?

No, things don’t work this way. It’s not the properly coded plugin which is incompatible. It’s the offender that is causing the other plugins to not work properly.

If you have a problem with the offending code we can try to help you but we give no guarantee and will take no liability for other developer’s errors.

But My Site Was Working Fine!

The offending code won’t necessarily break everything on your site. It’s usually JavaScript code and breaks complicated interactive JavaScript-based apps such as WatuPRO.

What if WatuPRO is the Offender?

This is unlikely although not entirely impossible. If other functions on your site stopped working correctly after activating WatuPRO please contact us and send us a live URL to have a look.

*Before Contacting Support

If you can’t resolve the issues yourself you can contact us for help. Please note that you MUST provide us URL where we can see the problem. We can not resolve your problem if you don’t send us URL. No screenshots, no vague explanations – we need a live URL where the problem can be seen.

WatuPRO 5.8

WatuPRO 5.8 is ready with new features and improvements. Here’s the changelog:

  • Added flashcards question type (a sub-type of multiple-choice questions). Learn more how they work at https://blog.calendarscripts.info/flashcards/
  • Added color & text size settings for flashcard questions.
  • Added variable %%QUIZ_CAT%% to display the test category in certificates.
  • Added optional URL parameters for each of the “Ask user for contact details” fields. They allow you to pass data from a different page in the link to the quiz and pre-fill contact fields.
  • New shortcode watupro-retake lets you display a “Try again” link or button at the final screen of the quiz.
  • New option lets you automatically add a toggle button on answer feedback so the feedback is hidden by default. Will be useful on large quizzes and quizzes with a lot of feedback on questions.
  • You can now restrict a test to selected user accounts by entering user logins or email addresses.
  • [Namaste! LMS Integration] you can restrict access to tests if they are required by lessons until the assigned lessons have been read.
  • Question paginator improvements for mobile devices: a button show / hide will appear accordingly to the screen resolution and the paginator state (for tests with more than 10 questions).
  • Added option to limit how many days after the first attempt the user can re-attempt the quiz. This works for logged in users together with the other re-attempting limits.
  • A new option lets you force RTL display on individual quizzes. This is sometimes needed when the whole site is not RTL or when the default theme cannot properly handle the quiz RTL display.
  • You can now specify which quiz results (grades) will trigger the email to admin similar to how you could do it for emails to quiz taker.
  • Added stats for quizzes taken yesterday, last month, this year and last year to the WatuPRO dashboard widget.
  • Added parameter “placeholder” for the watupro-result shortcode: this is text to display if the result is empty.
  • [Play plugin integration] Loaded modal dialog scripts. You’ll need this if you want to use the new Play feature that opens a modal pop-up if the user earns a badge or level when taking a quiz.
  • [Namaste! LMS Integration] You can now filter quiz results based on course enrollment in Namaste! LMS.
  • As planned, the legacy import/export of questions is removed leaving only the new formats.
  • Added filters for the email contents of email sent when quiz is completed (to allow custom plugins alter the contents).
  • [Intelligence module] New feature for paid test: you can define an increase or decrease of the price for each subsequent quiz attempt (for tests that charge on each attempt) untill a min or max threshold is met.
  • [Intelligence module] The Runtime logic feature has been deprecated. Please use the free Chained Logic addon instead. The feature will not be removed for backward compatibility.
  • [Fixed bug] Stripe options were not saved correctly for paid quizzes.
  • [Fixed bug] Analytics event tracker was causing error on non-Ajax quizzes.
  • [Fixed bug] watupro-result shortcode was not handling properly cases when quiz_id was passed as argument but latest attempt was on a different quiz.
  • [Fixed bug] “Calculate chekbox question as a whole” option did not work if Intelligence module was not present.
  • [Fixed bug] When changing the word for quiz / quizzes on the Settings page the change was not reflected on the page and caused confusion.
  • [Fixed bug] Personality quizzes should not show correct or incorrect checkmarks on questions.
  • [Fixed bug] Certificate approval emails did not add entry in the email log.
  • [Fixed bug] When a page has required question going back to the previous page should still be allowed.

How To Allow Users to Select WatuPRO User Group on Ultimate Member’s Registration Form

Ultimate Member is one of the popular free WordPress plugins for custom registration pages. So we added some code to allow integrating with their forms.

This integration requires version of WatuPRO not older than 5.8.0.1

To make this work you need to create a drop-down selector field in your Ultimate Member form. Then follow these two steps:

  1. The meta_key of the field should be watupro_groups
  2. The Choices callback value should be exactly watupro_get_user_groups

That’s it, save your field and you are all set in Ultimate member.

3. Then in WatuPRO -> User Groups page make sure the following option is checked and save:

Now when someone registers through your Ultimate Member forms they will be able to choose user group from WatuPRO.