Possible to share assignments with other teachers?

Is there a way to duplicate an assignment so that another instructor can use it?

I’m teaching the same course in a group of 3 instructors. But if we all used the same assignment it would mix the students together which raises some privacy flags, in addition to just being way more kids to scroll though.

What I’d like to do is have one of us setup an assignment with source repo, auto grading, and all that goodness and then have some way for the other two to duplicate that assignment in their classroom. Doing it manually seems a little tedious if there’s a way around it.

Possible? Am I just missing something obvious?

Don’t think so, at this point. Note that you can use the same template repo for all versions of the assignment (which is where most of the setup work occurs). The longest aspect, I’ve found, of creating a copy is reproducing the auto-grading settings. Having both open in different tabs is about as good as it currently gets.

1 Like

I’ve abandoned using the autograding configuration through the “New Assignment” web interface and instead I create my assignment template with the .github/workflows/classroom.yml file and the .github/classroom/autograding.json file. As long as I don’t try to use the web interface to change the tests, these won’t be overwritten and will persist through to the student’s repositories and work when they commit. The downside is that I have to manually edit the YAML files, but I was doing that anyway because I needed more flexibility in setting up the environment. As an example of this method, here is my meta-template which I use to create the templates for each individual assignment: https://github.com/ntu-hg2051/hw-template. You can then share your assignment templates however you like (making other instructors outside collaborators, sending them a .tar.gz file of the repo, etc.) and as long as they don’t use the autograding configuration when creating a new assignment, they’ll be set.


Do you still get the same points shown when you manually build the file? I assume if you setup the autograding.json file correctly, you do. Just checking because this seems like a pretty good solution.

@NuttKatyISD Yes, it works the same as if I had used the web interface. It’s more flexible, but not as user-friendly. You can see the classroom.yml file in my template repository to see how I’ve assigned points to specific tests. The points are displayed in GitHub actions and on the assignment dashboard as expected (although the dashboard has its own issues and you shouldn’t rely on the points it displays).

In fact, when grading I always run the tests locally using a pristine copy of the testing files, because the students can easily alter the tests or the autograding.yml file to cheat (in theory; I haven’t seen any students doing this yet, but also I tell them up front that I check for such alterations).

1 Like

I do the same thing on major grades. Download all the repos and replace the test files with another one. Usually has slightly different tests just in case somebody got froggy and wrote code specifically to the tests.

And thanks, building my own classroom.tmp and autograding.json files sounds like the perfect solution.

1 Like
© 2017 GitHub, Inc.
with by
GitHub Education