Import a grading rubric from YAML into a project's database
rubric_import.RdReads a rubric YAML file (see rubric_export() for the format) and applies
it to the project's grading database. Item order in the file determines
display order and keyboard hotkeys. This is the inverse of rubric_export().
Usage
rubric_import(
path,
project = ".",
mode = c("append", "replace"),
question = NULL
)Arguments
- path
Path to a rubric
.yaml/.ymlfile. Absolute or relative to the current directory; a bare relative path is also resolved against the project root.- project
Path to the project directory. Defaults to the working directory.
- mode
Either
"append"or"replace"; see Details.- question
Optional character vector restricting the import to those question names within the file.
Details
With mode = "append" (the default) the file's items are added after each
question's existing items. With mode = "replace" each affected question's
existing items are deleted first; this also deletes any recorded selections
of those items, for every repository, and cannot be undone. A question's
scoring setup is only updated when the file provides a scoring block.
Question names in the file must exactly match question names in the project's stored template; mismatches abort before anything is written.