All teacher guides

Add tasks inside the editor

Mark out code areas, attach instructions and choose which tasks students complete or edit during a live lesson.

On this page

Tasks attach instructions to lines in a Workspace. Use them for a missing function, a condition to correct, a CSS rule to change or several lines students need to write. They can be used in assigned work and in live handovers.

Start with a Workspace in Lessons. Prepare the surrounding code so that students can focus on the part you want them to practise.

Create a task area

  1. Open the code file in the teacher editor. Click a line for a one-line task, or select several lines for a longer task. The task includes the whole lines you select.
  2. On the first selected line, click the target symbol in the gutter between the line number and the code. Its tooltip reads Create or edit task.
The target beside the first selected line of a Python loop.Enlarge image
Select the loop, then click the target beside its first line.
  1. Check the file and line numbers at the top of the form. Give the task a Task title. Use Instructions to tell students what to change and how to check it. Add Marks available if you want to score the task.
  2. Choose Save task.
Task title, instructions, marks and Save task for the selected lines in main.py.Enlarge image
The file and line range show exactly where students will work.

For a new task, choose lines outside any existing task. Clicking the target on an existing task opens it for editing. A task can start on a blank line and grow as students write code.

Review the task list

Open Teaching tools → Tasks in the editor. Select a task to go to its file and code area. Open the menu beside its title to edit its instructions or move it in the task order. To move its code area, select the new lines first, then choose Use selected code as area.

Keep tasks in the order you want students to attempt them. Use instructions.md for the overall lesson brief and task instructions for the individual steps.

Students can open the task in Instructions to read the prompt and jump to the code.

Student task list showing instructions for a JavaScript task and a link to lines 13 to 21.Enlarge image
In this student view, Light up the skyline links to the relevant lines in sketch.js.

Set tasks as independent work

Choose Send to class, pick the class and expand Task areas. All prepared tasks start selected. Select at least one task. Students can edit the selected areas and add lines inside them. Other code is read-only.

For a separate score beside each task, choose Mark by task in Marking setup. Describe what earns the marks. For whole-Workspace marks or feedback alone, see choose the marking setup.

Check the selected tasks before sending. Later edits to the original stay in your copy.

Use a task for live questioning

During a live session, choose the task as the Handover area, or use Use for handover from the task controls. Choose Hand over beside the student who will edit it. They can change that task area without editing the surrounding code.

Take control back before changing task definitions or switching the handover area. See live modelling and student handover for taking back control and restoring the earlier code.

Review the answers

When reviewing assigned work, task names in Marking & feedback link back to their code areas. You can record marks and feedback against each scored task, then return them to the student.

See review and mark student Workspaces for saving decisions, checking AI suggestions and returning the work.