Once an assignment has been created and the due date has come up, is there any quick way of cloning all the submissions to my local machine? Preferably adding a tag to mark the commit that is being graded? I remember hearing about a tool, teachers_pet (?), that may have had this sort of functionality but I’m not sure if its still supported.

teachers_pet was created before GitHub Classroom came along, I believe…so it’s unclear to me how to gather/collect work from student’s individual copies of the assignment repository (i.e. the copies they made by “accepting” the assignment thru GitHub Classroom), since they are not necessarily in teams. I tried to use it to do so using the “clone_repos” command, including my organization name and the “prefix” for the assignment repository, but it errors out because there are no teams for each student.

I was wondering the same thing. I’ve created a couple of windows batch files to clone and tag the student’s repositories. I also created one that would do a pull from each since they sometimes turn things in late.

Turns out there have been a few threads looking at this. Sounds like they’re working on adding it as a feature to Classrooms, but its not there yet. I’m taking the route of @kchappelow, and writing a bash script to automate it in the meantime. Good opportunity to learn bash!

I feel compelled to add my voice to this thread. I’ve been using teachers_pet for a couple years with great success; I’m a huge fan. It seems like GitHub Classroom is a direct spinoff from that project, but Classroom has only 10% of the functionality. There’s no way for me to break my ‘classroom’ into sections, there’s no obvious way (as discussed on this thread) to do a mass clone for grading. I’m not sure why teachers_pet is advising people to move to Classroom at this time. For my next assignment, I’ll be going back to teachers_pet—it takes a little more setup, in that the instructor has to provide a list of students’ GitHub usernames, but there is ample documentation (unlike Classroom), and it does what you want it to do.

It’s still in pre-alpha, but is already serving a few of us (at the University of Toronto) very well. Iwill be really happy to get more people to start using it (and, perhaps, even contributing changes).

@rcraggs , thanks. I would love to have a few more people using it (right now, it’s only myself and a few colleagues here at UofT) and be able to move from pre-alpha to alpha as soon as possible.

If you need any help using Gitomator, please let me know - Since the project is at such an early stage, you can expect the occasional bug here and there, but you also get to enjoy a highly personalized tech-support service

gh_classroom_collect.py

#!/user/bin/env python
#
# This is a simple python script to clone all of the repositories for an
# assignment managed via GitHub Classroom. It has a dependency on the
# requests module, so to use it, you must:
#
# pip install requests
#
# You can run the script with the '-h' option to get info on its usage.

I take it there is no automatic way to find out what repos start with homework1- ?
It’s not the worst thing in the world to have to build a file with the students names, but I would rather not maintain that.

Is there any way to download all the repos for my organization? I can get it on screen:

@hydrodog, check out the get_repo_urls() function in my script above. It uses the GitHub API to get a list of all the repos in an organization, selects only the repos that start with a given prefix, and then gets the clone URLs for those repos. Sounds like that’s close to what you want to do.