@extends('layouts.app') @section('content')
← Back to Dashboard

Things To Do

Week: {{ $weekName }}

@if($subHeads->count())
@endif @if($homeworks->count())
@csrf @php $uniqueHomeworks = $homeworks->unique('ex_name'); @endphp @foreach($uniqueHomeworks as $index => $homework) @php $detail = $details[$homework->homework_id] ?? null; @endphp @php $assigned = $homework->weekwise_count ?? 0; // Sum achieved counts for this homework across all students or details $achieved = $details ->where('homework_id', $homework->homework_id) ->sum('achieved_count'); $percent = $assigned > 0 ? ($achieved / $assigned) * 100 : 0; @endphp @foreach(['sunday','monday','tuesday','wednesday','thursday','friday','saturday'] as $day) @endforeach {{-- Modal (skip if doc type) --}} @if(!in_array($homework->ex_path_id, [4])) @endif @endforeach
Exercise Thumbnail How Many Can I Do Status Sunday Monday Tuesday Wednesday Thursday Friday Saturday How Many Did I Do Remarks
{{ $homework->ex_name }} @if(!empty($homework->ex_path)) Thumbnail @else N/A @endif
{{ round($percent) }}%
@switch($homework->ex_path_id) @case(1) @break @case(2) @break @case(3) @break @case(4) @break @endswitch @if(in_array($homework->ex_path_id, [1,2,3,4])) Download @endif
@if($homework->status == 1) Viewed @else @endif
@else

No {{ $title }} available.

@endif
{{-- Dynamic Document Modal --}} @include('layouts.footers.auth.footer') @endsection