@extends('layouts.app') @section('content')
@php $highlightDates = $highlightDates ?? []; $default = [ "sun" => 0, "mon" => 0, "tue" => 0, "wed" => 0, "thu" => 0, "fri" => 0, "sat" => 0, ]; $highlightDates = array_merge($default, $highlightDates); @endphp
Sun
Mon
Tue
Wed
Thu
Fri
Sat

Classes Overview


@php // ensure $groupdetails is a Collection and sorted $sortedGroups = collect($groupdetails)->sortBy('groups')->values(); // $thisWeekId might come from controller — guard if it's not set $thisWeekGroup = isset($thisWeekId) ? $sortedGroups->firstWhere('id', $thisWeekId) : null; @endphp

This Week: {{ $groupname }}

Teacher: {{ $teacher->firstname }}

{{-- Button Row --}}
{{-- Left Button --}}
{{-- Right Button --}}

Things To Do


@php $uniqueHomeworks = $homeworks->unique('ex_name')->values(); $chunks = $uniqueHomeworks->chunk(1); // 10 exercises per stage @endphp
1 / {{ $chunks->count() }}
@foreach($chunks as $panelIndex => $panelHomeworks)
@foreach($panelHomeworks as $homework) @php $detail = $details[$homework->homework_id] ?? null; $assigned = $homework->weekwise_count ?? 0; $achieved = $details->where('homework_id', $homework->homework_id)->sum('achieved_count'); $percent = $assigned > 0 ? ($achieved / $assigned) * 100 : 0; $isComplete = $percent >= 100; @endphp
Weekly Entrys
Thumbnail
{{ $homework->ex_name }}
@if($isComplete) Done @else In Progress {{ round($percent) }}% @endif
Date How many did You dosss
Totals 0
@endforeach
@endforeach
@if($uniqueHomeworks->isEmpty())
No homework exercises found
@endif
@php // true if the student has achieved at least 1% of the tasks $hasAchievement = $completionPercent > 0; @endphp

Achievement


@if($hasAchievement)

{{ $message }}

{{ round($completionPercent) }}%
{{-- show the image that matches the achievement level --}} @else {{-- nothing achieved yet: show the default placeholder --}}

Do your tasks and achieve something great today!

@endif
@include('layouts.footer') @endsection @push('js') @endpush