The Assignments and Practice APIs let teachers create exercise sets for students — either manually curated or automatically selected using IRT (Item Response Theory) Fisher information maximization. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vruizz22/innova-backend-serverless/llms.txt
Use this file to discover all available pages before exploring further.
assignments module handles persisted, multi-exercise assignments that appear in the student’s task list; the practice module complements it with a real-time recommender that always surfaces the single most informative exercise for a given student.
POST /assignments
Create a new assignment for a whole course or a specific subset of students. The teacher specifies exercise IDs, an optional due date, and a reason code that signals whether the assignment was manually curated or generated by the recommender. Auth: JWT (bearer token required; caller must be a teacher)Request body
Human-readable assignment title displayed to students.
Ordered list of exercise UUIDs to include. The array order determines the display sequence.
Describes how the assignment was created. Must be one of the
AssignmentReason enum values:| Value | Description |
|---|---|
TEACHER_MANUAL | Teacher selected exercises by hand. |
PRACTICE_RECOMMENDER | Exercises were selected by the IRT Fisher-information recommender. |
UUID of the course. When provided, the assignment targets all enrolled students in the course.
Array of student UUIDs. Use this instead of (or alongside)
courseId to target a specific subset of students.ISO 8601 date-time string for the due date (e.g.
"2024-11-30T23:59:00.000Z"). Omit for open-ended assignments.Response
Returns the fullAssignment Prisma record, including the nested assignmentExercises (with exercise details) and targets (per-student status records).
UUID of the created assignment.
Assignment title.
The
AssignmentReason value that was stored.ISO 8601 due date, or
null.Ordered exercise entries, each containing the full
exercise record.One entry per targeted student with an initial
status of PENDING.Example request
POST /assignments/recommend
Create an IRT-recommended assignment for a specific student. The server computes the IRT 2-PL Fisher information for every active exercise against the student’s current BKT mastery estimates, selects the top-5 highest-information exercises (optionally scoped to a topic), and persists them as an assignment. Auth: JWT (bearer token required; caller must be a teacher)Query parameters
UUID of the student for whom exercises should be recommended.
Curriculum topic UUID. When provided, only exercises belonging to that topic are considered.
Response
Same shape asPOST /assignments. The title is auto-generated (e.g. "Práctica recomendada — ALG-2") and reason is always PRACTICE_RECOMMENDER.
Example request
Recommendations respect prerequisite gating. If a topic has prerequisites whose
pKnown is below 0.6, that topic’s exercises are excluded from the candidate pool regardless of Fisher information score.GET /assignments/student/:id
List all assignments targeted at a student. Includes the full exercise list (with topic metadata) for each assignment, ordered newest first. This endpoint is intentionally broad — it can be called by the student themselves, a teacher, or a parent view. Auth: JWTPath parameters
UUID of the student whose assignments to retrieve.
Response
Returns an array ofAssignmentTarget records, each joined with the parent Assignment and its ordered exercises.
Assignment UUID.
Assignment title.
Due date if set.
Per-student status:
PENDING, IN_PROGRESS, or COMPLETED.Ordered exercises with full topic information.
Example request
POST /practice/assign
Create an adaptive practice assignment for a single student. This is a convenience wrapper aroundPOST /assignments that uses the TEACHER_MANUAL reason and accepts itemIds (synonymous with exerciseIds).
Auth: JWT (bearer token required; caller must be a teacher)
Request body
UUID of the student to assign practice to.
Array of exercise UUIDs to include in the practice assignment.
Optional ISO 8601 due date string.
Response
UUID of the created assignment.
UUID of the assigned student (echoed from request body).
The exercise IDs that were assigned (echoed from request body).
ISO 8601 due date, if one was provided.
Example request
GET /practice/recommend-next
Return the single exercise from the active pool that maximises IRT 2-PL Fisher information for the student’s current ability estimate. This endpoint does not persist anything — it is designed for “next card” display in a live practice session. Auth: JWT Algorithm:- Load the student’s BKT mastery estimates (
pKnown) per topic. - Convert each
pKnownto a logit ability estimate θ (clamped to the range [0.05, 0.95]). - For every active exercise, compute
I(θ) = a² · P(θ) · (1 − P(θ))whereais the IRT discrimination parameter andbis the difficulty parameter. - Return the exercise with the highest
I(θ).
pKnown = 0.3 (θ ≈ −0.85) is assumed, which steers toward slightly-below-average difficulty items.
Query parameters
UUID of the student for whom to recommend the next exercise.
Curriculum domain UUID. When provided, only exercises whose topic belongs to this domain are considered (capped at 500 records).
Response
The recommended exercise.
The logit ability estimate θ that was used for scoring. Useful for debugging adaptive behaviour.
Human-readable explanation, e.g.
"θ = -0.85, b = -0.90 → I(θ) = 0.421 (Fisher máx)".Example request
Example response
Recommend vs. assign
POST /assignments/recommend and GET /practice/recommend-next both use Fisher information to select exercises, but they serve different purposes:/assignments/recommend— Creates a persistedAssignmentrecord for a student (top-5 exercises). The student sees it in their task list with a due date./practice/recommend-next— Returns a single exercise object for immediate display. Nothing is saved. Ideal for a “next question” button in a live adaptive practice UI.