The unit map_curriculum() maps: the course's descriptive fields, its
objectives, its sessions, and its assessment items where it has any. One call
rather than reading a file and assigning into the result of another:
Arguments
- objectives
Character: Path to the YAML file of course and session objectives. See
read_objectives()for the format.- assessments
Character: Path to a YAML file carrying an
assessmentsblock, orNULLwhere the course has none or carries them in the objectives file. Seeread_assessments().
Value
Named list of "course_name", "title", "term", "objectives" and
"sessions", plus "assessments" where the course has them – the shape
map_curriculum() takes.
Details
course <- read_course("objectives.yaml", "assessments.yaml")
cm <- map_curriculum(course, llmconfig = llmconfig)Assessments live in their own file because the two halves have different
provenance: the items are a draft extract_assessments() produced and the
objectives are not, so a diff over one file says which of the two changed and
the extraction can be re-run without touching hand-written objectives. A
course whose file already carries both blocks needs only the first argument,
and one with no assessments at all needs only the first argument too.
Both files carrying assessments is an error
If objectives already holds an assessments block and assessments is
also given, the two are not reconciled and neither is preferred: the run
stops. Which set of items is mapped decides every coverage claim in the
report, so there is nothing here worth guessing at – and a warning about it
would be read after the report was already written, if at all.
Examples
if (FALSE) { # \dontrun{
course <- read_course(
"data/epi207/objectives.yaml",
"data/epi207/assessments.yaml"
)
cm <- map_curriculum(course, llmconfig = llmconfig)
} # }