All docs

Creating an assignment with starter code

Build starter code as a draft, then publish it so every student gets their own copy.

Published by Birdflop, a 501(c)(3) nonprofit · Last updated

An assignment is a folder of starter code. You build it as a draft and publish it, and every student gets their own editable copy of its files.

Create a draft

In a class, open the Assignments tab, click New assignment, and choose one:

  • Start from scratch makes an empty assignment with the name you type.
  • Upload a folder makes the folder's contents the starter code. If the name is taken, CS Room adds a number, like Lab 1 (1).
  • Use a lesson copies one of CS Room's lessons, with its tests set up when the lesson has them and its lesson plan on the Lesson plan tab. You can also add a lesson from the Lessons page.
  • Copy from another class copies assignments from any class you teach, archived classes included. Tick as many as you want. Each copy brings its files, hidden files, tests and grading settings, and leaves due dates, submissions, grades and feedback behind. A taken name gets a number.

Students see nothing until you publish.

Reuse assignments next term

Make the new class, then use Copy from another class to bring over last term's assignments. You can also keep a class with no students as a place to build drafts, then copy each one into the classes that need it.

Refine the draft

Drafts sit at the top of the Assignments list, marked Draft. Click one to open its page. Open in workspace opens it in your own workspace, inside the class's assignments/ folder, where you can edit its files. Create, rename and delete assignments from the class page. The pencil beside the title renames one, draft or published, and students keep their work.

To put a screenshot or GIF in the instructions, paste it into the markdown file. CS Room saves the image in the same folder and adds the link where your cursor is, so students get the image with their copy.

The Settings tab holds the schedule and grading:

  • Set a Due date and Late work appears. At the deadline CS Room collects the work of everyone who hasn't submitted. Work collected then counts as on time. Late work decides what happens after:
    • Not accepted, the default: the assignment closes at the due date. Work is graded and nobody can submit after it.
    • Until a date: students can still submit until the date you pick, and anything after the due date is marked Late. The assignment closes then.
    • Anytime: it never closes on its own. Late work is marked Late.
  • Publish on a schedule publishes the draft at a time you pick.

Once an assignment is published, Close now collects and grades everyone's work and stops submissions at any time. Reopen lets students submit again and sets Late work to Anytime. A student with nothing turned in when the assignment reopened (say they joined the class after it was due) has their work collected at the next close, and it is marked Late.

To give one student more time instead of reopening for everyone, open their work on the Student work tab and pick a date under Extension. Until then they can submit, even after the assignment closes, and work turned in by then is on time. At their date their work is collected and graded like everyone else's was.

Lesson plan

The Lesson plan tab on an assignment's page holds your plan for teaching it: goals, pacing, common mistakes, notes for next time. Only teachers of the class see it. Click Add a lesson plan to start one from a short outline, and Edit to change it in your workspace, where co-teachers can edit it with you live.

The plan is the file .teacher/lessonplan.md in the assignment's folder. Students never get anything in .teacher, so you can also write or upload it there yourself.

Publish

Click Publish at the top of the draft's page. Every current student gets their own copy in their class folder, and students who join later get one too.

Choose which students see an assignment

Shown to, under Visibility on the Settings tab, is Everyone unless you change it. Pick Some students to give the assignment only to the students you tick, and click Show to. Online now ticks the students who have the class open, which suits a test taken in class. Students you don't tick never see the assignment: it isn't in their list, isn't collected or closed for them, and the gradebook shows Not assigned, which leaves it out of their average. You can set this on a draft, so it publishes to only those students.

Untick a student to hide the assignment from them again. Their work is turned in for them if they hadn't submitted, and their copy leaves their files. They keep their grade, and the assignment shows as Hidden in their list. Tick them again and they get their copy back as they left it. None hides the assignment from everyone.

Turn on Hide when closed to do this on its own: when the assignment closes (at the due date, at the end of late work, or with Close now), the assignment is hidden from every student it closed for. A student with an extension keeps seeing the assignment until their own date.

For a test that some students miss:

  1. Pick Some students, then Online now, and click Show to.
  2. Set the due date, or click Close now when time is up. With Hide when it closes on, the test disappears from everyone who took it.
  3. On the day the others take it, tick only them. Students who took it stay hidden. Give each new student an Extension so they can submit, or Reopen the assignment: hidden students can't submit either way.

Editing after publishing

You can keep editing the files in assignments/. Students' copies are never overwritten, so an edit to a file they already have does not reach them. A file you add from the file explorer does reach every student, and hiding a file removes it from their copies.

To push a fix to an existing file, add it as a new file, or have students right-click the assignment folder and choose Restore all files. That replaces their starter files with your current version. Students who join later get your latest version.

Test files

Set up grading for each assignment in Tests and solutions on its Settings tab, either as input and output cases or as a test command. See Writing autograder tests.

A graded run uses the student's own copy of every visible file, including a test file they have edited. Only hidden files are laid over their work. Before you publish, hide the tests that decide the grade and any answer keys under File visibility in Tests and solutions. Hidden files live in the assignment's .teacher folder.

If a hidden test turns out to be wrong after students submit, fix it and click Regrade all on the Student work tab. Every submission is graded again with your fix, even once the assignment has closed. Scores you typed in by hand stay.

An assignment with no test settings falls back to running its test_*.py files, and uses your copies of them. Students get no Run Tests button for it, so set up tests instead.

Removing an assignment

Delete an assignment from its Settings tab, under Danger zone. Deleting a published assignment also deletes every student's copy, including their work, along with its scores, grade locks, submissions, feedback and test settings. A new assignment published later under the same name starts clean.

To take an assignment away from students without deleting anything, set Who sees it to Some students and click None. Their work, submissions and grades stay, and you can show it to them again later.