UNIT reference, and read a unit’s tasks and task sheets.
Units
units (aliases courses, projects) lists what you’re enrolled in. By default it shows active units only; --include-inactive adds past ones. units show UNIT returns the unit’s task definitions alongside your project for it — including target_grade and submitted_grade at the project level, and per task a target_grade / target_grade_label, current grade / grade_label, status / status_label, and the dates that decide whether it’s overdue.
Full syntax: ontrack units.
Resolving UNIT
UNIT is a project ID, or the unit’s code or name exactly as OnTrack shows it. A digit-only reference is always read as a project ID directly. Anything else is matched, in order:
- An exact, case-insensitive match on the unit code, among your active units.
- Failing that, a case-insensitive substring match against the code or the name, among active units.
- Failing that, the same two passes again against every unit, including inactive ones.
ontrack refuses to guess: it exits with a usage error listing the matching project IDs, and you rerun the command with one of them.
The CLI never assumes what a unit code looks like — it resolves purely against your own unit list. Run
ontrack units --include-inactive to see the full vocabulary for your site.Tasks
tasks UNIT lists every task in the unit with its status and due date. tasks show returns one task’s full row plus its description, upload requirements, and whether it has a task sheet or resources. tasks read converts the task sheet PDF to Markdown and prints it — the same content, in a form you can grep or hand to an agent.
Full syntax: ontrack tasks.
Resolving TASK
TASK is the task abbreviation shown by ontrack tasks UNIT (for example 1.1), matched case-insensitively, or the numeric task definition ID.
Filtering by status
--status takes one or more raw OnTrack status values:
Only the first three —
not_started, working_on_it, need_help — are ones you can set yourself. The rest are set by OnTrack in response to a submission or a tutor action; see Task workflow for the states you can write and Downloads for pulling a task’s sheet or resources to disk.