When I add feedback to a student repo by commenting on the automatically opened PR, is there a way to delay releasing the feedback so that students get it all at once? As far as I know you can’t comment on a PR offline and then push changes.
In case others are interested, here’s a potential solution that’s not super clean, but could work:
- Install the GitHub CLI tool
- Download all assignments with the Classroom Assistant
- Create a text file in each repo containing the comments, e.g. through the command line as
echo "Variable name `foo` is ambiguous" > feedback
- After commenting on all the student repos, loop through each directory and run
gh pr 1 comment -F feedbackto post all the comments at once
I’ll probably wrap this up in a script that also:
- reopens PR #1 in case the student closed it
- either runs
gh pr 1 diffor
gh pr view 1 --webto show me the code (web view might be easier for more complex assignments)
- prompts me for the comment to be stored in a file with the name feedback or some such to avoid typos
I created a tool which automates creating marking repository with one PR per student. I think you could, without too much work, extend the tool to provide a copy-back functionality to push all the comments back into the students’ feedback PRs in one hit. The tool is here: GitHub - dham/classroom-tool: A tool to help instructors work with GitHub Classroom.
In fact, that would be good for providing feedback from my exams. I might try to find time to code it up - though probably not for a couple of months. PRs welcome in the meantime
Can your tool add a function to delete all students’ work in a classroom/assignment? Since I want to clean the classroom every semester and reuse the classroom link for next semester.
Hi Prof. Zhang,
That’s not really how GitHub classroom is intended to work. The usual pattern is that you have a GitHub organization for your course and that can persist for ever. A classroom is really targeted at running the course once. So the idea is that you make a new classroom in the same organization each semester. Notice that the class roster is at classroom level for this reason. It then doesn’t matter that you have a whole load of old repositories lying around in your organization - and going around deleting students’ code is likely to cause them to be pretty unhappy!