Opening the book…
This quickstart is designed to give you a complete win early: take a working PGML-first problem, copy it, and make a small edit that still grades correctly.
Quickstart steps
- Copy a working template problem (start from Breaking Down the Components if you have one available).
- Change only the story text first, keeping the variable names and math intact.
- Preview multiple variants to confirm the prompt still makes sense.
- Then change the numbers or the formula, one small change at a time.
Do not start by changing variable names or answer objects; change text first.
A minimal PGML-first skeleton (for copy-editing)
The file below is intentionally complete and minimal: it includes macros, setup, a PGML prompt, and an answer blank tied directly to its answer object.
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"PGcourse.pl",
);
Context("Numeric");
$a = random(2, 8, 1);
$b = random(3, 9, 1);
$ans = Real($a + $b);
BEGIN_PGML
In a lab notebook, two counts were recorded: [$a] and [$b].
What is the total count?
[`Total = `] [________]{$ans}
END_PGML
ENDDOCUMENT();
After you can copy-edit a problem like this without breaking grading, you are ready to expand into tables, multi-part prompts, and tighter answer checking.
Apply it today
- Copy a working file, change one small thing, and preview multiple variants before changing anything else.
- Keep student-facing sentences in PGML and keep regular PG focused on values and answer checking.
- After copy-editing, preview in ADAPT, and if ADAPT reports only a generic error, use Testing and Debugging (webwork-pg-renderer) to get a line-level error and fix it fast.
Next step: use Problem Generation (PG) to adopt a consistent file structure, then use Breaking Down the Components as your first reusable template.
This page titled 1.6: Quickstart - Edit Your First Problem was last modified on Fri, 27 Feb 2026 14:27:38 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.
The book could not be loaded just now.