Learning Place home
Online learning | Communication | Communities | Curriculum Exchange
Home | About | Help | Site map

Immediate feedback – Multiple answer

Use

  • When asking a question with more than one answer.

Example

  1. What three significant events occurred between 1914 and 1938?



  2. Tick the countries that were Japanese territory before 1931.

Resources

These are the additional resources required for this exercise.

Source: Questions

This section describes the source code for how you would write the questions in HTML.

Example: <input type="checkbox" name="q1" value="1" id="q1" onClick="checkCheck(1, this.name, this.value, this.form)">

Your input tags need to include the following attributes:

  • type="checkbox"
  • name="qX" – where X is the question number
  • value="Y" – where Y is the option number
  • id="qX" – where X is the question number
  • onClick="checkCheck(G, this.name, this.value, this.form)" – where G is the group number (appears as question on screen)

Consider each multiple answer question as a 'Group' and each available response as an individual question. Therefore

  • Group 1 has four questions and
  • Group 2 has 10 questions

which could either be correct or incorrect.

Questions must always be numbered sequentially starting from 1 and should avoid numbering such as q1a, q1b, etc. unless you are prepared to make major adjustments to the Javascript yourself. This does not mean that a question can't be seen as 'question 1a' to the user. There is no double-up of question numbers.

The number of options relates to the group. In this example there are two groups: Group 1 contains questions 1–4 and has 4 options; Group 2 contains questions 5–14 and has 10 options. Options must always be numbered sequentially starting from 1 for each group.

Question# 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Group 1 – Option# 1 2 3 4                    
Group 2 – Option#         1 2 3 4 5 6 7 8 9 10

The option label should be attached to its input via the label tag. The label tag includes the attribute for="qX" – the same value as the id of the input.

Example: <input type="checkbox" name="q1" value="1" id="q1" onClick="checkCheck(1, this.name, this.value, this.form)"> <label for="q1">The Washington Conference</label>

There is always one image per question. Images must be named according to their question. For example, name="iq1"i means image, q1 is the question it's attached to. Images should start as blank.gif with an empty alt. The Javascript will change the image as appropriate.

Example: <img src="/learningplace/images/courses/interactive/blank.gif" width="18" height="18" name="iq1" alt="">

The Reset button must always include the following attributes:

  • type="reset"
  • name="Reset"
  • value="Reset"
  • onclick="startAgain(Z)" – where Z is the number of questions/images

Example: <input type="reset" name="Reset" value="Reset" onClick="startAgain(14)">

Below is the source code for the example.

Source: Javascript

It's prefereable to link to a separate Javascript file although, for pages individually loaded into Blackboard, including the script within the HTML is acceptable.

There are three parts of the script that need to be modified:

  • Pre-loading of response image placeholders
  • Setting the question variables
  • Setting the response image variable paths

The response image placeholders must always start as blank.gif. Only change the value for the number of images – for (var i=1; i<=numberofimages; i++) {, and adjust the path to blank.gif – eval("iq"+i+".src = \"blank.gif\"");.

Set a new variable for each question as an Array. The variables must appear as:

  • var vqX = new Array("start",true,false,true,true); – where X is the group number and true/false relates to the option number as correct or incorrect.

In the example above: Group 1 has four options and options 1, 3 and 4 are all correct; Group 2 has 10 options and options 2, 3, 5, 6 and 10 are all correct.

Set the paths of the response image variables as needed. Do not remove or rename these variables.

Below is the source code for the Javascript of the above example.

^ Top of page

Copyright | Disclaimer | Acceptable use | Privacy | Internet linking | Access keys | image of flagsOther languages

© The State of Queensland (Department of Education and Training) 2009.

Queensland Government