|Multiple Choice example||topic started 7/31/2000; 2:08:10 PM
last post 7/31/2000; 2:08:10 PM
|Robert (Rochester ugrad) - Multiple Choice example
7/31/2000; 2:08:10 PM (reads: 3158, responses: 0)
(1 pt) rochesterLibrary/setMAAtutorial/multiplechoiceexample.pg
DOCUMENT(); # This should be the first executable line in the problem.
Create a multiple choice question using the new_multiple_choice call.
Use qa() to enter the question and the correct answer. Any duplicates will be eliminated.
After calling qa you can use extra() to add in extra incorrect answers that (along with the
correct answer) will be made into a random list of answers shown to the student.
If you want certain answers to be at the end of the list instead of having them be randomized
you can use makeLast to add specific answers to the end of the list of answers or to force
already existing answers to be moved to the end of the list. This is usually done for
'None of the above', or 'All of the above' type answers. Note that if 'None of the above'
is the correct answer then you must put it in qa() and then also makeLast() but the duplicate
will be eliminated. If more than one extra answer is added via makeLast, they are added
in the same order they are given in makeLast.
Now you would start your problem with a C<BEGIN_TEXT> tag and print the questions
and answers with the print_q() and print_a() commands. Within the C<BEGIN_TEXT/END_TEXT block>,
all calls to objects must be enclosed in ( ).
(The $PAR start a new paragraph by printing a blank line).
Now all that''s left is sending the students answers to the answer evaluator
along with the correct answers so that the students answers can be checked and
a score can be given. This is done using C<ANS>, an answer evaluator and the