I have been using github classrooms to collect assignments from my students at one C++ programming course. It has been a wonderful tool. The added deadlines are indeed very useful, but checking them manually takes too much time. I normally clone all my students repos (to check the source code, for instance) but when I do that I am cloning even what they have sent after the deadline. Is it possible to clone, in batch, only the submissions? I tried looking at a “submission” tip or branch in the repo of each student with no positive result.
Thanks in advance for your kind help.
NOTE 1: I have checked posts like Cloning All Submissions without SSH . That is not my problem, I know how to clone the repos in batch. What I need is to somehow clone or checkout ONLY the submissions.
NOTE 2: I have also tried checking the commits up to a given date. But, I cannot trust this completely because it happens that some students use live usb and the clock is completely wrong. Will the time be correct at github even if the commit time, locally, is wrong?
NOTE 3: What I am doing now is just setting up a cron job to clone the repos at the given deadline, but my server is not reliable and sometimes does not perform the job.
I use a script to create a branch at the deadline date, and then checkout that branch. It’s not ideal, since if I forget to run the script… but it works well enough.
Yeah, I also have an script to do that, and as you said it depends on timing. Not using the submission is really a missing opportunity … Being able to clone only the submissions at ANY time would be really useful.
I think there are two possible solutions.
At exactly your deadline time, run a script like Seth Fogarty describes to make a tag or branch of exactly whatever the student has in their repo at that point in time. This is then insensitive to the Git commit times, since students’ computers might have incorrect clocks (either accidental or deliberate).
In retrospect, you can use the GitHub Events API to get timestamps for each push event, and it will tell you the corresponding commit IDs that were included in that push. I’ve written code to print all the timestamps (https://github.com/danwallach/github-event-times) which could presumably be extended to do the tagging/branching if you really wanted that.
The problem with either option is that there are always a few students who you may have given deadline extensions, and you’d need to somehow build that into your processes. I have a README.md file that I require the students to edit, which has their name, email, some written questions for a handful of assignments, and a section called “if we gave you an extension, copy the email here and commit it before the deadline”. This brings the deadline extension to the attention of the grader, who can then pay more attention to all the commits and sort out which one is the proper one to grade.
Hi, thanks for your answer.
So, in other words, we need to keep using our hacks (scheduled scripts,
etc) since the “submissions” mark/tool cannot really be scripted. That’s
unfortunate. I wish I had more idea on how to implement this to help, For
now, I hope any developer from the github classroom see this and might
improve the "submissions tool"
Have a nice day.
@iluvatar1 this feature, which we are calling “GitHub Desktop” is on the roadmap with our engineering team. You can view the roadmap here: https://github.com/education/classroom/blob/master/ROADMAP.md
Hi, that is great! Will be looking forward for that. Thanks for the great
If people are willing to share the scripts they use in the above comments (@iluvatar1 @sfogarty maybe also @danwallach) I would really love to see them. I’m not quite sure what that script would look like and I’d love to save the
n hours I would take fumbling around trying to do this myself…
Hi, I just copy-pasted a part of my script in case you find it useful. It
is located at
The general idea is that you a have a classroom, an assignment, a target
date to clone (if you clone the repos at the exact hour you dont need this)
and a file containing the usernames of the students. Feel free to use it
and any suggestions are welcome.
I have a TA download all submissions at the deadline! She has written a script for the purpose.