Changes the description and/or points of a single stored rubric item in
place. The item keeps its id, position, hotkey and group, so every
recorded selection of it (and so every repository's marks) carries over to
the new wording: unlike replacing the question's rubric with
rubric_import(), nothing has to be re-recorded.
Usage
rubric_item_set(
question,
item,
description = NULL,
points = NULL,
project = ".",
snapshot = TRUE,
summary = NULL
)Arguments
- question
Question name from the project's template.
- item
Current description of the item, matched verbatim.
- description
New description, or
NULLto keep the current one.- points
New point value, or
NULLto keep the current one.- project
Path to the project directory. Defaults to the working directory.
- snapshot
Whether to take an automatic snapshot before the change.
- summary
Optional text recorded on the automatic snapshot and in the activity log: what the change is and why.
Value
Invisibly, the updated markermd_rubric_item.
Details
The item is identified by its current description, matched verbatim as in
marks_set() and marks_import(). A new description must be non-empty
and must not equal another item's description in the same question, since
descriptions identify items on import. Changing the points changes the
score of every repository that has the item selected; use
snapshot_diff() afterwards to review the effect.
An automatic snapshot of the state being changed is taken in the same
transaction (see snapshot_create()), and the change is recorded in the
activity log (see project_activity()). A running mark() session picks
the change up and offers to reload its rubric.