Skip to contents

S7 class representing a single template question with selected nodes and validation rules

Usage

markermd_question(
  id = integer(0),
  name = character(0),
  selected_nodes = markermd_node_selection(),
  rules = list(),
  filters = list(),
  scope = "sections",
  file = NA_character_
)

Arguments

id

Integer. Unique question identifier

name

Character. Question display name

selected_nodes

node_selection. Selected AST nodes for this question

rules

List. Validation rules for this question as markermd_rule objects

filters

List. Filter groups for this question as markermd_filter_group objects. Conditions within a group are ANDed, groups are ORed; filters narrow the question's node set before rules evaluate.

scope

Character. "sections" (the default) for a question that targets the selected headings and divs, or "document" for a question about the document as a whole (the YAML header, render settings, and other issues that belong to no single question). A document-scope question selects no nodes; its filters and rules, if any, evaluate against the whole document.

file

Character. The assignment file the question covers, as a path relative to the repository root (one of the template's files), or NA (the default) for the assignment's Quarto document. A question on another file covers the whole file: it selects no nodes and has no rules or filters, and it fails validation when a repository lacks the file.

Value

A markermd_question S7 object.