Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Renzo717/Aula-Virtual-Universidad-Radiolocucion/llms.txt

Use this file to discover all available pages before exploring further.

Activities (actividades) are the primary assessment tool inside each virtual classroom. NuestraVoz offers two currently-enabled activity types — a straightforward file upload and a fully auto-graded online form — both managed through the same lifecycle of states and the same deadline and late-submission controls.

Activity Types

entregable_simple

Students upload one or more files (up to 10 per submission, 20 MB each). The teacher manually reviews the files and assigns a grade.

formulario

The teacher builds a multiple-choice questionnaire. When a student submits their answers the system calculates the score automatically — no manual grading needed.
Two additional types — trabajo_practico and examen — appear in the ACTIVIDAD_TIPOS constant but are not yet enabled in the interface (marked enabled: false).

Activity Lifecycle

Every activity moves through three states:
1

activa

The activity is open. Students who are enrolled can submit (subject to deadline rules). This is the initial state when an activity is created.
2

cerrada

The teacher has manually closed submissions. Students cannot submit new responses; existing submissions remain visible. The teacher can reopen the activity at any time.
3

terminada

The activity is fully concluded. No further submissions are accepted. The state is set by the teacher via PATCH /api/aula/:materiaId/actividades/:actividadId/estado.

Creating an Activity

Only admin and docente users may create activities.
POST /api/aula/:materiaId/actividades

{
  "titulo": "Trabajo Práctico N°2",
  "descripcion": "Grabá un informe radial de 3 minutos sobre un tema de actualidad.",
  "tipo": "entregable_simple",
  "fecha_entrega": "2025-09-15T23:59:00.000Z",
  "permite_entrega_tardia": false
}
titulo
string
required
Name of the activity shown to students. Minimum 2 characters.
tipo
string
default:"entregable_simple"
Activity type. One of entregable_simple, formulario, trabajo_practico, or examen. Only entregable_simple and formulario are currently enabled in the UI.
fecha_entrega
string
ISO 8601 deadline. If omitted the activity has no deadline.
permite_entrega_tardia
boolean
default:"true"
When false the submission endpoint rejects any attempt after fecha_entrega if the student has not already started their submission.
preguntas
array
Required only when tipo is formulario. An array of question objects — see the Formulario Schema section below.

File Submissions (entregable_simple)

Students submit work via POST /api/aula/:materiaId/actividades/:actividadId/entrega using multipart/form-data.

File limits

Up to 10 files per submission, 20 MB each. Files are stored in Supabase Storage (bucket recursos) at entregas/:actividadId/:userId/:timestamp_filename.

Re-submission

If a submission already exists the endpoint updates it (HTTP 200) rather than creating a duplicate. Students can add more files or update their comment until the activity is graded or closed.

Late Submissions

When a student submits after fecha_entrega:
  • If permite_entrega_tardia is true the submission is accepted and stored with tardia: true.
  • If permite_entrega_tardia is false and no prior submission exists, the endpoint returns 403 La entrega está cerrada.
Once a submission has been calificada the student can no longer update it, regardless of late-submission policy.

Submission States

estadoMeaning
entregadaStudent has uploaded files; awaiting teacher review.
calificadaTeacher has assigned a grade (or the form was auto-graded).

Formularios: Auto-Graded Online Forms

When tipo is formulario the teacher builds the questionnaire in the same POST /api/aula/:materiaId/actividades request, passing a preguntas array.

Formulario Schema

// One question inside the `preguntas` array
{
  enunciado: string;        // The question text (min 2 chars)
  multiple: boolean;        // true → multiple correct answers allowed
  puntos: number;           // Points this question contributes (> 0)
  opciones: Array<{
    texto: string;          // Option label (min 1 char)
    es_correcta: boolean;   // Whether this option is a correct answer
  }>;
}
The sum of all puntos values across every question in a formulario must equal exactly 10. The API returns a validation error if the total deviates by more than 0.001.
Each question must have at least 2 options and at least 1 correct option. A single-answer question (multiple: false) must have exactly 1 correct option.

