From WeBWorK
Revision as of 15:19, 14 May 2010 by Aubreyja (Talk | contribs)
Jump to: navigation, search

Answer Format Help Links

This PG code shows how to add answer format help links to problems.

Problem Techniques Index

PG problem file Explanation

Initialization: We need to include the macros file


$answer = ImplicitPlane("x+y=2");

Setup: By declaring there are only two variables, ImplicitPlane will address objects as lines rather than planes.

Enter an equation for a line through the points
\( (0,2) \) and \( (2,0) \).
\{ ans_rule(20) \}
\{ AnswerFormatHelp("equations") \}

Main Text: We use AnswerFormatHelp("equations") to generate a link to an html help file with link text help (equations). The html help files are specifically designed to help students figure out the correct syntax for their answer, as well as common mistakes to avoid. We recommend placing a help link immediately after each answer blank in a problem, especially if there are different types of answers. Currently, help files are available for

  • angles
  • decimals
  • exponents
  • formulas
  • fractions
  • inequalities
  • intervals
  • logarithms
  • limits
  • numbers
  • points
  • syntax
  • units
  • vectors

It is possible to change the link text to help entering equations by including a second argument to the routine:

\{ AnswerFormatHelp("equations","help entering equations") \}

$showPartialCorrectAnswers = 1;

ANS( $answer->cmp() );


Answer Evaluation:

Problem Techniques Index

follow us