Aula virtual

{{$curso->nombre}}

@php $completed=auth()->user()->leccionesCompletadas()->where('curso_id',$curso->id)->pluck('lecciones.id'); $publishedExams=$curso->examenes->where('publicado',true); $total=$curso->lecciones->count()+$curso->tareas->count()+$publishedExams->count(); $submitted=$misEntregas->whereNotNull('entregada_at')->count(); $examDone=$examResults->count(); $done=$completed->count()+$submitted+$examDone; $progress=$total?min(100,round($done*100/$total)):0; $nextTasks=$curso->tareas->where('publicada',true)->where('fecha_limite','>=',now())->sortBy('fecha_limite'); $standalone=$curso->lecciones->whereNull('unidad_id'); $unread=$mensajes->where('destinatario_id',auth()->id())->whereNull('leido_at')->count(); $weightedTasks=$curso->tareas->filter(fn($t)=>$t->ponderacion>0&&$misEntregas->get($t->id)?->calificacion!==null); $weightedExams=$publishedExams->filter(fn($e)=>$e->ponderacion>0&&$examResults->has($e->id)); $weight=$weightedTasks->sum('ponderacion')+$weightedExams->sum('ponderacion'); $weightedScore=$weightedTasks->sum(fn($t)=>($misEntregas->get($t->id)->calificacion/$t->puntaje_maximo)*10*$t->ponderacion)+$weightedExams->sum(fn($e)=>($examResults->get($e->id)->first()->calificacion)*$e->ponderacion); $courseGrade=$weight?round($weightedScore/$weight,1):null; $field='w-full rounded-xl border-slate-300 text-sm dark:border-slate-700 dark:bg-slate-900'; @endphp
@if(session('success'))
✓ {{session('success')}}
@endif @php($videoClasses=$curso->eventos->where('tipo','VIDEOCONFERENCIA')->filter(fn($e)=>!$e->termina_at||$e->termina_at->gte(now()->subHours(2)))->sortBy('inicia_at')) @if($videoClasses->isNotEmpty())

Clases en vivo

Videoconferencias programadas

@foreach($videoClasses as $e)
{{$e->titulo}}

{{$e->inicia_at->format('d/m/Y H:i')}}@if($e->termina_at) · hasta {{$e->termina_at->format('H:i')}}@endif

@if($e->descripcion)

{{$e->descripcion}}

@endif
Entrar a la clase
@endforeach
@endif @if($errors->any())
{{$errors->first()}}
@endif
← Mis cursos

Mi ruta de aprendizaje

{{$curso->nombre}}

{{$curso->descripcion?:'Avanza por las unidades, completa actividades y consulta tu retroalimentación.'}}

{{$curso->sede->nombre}}Docente: {{$curso->user?->name??'Equipo académico'}}
Avance{{$progress}}%
{{$done}} de {{$total}} elementos completados
@foreach([['Contenido',$curso->lecciones->count(),'Recursos disponibles','text-indigo-600'],['Por entregar',$nextTasks->filter(fn($t)=>!$misEntregas->get($t->id)?->entregada_at)->count(),'Actividades pendientes','text-amber-600'],['Completado',$done,'Elementos terminados','text-emerald-600'],['Promedio',$courseGrade??'—','Ponderación publicada','text-violet-600']] as [$label,$value,$caption,$tone])

{{$label}}

{{$value}}{{$caption}}
@endforeach
@if($anuncios->isNotEmpty())

Anuncios del docente

@foreach($anuncios as $a)
{{$a->titulo}}{{$a->publicado_at->diffForHumans()}}

{{$a->mensaje}}

@endforeach
@endif

Próximas entregas

@forelse($nextTasks->take(5) as $t)@empty

No tienes entregas próximas.

@endforelse

Ruta de aprendizaje

El contenido mostrado aquí fue cargado y programado por tu docente.

@foreach($curso->unidades as $u)@endforeach @if($standalone->isNotEmpty())@endif @if($curso->unidades->isEmpty()&&$standalone->isEmpty())

Todavía no hay contenido publicado por el docente.

@endif

Actividades y entregas

@forelse($curso->tareas->where('publicada',true) as $t)@php($delivery=$misEntregas->get($t->id))

{{$t->titulo}}

Límite {{$t->fecha_limite->format('d/m/Y H:i')}} · {{$t->puntaje_maximo}} puntos

{{$delivery?->estatus??'PENDIENTE'}}

{{$t->instrucciones}}

@if($delivery?->calificada_at)
Calificación: {{$delivery->calificacion}} / {{$t->puntaje_maximo}}

{{$delivery->retroalimentacion}}

@else
@csrf@if($delivery?->archivo_path)Archivo actual: {{$delivery->archivo_nombre}}@endif
@endif
@empty

No hay tareas publicadas

@endforelse

Evaluaciones

@forelse($publishedExams as $e)@php($available=(!$e->disponible_desde||now()->gte($e->disponible_desde))&&(!$e->disponible_hasta||now()->lte($e->disponible_hasta)))
EVALUACIÓN

{{$e->titulo}}

{{$e->limite_tiempo}} min · {{$e->intentos_permitidos}} intento(s) · {{$examResults->get($e->id)?->count()??0}} realizados

@if($available)Iniciar evaluación@else

Disponible {{$e->disponible_desde?->format('d/m/Y H:i')??'próximamente'}}

@endif
@empty

No hay evaluaciones disponibles.

@endforelse

Libro de calificaciones

Tareas, evaluaciones y retroalimentación.

{{$courseGrade??'—'}}
@foreach($curso->tareas as $t)@php($d=$misEntregas->get($t->id))
{{$t->titulo}}{{$d?->retroalimentacion?:'Sin retroalimentación publicada'}}{{$d?->calificacion??'—'}} / {{$t->puntaje_maximo}}
@endforeach @foreach($publishedExams as $e)
{{$e->titulo}}Mejor/último intento publicado{{$examResults->get($e->id)?->first()->calificacion??'—'}} / 10
@endforeach @if($curso->tareas->isEmpty()&&$publishedExams->isEmpty())

Todavía no hay actividades calificables.

@endif

Foros

@forelse($curso->foros as $f)
{{$f->titulo}}

{{$f->descripcion}}

@csrf
@empty

No hay foros abiertos.

@endforelse

Mensaje al docente

@csrf

Historial de mensajes

@forelse($mensajes as $m)
{{$m->asunto}}{{$m->created_at->diffForHumans()}}

{{$m->remitente?->name}}

{{$m->mensaje}}

@if(($m->destinatario_id===auth()->id()||$m->destinatario_id===null)&&!$m->leido_at)
@csrf @method('PATCH')
@endif
@empty

No hay mensajes todavía.

@endforelse
@foreach($encuestas as $survey)

Encuesta · {{$survey->titulo}}

{{$survey->pregunta}}

@csrf
@endforeach

Participantes

@foreach($curso->usuarios as $student)
{{$student->name}}Estudiante
@endforeach