Author: Bernhard Jacobs, Medienzentrum der Philosophischen Fakultät der Universität Saarbrücken
german version created  4.2.1997; english version created  14.2.2001;  last update 21.2.2001
Download as zip-file  (Version 21.2.2001) for offline-reading
URL of the original:  http://www.phil.uni-sb.de/~jakobs/paedpsych/exercises/index.html

Setting tasks with JavaScript

german version )

aims | construction of new tasks | types of tasks | further hints | links | ©

Target group

Educational aims

Construction of New Tasks


go top

Types of tasks

Construction of tasks with a simple example:

Simple Multiple Choice (Example 1)

Who was the founder of psychoanalysis?

1.)Carl Gustav Jung
2.)Alfred Adler
3.)Sigmund Freud
4.)Wilhelm Reich

Code for this example:
<FORM>
<P><B>Who was the founder of psychoanalysis?</B></P>
<P>
1.)<INPUT type=radio name="mc" value="0">Carl Gustav Jung<BR>
2.)<INPUT type=radio name="mc" value="0">Alfred Adler<BR>
3.)<INPUT type=radio name="mc" value="1">Sigmund Freud<BR>
4.)<INPUT type=radio name="mc" value="0">Wilhelm Reich</P>
<P>
<INPUT type=hidden name=feedback value ="The founder of psychoanalysis is Sigmund Freud. Important terms of his teachings are for example: Ich, Es, Überich, Libido, Übertragung, Angstabwehr, Verdrängung and Widerstand.">
<!-- ---------------------------------------------------------------------------------------------------------------------------------------/!-->
<INPUT type=hidden name=bearbeitet value = "false">
<INPUT TYPE="BUTTON" NAME="Aufgabe" VALUE= "Aufgabe bestätigen" ONCLICK= "mccheck(this.form)" >
<INPUT TYPE="BUTTON" NAME="Lösung" VALUE= "Korrekte Lösung?" ONCLICK= "lmccheck(this.form)" >
</FORM></P>


value="0" means: This alternative is wrong.
value="1" means: This alternative is correct.
ATTENTION: Only one of these alternatives can be correct (therefore value=1 can only be chosen once)

With the help of Netscape Composer you can very easily construct these tasks as you might see in the following screen shot: Here the field "feedback" has been clicked on and the dialogue field "HTML-Tag" has been opened. In this dialogue field you can simply write the text for your feedback in between the quotation marks.


Simple multiple choice (Example 2)

(is only listed here simply to emphasise that you can test more than just simple facts with simple multiple choice: also this task is constructed in the shape of a table. This exercise has been taken from:
http://www2.gasou.edu/psychology/courses/dewey/ch05mcq.htm)
Negative reinforcement...
 
1.) increases the rate of behavior 
2.) involves following a behavior with a noxious or aversive stimulus 
3.) is a form of punishment 
4.) is also called DRL 
5.) requires an extinction period 


Simple multiple choice (Example 3)

Can you construct simple True/False-questions with "Simple Multiple Choice"?

1.)Yes
2.)No


go top

Multiple choice with several correct alternatives

Please tick all the chancellors of The Federal Republic of Germany (up to 3.2.1997)!

1) Stresemann
2) Heuss
3) Adenauer
4) Erhard
5) Carstens
6) Kiesinger
7) Barzel
8) Gerstenmaier
9) Brandt
10)Schmidt
11)Kohl
12)Lafontaine

Code for this example:
<P><FORM></P>

<P><B>Please tick all the chancellors of 
The Federal Republic of Germany (up to 3.2.1997)!</B></P>

<P>
1) <INPUT type=checkbox name="box" value="0">Stresemann<BR>
2) <INPUT type=checkbox name="box" value="0">Heus<BR>
3) <INPUT type=checkbox name="box" value="1">Adenauer<BR>
4) <INPUT type=checkbox name="box" value="1">Erhard<BR>
5) <INPUT type=checkbox name="box" value="0">Carstens<BR>
6) <INPUT type=checkbox name="box" value="1">Kiesinger<BR>
7) <INPUT type=checkbox name="box" value="0">Barzel<BR>
8) <INPUT type=checkbox name="box" value="0">Gerstenmaier<BR>
9) <INPUT type=checkbox name="box" value="1">Brandt<BR>
10)<INPUT type=checkbox name="box" value="1">Schmidt<BR>
11)<INPUT type=checkbox name="box" value="1">Kohl<BR>
12)<INPUT type=checkbox name="box" value="0">Lafontaine</P>

<P><INPUT type=hidden name=feedback value ="The chancellors of Germany are (up to 3.2. 1997):<p>Adenauer<br>Erhard<br>Kiesinger<br>Brandt<br>Schmidt<br>Kohl">
<!-- ---------------------------------------------------------------------------------------------------------------------------------------/!-->
<INPUT type=hidden name=bearbeitet value = "false">
<INPUT TYPE="BUTTON" NAME="Aufgabe" VALUE= "confirm answer" ONCLICK= "boxcheck(this.form)" >
<INPUT TYPE="BUTTON" NAME="Lösung" VALUE= "solution?" ONCLICK= "lboxcheck(this.form)" >
</FORM></P>

