Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/andrespaul123/micole-flutter/llms.txt

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

The Student Portal gives enrolled students a single place to view their weekly schedule, browse their subjects, track pending tasks and upcoming exams, access shared library materials, and submit task deliverables — all scoped to the tenant (school) they belong to.

Route Map

RouteScreenDescription
/mi-horarioEstudianteHorarioScreenFull weekly schedule
/estudiante/materiasEstudianteMateriasScreenList of enrolled subjects
/estudiante/materias/:asignacionIdEstudianteMateriaDetalleScreenSingle subject detail
/estudiante/materias/:asignacionId/pendientesEstudianteAgendaScreen (tipo=tarea)Pending homework tasks
/estudiante/materias/:asignacionId/examenesEstudianteAgendaScreen (tipo=examen)Scheduled exams
/estudiante/materias/:asignacionId/bibliotecaEstudianteBibliotecaScreenLibrary files for the subject
/estudiante/materias/:asignacionId/pendientes/:agendaId/entregaEstudianteEntregaTareaScreenTask submission form

My Schedule

Route: /mi-horario The schedule screen lists every class block assigned to the student’s course and parallel for the current academic period.

EstudianteHorarioRepository

class EstudianteHorarioRepository {
  final Dio _dio;
  EstudianteHorarioRepository(this._dio);

  Future<List<HorarioItem>> getHorario() async {
    final response = await _dio.get('/estudiante/horario');
    return (response.data as List)
        .map((e) => HorarioItem.fromJson(e))
        .toList();
  }
}
Endpoint: GET /estudiante/horario

HorarioItem Model

id
int?
Unique identifier for the schedule slot.
dia
String?
Day of the week (e.g. "Lunes", "Martes").
horaInicio
String?
Start time in HH:mm format. Mapped from hora_inicio.
horaFin
String?
End time in HH:mm format. Mapped from hora_fin.
materia
String?
Subject name for this slot.
profesor
String?
Full name of the teacher assigned to this slot.

My Subjects

Route: /estudiante/materias Displays the list of subjects the student is enrolled in for the current period.

EstudianteMateriaRepository

class EstudianteMateriaRepository {
  final Dio dio;
  EstudianteMateriaRepository(this.dio);

  Future<List<EstudianteMateria>> getMaterias() async {
    final response = await dio.get('/estudiante/materias');
    return (response.data as List)
        .map((e) => EstudianteMateria.fromJson(e))
        .toList();
  }

  Future<MateriaDetalle> getDetalleMateria(int asignacionId) async {
    final response = await dio.get('/estudiante/materias/$asignacionId');
    return MateriaDetalle.fromJson(response.data);
  }
}
Endpoints:
  • GET /estudiante/materias — list of enrolled subjects
  • GET /estudiante/materias/:asignacionId — detail for a single subject

EstudianteMateria Model

asignacionId
int
required
The teaching assignment ID. Used as the key throughout child routes. Mapped from asignacion_id.
materia
String
required
Subject name.
profesor
String
required
Teacher’s full name.

Subject Detail

Route: /estudiante/materias/:asignacionId Shows full detail for a single subject, including its weekly schedule blocks.

MateriaDetalle Model

asignacionId
int
required
Teaching assignment ID. Mapped from asignacion_id.
materia
String
required
Subject name.
profesor
String
required
Teacher’s full name.
horarios
List<HorarioMateria>
required
Weekly schedule slots for this subject. Each entry contains dia, horaInicio, and horaFin.

Pending Tasks

Route: /estudiante/materias/:asignacionId/pendientes Lists homework tasks assigned to the student for a specific subject, filtered by tipo=tarea.

EstudianteAgendaRepository

class EstudianteAgendaRepository {
  final Dio dio;
  EstudianteAgendaRepository(this.dio);

  Future<List<PadreAgenda>> getPendientes({
    String? tipo,
    int? asignacionId,
  }) async {
    final response = await dio.get(
      '/estudiante/pendientes',
      queryParameters: {
        if (asignacionId != null) 'asignacion_id': asignacionId,
        if (tipo != null) 'tipo': tipo,
      },
    );
    return (response.data as List)
        .map((e) => PadreAgenda.fromJson(e))
        .toList();
  }
}
Endpoint: GET /estudiante/pendientes?asignacion_id=:id&tipo=tarea

PadreAgenda Model (used for tasks and exams)

id
int
required
Agenda entry ID.
titulo
String
required
Title of the task or exam.
descripcion
String
required
Detailed description or instructions.
tipo
String
required
Entry type: "tarea" for tasks, "examen" for exams.
fechaEntrega
String?
Due date in ISO format. Mapped from fecha_entrega.
materia
String
required
Name of the subject this entry belongs to.
archivos
List<AgendaArchivo>
Attached reference files. Each item has id, nombreOriginal, and url.

