/app/maestro/clases/{class_id}/actividades.
Activity states
The activities page sorts tasks into three buckets:| State | Meaning |
|---|---|
| Pendientes | Due date has passed; submissions are waiting to be graded |
| En Curso | Currently open; students can still submit within the period |
| Finalizadas | Closed and fully graded |
Creating an activity
Open the activity form
Click the + button in the activities header. A right-side drawer opens with a blank form.
Fill in the activity details
| Field | Required | Notes |
|---|---|---|
| Title | Yes | Displayed to students on their class page |
| Description | Yes | Full text shown on the activity card |
| Type | Yes | simple (multiple choice) or development (open-ended) |
| Start date | Yes | Activity becomes visible to students on this date |
| Due date | Yes | Deadline for student submissions |
| Max qualification | Yes | Maximum numeric score for this activity |
| Questions | Yes | Defined inline in the form; at least one required |
Add questions
For simple type, each question has a prompt, a set of options, and one correct answer marked. For development type, each question is an open prompt that students answer in free text.
If the start date is in the past when you create or edit an activity, the
start_at, max_qualification, task, and type fields are excluded from the update payload — only title, description, finish_at, deleted, and students are updated.Editing an activity
Editing is only allowed for activities that are En Curso (the start date has not yet passed). Click the pencil icon on the activity card. The same form drawer opens pre-populated. Saving sends the same endpoint with the existingid field set.
For activities in Pendientes or Finalizadas state, the drawer opens in read-only mode (FormTaskReadOnly) — you can review details but not change them.
Cloning an activity
Click the copy icon on any activity card to duplicate it. The cloned activity gets:- The same title with ” (copia)” appended
- Fresh UUIDs for all questions and options
id: nullso it is treated as a new insert
Deleting an activity
start_at is in the future; if not, it returns an error. Otherwise it soft-deletes the task record.
Viewing student submissions
Click Evaluaciones on any activity card to go to/app/maestro/clases/{class_id}/actividades/{task_id}. This page shows:
- A summary card with title, description, date range, and max score
- A data table listing every student submission with delivery date and current grade
- A sidebar panel with aggregate stats: assigned, submitted, not submitted, min/max score, graded, not graded
AI content generation tool
The teacher-only endpointPOST /api/teacher/tool-generate uses a large language model (via the Groq API, model openai/gpt-oss-120b) to draft activity content. You can invoke it from the activity form.
Available tools
refrescar-conocimiento
Generates a topic summary with key concepts, common errors, a checklist, and three worked examples with mini-exercises. No age parameter required.
creacion-ejemplos
Produces five classroom-ready examples adapted to the specified student age. Each example has a context description and step-by-step instructions for the teacher.
creacion-examenes
Builds a full exam with MCQ and/or open-ended questions. You control the question count (4–30), type (
single, development, or both), and age level.preguntas-repaso
Generates 10 Socratic review questions with hints and model answers, adapted to the student age.
contextos-mundo-real
Produces a real-world context for the topic: an overview, a named concrete example (e.g., ChatGPT, Tesla Autopilot), and a step-by-step explanation of how it works.
Request format
The endpoint accepts JSON (not form data):| Field | Type | Notes |
|---|---|---|
tool | string | One of the five allowed tool names |
topic | string | Max 280 characters |
age | number | Clamped to 3–99; not used for refrescar-conocimiento |
notes | string | Optional context; max 900 characters |
exam.questions_count | number | 4–30; only for creacion-examenes |
exam.question_type | string | single, development, or both; only for creacion-examenes |
The
tool-generate endpoint is restricted to users with role === 'teacher'. Requests from other roles receive a 401 response.API reference
| Endpoint | Method | Purpose |
|---|---|---|
/api/teacher/create-update-activities | POST | Create or update an activity |
/api/teacher/delete-activity | POST | Soft-delete an activity (only before start date) |
/api/teacher/tool-generate | POST | AI-assisted activity content generation |