Enrollment is managed through two complementary panels.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kenri89/PROYECTO_UTP_AED_1_1/llms.txt
Use this file to discover all available pages before exploring further.
PanelMatricula is available to Administrator and Secretary roles and provides the full enrollment management interface — register, update, cancel, and undo. PanelMisMatriculas is exclusive to Students and shows only their own enrolled courses. Both panels share the same ListaMatricula singly-linked list as the in-memory store, backed by MatriculaDAO for SQL Server persistence. PanelMatricula also holds a reference to the shared PilaAcciones_U3 stack, which it reads (pops) to implement the Deshacer (undo) feature that reverses recent enrollment operations.
The Matricula Data Model
A Matricula record links one Estudiante to one Curso. It has no independent scalar fields of its own — its logical identity is the composite key (carnet, codigoCurso).
| Field | Type | Description | Constraint |
|---|---|---|---|
estudiante | Estudiante | The enrolled student (full object reference). | Non-null (Guava checkNotNull) |
curso | Curso | The course being enrolled in. | Non-null (Guava checkNotNull) |
ArbolEstudiantes and ListaCursos) before the Matricula is constructed, ensuring referential integrity at the application layer.
ListaMatricula — The Core Structure
ListaMatricula is a custom singly-linked list whose nodes each hold a Matricula reference and a pointer to the next node. It supports O(n) traversal, O(n) search by composite key, and O(1) head deletion.
Key methods used by the enrollment panels:
| Method | Description |
|---|---|
agregar(Matricula) | Appends a new node at the tail. |
buscar(carnet, codigoCurso) | Linear scan returning the matching Matricula or null. |
buscarPorCarnet(carnet) | Returns a List<Matricula> filtered by student carnet. |
eliminar(carnet, codigoCurso) | Removes the node matching the composite key; returns true on success. |
recorrer(Consumer<Matricula>) | Iterates all nodes, used for table rendering and export. |
limpiar() | Resets the list to empty (called before reloading from SQL). |
Enrollment Operations
Enroll a Student (Registrar)
Select a Carnet and a Código Curso from the combo-boxes (populated from
ArbolEstudiantes.inorden() and ListaCursos.recorrer() respectively), then click Registrar.The panel resolves both objects from their structures, calls MatriculaDAO.insertar(carnet, codigo), and on success reloads the list from SQL. It also registers the student account via CuentasEstudiantes.registrarPorMatricula(carnet).Search Enrollments by Student
ListaMatricula.buscarPorCarnet(carnet) performs a linear scan and returns every Matricula whose student carnet matches (case-insensitive). This is used both by the admin table view and by PanelMisMatriculas for the student self-view.Search a Specific Enrollment
When a row is selected in the context menu for update, the panel looks up the exact
Matricula by the composite key:Cancel an Enrollment (Eliminar)
Right-click a row and choose Eliminar. A confirmation dialog is shown. On approval,
MatriculaDAO.eliminar(carnet, codigoCurso) removes the record from SQL and cargarMatriculasDesdeSQL() rebuilds the in-memory list.Undo the Last Action (Deshacer)
Click Deshacer to pop the most recent action from
PilaAcciones_U3 and reverse it. The stack supports three reversible action types:| Action type | Undo behaviour |
|---|---|
"REGISTRO" | Calls MatriculaDAO.eliminar() to remove the enrollment. |
"ELIMINACIÓN" | Calls MatriculaDAO.insertar() to restore the enrollment. |
"ACTUALIZACIÓN" | Removes the current record and re-inserts the previous state. |
Student Self-View (PanelMisMatriculas)
When a student logs in, the PanelMisMatriculas panel is shown instead of the full enrollment manager. It receives the logged-in student’s carnet (from Usuario.getCarnet()) and uses buscarPorCarnet to filter only their own records:
If the logged-in student has no carnet linked to their user account, or has not yet been enrolled by the secretary, the panel displays an informational dialog instructing them to contact the secretariat.
Action History Tracking
PanelMatricula receives the shared PilaAcciones_U3 pilaHistorial reference from MenuPrincipal. The Deshacer button pops the most recent AccionMatricula off the stack and reverses the corresponding database operation. The stack is populated externally — for example by other components or future integrations that call pilaHistorial.apilar(new AccionMatricula(...)). See the History page for full details on the stack structure and AccionMatricula fields.
Excel Export
Both panels support exporting enrollments to Excel. Click Exportar a Excel (admin panel) or Descargar reporte (student panel). A file-chooser opens:- Admin panel default filename:
matriculas.xlsx - Student panel default filename:
reporte_matriculas.xls
ListaMatricula containing only that student’s records is passed instead. The exported sheet contains four columns:
| Column A | Column B | Column C | Column D |
|---|---|---|---|
| Carnet | Estudiante | Código Curso | Curso |