Gradable artefacts: rubrics, due dates, AI grading, human-in-the-loop.
An Assignment is something you grade. A Submission is a single
student’s response to it. Submissions hold both the response and the
grade, because in our experience the two need to live next to each
other: AI grading, human grading, regrades, comments, files.
await hk.submissions.create({ assignment_id: "asg_123", student_id: "usr_123", content: { text: "Lorentz invariance means that the laws of physics ..." },});
$hk->submissions->create([ 'assignment_id' => 'asg_123', 'student_id' => 'usr_123', 'content' => ['text' => 'Lorentz invariance means that the laws of physics ...'],]);
await hk.submissions.update(submissionId, { grade_manual: 9.0, grader_comments: "Strong on conceptual clarity; missed the bit on simultaneity.",});
$hk->submissions->update($submissionId, [ 'grade_manual' => 9.0, 'grader_comments' => 'Strong on conceptual clarity; missed the bit on simultaneity.',]);
The human grade always wins where present; AI grades stay attached for
audit.
// 1. AI grades all of themfor (const sub of submissions) { await hk.submissions.gradeWithAi(sub.id);}// 2. Show teacher the AI grade + rationale; teacher confirms or edits// in your UI// 3. Save with a manual grade (optional) and mark reviewedawait hk.submissions.update(submissionId, { grade_manual: teacherDecision.score, grader_comments: teacherDecision.notes, human_review_status: "reviewed",});
// 1. AI grades all of themforeach ($submissions as $sub) { $hk->submissions->gradeWithAi($sub->id);}// 2. Show teacher the AI grade + rationale; teacher confirms or edits// in your UI// 3. Save with a manual grade (optional) and mark reviewed$hk->submissions->update($submissionId, [ 'grade_manual' => $teacherDecision->score, 'grader_comments' => $teacherDecision->notes, 'human_review_status' => 'reviewed',]);
This is the workflow we recommend for everything other than purely
formative quizzes. It’s fast, it’s auditable, and it keeps a teacher
on the hook for the final mark.