1.1: What is WeBWorK?

The ADAPT WeBWorK Handbook · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    1.1: What is WeBWorK?

    WeBWorK delivers automatically graded questions to students through a web interface. As an author, you write a text-based problem file (usually a .pg file) that defines values, a prompt, answer blanks, and grading rules.

    A single problem can randomize values, present structured data, collect student answers, and grade them immediately. In this guide, regular PG is treated as the setup layer and PGML is treated as the student-facing prompt (see Problem Generation (PG) for more on PG).

    This book targets the PG 2.17 subset used in ADAPT and webwork-pg-renderer, which means some macros found in full WeBWorK installs are not available. Keep that constraint in mind when you see online examples that load macros you do not recognize (see Common terms and names for common terms).

    PGML-first rule of thumb

    WeBWorK problems are written in a language called PG, but most authors should treat "regular PG" as the plumbing that sets up variables and answer checkers. The student-facing prompt should be written in PGML (PG Markup Language), which is designed to replace older BEGIN_TEXT authoring.

    Rule of thumb: if it is a sentence the student reads, it belongs in PGML.

    • PG (minimal): load macros, choose contexts, define random values, and build MathObjects.
    • PGML (primary): write the prompt, math, tables, and answer blanks using readable markup.

    You should be able to edit most biology questions in this book without fully understanding the PG setup code, as long as you keep changes inside the PGML block.

    Why it works well for life sciences

    • Short prompts with structured data (tables, concentrations, rates, and units).
    • Algorithmic variants for repeated practice without reusing the same numbers.
    • Clear answer checking via MathObjects (numeric, formulas, lists, and recognition checks).
    • Clean prompts for common biology patterns (dilutions, fold change, and small data tables).

    Apply it today

    • Write one prompt sentence in PGML and move any student-facing text out of regular PG.
    • Pick one biology-native pattern (a dilution, a rate, or a fold change) and randomize only the numbers.

    Next step: read Why use WeBWorK to decide when a prompt belongs in WeBWorK and when a simpler tool is a better fit.


    This page titled 1.1: What is WeBWorK? was last modified on Fri, 27 Feb 2026 14:31:45 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.