@extends('layouts.app') @section('title', $course->title . ' | Gerencia Docente', 'Curso | Gerencia Docente') @section('content')

{{ $course->code }}

{{ $course->title }}

Prontuario: @if (!is_null($course->syllabus)) PDF @else @auth {{-- TODO: Button for adding syllabus --}} @else n/a @endauth @endif

Semestres

{{-- TODO: Add button for new section if admin --}}
@foreach ($course->semesters->unique()->sortByDesc('code') as $semester) {{-- @dd($semester_code) --}}

{{ $semester->alpha }}

@foreach ($semester->sections->where('course_id', '=', $course->id)->sortBy('code') as $section) @endforeach
Sección Profesor Prontuario Creditos # de Estudiantes
{{ $section->code }} @foreach ($section->professors->sortBy('last_name') as $professor) {{ $professor->first_name . ' ' . $professor->last_name }} @if (!$loop->last)
@endif @endforeach
{{-- TODO: Add buton for uploading syllabus if admin --}} @if (!is_null($section->syllabus)) PDF @else @auth @else n/a @endauth @endif @if (!is_null($section->credits)) {{ $section->credits }} @else n/a @endif @if (!is_null($section->student_count)) {{ $section->student_count }} @else n/a @endif
@if (!$loop->last)

@endif @endforeach
@endsection @section('modals') @include('modal.course.edit') @include('modal.section.edit') @include('modal.section.syllabus') @endsection @section('scripts') @endsection