Difference between revisions of "FullProblemTemplate"

From WeBWorK_wiki
Jump to navigation Jump to search
m
m
Line 144: Line 144:
 
</p>
 
</p>
   
[[Category:Top]]
 
 
[[Category:Sample Problems]]
 
[[Category:Sample Problems]]
 
[[Category:Subject Area Templates]]
 
[[Category:Subject Area Templates]]

Revision as of 16:58, 7 January 2012

Insert Title Here

This PG code shows how to ...

  • Download file: File:Filename1.txt (change the file extension from txt to pg when you save it)
  • File location in NPL: FortLewis/Authoring/Templates/...


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
);

TEXT(beginproblem());

Initialization:

Context("Numeric");

$answer = Compute("1");

Setup:

Context()->texStrings;
BEGIN_TEXT
Question text
$BR
$BR
Answer =
\{ ans_rule(20) \}
\{ AnswerFormatHelp("formulas") \}
END_TEXT
Context()->normalStrings;

Main Text:

$showPartialCorrectAnswers = 1;

ANS( $answer->cmp() );

Answer Evaluation:

Context()->texStrings;
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;

COMMENT('MathObject version.');

ENDDOCUMENT();

Solution:

Templates by Subject Area