Workarounds for Updates to Starter Code in Classroom


(Vanessa) #1

Continuing the discussion from :wave: Teachers! Introduce yourself here: @aktemuris looking to tweak starter code after their students accept the assignment.

Does anyone know of a good workaround instead of deleting + recreating? Wonder if @gcschmit has an idea.


(Geoff Schmit) #2

While not being able to update all students’ repositories at once is a limitation of the sandbox approach, having tried to fork and pull request model, the advantages far outweigh the disadvantages. When I’ve run into this challenge, it has been for new code as opposed to changes to existing code. I have opted to post the code on Canvas (our Learning Management System) and have students add the files to their repositories manually.

There is probably some way to automate via a script the process of adding files to each student repository given a list of all student repositories. I haven’t been inconvenienced enough to do this :slight_smile:


(Luyts Maarten) #3

Let the students add your updated repo as a new remote.
git remote add <name> <url>

Then let them pull from it and merge it into their existing repo
git pull <name> <branch>

You provide the code and your students are responsible for acquiring the code


Use of GitHub Classroom requires many private repos?
(Barış Aktemur) #4

Thanks. I’ll try this approach the next time.


(Hamish Cunningham) #5

hi Luyts!

Will this work if the starter repo is private?

Thanks!

Hamish


(Vanessa) #6

@hamishcunningham should work as long as students have collaborator permissions on the starter repo.


(Hamish Cunningham) #7

thanks Vanessa – do they get collab perms on the starter repo when they
click the assignment link,
or would they need individually adding as collaborators?

cheers, h


(Vanessa) #8

@hamishcunningham here’s the scoop:

  • If it’s an individual exercise, students become outside collaborators and can see only their repo. I suggest collecting their usernames via a google form if you want to add them.

  • If it’s a group exercise, students become a team inside the GitHub organization, and so they can see your repo (unless you set permissions to none) and you need to change the settings.

Hope this helps.


(Pannirselvam P.V) #9

Yes well made to make all cear