Forum archive 2000-2006

Robert (Rochester ugrad) - Checkbox Multiple Choice example

Robert (Rochester ugrad) - Checkbox Multiple Choice example

by Arnold Pizer -
Number of replies: 0
inactiveTopicCheckbox Multiple Choice example topic started 8/7/2000; 3:52:16 PM
last post 8/7/2000; 3:52:16 PM
userRobert (Rochester ugrad) - Checkbox Multiple Choice example  blueArrow
8/7/2000; 3:52:16 PM (reads: 3381, responses: 0)

'Checkbox Multiple Choice' basic example

(for more advanced comments on Multiple Choice questions see Multiple.pm) To obtain the problem:

Unable to obtain and render setMAAtutorial/checkboxexample.pg from the library rochesterLibrary

Could not find problem setMAAtutorial/checkboxexample.pg in library rochesterLibrary


[Macro error: Could not find problem setMAAtutorial/checkboxexample.pg in library rochesterLibrary]

 


  1. Since this is a checkbox multiple choice question, we do not want to tell the student which questions are correct and which are wrong because it would lead to constant guessing. To accomplish this we set the following flag $showPartialCorrectAnswers to 0.
  2. Saying that $cmc "contains" the checkbox multiple choice object is not quite true. Actually $cmc is a scalar variable which contains a pointer to the checkbox multiple choice object, but you can think of the checkbox multiple choice object as being shoe horned into the variable $cmc. You need to remember that $cmc contains (a pointer to) an object, and not ordinary data such as a number or string.

    Some people use the convention $o_cmc to remind them that the variable contains an object.

    An object contains both data (in this case the list of questions and answers) and subroutines (called methods) for manipulating that data.

    The construction $cmc->qa(..one question and a list of the answers..) Asks the object $cmc to store the question and answers given in the argument in its private data.

    The construction $cmc->extra(..list of incorrect answers) Asks the object $cmc to store several incorrect answers as possible correct answers for the student to choose from. $out = $ml->print_q() asks the object to store a string of the formatted question in the variable $out. $out = $ml->print_a() asks the object to store a string of the formatted answers in the variable $out.

 

<| Post or View Comments |>