Category Archives: CalendarScripts

User Info Shortcodes from WatuPRO Version 4.1.1

From WatuPRO version 4.1.1 and above you no longer need additional plugins to display data from user profile of the logged in user (if you want to display data for another user read the section “Passing User ID” at the bottom. This is especially important if you will use the shortcodes in certificates.) WatuPRO defines own shortcodes that are super easy to use.

If you are using the light version – the free Watu plugin, the shortcode [watu-userinfo] works exactly the same way.

Here is what you need:

[watupro-userinfo profile_field] where “profile field” is the field from the user profile you want to display. For example:

[watupro-userinfo display_name] will display the user display name

[watupro-userinfo first_name] and [watupro-userinfo last_name] will display respectively the first and last name and so on. The full list of default user fields is here:

ID
user_login
user_pass
user_nicename
user_email
user_url
user_registered
display_name
first_name
last_name

But this is not all. You can also display ANY value from the user_meta table as long as you know the key, even if it’s created by another plugin. For example [watupro-userinfo namaste_points] will display the points collected in Namaste! LMS and so on.
One great plugin for managing user_meta is Advanced Custom Fields.

Showing Defaults (and handling non-logged in users)

You can prepare a default value to be shown if the user is not logged in, or simply if the value is empty. You just need to pass the default as second argument to the shortcode. Here is example:

Hello [watupro-userinfo first_name "Friend"]!

Passing User ID

This feature requires min. WatuPRO version 4.9.1.4.

By default this shortcode displays data for the currently logged in user. However you can pass user ID by adding “user_id” attribute after the other attributes. The user_id attribute can contain fixed number  (the ID of the user). In certificates it can contain “certificate” in which case the user ID will be figured out from the certificate owner (please don’t use “certificate” outside of the certificate contents, it will not work).

Examples:

[watupro-userinfo first_name "Friend" user_id="5"]
[watupro-userinfo user_url user_id="certificate"]

The user_id attribute can contain “quiz-taker” in the page that lets you configure email for manually edited results (Intelligence module). Example:

[watupro-userinfo first_name "Friend" user_id="quiz-taker"]

That’s it. Use the new shortcodes in the final screen, in certificates, in the email contents, anywhere. You can use them even in areas outside of WatuPRO – for example in post or pages, in the sidebar, etc.

WatuPRO 4.1: Question Hints, Multiuser Management, PDF Certificates, And More

Here are the new and improved features in WatuPRO 4.1:

  1. New powerful feature – question hints. They are optional, you can enable multiple hints for every question, and specify how many hints the user is allowed to see total in the quiz and per question.
  2. New detailed report showing a list of all answers on a question (Reporting module).
  3. You can now add a custom “Start” button on each quiz which will hide the quiz content until the button is clicked (works both on timed and non-timed quizzes). More info here.
  4. Improved interface on “Copy questions” page lets you see them grouped by category.
  5. Option to cleanup all taking data on specific exam.
  6. Added visible Paypal error log for seeing payment errors (Intelligence module).
  7. Multiuser management is now available in the Intelligence module (there is a link on the WatuPRO Settings page, right under Role management).
  8. PDF certificates can be generated through DocRaptor.
  9. Custom roles can also be selected to manage exams.
  10. The text “Question 1 of X” is not shown when the quiz has only 1 question.
  11. Added a second import method to solve problems that some customers have with importing questions with foreign characters.
  12. You can choose to add the new question in the beginning instead of at the end of the quiz.
  13. Improved performance and fixed small bug with backslashes on “Stats per questions” page
    (Reporting module).
  14. Improved the way “Fill the gaps” question look when submitted (Intelligence module).
  15. Added link to view / print certificate from the “users who earned it” page.
  16. Automatically redirecting non logged in users to login page when trying to view certificates.
  17. Added required question warning when quiz is paginated one page per question category.
  18. Fixed bug with category grades showing in the “re-submitting is allowed only if…” section.
  19. Fixed bug with importing multiple categories when you import XLS file with new question categories.

The upgrade is sent to all eligible customers.

Create Start Button in WatuPRO Using The {{{button}}} Tag

Since version 4.0.8 WatuPRO supports starting the quiz with a start buttons, similar to how other plugins do it. We don’t do this by default because it’s not suitable for all cases. But it’s super easy to configure, and this page will show you how.

Please do not use this together with “Ask for user contact details” setting. When you require user contact details, the button is created automatically when appropriate.

The start button tag should be placed into the quiz description box, and it will render a HTML button tag. More about this later.

Timed and Non-Timed Quizzes

First, note the difference between timed quizzes (quizzes with time-limit) and non-timed quizzes (quizzes without time limed). If you place the start button in a timed quiz, the start button will appear in the place of our default “Click here to start exam” link. If you place the start button in a non-timed quiz, the button will appear where you have placed it in the description.

See example timed quiz and example non-timed quiz.

Configure the button

By default placing the {{{button}}} tag will generate a HTML button tag with default style and text “Start Exam”. But you can easily customize this:

{{{button "Start My Quiz Now"}}} – just add text in quotes after the button word (don’t forget the space) and WatuPRO will generate the button with that text.

{{{button "Start My Quiz Now" "color:green;background-color:black;padding:20px;"}}} – add any CSS as third argument (note the space and the quotes) and WatuPRO will apply your CSS to the button.

Easy!