Skip to main content
Version: Next (unreleased)

Keeping a private answer key

Students only ever see questions. With a little extra setup, GrillMyCode also keeps a copy of every student's questions with the answers, in a private repository that only instructors can see. It also builds a multiple-choice quiz for each student that you can import into your LMS.

The answer key works only with Classroom 50 assignments. In any other repository, students still get their questions, but no answer key is kept.

This page shows how to set it up. It takes about 10 minutes once, and one extra line in each assignment's workflow.

A cartoon split by a brick wall with an "Instructors only" sign and a padlock. The GrillMyCode flame sits on the wall and sends a paper plane to each side. On the student's side, the student looks at a pinned issue of questions with a PDF copy, and every answer is hidden. On your side as a Classroom 50 instructor, a locked folder with a tab for each student, such as jsmith, holds questions with answers, and a quiz card flies off to your LMS. Chips underneath compare the sides: the student gets questions but not answers; you get questions, answers and an LMS quiz.

What you get​

For each assignment, GrillMyCode creates a private repository in your classroom's organization, named after the assignment. For example, cs-principles-lab-3-grillmycode-instructor. Inside, each student has a folder containing:

  • questions.md: their questions and answers. This is the file to read.
  • A quiz file (.imscc), ready to import into Brightspace, Canvas, Moodle or most other LMSs. See Importing quizzes into your LMS.
  • A Brightspace-only alternative (.csv), which you can ignore on any other LMS.
  • A data folder of files you don't need to read: the questions in the form the quiz is built from, and the AI's reply before GrillMyCode tidied it, which helps when something looks wrong.

Every new run for a student replaces their files, so each folder always holds exactly one up-to-date assessment. Students can't see this repository.

Top: the private instructor repository web101-lab-3-grillmycode-instructor, with a .github/workflows folder and one folder per student. Bottom: one student's folder, containing the Brightspace CSV quiz, the .imscc quiz, questions.md and raw-ai-output.md.

Screenshot needed

Retake this screenshot so the student's folder shows the data folder in place of raw-ai-output.md.

One-time setup​

Three panels joined by arrows. "In your own account": a settings window, Settings › Developer settings, with repo and workflow ticked and a Generate token button, and a key beside it, captioned "Create a token in your own account's settings, not the organization's". "In your organization": the key goes into a safe labelled "your org", captioned "Save it as a secret in your organization's settings, named INSTRUCTOR_REPO_TOKEN". "Every run": a student's repository with the GrillMyCode flame passes the key to a locked answer key folder, captioned "Each run uses it to write the answer key to your private repository".

Create an access token​

GrillMyCode needs permission to create repositories in your organization and write to them. You give it that with a personal access token: a password tied to your GitHub account, limited to specific permissions.

Use an account that can create repositories in the organization; an organization owner can.

  1. On GitHub, go to Settings → Developer settings → Personal access tokens → Tokens (classic). This is your own account's settings, not the organization's.
  2. Select Generate new token (classic).
  3. Give it a name, such as GrillMyCode answer key, and an expiry date that suits you, such as one year.
  4. Tick the repo scope and the workflow scope. Both are needed.
  5. Select Generate token and copy it straight away. GitHub shows it only once.
Want tighter permissions?

A fine-grained token works too. See Tokens, secrets and permissions for the exact permissions it needs.

Save it as an organization secret​

This is the same process as for the OpenRouter key.

  1. Open your classroom's organization and go to Settings → Secrets and variables → Actions.
  2. Select New organization secret.
  3. For Name, enter INSTRUCTOR_REPO_TOKEN.
  4. For Value, paste the token.
  5. Under Repository access, choose All repositories, or Private repositories.
  6. Select Add secret.

When the token expires, generate a new one and replace the secret's value. Until you do, answer keys stop arriving; see Troubleshooting.

For each assignment​

In the Workflow Wizard's Repositories step, answer Yes to the Classroom 50 question. Then, in its Delivery step, leave A private instructor repository for the assignment and Labelled student repositories in the organization list ticked. Both are ticked by default. Then commit the workflow to the template as usual.

If you already have a workflow file, add these lines under with: instead:

instructor_repo_token: ${{ secrets.INSTRUCTOR_REPO_TOKEN }}
label_repos: "true"

That's all. The private repository is created automatically when the first student's questions are generated.

Where to find it​

After the first student's run, open:

https://github.com/{your-organization}/{assignment-name}-grillmycode-instructor

The repository is also listed with your organization's other repositories.

Good to know​

  • It's for Classroom 50 repositories only. GrillMyCode works out the assignment and the student from the way Classroom 50 names repositories. In any other repository, it skips the answer key and adds a warning to the run.
  • It changes the questions slightly. With the token in place, the AI also writes three wrong answers per question for the multiple-choice quiz. Students never see them, but each assessment costs a little more. Without the token, only the correct answers are generated.
  • Student repositories get labelled. With labels ticked, once a student has questions, their repository shows a grillmycode topic and a question count in its description, so you can spot them in your organization's repository list. See Tracking assessed repositories.
  • Check the run, not just the tick. If the answer key can't be written, for example because the token has expired, the run still succeeds, because the student's questions were delivered fine. The problem shows as an error message on the run's summary page. See Troubleshooting.

Go deeper: Instructor repository internals: folder layout, file formats, how students are identified · Tracking assessed repositories: resubmissions and repository labels · Recipe: Private answer key