wbExam – A WordPress plugin
Description for v0.2.3
wbExam is a plugin for WordPress that gives you the ability to add an (test-)exam to your site, as seen in these examples. It was written to help people practice for their LPI exams, but it is flexible enough to accomodate almost any kind of exam.
Features
- As many questions as you like
- Three types of questions
- Open
- Multiple Choice – select one
- Multiple Choice – select many
- Customizable
- Anti-Cheating support
- Spoilers On/Off – New in v0.2.1
Downloads
The latest version is 0.2.3.
You can download it here
Please take a look at the CHANGELOG for upgrade instructions.
Installation
Installation of wbExam is a breeze:
- Download and unzip the latest release.
- Copy both files from the
plugins-directory to your/wp-content/pluginsdirectory - Activate wbExam in your Adminstration->Plugins panel
Using wbExam
Using wbExam is easy, just follow the steps below to get you started in no time:
- Create a PageTemplate that uses the
<?php wb_exam() ?>tag - Create a page using your new template
- Add a Custom Key to your page called
question_filewith as value the path to a question_file. This path can be an absolute path from your server’s /-dir, or it can be relative from your /wp-content/plugins dir.e.g. ../myquestions.php or /var/www/myotherquestions.php
Creating a question_file
Copy plugins/wb_exam_questions.php to a new file and start hacking. The provided example is documented fairly well, so that shouldn’t be a problem.
At the bottom of the question_file you can configure all the texts used by wbExam as well as the score required to ‘Pass’ your exam. Setting this value to 0 will make everybody pass your test.
Hiding the running score and the Correct/Incorrect messages
As of version 0.2.1 you can turn off the Spoiler-Block from your question_file. Turning it off here also disables the score from showing up in your page-source, whereas the previous method would only hide it from the screen. To turn off the Spoiler-Block just specify:
$wb_hide_spoiler = 'something';
somewhere in your question_file between the other options. Make sure you don’t put it in between your questions!
Customizing the Spoiler-Block
Customizing the Spoiler-Block is easy: The text can be configured per test in your question_file.
The display-style can be altered by specifying the following class in your
:
.wb_exam_spoiler {
attribute: value;
}
If you don’t know CSS, don’t worry. It will use your default theme-style for normal and small-text if you don’t specify anything.
Warning
wbExam should not be used for taking real exams. Although Anti-Cheating support has been included as of version 0.2 there is (still) no way to save test-results.