The new multiple choice questions can be inserted into any page
using the PHP function calls below. See the bottom of this page for the rendered result of the sample exercise.
The following HTML produces a multiple choice exercise.
This HTML is produced by PHP functions so that any future developments
will take effect across all old content.
Note: Gap fill exercises and multiple choice exercise, submit back to the same page
so that the DB updates are handled within the same page's PHP code.
Multiple Choice HTML produced by PHP functions
Use these PHP functions to generate multiple choice questions.
The form start and end should also work if they contain a mixture
of question types. Eg: The same form can contain a mixture of gap fills and multiple choice questions
This function requires an array defining the multiple choice question.
This array data can also be stored on the questions database.
Example Multiple Choice Question array
Multiple Choice Which one of these living creatures is a mammal?
Produces this HTML - ONE MULTIPLE CHOICE QUESTION
<p><b>Multiple Choice </b> Which one of these living creatures is a mammal?</p>
<input type="radio" name="which-is-mammal" value="a"/>crocodile
<input type="radio" name="which-is-mammal" value="b"/>ant
<input type="radio" name="which-is-mammal" value="c"/>whale
<input type="radio" name="which-is-mammal" value="d"/>penguin
Insert a gap fill question into the page.
Gap fill questions will be given a default sequence number,
but you may sequence the gapfill question yourself so that when
the sequence is broken by inserting more questions, the submitted results still
remain without a broken sequence.