The necessary information is basically the same as in simple multiple choice tasks.The only difference is that there can be several correct alternatives (that means: value="1" can be used several times)
Matching tasks with multiple choice with several correct answers
Matching tasks have to be understood as compact multiple choice tasks because every single matching task can be subdivided into several simple multiple choice tasks. It is possible here to represent the matching tasks with multiple choice with several correct alternatives as the following example shows:

What person stands for which psychological movement?
 
Behaviourism Psychoanalysis Cognitivism
Freud
 1.)
 2.)
 3.)
Skinner
 4.)
 5.)
 6.)
Piaget
 7.)
 8.)
 9.)
Watson
10.)
11.)
12.)

The alternatives have to be numbered so that the automatical feedback can be given correctly.


go top

Short answer tasks for text [and whole numbers] (Example 1)

Who was the founder of psychoanalysis?


Code for this example:
<FORM method=post>
<P><B>Who was the founder of psychoanalysis?</B></P>

<P><INPUT type=text name="antwort" size=40 value="" >
<INPUT type=hidden name=muster1 value ="Sigmund Freud">
<INPUT type=hidden name=muster2 value ="Freud">
<INPUT type=hidden name=muster3 value ="">
<INPUT type=hidden name=vergleich value = "="><BR>
<INPUT type=hidden name=feedback value ="The founder of psychoanalysis is Sigmund Freud. Important terms of his teachings are for example: Ich, Es, Überich, Libido, Übertragung, Angstabwehr, Verdrängung and Widerstand.">
<!-- ------------------------------------------------------/-->
<INPUT type=hidden name=bearbeitet value = "false">
<INPUT TYPE="BUTTON" NAME="Aufgabe" VALUE= "confirm answer" ONCLICK= "shortcheck (this.form)" >
<INPUT TYPE="BUTTON" NAME="Lösung" VALUE= "solution?" ONCLICK= "lshortcheck(this.form)" >
</FORM></P>

All in all there are three examplatory answers (patterns [in German muster]) with whom the learner's answer can be compared.
muster1
- corresponds with the best possible answer and is given as the correct solution
- should at any rate contain a certain value
muster2 and muster3
- are alternatively correct solutions
- do not have to contain a certain value (e.g. muster3 in this case)
comparison
= means: exact correspondence between answer and examplary answer
!= means: exemplary answer is contained in the answer (capital letters are being ignored)
 
An answer is correct if it corresponds (according to the type of comparison) with one of the given patterns. An exemplatory comparison with "" will be ignored because this would make every answer appear to be correct.

go top

Short Answer test for text [and whole numbers]  (Example 2)

How do you call the theoretical position within psychology which only claims observable behaviour to be relevant for an analysis and does not refer to interactions between stimulus and response?


In this question the exemplatory comparison "pattern contained in answer" has been used.
Many answers can be given correct feedback which would otherwise be noted as incorrect as a result of wrong spelling or correct extensions.  <input type=hidden name=vergleich value ="!="> in correspondence with muster3="behavi" has the effect that for example all the following answers will be marked as correct:  behavior, behaviorism, behaviourism, Behaviorism.

Short Answer Test especially for numbers

1/2 = 
correct would be then for example: 0.5; .5; 0,50000

Signification of the modifieable input variables (with an example)