Example: Two-question form totalling 10 points

{
  "titulo": "Quiz — Géneros radiales",
  "tipo": "formulario",
  "permite_entrega_tardia": false,
  "preguntas": [
    {
      "enunciado": "¿Qué género radial se caracteriza por la narración en primera persona?",
      "multiple": false,
      "puntos": 5,
      "opciones": [
        { "texto": "Documental",       "es_correcta": false },
        { "texto": "Testimonio",       "es_correcta": true  },
        { "texto": "Radioteatro",      "es_correcta": false }
      ]
    },
    {
      "enunciado": "Marcá todos los géneros de no-ficción:",
      "multiple": true,
      "puntos": 5,
      "opciones": [
        { "texto": "Documental",       "es_correcta": true  },
        { "texto": "Informe radial",   "es_correcta": true  },
        { "texto": "Radioteatro",      "es_correcta": false }
      ]
    }
  ]
}

Auto-Grading Logic

When a student submits their answers via POST /api/aula/:materiaId/actividades/:actividadId/formulario-entrega, the calcularNotaFormulario function runs immediately:
1

Per-question scoring

For each question, the score ratio is computed as (correctasMarcadas − incorrectasMarcadas) / totalCorrectas, clamped to [0, 1]. That ratio is multiplied by the question’s puntos and rounded to two decimal places. Selecting incorrect options therefore reduces the score proportionally, and selecting zero correct options yields 0 points for that question.
2

Total score

All per-question scores are summed and rounded to two decimal places. The final nota is clamped to [0, 10].
3

Immediate result

The submission is inserted with estado: "calificada" and the computed nota. Students receive their resultados array in the response — one entry per question showing puntos_obtenidos and whether each option was correct.
Before a student has submitted, the form questions are served with es_correcta stripped from each option (via ocultarRespuestasCorrectas). After submission, teachers and the submitting student can retrieve full results including correct-answer indicators.

Submitting a Formulario

POST /api/aula/:materiaId/actividades/:actividadId/formulario-entrega

{
  "respuestas": [
    {
      "pregunta_id": "uuid-of-question-1",
      "opcion_ids": ["uuid-of-selected-option"]
    },
    {
      "pregunta_id": "uuid-of-question-2",
      "opcion_ids": ["uuid-opt-a", "uuid-opt-b"]
    }
  ]
}
Every question must be answered — the API returns 400 Debés responder todas las preguntas if any are omitted. Each formulario can only be submitted once per student.

Grading (entregable_simple)

For file submissions, the teacher assigns a grade manually via:
PATCH /api/aula/:materiaId/actividades/:actividadId/entregas/:entregaId

{
  "nota": 8
}
nota
number
required
Numeric grade. Must be between 1 and 10 inclusive. Decimal values are accepted (e.g. 7.5).
On success the submission’s estado transitions to calificada.

Teacher View: Submission List

Teachers (and admins) retrieve all submissions for an activity:
GET /api/aula/:materiaId/actividades/:actividadId/entregas
Each entry in the response includes the full estudiante profile object, the list of archivos, the current estado, the nota (if graded), and a tardia boolean flag. For formulario activities, the equivalent endpoint is:
GET /api/aula/:materiaId/actividades/:actividadId/formulario-resultados
This returns every enrolled student alongside their submission (or null if they have not yet responded), making it easy to see who still needs to complete the quiz.

Student View

On the Actividades tab, students see each activity with a mi_entrega field attached:
interface MiEntregaResumen {
  estado: string;      // "entregada" | "calificada"
  nota: number | null;
  tardia: boolean;
}
A null value means the student has not yet submitted. The tardia flag is displayed as a visible badge in the UI so students know their submission was recorded as late.

Activity Materials (Teacher Attachments)

Teachers can attach reference materials to any entregable_simple activity:
POST /api/aula/:materiaId/actividades/:actividadId/material
Content-Type: multipart/form-data

archivos: <file1>, <file2>, ...   # up to 10 files, 20 MB each
Materials appear in the activity detail view as downloadable links for all students.

Build docs developers (and LLMs) love