Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ariellukezz/admision-web/llms.txt

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

The Simulacro module provides a complete workflow for running mock university admission exams before the official admission cycle. Coordinators create simulacro sessions, participants register and pay the enrollment fee, answer sheets are uploaded and scored, and final results are published to a public API endpoint so participants can look up their scores by DNI. This module operates entirely independently from the main admission exam pipeline.
The Simulacro module is a self-contained process that runs on its own data tables (simulacro, inscripcion_simulacro, participantes_simulacro, detalle_examen_simulacro). It does not share enrollment or scoring records with the main admission process (postulante, puntajes, resultados).

Role and Access

The Simulacro role (id_rol = 6) gates all management routes. After login, users with this role are redirected to /simulacro. Every route under the /simulacro/* prefix is protected by both the auth and simulacro middleware. Attempting to access these routes with any other role returns a 403 No tienes permisos error.
Middleware file: app/Http/Middleware/Simulacro.php
Route prefix:    /simulacro
Auth redirect:   /simulacro  (after login with id_rol = 6)
RouteViewDescription
GET /simulacroSimulacro/Admin/indexAdmin dashboard
GET /simulacro/simulacrosSimulacro/SimulacrosSimulacro session list
GET /simulacro/inscripcionesSimulacro/Admin/Inscripciones/indexEnrolled participant list
GET /simulacro/participantesSimulacro/Admin/Participantes/indexParticipant registry
GET /simulacro/entradaSimulacro/Entrada/indexExam entry / check-in
GET /simulacro/pagosSimulacro/Admin/Pagos/indexPayment management
GET /simulacro/pagos-consultaSimulacro/Admin/Pagos/consultaPayment query/lookup
GET /verificacion-fotosVerfificacionD/indexPhoto verification

Simulacro Session Workflow

1

Coordinador creates a simulacro session

A coordinator creates a new session via POST /simulacro/save-simulacro handled by SimulacroController@saveSimulacro. Each Simulacro record stores:
  • nombre — session name (e.g., “Simulacro 2024-I”)
  • anio — exam year
  • estado — active/inactive toggle
  • ubigeo — geographic location (department / province / district) of the exam venue
  • fecha — auto-set to the creation date
  • id_usuario — authenticated coordinator
Existing sessions can be retrieved (paginated, searchable by name) through POST /simulacro/get-simulacrosSimulacroController@getSimulacros.
2

Participants register (InscripcionSimulacro)

Public participants self-register via SimulacroController@saveParticipante, which wraps participant creation and enrollment in a single database transaction:
DB::beginTransaction();

$participante = ParticipanteSimulacro::create([
    'tipo_doc'         => $request->tipo_doc,
    'nro_doc'          => $request->nro_doc,
    'paterno'          => $request->paterno,
    'materno'          => $request->materno,
    'nombres'          => $request->nombres,
    'sexo'             => $request->sexo,
    'fec_nacimiento'   => $fecha,
    'celular'          => $request->celular,
    'correo'           => $request->correo,
    'ubi_residencia'   => $request->ubigeo_residencia,
    'grado_instruccion'=> $request->grado,
    'id_colegio'       => $request->id_colegio,
]);

$inscripcion = InscripcionSimulacro::create([
    'id_estudiante' => $participante->id,
    'id_simulacro'  => 3,
    'estado'        => 1,
    'fecha'         => date('Y-m-d'),
    'terminos'      => $request->terminos,
    'id_programa'   => $request->programa,
]);

DB::commit();
Once enrolled, the coordinator can view participants through:
  • POST /simulacro/get-inscritos-simulacro — paginated list joined with programa, colegios, and ubigeo, searchable by name, DNI, school, or program.
  • POST /simulacro/get-participantes-simulacro — full participant detail including residence and school ubigeo.
A PDF enrollment voucher is generated on demand via SimulacroController@pdfInscripcion (GET /pdf-simulacro-inscripcion/{dni}) and stored at public/documentos/simulacro2023/{dni}.pdf.
3

Answer sheets uploaded and scored

Exam answer data and results are managed through the ResultadosController bulk-upload endpoints under the /calificacion prefix:
EndpointController MethodDescription
POST /calificacion/subir-excel-simulacroResultadosController@SubirResultadoUpload XLSX result file
POST /calificacion/carga-ide/{proceso}/{area}ResultadosController@cargaArchivoIdeLoad IDE answer data
POST /calificacion/carga-res/{proceso}ResultadosController@cargaArchivoResLoad response data
POST /calificacion/carga-pat/{proceso}ResultadosController@cargaArchivoPatLoad pattern/key file
Individual exam responses are recorded per-question via SimulacroController@saveRespuestas (POST /simulacro/save-respuestas) and the private guardarRespuesta helper, storing each answer with its nota (0, partial, or full score × ponderacion) into detalle_examen_simulacro.
4

Photo verification

Before results are published, participant photos are cross-checked at the dedicated route:
GET /verificacion-fotos
Middleware: auth, simulacro
Inertia view: VerfificacionD/index
This page is only accessible to authenticated Simulacro-role users. Coordinators use it to confirm that the photo on record matches the participant who attended the exam session.
5

Results computed and published

Aggregate scores per area are available through ResultadosController@getResultados (POST /get-puntaje-simulacro). Maximum scores per knowledge area (INGENIERÍAS, BIOMÉDICAS, SOCIALES) are retrieved by PuntajeController@getPunajesMaximos:
// PuntajeController.php
$res = DB::select("
  SELECT pun.AREA, maximos.max_puntaje, pun.dni, pun.paterno, pun.materno, pun.nombres, pun.programa
  FROM (
      SELECT AREA, MAX(puntaje + puntaje_vocacional) AS max_puntaje
      FROM puntajes
      WHERE id_proceso = 10
        AND AREA IN ('BIOMEDICAS', 'SOCIALES', 'INGENIERIAS')
        AND apto = 'SI'
      GROUP BY AREA
  ) AS maximos
  JOIN puntajes pun ON maximos.max_puntaje = (pun.puntaje + pun.puntaje_vocacional)
    AND pun.area = maximos.area
  WHERE pun.id_proceso = 10 AND pun.apto = 'SI'
");
Once published, results are available on the public API endpoint described below.

Exam Entry / Check-In

The entry sub-panel at GET /simulacro/entrada (Simulacro/Entrada/index) lets staff record participant check-in on exam day. Three SimulacroController methods power this flow:
EndpointMethodDescription
POST /simulacro/get-participantegetEntradaLookup a participant record by nro_doc from the entrada table
POST /simulacro/save-entradasaveEntradaMark a participant as checked in (ingreso = 1, fecha_ingreso = now())
POST /simulacro/get-total-entradagetTotalEntradaReturn total check-in count broken down by area (INGENIERÍAS, BIOMÉDICAS, SOCIALES)
POST /simulacro/get-simulacro-ingresogetIngresosPaginated list of all check-in records, searchable by name or DNI

Payment Processing

Participants pay a fee before completing registration. Payment is handled by PagoSimulacroController, which integrates with the university’s external payment gateway. Payment verification flow:
// PagoSimulacroController@pagoSimulacro (GET /get-pago-simulacro/{dni})
$pago = Pago::where('dni', $dni)
    ->where('status', 1)   // confirmed payment
    ->first();
The coordinator dashboard shows all payments via POST /simulacro/get-pagos-simulacro (PagoSimulacroController@getPagosSimulacro). An alternate consulta view queries the pagostemp table for cross-referencing through POST /simulacro/get-pagos-simulacro-consulta.

Public Results API

Once results are published, any external system or participant can query their score by DNI without authentication:
GET /api/v1/resultados_simulacro/{dni}
Controller: ResCepreController@obtenerInformacionEstudiante This endpoint is public (no auth:sanctum middleware) and returns the student’s simulacro result data including area scores. It is the primary integration point for the university portal and third-party student-facing applications.

Dashboard Statistics

The Simulacro admin panel surfaces real-time counters via three GET endpoints on SimulacroController (all under the auth + simulacro middleware group):
EndpointMethodReturns
GET /simulacro/get-nro-participantespostulantesRegistradosTotal ParticipanteSimulacro count + last registration date
GET /simulacro/get-nro-inscritospostulantesInscritosTotal InscripcionSimulacro count + last enrollment date
GET /simulacro/get-nro-pagospagosRegistradosTotal Pago count + last payment date
GET /simulacro/postulantes-por-programaspostulantexProgramaEnrollment count grouped by programa.nombre and area
GET /simulacro/get-inscritos-genero-reportereporteInscritosGeneroEnrollment count grouped by sexo
GET /simulacro/get-inscritos-areas-reportereporteInscritosAreasEnrollment count grouped by academic area

Build docs developers (and LLMs) love