@php $restringirVista = auth()->id() === $intento->user_id && auth()->user()->isEstudiante() && ! ($puedeGestionar ?? false); $verPuntaje = ! $restringirVista || $intento->cuestionario->estudiantePuedeVerPuntaje(); $verRespuestas = ! $restringirVista || $intento->cuestionario->estudiantePuedeVerRespuestas(); $preguntasIntento = $intento->cuestionario->preguntasOrdenadasPara($intento); $esperaVisibilidad = $restringirVista && $intento->cuestionario->estudianteEsperaVisibilidadDiferida(); $esperaRespuestas = $restringirVista && $intento->cuestionario->estudianteEsperaRespuestasDiferidas(); @endphp Estudiante: · Intento #{{ $intento->numero_intento }} · Estado: {{ $intento->estado }} @if($verPuntaje && $intento->notaEscala() !== null) · Este intento: @endif
@if( ($verPuntaje && ($calificacionFinal || ($intento->cuestionario->esSaber() && $intento->desglose_areas))) || ($intentosUsuario->count() > 1) || ($puedeNuevoIntento ?? false) || ($puedeGestionar ?? false) )
@if($verPuntaje && $calificacionFinal)

Nota final ({{ $calificacionFinal['etiqueta'] }}) · {{ $intento->cuestionario->escalaLabel() }}

@elseif($verPuntaje && $intento->cuestionario->esSaber() && $intento->desglose_areas)

{{ \App\Support\EscalaSaber::etiqueta() }}

@endif @if($intentosUsuario->count() > 1)

Historial de intentos

@endif
@if($puedeNuevoIntento ?? false) @endif @if($puedeGestionar ?? false)
@csrf @method('DELETE')
@if($intentosUsuario->count() > 1)
@csrf @method('DELETE')
@endif @endif
@elseif(($puedeNuevoIntento ?? false) || ($puedeGestionar ?? false))
@if($puedeNuevoIntento ?? false) @endif @if($puedeGestionar ?? false)
@csrf @method('DELETE')
@endif
@endif @if($esperaRespuestas && $verPuntaje && ! $verRespuestas)
Puedes ver tu puntaje. Las respuestas estarán disponibles cuando finalice el periodo programado del cuestionario ({{ $intento->cuestionario->ends_at->siteFormat() }}).
@elseif($esperaVisibilidad && ! $verPuntaje && ! $verRespuestas)
Las respuestas y el puntaje estarán disponibles cuando finalice el periodo programado del cuestionario ({{ $intento->cuestionario->ends_at->siteFormat() }}).
@elseif(! $verRespuestas && $verPuntaje)
En este cuestionario solo puedes ver tu puntaje. Las respuestas no se muestran para evitar que se compartan.
@elseif($verRespuestas && ! $verPuntaje)
Puedes revisar tus respuestas. El puntaje no se muestra según la configuración del cuestionario.
@endif @if($verRespuestas) @foreach($preguntasIntento as $index => $pregunta) @php $respuesta = $intento->respuestas->firstWhere('pregunta_id', $pregunta->id); $opcionesIntento = $intento->cuestionario->opcionesOrdenadasParaPregunta($pregunta, $intento); $maxPregunta = $pregunta->puntosMaximosEnEscala($intento->cuestionario); @endphp

{{ $pregunta->tipo === 'descripcion' ? 'Información' : 'Pregunta '.$pregunta->numeroEstudiante($preguntasIntento) }} @if($verPuntaje && $pregunta->tipo !== 'descripcion') · @if($intento->cuestionario->esSaber()) @php $pctPregunta = $maxPregunta > 0 && $respuesta?->puntos_obtenidos !== null ? round(((float) $respuesta->puntos_obtenidos / $maxPregunta) * 100, 1) : null; @endphp @if($pctPregunta !== null) {{ $pctPregunta }} / 100 @if($pregunta->area) · {{ $pregunta->area->nombre }} @endif @else — / 100 @endif @else @php $notaPregunta = \App\Support\EscalaValorativa::desdePuntaje( $respuesta?->puntos_obtenidos !== null ? (float) $respuesta->puntos_obtenidos : null, $maxPregunta, $intento->cuestionario->colegioParaEscala() ); @endphp @if($notaPregunta !== null) @else — / {{ number_format(\App\Support\EscalaValorativa::MAXIMO, 1) }} @endif @endif @endif

