you can have [students] commit directly to their master branch, and then you can click into each individual commit to give feedback in-line.
I can see how this integrates well with the existing GH tools. It’s not ideal for my students, who are new to git. The git history on their repos can be really quite funny, with lots of flailing around. It would be hard for me to comment on individual commits that way. What I really want is a way to comment on their final code, the way I would comment on a PR.
There’s a detailed discussion of various other options in this post from last summer. It sounds like per-commit commenting is the most commonly-used method, though when I first read through the thread I thought that PR’s were being more widely used. However, I think the PR-comment function is mostly used by professors outside of Classroom. It’s the method I used in my first assignment this term, which uses “vanilla” github rather than the classroom mechanisms.
So my first question was, is there a way for me to achieve this (comment on the final product rather than individual commits) in the current classroom setup? At first it seems like the answer is no, since (I believe) there’s no way to submit a PR between 2 repositories owned by the same organization, and there isn’t a “comment directly on code” feature in GH.
This issue is a feature request for full-code commenting. It also links to a blog post which suggests creating a new empty branch (say, “teacher-comments”) and then creating a new PR to merge student work into that branch. That sounds pretty good – though maybe one would want to start the branch at the last commit in the starter code, so you really only see the student code. Still, in a large class it would be difficult to keep track of everyone’s work, since the PR’s are not centrally listed anywhere.
Thinking about all of these things together, I wonder if an ideal submission & grading process would look something like this:
- create an assignment in Classroom as usual
- at the deadline, create a “submisison” tag or, I guess, branch, in every student repo as described by @sfogarty in this reply to @iluvator. I’m not sure what such a script would look like, but maybe it would use one of the command-line github clients. The script needs access to your GH credentials, though, since these are private repos.
- create new “teacher-comments” branches in each repo, starting from the last commit in the starter-code
- initiate PR’s from the “submission” branches to the “teacher-comments” branches
- collect all the PR URL’s in some format, say CSV or JSON, that allows association between the PR and a student record (this seems essential to me)
Then individual teachers could integrate the PR URL into whatever grading mechanism we normally use. In my case, it’s a twisted ad-hoc undocumented un-updated workflow for Emacs and org-mode, but you could presumably use some more rational method The only thing that seems to me to be missing here is a way to update assignments after the inital sharing (I asked about this last night in another post).
I would love to hear (a) what other people think of this proposed workflow and (b) some suggestions for implementing its parts. Most of it I guess could be done on a local laptop with a shell script, but it might be more elegant to use the github API instead, especially since presumably you’d need the API to initiate the PR anyway. In either case I’m not sure how best to handle authentication and repo discovery.
Would really love to hear thoughts from the community!