# Essay Questions

(Difference between revisions)

Essay questions are "open ended" or "paragraph" style questions which are submitted by the student and then later graded manually by the professor. The current essay questions implementation has the following features:

• Free response questions are easy to code and it is straightforward to add free response components to existing problems.
• Student answers and instructor comments can include typeset mathematics written both in calculator form and using LaTeX.
• Free response type questions can be included in problems with traditional WeBWorK questions.
• Instructors can provide feedback on student answers. Students can see instructor comments and can make revisions.
• Free response questions are compatible with problem randomization.

## Setting Up an Essay Question

All essay questions can be set up using three lines of code. At the top of your problem you should have

loadMacros("PGessaymacros.pl");


This loads PGessaymacros. It can also be included as one of the macros in every problems existing loadMacros call. In the text of your problem you should have

\{essay_box()\}


This creates the essay box. You can include character dimensions if you want to have a custom size, e.g. \{essay_box(162,48)\}. Finally, you will need an answer checker to go with your essay box. This is given by

ANS(essay_cmp());


Problems can use both essay answer boxes and comparators and tradition answer boxes and comparators. You can also use multiple essay boxes, as long as each has its own comparator.

For example, the following code shows an essay answer in a problem.

DOCUMENT();

$m = random(2,5);$b = random(20,30);
Context("Numeric");
$F = Formula("$m D + $b");$y1 = $F->eval(D=>1);$y2 = $F->eval(D=>2); BEGIN_TEXT The cost to download data using your phone is a linear function of the amount of data downloaded. Suppose it costs$y1 dollars to download 1 gigabyte of data and $y2 dollars to download 2 gigabytes of data.$PAR
Find a formula for the cost C in terms of the amount downloaded D. $BR C=\{ans_rule()\}$PAR
What do the slope and y-intercept of this function represent? $BR \{#Put an Essay Box where ever you want a essay type answer\} \{essay_box()\} END_TEXT ANS($F->cmp());
#Essay Boxs use the essay_cmp evaluator.
ANS(essay_cmp());
ENDDOCUMENT();



Essay answers are submitted like any other WeBWorK answer. Students type their answer into the box and hit submit. Unlike regular answers, the essay box will not be colored red or green, nor will it be marked correct. Rather the answer results will have a message informing students that their answers will be graded at a later time.

Student answers can have typeset mathematics. This can be done in one of two ways. First students can insert "calculator style" typsetting in between backticks (). For example

int_a^b e^x dx


This typesetting follows the AsciiMath markup language http://www1.chapman.edu/~jipsen/mathml/asciimath.html . it is reasonably intuitive, but can be a bit surprising when you do more complicated typesetting. The second approach is to use LaTeX formatting between    or    delimiters.

$$\int_a^b e^x \; dx$$


This is typeset using the MathJax LaTeX interpreter and is generally more robust. The following are some Useful tips for submitting problems:

• You can see a formatted preview of your answer by using the preview button. Do this to check your typsetting.
• You cannot use html. Any html or other code snippets will be rendered as is.
• Beware sloppy typesetting. Expressions like  $$e^x for x < 2$$  will render badly.

Essay answers are graded using the Manual Grader page. This can be found using any of the three links below. However these links only appear after at least one person has submitted an answer to the essay question.

• The "Needs Grading" or "Regrade" link on the set detail page for the corresponding homework set.

Once the problem grader is open you will get a page like the one shown below:

At this point you enter students grades and hit save. Some useful tips are:

• If the problem has an automatically graded portion, the current grade will be listed and the graded parts will be colored red or green according to correctness.
• If you have included randomization into your problem you can see the students version of that problem by clicking on their name.
• The students name will be bold if they have submitted a new answer since the last time you saved grades on the grader page.
• You can give a student 100% by using the tick box, or you can set their grade using the dropdown.
• You can comment on a student answer by using the comment field to the right of the grade dropdown (not pictured). This can also include typeset mathematics following the same rules as student answers. Preview your typesetting by hitting the preview button.
• If students resubmit their answer your old comment will not be shown and you can provide a new comment on the new answer.
• All old comments can be seen using the Past Answers page.

## Notes

The following are some gotcha "features" that are a result of how the system is set up.

• Comments are stored with the past answer database. Answers in the past answer database are not purged when homework sets are deleted. So if you delete a homework set and create a new one with the same name, you may see some of the old comments appearing on your new homework set's problems.
• The system behaves strangely if you change the essay problem after some students have submitted answers. Changing the text of the problem is probably fine, but if you remove or add an answer blank you might get unexpected results on the grader page.
• The link to the grader page only appears after at least one person has submitted an essay answer.
• The grader page isn't happy unless you have been assigned the problem set you are grading.
• You can change who can access and use the problem grader by changing the score_sets` permission level.