## DESCRIPTION ## Many multiple choice template ## ENDDESCRIPTION ## KEYWORDS('multiple choice', 'template') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('01/30/2011') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGchoicemacros.pl", "PGgraders.pl", ); TEXT(beginproblem()); ########################### # Setup Context("Numeric"); # Create and use pop up lists $tf = new_select_list(); $tf->rf_print_q(~~&pop_up_list_print_q); # Choices presented to students $tf->ra_pop_up_list( [ "No answer" => "?", "True" => "True", "False" => "False", ]); # Questions and answers $tf -> qa ( "All continuous functions are differentiable.", "False", "All differentiable functions are continuous.", "True", "All polynomials are differentiable.", "True", "All functions with positive derivatives are increasing.", "True", "All rational functions are continuous.", "False", "All exponential functions are differentiable.", "True", "All exponential functions are rational functions.", "False", ); # How many questions to use $tf->choose(6); ########################### # Main text Context()->texStrings; BEGIN_TEXT Are the following statements true or false? $BR \{ $tf -> print_q() \} END_TEXT Context()->normalStrings; ############################ # Answer evaluation $showPartialCorrectAnswers = 0; # # Incremental grader # install_problem_grader(~~&custom_problem_grader_fluid); $ENV{'grader_numright'} = [2,4,6]; $ENV{'grader_scores'} = [0.3,0.6,1]; $ENV{'grader_message'} = "You can earn " . "30% partial credit for 2 - 3 correct answers, and " . "60% partial credit for 4 - 5 correct answers."; # # All or nothing grader # # install_problem_grader(~~&std_problem_grader); ANS( str_cmp( $tf->ra_correct_ans() ) ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} You could put an explanation here. END_SOLUTION Context()->normalStrings; COMMENT("MathObject version."); ENDDOCUMENT();