I write homework assignments for students. I also need to create a different version of the same document with all the answers and scoring guide for the tutors (teaching assistants). It is irritating to create two different versions of the document by hand. To avoid this, I’ve come up with the following imperfect solution:
- Write the assignment in .Rmd. One side benefit of this is one can automate adding up the points that each question is worth.
- Include all the information for grading the homework, such as the correct answers and partial credit answers, in markdown comments: , below each question.
- Render the .Rmd to PDF with RStudio knitR and send it to the students.
- Pass the .Rmd through a sequence of sed commands to replace the comment tags with tags for a code block, creating a “gradingGuide.Rmd”.
- Render gradingGuide.Rmd to PDF or html, and send it to the tutors (teaching assistants).
Any other solutions out there?