# References: # http://webworkgoehle.blogspot.com/2012/09/essay-answers-in-webwork.html ########################## # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "parserPopUp.pl", "PGessaymacros.pl", "PGcourse.pl", ); TEXT(beginproblem()); $showPartialCorrectAnswers = 0; install_problem_grader(~~&std_problem_grader); ########################## # Setup Context("Numeric"); $popup = PopUp( [ "Choose", "True", "False" ], # choices "False" # corect answer ); $a = random(2,5,1); $f1 = Compute("ln(x (x-$a))"); $f2 = Compute("ln(x) + ln(x-$a)"); ########################## # Main text Context()->texStrings; BEGIN_TEXT Answer the following true / false question and then explain your answer. Your answers will be read and graded manually at a later time. $BR $BR \{ $popup->menu() \} For all real numbers \( x \), \( $f1 = $f2 \). $BR $BR Please explain your reasoning in the answer box below. $BR \{ essay_box() \} END_TEXT Context()->normalStrings; ########################## # Answer evaluation ANS( $popup->cmp() ); ANS( essay_cmp() ); COMMENT('MathObject version'); ENDDOCUMENT();