Difference between revisions of "AnswerFormatHelp"
Line 93: | Line 93: | ||
<li>vectors</li> |
<li>vectors</li> |
||
</ul> |
</ul> |
||
− | It is possible to change the link text by including a second argument to the routine: |
+ | It is possible to change the link text to <code>help entering equations</code> by including a second argument to the routine: |
<pre> |
<pre> |
||
− | \{ AnswerFormatHelp(" |
+ | \{ AnswerFormatHelp("equations","help entering equations") \} |
</pre> |
</pre> |
||
</p> |
</p> |
Revision as of 23:52, 22 April 2010
Answer Format Help Links
This PG code shows how to add answer format help links to problems.
PG problem file | Explanation |
---|---|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "AnswerFormatHelp.pl", "parserImplicitPlane.pl", ); TEXT(beginproblem()); |
Initialization:
We need to include the macros file |
Context("ImplicitPlane")->variables->are(x=>"Real",y=>"Real"); $answer = ImplicitPlane("x+y=2"); |
Setup:
By declaring there are only two variables, |
BEGIN_TEXT Enter an equation for a line through the points \( (0,2) \) and \( (2,0) \). $BR $BR \{ ans_rule(20) \} \{ AnswerFormatHelp("equations") \} END_TEXT |
Main Text:
We use
It is possible to change the link text to \{ AnswerFormatHelp("equations","help entering equations") \} |
$showPartialCorrectAnswers = 1; ANS( $answer->cmp() ); ENDDOCUMENT(); |
Answer Evaluation: |