@extends('layout.main') @section('title', 'Tugas') @section('isi') @if (Auth::user()->is_admin == 1)

DATA TUGAS

Tambah Tugas Tambah Kuis @if ($jumtug == 0 && $jumkuis == 0)
@elseif ($jumtug > 0 || $jumkuis > 0)
@foreach ($tugas as $tgs)
Terakhir: {{$tgs->tangakhir . ' ' . $tgs->wakakhir}}

{{ $tgs->judul }}

{{ $tgs->keterangan }}
{{ $tgs->jurusan }}
@php $untuk = app('App\Http\Controllers\TasksController')->getUntuk($tgs->untuk); @endphp @if ($tgs->untuk != null)
{{ $untuk->nama }} | {{ $untuk->kelas }}
@endif Hasil Kerja Siswa Edit
@endforeach @foreach ($kuis as $kui)
Terakhir: {{$kui->tangakhir . ' ' . $kui->wakakhir}}

{{ $kui->kuis }}

{{ $kui->jurusan }}
@php $untuk = app('App\Http\Controllers\TasksController')->getUntuk($kui->untuk); @endphp @if ($kui->untuk != null)
{{ $untuk->nama }} | {{ $untuk->kelas }}
@endif Hasil Kuis Siswa Edit
@endforeach
@endif
@endif @if (Auth::user()->is_industri == 1)

DATA TUGAS

Tambah Tugas @if ($jumtug == 0)
@elseif ($jumtug > 0)
@foreach ($tugas as $tgs)
Terakhir: {{$tgs->tangakhir . ' ' . $tgs->wakakhir}}

{{ $tgs->judul }}

{{ $tgs->tanggal }}
@php $untuk = app('App\Http\Controllers\TasksController')->getUntuk($tgs->untuk); @endphp @if ($tgs->untuk != null)
{{ $untuk->nama }}
@endif

{{$tgs->keterangan}}

Hasil Kerja Siswa Edit
@endforeach
@endif
@endif @if (Auth::user()->is_siswa == 1)

TUGAS SAYA

@if ($idi == null)
@elseif ($jumtug == 0 && $jumtug_sch == 0 && $jumkuis == 0)
@elseif ($jumtug > 0 || $jumtug_sch > 0 || $jumkuis > 0)
@foreach ($tugas as $tgs)
@foreach ($mytugas as $mytgs) @php $sekarang = time(); $tangaw = strtotime($mytgs->updated_at); $tangah = strtotime($tgs->tangankhir . $tgs->wakakhir); $sisa = $tangah - $sekarang; $hari = floor($sisa/(60*60*24)); $jm = $sisa - $hari * (60*60*24); $jam = floor($jm/(60*60)); $mnt = $jm - $jam *(60*60); $menit = floor($mnt/60); $dtk = $mnt - $menit *(60); $detik = floor($dtk); $telat = $tangah - $tangaw; $hari_telat = floor($telat/(60*60*24)); $jm_telat = $telat - $hari_telat * (60*60*24); $jam_telat = floor($jm_telat/(60*60)); $mnt_telat = $jm_telat - $jam_telat *(60*60); $menit_telat = floor($mnt_telat/60); $dtk_telat = $mnt_telat - $menit_telat *(60); $detik_telat = floor($dtk_telat); @endphp @if ($mytgs->id_tugas == $tgs->id) @else Tersisa {{$hari}} hari, {{ $jam . ' : ' . $menit . ' : ' . $detik }} @endif @endforeach

{{ $tgs->judul }}

{{ $tgs->tangakhir . ' ' . $tgs->wakakhir }}

{{ $tgs->keterangan }}


@csrf
@error('file') {{ $message }} @enderror
@foreach ($mytugas as $mytgs) @if ($mytgs->id_tugas == $tgs->id)