<input type=hidden name=muster value ="0.5"> defines 0.5 as correct answer with which the student's answer is being compared; this answer is also defined as the only correct pattern for the solution
<input type=hidden name=ergebnisart value ="Zahl"> defines that the student's answer will be interpreted as number and not as an expression. ergebnisart value ="Ausdruck" also accepts arithmetical expressions as answers, e.g. 0.25*2. If the answer should be valued as number and/or expression, the the code should be: value="Ausdruck".
<input type=hidden name=toleranz value ="0"> marks the student's answer only as correct if it corresponds exactly with the pattern. If you have a tolerance of value = "0.01", then the student's  answer will be marked correct if it does not vary more than 0.01 from the correct result (= the value of the input variable with the name muster. You can use an abritrary number of tolerance values.

Furthermore only the input variable feedback will have to be changed as in example 1.
<input type=hidden name=feedback value ="1/2 = 0.5" >

The construction of these special short answer tasks is explained (in German) on the following website:
Short - Answer (Zahl) - Aufgabe zur Überprüfung von Zahlen.

Essay test

How can escape learning be converted into avoidance learning?

Code for this example:
<P><FORM method=post>
<B>How can escape learning be converted into avoidance learning?  </B></P>
<P><TEXTAREA name="antwort" rows=10 cols=50 wrap=virtual></TEXTAREA></P>
<P><INPUT type=hidden name=feedback value="<b>by giving the animal a warning signal </b><p> If the animal receives a warning before an aversive stimulus, the animal has a chance to avoid the stimulus by performing some behavior, such as running away. This is avoidance conditioning or avoidance learning.">
<!-- ---------------------------------------------------------------------------------------------------------------------------------------/!-->
<INPUT type=hidden name=bearbeitet value = "false">
<INPUT TYPE="BUTTON" NAME="Aufgabe" VALUE= "confirm answer" ONCLICK= "essay (this.form)" >
<INPUT TYPE="BUTTON" NAME="Lösung" VALUE= "solution?" ONCLICK= "lessay(this.form)" >
</FORM>

In this case the only possibility left is to define the exemplatory answer as value of the variable feedback.
The exercise above has been slightly modified and was taken from:
http://www2.gasou.edu/psychology/courses/dewey/ch05mcq.htm)

go top

Clickable map

These exercises are not so easy to construct. If you have little time you should not even start with it, because you will have to put quite a lot of effort in it.  (This exercise only functions locally if the file dreieck.gif lies in the same directory as this file!)

Please click on the hypotenuse!



Code for this example
<P>
<FORM>
<B>Please click on the hypotenuse!</B> </P><P>
 <IMG USEMAP="#dreieck" SRC="dreieck.gif" HEIGHT=132 WIDTH=204></P><P>
 <MAP NAME="dreieck">
   <AREA Shape="poly" COORDS="14,21 28,21 188,108 188,113 14,21" href= "javascript:meldung('1','You have clicked on the hypotenuse')"  onMouseOver="window.status='Please click with the mouse on the correct part!'; return true"; onMouseOut="window.status=''; return true" >
   <AREA Shape="rect" COORDS="181,14 188,101" href= "javascript:meldung('0','You have clicked on a leg')" onMouseOver="window.status='Please click with the mouse on the correct part!'; return true"; onMouseOut="window.status=''; return true">
   <AREA Shape="rect" COORDS="22,14 187,20" href= "javascript:meldung('0','You have clicked on a leg')" onMouseOver="window.status='Please click with the mouse on the correct part!'; return true"; onMouseOut="window.status=''; return true">
 </MAP> </P><P>
 <!-----------------------------------------------------------------------------------------------------------------------------------------/!-->
 <INPUT type=hidden name=bearbeitet value = "false"> 
 <INPUT type=hidden name=feedback value ="The side y is the hypotenuse.<p> In a right-angled triangle the hypotenuse is the side which lies opposite the right angle. This is in this case the side y. The hypotenuse is the longest side in a triangle.<p> The two other sides which lie in a right angle are the legs.">
 <INPUT TYPE="BUTTON" NAME="Lösung" VALUE= "more explanation" ONCLICK= "graphfeedback(this.form)" >
</FORM></P>

First of all you will need a www-compatible graphic (gif, jpg). Then the clickable parts of it should be defined with Area Shape and coordinates which can easily done with the appropriate program (e.g.: Getting Utilities for Creating Clickable Maps). Then the graphic will have to be integrated into the www as you can see above (maybe you will have to modify it slightly). If you have several exercises of this shape the names of the maps should be different from each other.

Adaptions of the lines starting with <AREA...:

  • Shape and COORDS according to the values of the defined areas
  • meldung ('first value=correct/wrong','second value= direct feedback'..), in the example

  • meldung ('1','You have clicked on the hypotenuse') = correct and special  feedback
    meldung ('0','You have clicked on a leg') = false and special feedback
    You can as well give further explanations in the hidden variable feedback.
    The direct feedback should be relatively short and should not contain an html-code.
    The feedback in the variable feedback can contain an html-code.

    Graphical exercises need a lot of effort and you will have to try out a lot of things. The example above which only serves as a means of demonstration could have been constructed much easier by using simple multiple choice. So make sure that you really need a graphic image for your exercise. The clicking on certain positions in a graphic image is only useful if it is hard to describe the same thing in words.


    go top

    Further hints and recommendations

    Help with answers

    Exercise hints with links Addition of further forms

    with exercise hints:

    References to JavaScript


    go top

    Some critical remarks

    Hints to further interactive exercises

    Educational references

    Assessment, a very substantial text dealing with several aspects of assessment, beneath it a discussion of several exercise types, University of Technology, Sydney
    Guidelines for Multiple Choice Question Creation (short and in brief)
    How to write tests
    HOW TO WRITE BETTER TESTS
    Multiple Choice Formats
    Writing Multiple Choice Items which Require Comprehension  by Russ Dewey
    Selection Test Items (comprehensive presentation with tips for the construction of selection tests))
    Designing MCQ's (information supplied by: Helen Pownall )
    Copyright
    © Bernhard Jacobs, 2001
    free software only for noncommercial educational usage

    go top
    german version created 4.2. 1997; english version created 14.2.2001; last update 21.2.2001;
    Bernhard Jacobs, b.jacobs@mx.uni-saarland.de  | Translation: Stefanie Göttel