Skip to main content
Activities are tasks assigned to all approved students in a class. Each activity has a type, a time window, a maximum score, and a set of questions. Students submit responses, and you grade them. Activities are managed at /app/maestro/clases/{class_id}/actividades.

Activity states

The activities page sorts tasks into three buckets:
StateMeaning
PendientesDue date has passed; submissions are waiting to be graded
En CursoCurrently open; students can still submit within the period
FinalizadasClosed and fully graded
You can switch between states using the filter buttons. A search bar lets you filter by title or description within the active state.

Creating an activity

1

Open the activity form

Click the + button in the activities header. A right-side drawer opens with a blank form.
2

Fill in the activity details

FieldRequiredNotes
TitleYesDisplayed to students on their class page
DescriptionYesFull text shown on the activity card
TypeYessimple (multiple choice) or development (open-ended)
Start dateYesActivity becomes visible to students on this date
Due dateYesDeadline for student submissions
Max qualificationYesMaximum numeric score for this activity
QuestionsYesDefined inline in the form; at least one required
3

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.
4

Save the activity

Submit the form. A POST is sent to /api/teacher/create-update-activities:
POST /api/teacher/create-update-activities
Content-Type: multipart/form-data

id_class=<class_id>
title=Introduction to Fractions
description=Practice simplifying fractions.
type_task=simple
start_at=2026-03-25T00:00:00
finish_at=2026-04-01T00:00:00
max_qualification=10
task=[{"id":"...","question":"What is 1/2 simplified?","options":[...]}]
On success, the server inserts the activity into the tasks table and sends a push and email notification to all approved students in the class.
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 existing id 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: null so it is treated as a new insert
The clone form opens immediately so you can adjust details before saving.

Deleting an activity

Activities can only be deleted before their start date. Once start_at is in the past, the delete button is hidden and the API will reject the request.
POST /api/teacher/delete-activity
Content-Type: multipart/form-data

id_task=<task_id>
The server first checks that 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
See Grading for how to enter scores from this view.

AI content generation tool

The teacher-only endpoint POST /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):
POST /api/teacher/tool-generate
Content-Type: application/json

{
  "tool": "creacion-examenes",
  "topic": "Fracciones",
  "age": 12,
  "notes": "Enfocarse en simplificación y equivalencias.",
  "exam": {
    "questions_count": 10,
    "question_type": "both"
  }
}
FieldTypeNotes
toolstringOne of the five allowed tool names
topicstringMax 280 characters
agenumberClamped to 3–99; not used for refrescar-conocimiento
notesstringOptional context; max 900 characters
exam.questions_countnumber4–30; only for creacion-examenes
exam.question_typestringsingle, development, or both; only for creacion-examenes
The endpoint returns a JSON object matching the schema for the requested tool. If the model returns invalid JSON on the first attempt, the endpoint retries once before returning an error.
The tool-generate endpoint is restricted to users with role === 'teacher'. Requests from other roles receive a 401 response.

API reference

EndpointMethodPurpose
/api/teacher/create-update-activitiesPOSTCreate or update an activity
/api/teacher/delete-activityPOSTSoft-delete an activity (only before start date)
/api/teacher/tool-generatePOSTAI-assisted activity content generation