Skip to main content

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.

Students have a read-oriented experience within the system. They can view the courses they are enrolled in, submit academic requests, and browse the enrollment history stack — but they cannot modify the course catalog, manage other students’ records, or perform any enrollment operations. All data shown in student-facing panels is automatically filtered to the authenticated student’s own carnet.

Available Panels

1

Mis cursos matriculados

Opens PanelMisMatriculas, which filters the shared ListaMatricula to display only the courses linked to the logged-in student’s carnet:
// MenuPrincipal.java — Mis cursos matriculados action
new PanelMisMatriculas(
    listaMatricula,
    usuarioActual.getCarnet(), // student's own carnet
    arbolEstudiantes
)
The panel calls ListaMatricula.buscarPorCarnet(carnet) internally to retrieve the filtered enrollment list. Students cannot view or modify enrollments belonging to other carnets.
2

Solicitudes

Opens PanelSolicitudesEstudiante, where students can submit new academic requests and track the status of existing ones. Requests are added to the shared Queue<Solicitud> (colaSolicitudes) and later resolved by an administrator through the Atender Solicitudes panel.
// MenuPrincipal.java — Solicitudes action
new PanelSolicitudesEstudiante(colaSolicitudes)
3

Historial Académico

Opens PanelHistorial, a read-only view of the PilaAcciones_U3 stack. Students can inspect the chronological history of all enrollment actions. The carnet array passed to the panel is derived from the full ArbolEstudiantes in-order traversal, but student users are expected only to review their own records.
// MenuPrincipal.java — Historial action
String[] arregloCarnets = carnets.toArray(new String[0]);
PanelHistorial panel = new PanelHistorial(pilaHistorial, arregloCarnets);

Panels Not Accessible to Students

The following buttons are hidden when the authenticated user is a student:
PanelVisibility Rule
Gestión de CursosesAdmin || esSecretaria — students excluded
Gestión de EstudiantesesAdmin || esSecretaria — students excluded
MatrículaesAdmin || esSecretaria — students excluded
Atender SolicitudesesAdmin only

Authentication

Students authenticate using their carnet as the username and the fixed password "1234". This is verified by CuentasEstudiantes.autenticar(), which reads from a local plain-text file rather than the SQL Server database:
// CuentasEstudiantes.java
public static final String PASSWORD_DEFECTO = "1234";

public static boolean autenticar(String usuario, String password) {
    if (usuario == null || password == null
            || !PASSWORD_DEFECTO.equals(password)) {
        return false;
    }
    // Reads ~/.proyecto_utp_aed_datos/cuentas_estudiantes.txt
    // Returns true if the trimmed username appears as a line in the file
}
The accounts file is located at:
~/.proyecto_utp_aed_datos/cuentas_estudiantes.txt
Each non-blank, non-comment line in the file is treated as a valid carnet. Authentication succeeds when the submitted username matches a line in the file and the password equals PASSWORD_DEFECTO.

Account Auto-Creation

Students do not self-register. CuentasEstudiantes.registrarPorMatricula(carnet) is called in two places to keep the accounts file up to date:
  1. During enrollment — when a secretary or administrator enrolls a student through the Matrícula panel (PanelMatricula), the method is called immediately after the enrollment is recorded successfully.
  2. On application startup — when PersistenciaAcademica.cargar() loads persisted data from disk, it iterates over every saved enrollment and calls registrarPorMatricula for each one, ensuring the accounts file remains consistent after a restart.
// PanelMatricula.java — called after a successful enrollment
CuentasEstudiantes.registrarPorMatricula(carnet);

// PersistenciaAcademica.java — called for every enrollment during data load
listaMatricula.recorrer(
    m -> CuentasEstudiantes.registrarPorMatricula(m.getEstudiante().getCarnet())
);
The underlying method is idempotent — if the carnet already exists in the file it is simply skipped, so calling it multiple times has no side effects:
// CuentasEstudiantes.java
public static void registrarPorMatricula(String carnetRaw) {
    String carnet = Strings.nullToEmpty(carnetRaw).trim();
    if (carnet.isEmpty()) return;

    File f = archivo();
    FileUtils.forceMkdir(f.getParentFile());
    Set<String> carnets = leerCarnets(f);
    if (carnets.contains(carnet)) return; // idempotent — skip if already present

    carnets.add(carnet);
    FileUtils.writeLines(f, StandardCharsets.UTF_8.name(), carnets);
}
A student account is created the first time the student is enrolled. Until that enrollment occurs, the carnet is not present in the accounts file and the student cannot log in.

The Usuario Object for Students

When a student successfully authenticates, UsuarioDAO constructs the Usuario object with the carnet field populated:
// UsuarioDAO.java — autenticarFallback(), student branch
if (CuentasEstudiantes.autenticar(username, password)) {
    return new Usuario(username, password, "Estudiante", username);
    //                                                   ^^^^^^^^
    //                               carnet = username (the carnet they logged in with)
}
This carnet is later retrieved by MenuPrincipal via usuarioActual.getCarnet() to filter enrollment data in PanelMisMatriculas. Compare this with the Usuario constructor used for admin and secretary accounts, where carnet is null:
// Usuario.java — constructors
public Usuario(String username, String password, String rol) {
    this(username, password, rol, null); // carnet = null
}

public Usuario(String username, String password, String rol, String carnet) {
    // carnet is set only when provided (students)
    this.carnet = carnet;
}
Students cannot change their own password. The password is always "1234" — the value of CuentasEstudiantes.PASSWORD_DEFECTO. If a password reset mechanism is needed in the future, it would require modifying CuentasEstudiantes to support a username:password file format instead of carnet-per-line.
Because the accounts file stores only carnets (no hashed passwords), anyone with read access to ~/.proyecto_utp_aed_datos/cuentas_estudiantes.txt can enumerate all student carnets. Restrict filesystem permissions on that directory in multi-user environments.

Build docs developers (and LLMs) love