Difference between revisions of "FullProblemTemplate"
Jump to navigation
Jump to search
(switch to PGML and remove answerFormatHelp.pl macro) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<h2>Insert Title Here</h2> |
<h2>Insert Title Here</h2> |
||
− | [[File: |
+ | [[File:GraphicsFilename1.png|300px|thumb|right|Click to enlarge]] |
<p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> |
<p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> |
||
This PG code shows how to ... |
This PG code shows how to ... |
||
</p> |
</p> |
||
− | * Download file: [[File:Filename1.txt]] (change the file extension from txt to pg when you save it) |
||
+ | <!--* File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/ FortLewis/Authoring/Templates/] --> |
||
− | * File location in NPL: <code>FortLewis/Authoring/Templates/...</code> |
||
<br clear="all" /> |
<br clear="all" /> |
||
Line 16: | Line 15: | ||
<tr valign="top"> |
<tr valign="top"> |
||
− | <th> PG problem file </th> |
+ | <th style="width: 50%"> PG problem file </th> |
<th> Explanation </th> |
<th> Explanation </th> |
||
</tr> |
</tr> |
||
Line 42: | Line 41: | ||
DOCUMENT(); |
DOCUMENT(); |
||
− | loadMacros( |
||
+ | loadMacros('PGstandard.pl','MathObjects.pl','PGML.pl'); |
||
− | "PGstandard.pl", |
||
− | "MathObjects.pl", |
||
− | "AnswerFormatHelp.pl", |
||
− | ); |
||
TEXT(beginproblem()); |
TEXT(beginproblem()); |
||
Line 81: | Line 76: | ||
<td style="background-color:#ffdddd;border:black 1px dashed;"> |
<td style="background-color:#ffdddd;border:black 1px dashed;"> |
||
<pre> |
<pre> |
||
− | Context()->texStrings; |
||
+ | BEGIN_PGML |
||
− | BEGIN_TEXT |
||
Question text |
Question text |
||
− | $BR |
||
+ | |||
− | $BR |
||
+ | Answer = [__]{$answer} |
||
− | Answer = |
||
+ | |||
− | \{ ans_rule(20) \} |
||
+ | END_PGML |
||
− | \{ AnswerFormatHelp("formulas") \} |
||
− | END_TEXT |
||
− | Context()->normalStrings; |
||
</pre> |
</pre> |
||
<td style="background-color:#ffcccc;padding:7px;"> |
<td style="background-color:#ffcccc;padding:7px;"> |
||
<p> |
<p> |
||
<b>Main Text:</b> |
<b>Main Text:</b> |
||
− | </p> |
||
− | </td> |
||
− | </tr> |
||
− | |||
− | <!-- Answer evaluation section --> |
||
− | |||
− | <tr valign="top"> |
||
− | <td style="background-color:#eeddff;border:black 1px dashed;"> |
||
− | <pre> |
||
− | $showPartialCorrectAnswers = 1; |
||
− | |||
− | ANS( $answer->cmp() ); |
||
− | </pre> |
||
− | <td style="background-color:#eeccff;padding:7px;"> |
||
− | <p> |
||
− | <b>Answer Evaluation:</b> |
||
</p> |
</p> |
||
</td> |
</td> |
||
Line 120: | Line 95: | ||
<td style="background-color:#ddddff;border:black 1px dashed;"> |
<td style="background-color:#ddddff;border:black 1px dashed;"> |
||
<pre> |
<pre> |
||
− | Context()->texStrings; |
||
+ | BEGIN_PGML_SOLUTION |
||
− | BEGIN_SOLUTION |
||
− | ${PAR}SOLUTION:${PAR} |
||
Solution explanation goes here. |
Solution explanation goes here. |
||
− | END_SOLUTION |
||
+ | END_PGML_SOLUTION |
||
− | Context()->normalStrings; |
||
− | |||
− | COMMENT('MathObject version.'); |
||
ENDDOCUMENT(); |
ENDDOCUMENT(); |
||
Line 144: | Line 114: | ||
</p> |
</p> |
||
− | [[Category: |
+ | [[Category:Sample Problems]] |
− | [[Category: |
+ | [[Category:Subject Area Templates]] |
Latest revision as of 10:56, 4 April 2023
Insert Title Here
This PG code shows how to ...
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros('PGstandard.pl','MathObjects.pl','PGML.pl'); TEXT(beginproblem()); |
Initialization: |
Context("Numeric"); $answer = Compute("1"); |
Setup: |
BEGIN_PGML Question text Answer = [__]{$answer} END_PGML |
Main Text: |
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT(); |
Solution: |