Difference between revisions of "EssayAnswer1"

From WeBWorK_wiki
Jump to navigation Jump to search
(New essay answers page)
 
(add historical tag and give links to newer problems.)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
{{historical}}
  +
  +
<p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Misc/EssayAnswer.html a newer version of this problem]</p>
  +
  +
 
<h2>Essay answer</h2>
 
<h2>Essay answer</h2>
   
 
[[File:EssayAnswer1.png|300px|thumb|right|Click to enlarge]]
 
[[File:EssayAnswer1.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 write a question whose answer is an essay.
+
This PG code shows how to write a question whose answer is an essay. This feature was introduced in [http://webworkgoehle.blogspot.com/2012/09/essay-answers-in-webwork.html Fall 2012].
 
</p>
 
</p>
* Download file: [[File:EssayAnswer1.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/Misc/EssayAnswer1.pg FortLewis/Authoring/Templates/Misc/EssayAnswer1.pg] -->
* File location in OPL: <code>FortLewis/Authoring/Templates/Misc/EssayAnswer1.pg</code>
+
* PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Misc/EssayAnswer1_PGML.pg FortLewis/Authoring/Templates/Misc/EssayAnswer1_PGML.pg]
   
 
<br clear="all" />
 
<br clear="all" />
Line 16: Line 21:
   
 
<tr valign="top">
 
<tr valign="top">
<th> PG problem file </th>
+
<th width="50%"> PG problem file </th>
 
<th> Explanation </th>
 
<th> Explanation </th>
 
</tr>
 
</tr>
Line 41: Line 46:
 
<pre>
 
<pre>
 
DOCUMENT();
 
DOCUMENT();
loadMacros(
 
  +
loadMacros('PGstandard.pl','MathObjects.pl','parserPopUp.pl',
"PGstandard.pl",
 
  +
'PGessaymacros.pl','PGML.pl','PGcourse.pl');
"MathObjects.pl",
 
"parserPopUp.pl",
 
"PGessaymacros.pl",
 
"PGcourse.pl",
 
);
 
 
TEXT(beginproblem());
 
TEXT(beginproblem());
   
 
$showPartialCorrectAnswers = 0;
 
$showPartialCorrectAnswers = 0;
 
install_problem_grader(~~&std_problem_grader);
 
 
</pre>
 
</pre>
 
</td>
 
</td>
Line 81: Line 79:
 
<td style="background-color:#ffffdd;border:black 1px dashed;">
 
<td style="background-color:#ffffdd;border:black 1px dashed;">
 
<pre>
 
<pre>
Context("Numeric");
+
Context('Numeric');
   
 
$popup = PopUp(
 
$popup = PopUp(
[ "Choose", "True", "False" ], # choices
+
[ 'Choose', 'True', 'False' ], # choices
"False" # corect answer
+
'False' # corect answer
 
);
 
);
  +
   
 
$a = random(2,5,1);
 
$a = random(2,5,1);
Line 107: Line 106:
 
<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
 
  +
Answer the following true / false question and
Answer the following true / false question and
 
  +
then explain your answer. Your answers will be
then explain your answer. Your answers will be
 
 
read and graded manually at a later time.
 
read and graded manually at a later time.
$BR
 
  +
$BR
 
  +
[@ $popup->menu() @]*
\{ $popup->menu() \}
 
  +
For all real numbers [` x `], [` [$f1] = [$f2] `].
For all real numbers \( x \), \( $f1 = $f2 \).
 
  +
$BR
 
  +
Please explain your reasoning in the answer box below.
$BR
 
  +
[@ essay_box(8,60) @]*
Please explain your reasoning in the answer box below.
 
  +
END_PGML
$BR
 
\{ essay_box() \}
 
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> Clearly communicate to the student the expectations
 
<b>Main Text:</b> Clearly communicate to the student the expectations
of the problem and how it will be graded. The <code>essay_box()</code>
+
of the problem and how it will be graded. The <code>essay_box(w,h)</code>
is resizable.
+
is resizable and takes inputs for initial width and height.
 
</p>
 
</p>
 
</td>
 
</td>
Line 144: Line 138:
 
<p>
 
<p>
 
<b>Answer Evaluation:</b> The essay answer is graded manually by the
 
<b>Answer Evaluation:</b> The essay answer is graded manually by the
professor. Hand grading is done by clicking on <b>Statistics</b> in
+
professor. Hand grading is done either (1) by clicking on the homework set and clicking the <b>Grade problem</b> link in the rightmost column of the problem list [[File:essay_grading.png|thumb]] or (2) by clicking on <b>Statistics</b> in
 
Instructor Tools menu, selecting the homework set, and clicking the
 
Instructor Tools menu, selecting the homework set, and clicking the
<b>Needs grading</b> or <b>Regrade</b> links under. For more details,
+
<b>Needs grading</b> or <b>Regrade</b> links under the problem number. For more details,
 
please see [http://webworkgoehle.blogspot.com/2012/09/essay-answers-in-webwork.html the initial blog announcement about essay answers].
 
please see [http://webworkgoehle.blogspot.com/2012/09/essay-answers-in-webwork.html the initial blog announcement about essay answers].
 
</p>
 
</p>
 
<p>
 
<p>
 
Note that <code>essay_cmp()</code> is not associated with any object (i.e.,
 
Note that <code>essay_cmp()</code> is not associated with any object (i.e.,
it is <b>not</b> <code>$essay->cmp()</code>.
+
it is <b>not</b> <code>$essay->cmp()</code>).
 
</p>
 
</p>
 
</td>
 
</td>
Line 161: Line 155:
 
<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();

Latest revision as of 06:19, 17 July 2023

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

This problem has been replaced with a newer version of this problem


Essay answer

Click to enlarge

This PG code shows how to write a question whose answer is an essay. This feature was introduced in Fall 2012.


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT(); 
loadMacros('PGstandard.pl','MathObjects.pl','parserPopUp.pl',
  'PGessaymacros.pl','PGML.pl','PGcourse.pl');
TEXT(beginproblem());

$showPartialCorrectAnswers = 0;

Initialization: Use the PGessaymacros.pl for the essay answer and parserPopUp.pl for the multiple choice drop down menu. Setting $showPartialCorrectAnswers = 0; means that students will not receive feedback on whether their answers are correct. The all-or-nothing problem grader (the standard problem grader) is used in order to withhold assigning any credit when the student submits an answer. This allows the professor to manually determine what percentage the student should get. If the standard problem grader was not used here, then the default problem grader (the average problem grader) would award 50 percent credit to students who answer the multiple choice question correct.

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)");

Setup: Nothing out of the ordinary happens here.

BEGIN_PGML
Answer the following true / false question and
then explain your answer.  Your answers will be
read and graded manually at a later time.

[@ $popup->menu() @]*
For all real numbers [` x `], [` [$f1] = [$f2] `].

Please explain your reasoning in the answer box below.
[@ essay_box(8,60) @]*
END_PGML

Main Text: Clearly communicate to the student the expectations of the problem and how it will be graded. The essay_box(w,h) is resizable and takes inputs for initial width and height.

ANS( $popup->cmp() );
ANS( essay_cmp() );

Answer Evaluation: The essay answer is graded manually by the professor. Hand grading is done either (1) by clicking on the homework set and clicking the Grade problem link in the rightmost column of the problem list

Essay grading.png
or (2) by clicking on Statistics in

Instructor Tools menu, selecting the homework set, and clicking the Needs grading or Regrade links under the problem number. For more details, please see the initial blog announcement about essay answers.

Note that essay_cmp() is not associated with any object (i.e., it is not $essay->cmp()).

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();

Solution:

Templates by Subject Area