6.6: Randomized MC True and False Statements

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.

    6.6: Randomized MC True and False Statements

    This page shows how to build statement-by-statement evaluation prompts using RadioButtons or PopUp widgets for each statement. It also covers how to create YAML-based statement banks and generate multiple-choice "Which statement is TRUE/FALSE?" questions from them.

    Use this page when: you want students to mark each statement as true/false or correct/incorrect rather than choose one best answer, or when you want to generate multiple-choice questions from curated pools of true and false statements. For basic single-answer multiple choice, see Multiple Choice. For checkbox-style multiple answer, see Multiple Answer.

    When to use MC statements vs matching sets

    Statement-based multiple choice is best when you want students to evaluate ideas (truth or falsehood), not just map terms to definitions.

    Good fits for MC statements:

    • "Which statement is TRUE/FALSE?" conceptual checks
    • Misconception diagnostics (wrong molecule, wrong direction, wrong location, sign flips)
    • "Why" and "what changes" logic that is hard to make one-to-one

    If your goal is to map terms or components to their matching definitions or functions (especially pathways and part-to-function), consider a matching set instead (see Randomized Matching Problems).

    Copy and edit (RadioButtons per statement)

    $tf = [ 'True', 'False' ];
    $rb1 = RadioButtons($tf, 'True');
    $rb2 = RadioButtons($tf, 'False');
    
    BEGIN_PGML
    1. The enzyme activity increases with temperature. [_]{$rb1}
    
    2. The inhibitor decreases Vmax in competitive inhibition. [_]{$rb2}
    END_PGML
    

    Common failure and fix

    Broken: parserCheckboxList.pl used for statement checks
    What you will see: widget missing or render failure
    Fix: use RadioButtons or PopUp per statement
    

    Styling and emphasis

    • Use HTML spans to emphasize key words like NOT or ONLY.
    • Keep each statement short so students can scan quickly.

    Creating statement banks with YAML

    Instead of hand-coding each PGML problem, you can define pools of true and false statements in a YAML file and use a generator script to produce multiple-choice questions automatically. Each generated question presents one correct answer among several distractors drawn from the bank.

    YAML file structure

    Each YAML file requires three top-level keys:

    YAML file structure: key, required, and description.
    Key Required Description
    topic Yes Short phrase used in the question stem (e.g., DNA structure)
    true_statements Yes Mapping of statement IDs to correct statement text
    false_statements Yes Mapping of statement IDs to incorrect statement text

    Common optional keys

    Common optional keys: key and description.
    Key Description
    connection_words YAML list of stem connectors (defaults to built-in words like concerning, about, regarding)
    replacement_rules Mapping of literal substring replacements for consistent formatting or color
    override_question_true Replace the TRUE stem with custom text, or set to ~ to disable TRUE questions
    override_question_false Replace the FALSE stem with custom text, or set to ~ to disable FALSE questions

    In YAML, ~ means null (like Python None). For connection_words, null means "use the built-in defaults." For override keys, null means "disable that question form entirely."

    Statement IDs and conflict groups

    Statement IDs follow the pattern truth<N>a, truth<N>b, false<N>a, false<N>b, and so on. Statements that share the same number represent the same concept with different phrasing. The generator automatically prevents variants of the same concept from appearing together in one question.

    true_statements:
      truth3a: Enzymes lower activation energy.
      truth3b: Enzymes speed reactions by lowering activation energy.
    

    Because truth3a and truth3b share the number 3, they will never both appear as choices in the same generated question. This lets you author multiple equivalent phrasings for the same idea without creating confusing near-duplicate answer choices.

    Replacement rules for formatting consistency

    The replacement_rules key is a simple search-and-replace table applied to all question text and choices. It is commonly used for:

    • Highlighting key terms with HTML color spans
    • Consistent symbols and typography (e.g., &Delta;G, &nbsp;)
    replacement_rules:
      cAMP: "<strong>cAMP</strong>"
      cGMP: "<strong>cGMP</strong>"
    

    Generating PGML files from YAML

    The yaml_mc_statements_to_pgml.py script reads the same YAML schema described above and generates WeBWorK PGML problem files. This workflow uses the same statement bank format, so you can maintain one YAML file and produce both Blackboard export files and PGML problems from it.

    source source_me.sh
    python3 yaml_mc_statements_to_pgml.py -y your_set.yml -x 20
    

    The -x flag controls how many question variants to generate. By default, the generator creates both "Which statement is TRUE?" and "Which statement is FALSE?" forms. You can disable either form with --no-true or --no-false.

    Second messenger signaling example (complete YAML)

    ---
    topic: second messenger signaling
    learning_objective: Distinguish cAMP vs cGMP roles and enzymes that regulate them.
    
    replacement_rules:
      cAMP: "<strong>cAMP</strong>"
      cGMP: "<strong>cGMP</strong>"
    
    true_statements:
      truth1a: cAMP is a second messenger made from ATP
      truth1b: cyclic AMP (cAMP) is produced from ATP by adenylyl cyclase
      truth2: phosphodiesterase breaks down cyclic nucleotides to terminate a signal
      truth3: Protein kinase A (PKA) is activated by cAMP
    
    false_statements:
      false1a: cAMP is a second messenger made from glucose
      false1b: cyclic AMP (cAMP) is produced from ADP by phosphodiesterase
      false2: phosphodiesterase makes cAMP from ATP
      false3: Protein kinase A (PKA) is activated by cGMP
    

    Note the conflict groups: truth1a and truth1b both describe how cAMP is made, so they share number 1 and will not appear together. The same applies to false1a and false1b.

    What makes a good false statement

    False statements should be "plausible but wrong" in a way that diagnoses a specific misconception. Good patterns include:

    • Wrong substrate or reactant: ATP vs GTP, NADH vs NADPH
    • Wrong directionality: influx vs efflux, synthesis vs degradation
    • Wrong cellular location: nucleus vs cytosol vs mitochondrion
    • Swapped cofactors or ions: Mg2+ vs Ca2+
    • Wrong sign or relationship: reversed thermodynamic logic using delta-G or equilibrium

    Practical trick: write the true statement first, then create the false version by changing exactly one detail.

    Avoiding accidental cues

    Three quick checks that prevent students from using test-taking strategies instead of content knowledge:

    • Similar length: Do not let one statement be noticeably longer or shorter than the others.
    • Parallel grammar: Use the same sentence structure across all choices (all noun phrases, or all full sentences).
    • No unique keywords: Avoid terms that appear in only one choice, as they can give away the answer.

    Additional statement hygiene: one main idea per statement (avoid "and also..." bundles), use concrete biology verbs (binds, phosphorylates, opens, inhibits), avoid double negatives, and define abbreviations on first use.

    Difficulty control

    You can adjust question difficulty by varying how the false statements are constructed:

    Difficulty control: difficulty and strategy.
    Difficulty Strategy
    Easier Use direct definitions and unique vocabulary. Keep false statements clearly wrong with one obvious error.
    Harder Make false statements "plausible but wrong" using common misconceptions. Use more similar terms across choices, relying on conflict groups to avoid near-duplicates in the same question.

    Quality checks for statement banks

    Before using a bank in an assessment, run through this checklist:

    • Misfiled statements: Confirm all truth* entries are under true_statements and all false* entries are under false_statements.
    • ID collisions: Do not reuse the same ID for two unrelated meanings (e.g., two different truth5a ideas).
    • Duplicate text: The generator fails if the exact same sentence appears twice, even across true and false sections.
    • Replacement rule overlap: Use specific, non-overlapping phrases to avoid nested spans or partial matches.
    • Grammar scan: Fix typos and subject/verb agreement. Correct grammar improves student trust even when the biology is right.

    Biology examples to model

    • Experimental design statements (controls, variables, replication).
    • Pathway regulation claims (activation vs repression).

    Complete working example

    Enzyme true/false statements -- A full problem with per-statement RadioButtons evaluating claims about enzyme behavior.

    ## TITLE('Enzyme behavior true or false')
    ## DESCRIPTION
    ## Evaluate true/false statements about enzyme regulation
    ## and kinetics using per-statement RadioButtons.
    ## ENDDESCRIPTION
    ## KEYWORDS('enzymes','true false','RadioButtons','kinetics')
    ## DBsubject('Biochemistry')
    ## DBchapter('Enzymes')
    ## DBsection('Regulation')
    ## Date('2026-02-15')
    ## Author('Author name')
    ## Institution('Institution name')
    
    DOCUMENT();
    loadMacros(
    	"PGstandard.pl",
    	"PGML.pl",
    	"parserRadioButtons.pl",
    	"PGcourse.pl",
    );
    
    $tf = [ 'True', 'False' ];
    $rb1 = RadioButtons($tf, 'True');
    $rb2 = RadioButtons($tf, 'False');
    $rb3 = RadioButtons($tf, 'True');
    $rb4 = RadioButtons($tf, 'False');
    
    BEGIN_PGML
    For each statement about enzymes, select True or False.
    
    1. Enzymes increase the rate of a reaction without being consumed. [_]{$rb1}
    
    2. A competitive inhibitor decreases the Vmax of an enzyme. [_]{$rb2}
    
    3. Allosteric regulation involves binding at a site other than the active site. [_]{$rb3}
    
    4. Increasing temperature always increases enzyme activity. [_]{$rb4}
    END_PGML
    
    ENDDOCUMENT();
    

    Apply it today

    • Use one RadioButtons object per statement and keep answer keys aligned.
    • Avoid checkbox macros not available in the PG 2.17 subset.
    • Create YAML statement banks with 8 to 20 items per truth category for good question variety.
    • Use conflict group IDs (e.g., truth4a, truth4b) for equivalent phrasings of the same concept.
    • Write the true statement first, then create the false version by changing one detail.
    • Run the quality checklist before deploying a bank to an assessment.

    This page titled 6.6: Randomized MC True and False Statements was last modified on Fri, 27 Feb 2026 15:36:15 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.