Writes what read_objectives() reads, from the list
read_objectives_table() returns. The sibling of write_assessments(), and
used the same way: write it, read the file, fix what is wrong, then map.
Arguments
- x
Named list with elements "objectives" and "sessions", optionally "course_name", "title" and "term" – as returned by
read_objectives_table().- file
Character: Path to write to.
NULLreturns the YAML as a character scalar.
Details
Where sessions carries a "headers" attribute, each block is preceded by a
comment naming the spreadsheet column it came from, so that a sheet organized
by week keeps its week numbering next to the session_NN key.
One objective per line, double-quoted, in the order read_objectives()
documents – so the file looks like a hand-written one, and correcting an
objective is a one-line diff.