Updating the starter code


(Elhambuxton) #1

Hi,
I have started using github classroom this semester. I have created my first assignment and posted a starter code in the repository. Now how can I update the starter code in all private repositories created for each student for the assignment?
Thank you.

-Ellie


(DJ Holt) #2

Hi Ellie,

We considered this need as well. This solution is not included with GitHub Classroom, but it’s still possible. One option would be to create a script or scripts that automate this process for each of the repositories, but this could get tedious very quickly, as you’d be required to merge individual repositories.

Another good solution would be to instruct your students on how to synchronize their repos with your repo, where they would each be responsible for merging themselves. There are several ways to do this using Git, but here’s a quick and easy one:

https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/

I hope that helps!

  • DJ

Updating assignments after creation?
(Elhambuxton) #3

?Thank you very much for your quick response.


(Rob Muhlestein) #4

I’d also like to add that there are some good use cases where never updating the repos once accepted is also useful. Say, for example, after a student has completed the assignment based a set of requirements for a given point in time. And then later students begin completing the same assignment with new content. Being able to go back and validate a former students exact completed assignment is very useful when comparing against the current requirements for the assignment. In such cases caution may be in order to any bulk private student repo updates because students who have already completed the assignment, perhaps some time ago, would suddenly appear to have not competed the assignment based on the requirements they met when they first completed it.


(Péter Krassay) #5

Hey Guys,

@djholt Thank you for the link, based on that I can teach my students how to update the starter repo’s code.

But what about issue, labels, milestones, etc?
Do you have any solution how to synchronize them? (I couldn’t find any.)

I am currently thinking about the following workflow for my lab.

  1. I create a starter repository.
  2. I create an assignment (private) in GitHub Classroom with the starter repository.
  3. Before the weekly labs each time I update the starter repository and create a new issue (Complete Lab x). (Unfortunately I don’t know yet exactly how man labs will be held an in which order exactly, so creating everything in advance is not an option.)
  4. With merging the upstream repository they can get the code changes but I would like to be able to transfer issues too without creating 40 new issues by hand.

What do you think?

Your response is highly appreciated! :slight_smile:

Cheers,
Péter


(John Britton) #6

There’s no way to sync these things, but we do have a pull request open for automatically creating issues on new repositories for students:


(Péter Krassay) #7

This looks very promising! Thank you for working on this. From this the next step could be the issue sync. :slight_smile:


(Dave Whipp) #8

This topic has died a bit, but since I’m here I thought I would share our “solution” to this problem. We separate the course materials into “lessons” and “exercises”. The lessons are publicly available and include a file hints.md, where we can offer hints on completing the exercises, as well as fixes for any problems in the exercise materials. The exercises normally take the form of a git repository containing a README.md describing the exercise, some starter code(s), and any data needed for the exercise. With this configuration, we can update the hints.md file in the lesson repo to include any changes needed for the exercise after the students have created their repos, including adding a new starter code if things are going really badly that week. If changes are made to the lesson hints.md, we simply then just post an issue in the lesson repo and use an @mention for the team of students for that course to make note of the update.

I realise there may be better, more git-like, solutions for this problem, but we’re working with geoscience students that often have limited computational skills. This solution has worked reasonably well and was intuitive for our students, so we were happy with it. Perhaps it will be of use for others as well.


(Kangwon Lee (Education)) #9

Hi. Thanks for many good ideas. I think I would be able to learn about

  • starter-repo as upstream repository
  • using issues & pull requests
  • separating lessons repository, keep updating it, and notifying student by mentioning in issues

Maybe I am too ignorant about git & github but can I have your opinions on following possible idea?:

  • making & distributing a patch and letting students apply it to their individual repositories

Do you think this blog post titled “Patches by Email” (2011) could be helpful? What about adding an instruction on YouTube ? (Conflict of interest possible? By making students see unwanted ads while I could be making money? :slight_smile: )