Using WatuPRO for Polls (New Shortcodes From Reporting Module)

From version 4.3.7 the quiz plugin WatuPRO supports “poll-like” shortcodes through the Reporting module. The shortcodes render a simple bar chart showing how all users have answered a given question. Here’s an example from our open demo quiz: (note that it pulls random 3 of 5 questions so the frog question will not always be loaded) frog-question In this example the chart is shown immediately after answering the quiz. It can however be used everywhere, including in some custom made pages. The shortcode can show either how each answer distributes (for “single choice” and “multiplce choice” questions), or the distribution of correct / incorrect answers (for all other question types). You can get the shortcode for each question from add / edit question page: frog-question-edit Clicking on “How to configure” will take you to the help page which explains how you can change the colors or show “correct/incorrect” chart instead of distribution per answer. Note that this functionality requires the Reporting module.

An SQL Query

You like this so much that you want to add it in the optional “answer explanation” are of all your existing thousands of questions? You can do it with an SQL query:

UPDATE wp_watupro_question SET explain_answer = CONCAT(explain_answer, '<br>[', 'watupror-poll question_id="', ID, '"]');

Note that you may need to change “wp_watupro_question” depending on how the table prefix is named in your installation.