Exams

Route: /estudiante/materias/:asignacionId/examenes Uses the same EstudianteAgendaRepository.getPendientes() method as the tasks screen, but passes tipo: "examen" to filter for exam entries only. Endpoint: GET /estudiante/pendientes?asignacion_id=:id&tipo=examen

Library

Route: /estudiante/materias/:asignacionId/biblioteca Shows the shared study materials (PDFs, documents, links) published by the teacher for this subject.

EstudianteAgendaRepository – getBiblioteca

Future<List<EstudianteBiblioteca>> getBiblioteca({
  int? asignacionId,
}) async {
  final response = await dio.get(
    '/estudiante/biblioteca',
    queryParameters: {
      if (asignacionId != null) 'asignacion_id': asignacionId,
    },
  );
  return (response.data as List)
      .map((e) => EstudianteBiblioteca.fromJson(e))
      .toList();
}
Endpoint: GET /estudiante/biblioteca?asignacion_id=:id

EstudianteBiblioteca Model

id
int
required
Library entry ID.
titulo
String
required
Title of the library item.
descripcion
String
required
Description or summary.
materia
String
required
Subject the item belongs to.
profesor
String
required
Teacher who published this material.
createdAt
String
required
Creation timestamp. Mapped from created_at.
archivos
List<AgendaArchivo>
required
Downloadable files. Each item exposes id, nombreOriginal, and a fully-resolved url.

Task Submission

Route: /estudiante/materias/:asignacionId/pendientes/:agendaId/entrega Allows the student to submit their work for a task. Submissions consist of an optional text comment and one or more uploaded files.

EntregaTareaRepository

class EntregaTareaRepository {
  final Dio dio;
  EntregaTareaRepository(this.dio);

  /// Fetch an existing submission for a task (returns null if not yet submitted).
  Future<EntregaTarea?> getEntrega(int agendaId) async {
    final response = await dio.get('/estudiante/tareas/$agendaId/entrega');
    if (response.data == null) return null;
    return EntregaTarea.fromJson(response.data);
  }

  /// Create a new submission record; returns the new entrega ID.
  Future<int> crearEntrega({
    required int agendaId,
    String? comentario,
  }) async {
    final response = await dio.post(
      '/estudiante/tareas/$agendaId/entrega',
      data: {
        if (comentario != null) 'comentario': comentario,
      },
    );
    return response.data['id'];
  }

  /// Upload one or more files to an existing submission.
  Future<List<EntregaTareaArchivo>> subirArchivos({
    required int entregaId,
    required List<MultipartFile> archivos,
  }) async {
    final formData = FormData();
    for (final file in archivos) {
      formData.files.add(MapEntry('archivos[]', file));
    }
    final response = await dio.post(
      '/estudiante/entregas/$entregaId/archivos',
      data: formData,
    );
    return (response.data['archivos'] as List)
        .map((e) => EntregaTareaArchivo.fromJson(e))
        .toList();
  }

  /// Delete a single uploaded file from a submission.
  Future<void> eliminarArchivo(int archivoId) async {
    await dio.delete('/estudiante/entrega-archivos/$archivoId');
  }
}

Submitting a Task — Step by Step

1

Create the submission record

Call crearEntrega() with the agendaId and an optional comment. The server returns the new entregaId.
final entregaId = await entregaTareaRepository.crearEntrega(
  agendaId: agenda.id,
  comentario: 'Adjunto mi resolución completa.',
);
2

Upload files

Wrap each picked file as a MultipartFile and pass the list to subirArchivos().
final archivos = pickedFiles.map((path) =>
  MultipartFile.fromFileSync(path, filename: basename(path)),
).toList();

final uploaded = await entregaTareaRepository.subirArchivos(
  entregaId: entregaId,
  archivos: archivos,
);
3

Confirm upload

The response contains the list of EntregaTareaArchivo objects that were saved. Display them in the UI or navigate back to the task list.

EntregaTarea Model

id
int
required
Submission record ID.
comentario
String?
Optional text comment from the student.
fechaEntrega
String?
Timestamp of when the submission was created. Mapped from fecha_entrega.
estado
String
required
Submission state (e.g. "pendiente", "revisado").
archivos
List<EntregaTareaArchivo>
required
Files attached to this submission.

EntregaTareaArchivo Model

id
int
required
File record ID.
nombreOriginal
String
required
Original filename as uploaded by the student. Mapped from nombre_original.
url
String
required
Fully resolved download URL. Relative URLs are automatically prefixed with the base server address.

Build docs developers (and LLMs) love