github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 563 forks source link

Do not sync solution branch? #2453

Open yves-chevallier opened 4 years ago

yves-chevallier commented 4 years ago

I don't know exactly what the expected behavior is, but here is what I have:

An assignment with two branches (private template):

When I create a new assignment and my student clone the repository I could check (by testing with a dummy user) that only the master branch will be forked with a massive squash on all previous commits. So each student can see only one branch: master with one commit.

And this is exactly what I was expecting. Unfortunately when I created my assignment, this time, every single student could see the solution branch (which was a bad news for me).

Is this a feature or a bug?

d12 commented 4 years ago

Including all branches was recently implenented, I wonder if this can be made optional. cc @education/classroom-reviewers

yves-chevallier commented 4 years ago

Oh ! This is a very bad news. We spent some time to came up with a nice workflow and we released our first big assignment to our students. Unfortunately I discovered Yesterday that the solution was then visible and despite none of them pretended to notice it. We simply cannot give them a mark on this assignment, so we had to cancel it (which is also a really bad news in my (evil) plan to convince my colleagues to use GitHub Classroom).

Any workaround known?

yves-chevallier commented 4 years ago

That said, if the behavior changed, I would call this issue a bug and not a feature request :(

pdvrieze commented 4 years ago

This is a feature I would also really want. As a workaround it is possible to have a solution repo (with all code) and a problem repo (with only the base code) where you use a different remote to synchronize only the problem branch to the problem repo.