Selesai @if ($tangaw > $tangah) @if ($hari_telat > 0) (Terlambat {{$hari_telat}} hari, {{ $jam_telat . ' : ' . $menit_telat . ' : ' . $detik_telat }}) @elseif ($jam_telat > 0 && $hari_telat == 0) (Terlambat {{ $jam_telat . ' jam ' . $menit_telat . ' menit ' . $detik_telat . ' detik '}}) @elseif ($menit_telat > 0 && $jam_telat == 0 && $hari_telat == 0) (Terlambat {{ $menit_telat . ' menit ' . $detik_telat . ' detik '}}) @elseif ($detik_telat > 0 && $menit_telat == 0 && $jam_telat == 0 && $hari_telat == 0) (Terlambat {{ $detik_telat . ' detik '}}) @endif @endif

@endif @endforeach
@endforeach @foreach ($tugas_sch as $tgs_sch)
@foreach ($mytugas as $mytgs) @php $hariini = date('Ymd'); $ngirim = date('Ymd', strtotime($mytgs->updated_at)); $tangakhir = date('Ymd', strtotime($tgs_sch->tangakhir)); $sekarang = time(); $tangaw = strtotime($mytgs->updated_at); $tangah = strtotime($tgs_sch->wakakhir); $tersisa = $tangakhir - $hariini; $sisa = $tangah - $sekarang; $hari = floor($sisa/(60*60*24)); $jm = $sisa - $hari * (60*60*24); $jam = floor($jm/(60*60)); $mnt = $jm - $jam *(60*60); $menit = floor($mnt/60); $dtk = $mnt - $menit *(60); $detik = floor($dtk); $terlambat = $ngirim - $tangakhir; $telat = $tangaw - $tangah; $hari_telat = floor($telat/(60*60*24)); $jm_telat = $telat - $hari_telat * (60*60*24); $jam_telat = floor($jm_telat/(60*60)); $mnt_telat = $jm_telat - $jam_telat *(60*60); $menit_telat = floor($mnt_telat/60); $dtk_telat = $mnt_telat - $menit_telat *(60); $detik_telat = floor($dtk_telat); $terlewat = $hariini - $tangakhir; $lewat = $sekarang - $tangah; $hari_lewat = floor($lewat/(60*60*24)); $jm_lewat = $lewat - $hari_lewat * (60*60*24); $jam_lewat = floor($jm_lewat/(60*60)); $mnt_lewat = $jm_lewat - $jam_lewat *(60*60); $menit_lewat = floor($mnt_lewat/60); $dtk_lewat = $mnt_lewat - $menit_lewat *(60); $detik_lewat = floor($dtk_lewat); @endphp @if ($mytgs->id_tugas != $tgs_sch->id && $hariini <= $tangakhir) Tersisa {{$tersisa}} hari, {{ $jam . ' : ' . $menit . ' : ' . $detik }} @elseif ($mytgs->id_tugas != $tgs_sch->id && $hariini > $tangakhir) Lewat {{$terlewat}} hari, {{ $jam_lewat . ' : ' . $menit_lewat . ' : ' . $detik_lewat }} @endif @endforeach

{{ $tgs_sch->judul }}

{{ $tgs_sch->tangakhir . ' ' . $tgs_sch->wakakhir }}

{{ $tgs_sch->keterangan }}


@csrf
@error('file') {{ $message }} @enderror
@foreach ($mytugas as $mytgs) @if ($mytgs->id_tugas == $tgs_sch->id)

Selesai @if ($ngirim > $tangakhir) @if ($terlewat > 0) (Terlambat {{$terlewat}} hari, {{ $jam_telat . ' : ' . $menit_telat . ' : ' . $detik_telat }}) @elseif ($jam_telat > 0) (Terlambat {{ $jam_telat . ' jam ' . $menit_telat . ' menit ' . $detik_telat . ' detik '}}) @elseif ($menit_telat > 0) (Terlambat {{ $menit_telat . ' menit ' . $detik_telat . ' detik '}}) @elseif ($detik_telat > 0) (Terlambat {{ $detik_telat . ' detik '}}) @endif @endif

@endif @endforeach
@endforeach @foreach ($kuis as $kui)

{{ $kui->kuis }}

Batas Waktu: {{ $tgs_sch->tangakhir . ' ' . $tgs_sch->wakakhir }}

Isi Kuis
@endforeach
@endif
@endif @endsection