Overview

System requirements

Frontend

  • Modern html5 browser
  • Cookies enabled
  • Javascript enabled

Backend / Server

  • Client with modern browser, javascript and cookies
  • MySQL database (mandantory for wordpress also)
  • PHP 5.4 or newer
  • WordPress 4.5.x or newer (older versions maybe also ok but we offer no support for them)

Features

  • Three item types: Quiz, Survey and Poll
  • Five question types: Single choice, multiple choice, order, cloze and free text.
  • Template engine and templates for all items. Template overloading and fallback for missing elements.
  • Randomizing questions as option per item.
  • Detailed evaluation and statistics with multiple export options.
  • Detailed quiz review for end user after completing a quiz.
  • Database time control for quizzes with time limit.
  • Internal session management to manage page reloads on all items.
  • Full visual WordPress editor for questions and answers.
  • Questions can be assigned to categories.
  • Multiple filter for questions on edit quiz pages.
  • Save deleting of quiz items and questions: SQuiz will check if questions are in use or quizzes are part of any evaluation or statistic.

The difference between quiz, survey and poll can be found mainly in the evaluation. Only quiz evaluation has the possibility to drill down to single user participation. Poll and survey  participations are only visible as aggregated data.

Another restriction with polls is that you can have only one choice question. Additionally a hashed ip is saved in an internal session for participation so that a visitor only can vote once a day. When reloading the page the result will shown up.

Basically SQuiz starts an internal session based on a client cookie if a visitor starts a quiz, survey or poll. So user must accept cookies to participate, otherwise quizzes wont work. The cookie only contains a single number – this is the id to the internal session. There is no security issue, neither for the visitors nor for the system. The session will be deleted if it has expired (one day) or if the cookie on the client is missing.

All this is necessary to save a visitors state. If he reloads the page while playing a quiz the quiz will continue exactly where it was before reloading. So he don’t lost answered questions when he unintentionally reloads the page or the browser gets stuck at any point. In case of polls this should avoid multiple participations by one visitor.

Customizing basic layout and styles is easy. You only have to override parts of a template with your own template and add a new stylesheet file. Please read more about Templates and Template Overloadiung.

Building Polls with SQuiz3

Start with New Squiz Item from the SQuiz menu.

2016-08-17 09_49_16-SQuiz Menu

The form will open and you must input the basic data. That is:

  1. a title
  2. item type and template
  3. There is only one nav button necessary: the Start Button. You should label it with ‘vote’ or something like that. ( bottom of the page )
  4. decide if you want to randomize questions or have a time limit.

Review at the end, passing score, randomize questions and time limit are obviously not suitable. Leave them off or 0.

After that you have to save the poll otherwise you cannot add the question.

Polls could have only ONE question. This question MUST be of type choice otherwise you won’t see anything.

You should have already created a question for your poll , otherwise you must do that now. You can use the same questions as for the quizzes and surveys. User votes will be aggregated in evaluation.

Add Questions

see Build Quizzes

Ending

Polls should have a overview about all votes at the end. You can use the placeholder

  • {poll participations} : Number of counted votes
  • {poll result} : The result diagramm

all others are not suitable.

2016-08-17 10_58_36-Edit SQuiz Item Poll ending

If you leave this empty, nothing will be displayed after voting.

Building Surveys with SQuiz3

Start with New Squiz Item from the SQuiz menu.

2016-08-17 09_49_16-SQuiz Menu

The form will open and you must input the basic data. That is:

  1. a title
  2. item type and template
  3. button labels ( bottom of the page )
  4. decide if you want to randomize questions or have a time limit.

Review at the and and a passing score is obviously not suitable. I don’t know if a time limit makes sense because the survey will end automatically if time has elapsed.

After that you have to save the survey otherwise you cannot add questions.

You should have already created some questions for your survey , otherwise you must do that now. You can use the same questions as for the quizzes and polls. Difference will be in evaluation. No answer will be considered as correct, every answer will be counted and listed aggregated in the evaluation.

2016-08-17 10_50_16-Statistics Survey Aggregation

Adding Questions

Surveys are different from quizzes because there are no correct answers. To get Questions were the user can choose more than one answer you have to mark all possible answers as correct.

To get a single choice question (such as true / false) leave all correct checkboxes unchecked – the user can only select one answer.

Further information about adding answers here.

Ending

Add some text to say goodbye to your visitor or let him know some statistics. Use the placeholder as described on top of this box.

2016-08-17 10_58_36-Edit SQuiz Item Quiz ending

This is an example for a quiz ending but you can use the placeholders similar to that.

Template Overloading

The frontend is driven by the template engine Twig. Examples and docs can be found here: http://twig.sensiolabs.org/documentation.
All templates can be found in \[plugin_dir]\templates, every template group in his own directory.

If you want to create your own, create for a new folder (name without umlauts, white spaces and special characters, only [a-z 0-9 -_]).
From now on you can access this new template in the SQuiz edit screen (right sidebar Templates) and you can assign it to a quiz.
You must not but you can copy and customize template parts from the standard, poll or survey folder.

Additionally you must create a style sheet file in \[plugin_dir]\assets\css which must be named like this:

squiz_frontend_[template directory name].css

As you can see, that the template directory name must follow the rules for valid unix filenames.

This stylesheet will be loaded after the standard stylesheet, so that you can overwrite the standard styles as you like. Btw. the standard frontend stylesheet will be loaded even if you use another template for a certain quiz. Missing template files (in your custom template folder) will be searched in standard so that is a kind of overloading mechanism. You can overload or customize some parts of a template and you can skip other parts if they are okay for you.

With version 3.0.0 stylesheet overloading affects all quizzes, polls or surveys grouped on one page together. That means if you have a page with two items (even if they are from different type) the overloaded stylesheet will affect both.

To avoid this you have to use an unique id or class for the new template and group all styles to this class or id. Best would be to set a class for the main container and use this in your stylesheet

<div class="squiz_container my_new_template" id="squiz_{{ item.id }}">
.my_new_template.squiz_container {
   width: 100%;
   position: relative;
   height: auto;
   overflow: hidden;
   border:3px solid #a35;
}