{!! $pregunta->contenido !!}
@if(in_array($pregunta->tipo, ['seleccion_unica','seleccion_multiple','verdadero_falso','likert'])) @if($pregunta->tipo === 'likert') @php $items = $pregunta->likertItems; $mapa = $respuesta?->opciones_ids ?? []; $esMapa = is_array($mapa) && ! array_is_list($mapa); @endphp @if($items->isNotEmpty() && $esMapa)
@foreach($opcionesIntento as $opcion) @endforeach @foreach($items as $item) @php $elegida = (int) ($mapa[(string) $item->id] ?? $mapa[$item->id] ?? 0); @endphp @foreach($opcionesIntento as $opcion) @endforeach @endforeach
Enunciado {{ strip_tags($opcion->contenido) }} @if(auth()->user()->isDocente() || auth()->user()->isSuperAdmin()) {{ $opcion->etiquetaPorcentaje() }} @endif
{{ $item->contenido }}id) style="background: #e8f0fe; color: #0f6cbf;" @endif> {{ $elegida === (int) $opcion->id ? '✓' : '·' }}
@else
@foreach($opcionesIntento as $i => $opcion) @php $ids = array_map('intval', array_values($mapa)); $seleccionada = in_array((int) $opcion->id, $ids, true); @endphp
{{ $i + 1 }}. {{ strip_tags($opcion->contenido) }} @if(auth()->user()->isDocente() || auth()->user()->isSuperAdmin()) ({{ $opcion->etiquetaPorcentaje() }}) @endif @if($seleccionada) @endif
@endforeach
@endif @else
    @foreach($opcionesIntento as $i => $opcion) @php $ids = array_map('intval', $respuesta->opciones_ids ?? []); $seleccionada = in_array((int) $opcion->id, $ids, true); @endphp
  • {{ $pregunta->etiquetaOpcion($i) }}. {!! $opcion->contenido !!} @if(auth()->user()->isDocente() || auth()->user()->isSuperAdmin()) {{ $opcion->etiquetaPorcentaje() }} @endif @if($seleccionada) Seleccionada @endif
  • @endforeach
@endif @elseif($pregunta->tipo === 'abierta')
{{ $respuesta->respuesta_texto ?? 'Sin respuesta' }}
@endif
@endforeach @endif @if((auth()->user()->isDocente() || auth()->user()->isSuperAdmin()) && $intento->cuestionario->preguntas->where('tipo','abierta')->count())
@csrf

Calificación manual de preguntas abiertas

@foreach($intento->cuestionario->preguntas->where('tipo','abierta') as $pregunta) @php $respuesta = $intento->respuestas->firstWhere('pregunta_id', $pregunta->id); $maxPregunta = $pregunta->puntosMaximosEnEscala($intento->cuestionario); @endphp
{!! $pregunta->contenido !!}
{{ $respuesta->respuesta_texto ?? 'Sin respuesta' }}
@if($intento->cuestionario->esSaber()) @php $notaManual = $pregunta->puntos > 0 && $respuesta->puntos_obtenidos !== null ? round(((float) $respuesta->puntos_obtenidos / (float) $pregunta->puntos) * 100, 1) : null; @endphp

Se aplica como porcentaje de los puntos de la pregunta dentro del área.

@else @php $notaManual = $respuesta->puntos_obtenidos !== null ? (float) $respuesta->puntos_obtenidos : null; @endphp

Peso {{ number_format((float) $pregunta->peso_porcentaje, 1) }}% del cuestionario (escala total 0–{{ number_format($intento->cuestionario->escalaMaxima(), 1) }}).

@endif
@endforeach
@endif @if(auth()->user()->isDocente() || auth()->user()->isSuperAdmin()) Ver participantes @else Volver a mis cuestionarios @endif