archivo de configuracion de nginx agregado para el puerto 9000
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.landing')
|
||||
|
||||
@section('title', isset($tarea) ? 'Editar Tarea' : 'Nueva Tarea')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<div class="d-sm-flex align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
{{ isset($tarea) ? 'Editar Tarea' : 'Nueva Tarea' }}
|
||||
— {{ $material->name }} · Grupo: {{ $grupo->clave }}
|
||||
</h6>
|
||||
<a href="{{ route('grupo.material.tareas', [$grupo, $material]) }}"
|
||||
class="btn btn-sm btn-secondary shadow-sm">
|
||||
<i class="fas fa-arrow-left fa-sm"></i> Regresar
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($tarea))
|
||||
<form action="{{ route('grupo.material.tareas.update', [$grupo, $material, $tarea]) }}" method="POST">
|
||||
@method('PUT')
|
||||
@else
|
||||
<form action="{{ route('grupo.material.tareas.store', [$grupo, $material]) }}" method="POST">
|
||||
@endif
|
||||
@csrf
|
||||
|
||||
<div class="form-group">
|
||||
<label for="titulo">Título <span class="text-danger">*</span></label>
|
||||
<input type="text" id="titulo" name="titulo" class="form-control"
|
||||
value="{{ old('titulo', $tarea->titulo ?? '') }}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descripcion">Descripción / Instrucciones</label>
|
||||
<textarea id="descripcion" name="descripcion" class="form-control" rows="5">{{ old('descripcion', $tarea->descripcion ?? '') }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="fecha_entrega">Fecha límite de entrega</label>
|
||||
<input type="date" id="fecha_entrega" name="fecha_entrega" class="form-control"
|
||||
value="{{ old('fecha_entrega', isset($tarea) && $tarea->fecha_entrega ? $tarea->fecha_entrega : '') }}">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save fa-sm"></i>
|
||||
{{ isset($tarea) ? 'Guardar cambios' : 'Crear tarea' }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,109 @@
|
||||
@extends('layouts.landing')
|
||||
|
||||
@section('head')
|
||||
@include('layouts._partials.tablaStyle')
|
||||
@endsection
|
||||
|
||||
@section('title', 'Tareas')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<div class="d-sm-flex align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
Tareas — {{ $material->name }} · Grupo: {{ $grupo->clave }}
|
||||
</h6>
|
||||
<div>
|
||||
{{-- Botón regresar según rol --}}
|
||||
@hasrole('Coordinación académica')
|
||||
<a href="{{ route('grupo.ver.materias', $grupo) }}" class="btn btn-sm btn-secondary shadow-sm mr-2">
|
||||
<i class="fas fa-arrow-left fa-sm"></i> Regresar
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('grupo.administrar', $grupo) }}" class="btn btn-sm btn-secondary shadow-sm mr-2">
|
||||
<i class="fas fa-arrow-left fa-sm"></i> Regresar
|
||||
</a>
|
||||
<a href="{{ route('grupo.material.tareas.create', [$grupo, $material]) }}"
|
||||
class="btn btn-sm btn-primary shadow-sm">
|
||||
<i class="fas fa-plus fa-sm text-white-50"></i> Nueva Tarea
|
||||
</a>
|
||||
@endhasrole
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if (session('info'))
|
||||
<div class="alert alert-success"><strong>{{ session('info') }}</strong></div>
|
||||
@endif
|
||||
|
||||
@if ($tareas->isEmpty())
|
||||
<div class="alert alert-info">Aún no hay tareas para esta materia.</div>
|
||||
@else
|
||||
<table id="tcont" class="table table-striped table-bordered table-hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Título</th>
|
||||
<th>Fecha límite</th>
|
||||
<th>Pendientes</th>
|
||||
<th>Calificadas</th>
|
||||
<th>Total alumnos</th>
|
||||
<th>Opciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($tareas as $tarea)
|
||||
<tr>
|
||||
<td>{{ $tarea->titulo }}</td>
|
||||
<td>
|
||||
@if ($tarea->fecha_entrega)
|
||||
{{ \Carbon\Carbon::parse($tarea->fecha_entrega)->format('d/m/Y') }}
|
||||
@if (\Carbon\Carbon::parse($tarea->fecha_entrega)->isPast())
|
||||
<span class="badge badge-danger ml-1">Vencida</span>
|
||||
@else
|
||||
<span class="badge badge-success ml-1">Activa</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">Sin fecha</span>
|
||||
@endif
|
||||
</td>
|
||||
<td><span class="badge badge-warning">{{ $tarea->pendientes_count }}</span></td>
|
||||
<td><span class="badge badge-success">{{ $tarea->calificadas_count }}</span></td>
|
||||
<td>{{ $tarea->entregas_count }}</td>
|
||||
<td>
|
||||
<a href="{{ route('grupo.material.tareas.show', [$grupo, $material, $tarea]) }}"
|
||||
class="btn btn-sm btn-info">
|
||||
<i class="fas fa-eye"></i> Ver
|
||||
</a>
|
||||
@hasrole('Docente')
|
||||
<a href="{{ route('grupo.material.tareas.edit', [$grupo, $material, $tarea]) }}"
|
||||
class="btn btn-sm btn-warning">
|
||||
<i class="fas fa-edit"></i> Editar
|
||||
</a>
|
||||
<form class="delete-form d-inline"
|
||||
action="{{ route('grupo.material.tareas.destroy', [$grupo, $material, $tarea]) }}"
|
||||
method="POST">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="btn btn-sm btn-danger">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
@endhasrole
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts._partials.tablaScript')
|
||||
@include('layouts._partials.delete')
|
||||
@endsection
|
||||
@@ -0,0 +1,153 @@
|
||||
@extends('layouts.landing')
|
||||
|
||||
@section('head')
|
||||
@include('layouts._partials.tablaStyle')
|
||||
@endsection
|
||||
|
||||
@section('title', 'Mis Tareas')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mis Tareas</h6>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@if (session('info'))
|
||||
<div class="alert alert-success"><strong>{{ session('info') }}</strong></div>
|
||||
@endif
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger"><strong>{{ session('error') }}</strong></div>
|
||||
@endif
|
||||
@if ($errors->has('entrega'))
|
||||
<div class="alert alert-warning"><strong>{{ $errors->first('entrega') }}</strong></div>
|
||||
@endif
|
||||
|
||||
@if (!isset($tareas) || $tareas->isEmpty())
|
||||
<div class="alert alert-info">No tienes tareas asignadas en tus grupos.</div>
|
||||
@else
|
||||
<div class="table-responsive">
|
||||
<table id="tcont" class="table table-striped table-bordered table-hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tarea</th>
|
||||
<th>Materia</th>
|
||||
<th>Grupo</th>
|
||||
<th>Fecha límite</th>
|
||||
<th>Status</th>
|
||||
<th>Calificación</th>
|
||||
<th>Tu entrega / Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($tareas as $tarea)
|
||||
@php $entrega = $entregasMap[$tarea->id] ?? null; $status = $entrega?->status ?? 'sin_subir'; @endphp
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ $tarea->titulo }}</strong>
|
||||
@if ($tarea->descripcion)
|
||||
<p class="text-muted small mb-0">{{ Str::limit($tarea->descripcion, 80) }}</p>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $tarea->material->name }}</td>
|
||||
<td>{{ $tarea->grupo->clave }}</td>
|
||||
<td>
|
||||
@if ($tarea->fecha_entrega)
|
||||
{{ \Carbon\Carbon::parse($tarea->fecha_entrega)->format('d/m/Y') }}
|
||||
@if (\Carbon\Carbon::parse($tarea->fecha_entrega)->isPast())
|
||||
<span class="badge badge-danger">Vencida</span>
|
||||
@else
|
||||
<span class="badge badge-success">Activa</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">Sin fecha</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($status === 'sin_subir')
|
||||
<span class="badge badge-secondary">Sin subir</span>
|
||||
@elseif ($status === 'pendiente')
|
||||
<span class="badge badge-warning">Pendiente</span>
|
||||
@else
|
||||
<span class="badge badge-success">Calificada</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($status === 'calificada' && $entrega)
|
||||
<strong class="text-success">{{ number_format($entrega->calificacion, 1) }}</strong>
|
||||
@if ($entrega->comentario)
|
||||
<br><small class="text-muted">{{ $entrega->comentario }}</small>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($status === 'sin_subir')
|
||||
{{-- Formulario de entrega: texto y/o archivo --}}
|
||||
<form action="{{ route('tarea.entregar', $tarea) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="form-group mb-1">
|
||||
<textarea name="texto" class="form-control form-control-sm"
|
||||
rows="3" placeholder="Escribe tu respuesta aquí (opcional)..."></textarea>
|
||||
</div>
|
||||
<div class="form-group mb-1">
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="archivo_{{ $tarea->id }}" name="archivo">
|
||||
<label class="custom-file-label small" for="archivo_{{ $tarea->id }}">
|
||||
Adjuntar archivo (opcional)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm btn-block mt-1">
|
||||
<i class="fas fa-upload fa-sm"></i> Entregar
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@elseif ($status === 'pendiente' || $status === 'calificada')
|
||||
{{-- Mostrar lo que entregó --}}
|
||||
@if ($entrega?->texto)
|
||||
<div class="border rounded p-2 bg-light mb-2" style="max-height:120px;overflow-y:auto;font-size:.85rem;">
|
||||
{{ $entrega->texto }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($entrega?->archivo)
|
||||
<a href="{{ route('files.serve', $entrega->archivo) }}"
|
||||
target="_blank" class="btn btn-sm btn-outline-info">
|
||||
<i class="fas fa-eye fa-sm"></i> Ver archivo entregado
|
||||
</a>
|
||||
@endif
|
||||
@if (!$entrega?->texto && !$entrega?->archivo)
|
||||
<span class="text-muted small">Sin contenido registrado</span>
|
||||
@endif
|
||||
@if ($status === 'pendiente')
|
||||
<br><small class="text-warning"><i class="fas fa-clock"></i> Esperando calificación</small>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts._partials.tablaScript')
|
||||
<script>
|
||||
document.querySelectorAll('.custom-file-input').forEach(input => {
|
||||
input.addEventListener('change', function () {
|
||||
const fileName = this.files[0]?.name || 'Adjuntar archivo (opcional)';
|
||||
this.nextElementSibling.textContent = fileName;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,156 @@
|
||||
@extends('layouts.landing')
|
||||
|
||||
@section('head')
|
||||
@include('layouts._partials.tablaStyle')
|
||||
@endsection
|
||||
|
||||
@section('title', 'Detalle de Tarea')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
{{-- Info de la tarea --}}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<div class="d-sm-flex align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
{{ $tarea->titulo }}
|
||||
— {{ $material->name }} · Grupo: {{ $grupo->clave }}
|
||||
</h6>
|
||||
<a href="{{ route('grupo.material.tareas', [$grupo, $material]) }}"
|
||||
class="btn btn-sm btn-secondary shadow-sm">
|
||||
<i class="fas fa-arrow-left fa-sm"></i> Regresar
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (session('info'))
|
||||
<div class="alert alert-success"><strong>{{ session('info') }}</strong></div>
|
||||
@endif
|
||||
@if ($tarea->descripcion)
|
||||
<p class="mb-2"><strong>Instrucciones:</strong> {{ $tarea->descripcion }}</p>
|
||||
@endif
|
||||
@if ($tarea->fecha_entrega)
|
||||
<p class="mb-0">
|
||||
<strong>Fecha límite:</strong>
|
||||
{{ \Carbon\Carbon::parse($tarea->fecha_entrega)->format('d/m/Y') }}
|
||||
@if (\Carbon\Carbon::parse($tarea->fecha_entrega)->isPast())
|
||||
<span class="badge badge-danger ml-1">Vencida</span>
|
||||
@else
|
||||
<span class="badge badge-success ml-1">Activa</span>
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Entregas de alumnos --}}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Entregas de alumnos</h6>
|
||||
</div>
|
||||
<div class="card-body table-responsive">
|
||||
<table id="tcont" class="table table-striped table-bordered table-hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Alumno</th>
|
||||
<th>Status</th>
|
||||
<th>Entrega</th>
|
||||
@hasrole('Docente')
|
||||
<th>Calificar / Calificación</th>
|
||||
@endhasrole
|
||||
@hasrole('Coordinación académica')
|
||||
<th>Calificación</th>
|
||||
@endhasrole
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($alumnos as $alumno)
|
||||
@php $entrega = $entregas[$alumno->id] ?? null; @endphp
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{{ $alumno->alumnos->first()?->apellidoPaterno }}
|
||||
{{ $alumno->alumnos->first()?->apellidoMaterno }}
|
||||
{{ $alumno->alumnos->first()?->name }}
|
||||
</td>
|
||||
|
||||
<td class="align-middle">
|
||||
@if (!$entrega || $entrega->status === 'sin_subir')
|
||||
<span class="badge badge-secondary">Sin subir</span>
|
||||
@elseif ($entrega->status === 'pendiente')
|
||||
<span class="badge badge-warning">Pendiente</span>
|
||||
@else
|
||||
<span class="badge badge-success">Calificada</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="align-middle" style="max-width:280px">
|
||||
@if ($entrega && ($entrega->texto || $entrega->archivo))
|
||||
@if ($entrega->texto)
|
||||
<div class="border rounded p-2 bg-light mb-1"
|
||||
style="max-height:100px;overflow-y:auto;font-size:.85rem;white-space:pre-wrap;">{{ $entrega->texto }}</div>
|
||||
@endif
|
||||
@if ($entrega->archivo)
|
||||
<a href="{{ route('files.serve', $entrega->archivo) }}"
|
||||
target="_blank" class="btn btn-sm btn-outline-info">
|
||||
<i class="fas fa-file fa-sm"></i> Ver archivo
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted small">Sin entrega</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
{{-- Docente: puede calificar --}}
|
||||
@hasrole('Docente')
|
||||
<td class="align-middle" style="min-width:300px">
|
||||
@if ($entrega && in_array($entrega->status, ['pendiente', 'calificada']))
|
||||
<form action="{{ route('tarea.calificar', [$tarea, $alumno]) }}" method="POST"
|
||||
class="d-flex align-items-center flex-wrap" style="gap:4px">
|
||||
@csrf
|
||||
<input type="number" name="calificacion" min="0" max="10" step="0.1"
|
||||
class="form-control form-control-sm" style="width:80px"
|
||||
placeholder="0–10"
|
||||
value="{{ $entrega->status === 'calificada' ? $entrega->calificacion : '' }}"
|
||||
required>
|
||||
<input type="text" name="comentario" class="form-control form-control-sm"
|
||||
style="width:140px" placeholder="Comentario"
|
||||
value="{{ $entrega->comentario ?? '' }}">
|
||||
<button type="submit"
|
||||
class="btn btn-sm {{ $entrega->status === 'calificada' ? 'btn-warning' : 'btn-success' }}">
|
||||
<i class="fas fa-{{ $entrega->status === 'calificada' ? 'redo' : 'check' }} fa-sm"></i>
|
||||
{{ $entrega->status === 'calificada' ? 'Recalificar' : 'Calificar' }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<span class="text-muted small">Sin entrega aún</span>
|
||||
@endif
|
||||
</td>
|
||||
@endhasrole
|
||||
|
||||
{{-- Coordinación: solo lectura de calificación --}}
|
||||
@hasrole('Coordinación académica')
|
||||
<td class="align-middle">
|
||||
@if ($entrega?->status === 'calificada')
|
||||
<strong class="text-success">{{ number_format($entrega->calificacion, 1) }}</strong>
|
||||
@if ($entrega->comentario)
|
||||
<br><small class="text-muted">{{ $entrega->comentario }}</small>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-muted">—</span>
|
||||
@endif
|
||||
</td>
|
||||
@endhasrole
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts._partials.tablaScript')
|
||||
@endsection
|
||||
Reference in New Issue
Block a user