Academic Periods and Evaluation Windows in Mi Cole
Define and manage the school year with academic periods and nested evaluation windows. Control the active period and organise grading cycles per school.
Use this file to discover all available pages before exploring further.
Academic periods represent the school year (or semester) during which instruction takes place. Each school can have multiple academic periods, but only one is active at any given time. Nested inside every academic period are evaluation periods (PeriodoEvaluacion)—discrete grading windows such as trimestres or quimestres—which drive grade book entries, assessments, and report cards throughout the year.
The active academic period is loaded automatically when the app starts via AcademicPeriodViewModel.loadPeriodoActivo(). All views that depend on the current period (courses, enrollments, grade books) read from periodoActivo without requiring the user to select it manually.
Endpoint:PATCH /api/periodos/:id/activarIn AcademicPeriodViewModel, calling activarPeriodo(id) patches the server, updates the local periodoActivo reference, and then refreshes the full list via loadPeriodos() so the UI reflects the new state immediately:
Future<bool> activarPeriodo(int id) async { await repository.activarPeriodo(id); // Update local reference for (final p in periodos) { if (p.id == id) { periodoActivo = AcademicPeriod( id: p.id, nombre: p.nombre, fechaInicio: p.fechaInicio, fechaFin: p.fechaFin, activo: true, ); } } await loadPeriodos(); // refresh full list return true;}
Evaluation periods (PeriodoEvaluacion) are grading windows nested inside an academic period. Typical examples include Primer Quimestre, Segundo Quimestre, or Trimestre 1–3.
class PeriodoEvaluacionRepository { final Dio _dio; PeriodoEvaluacionRepository(this._dio); // List evaluation periods for a given academic period Future<List<PeriodoEvaluacion>> getPeriodosEvaluacion(int periodoId) async { final response = await _dio.get( '/periodos/$periodoId/periodos-evaluacion', ); return (response.data as List) .map((e) => PeriodoEvaluacion.fromJson(e)) .toList(); } // Create a new evaluation period Future<PeriodoEvaluacion> createPeriodoEvaluacion({ required int periodoId, required String nombre, required int orden, }) async { final response = await _dio.post( '/periodos/$periodoId/periodos-evaluacion', data: {'nombre': nombre, 'orden': orden}, ); return PeriodoEvaluacion.fromJson(response.data); }}
Method
Endpoint
Description
getPeriodosEvaluacion(periodoId)
GET /api/periodos/:id/periodos-evaluacion
List all evaluation periods for an academic period