Loading...
@extends('layouts.app') @section('content')

Notes du {{ $trimestre->libelle }}

Élève : {{ $student->first_name }} {{ $student->last_name }} | {{ $student->matricule ?? 'Non défini' }} | {{ $student->currentClass->libelle ?? 'Classe non définie' }}

@if(empty($notes))
Aucune note disponible pour ce trimestre.
@else {{-- Moyenne générale --}}
Moyenne générale : {{ is_numeric($moyenne_generale) ? number_format($moyenne_generale,2) : 'NC' }}/20
@foreach($notes as $matiere => $groupes)
{{ $matiere }} Coefficient : {{ $coefficients[$matiere] ?? 1 }}
Moyenne : {{ is_numeric($moyennes_matiere[$matiere]) ? number_format($moyennes_matiere[$matiere], 2) : 'NC' }}/20
{{-- Sous-matières --}} @if(isset($groupes['sous_matieres'])) @foreach($groupes['sous_matieres'] as $sub_matter_id => $listeSous) @php $subName = $listeSous[0]->sous_matiere ?? '-'; $moySub = $moyennes_sous_matieres[$matiere][$sub_matter_id] ?? null; $coef = $coeff_sub[$sub_matter_id] ?? 1; $base = 20 * $coef; @endphp
{{ $subName }} — Moyenne : {{ is_numeric($moySub) ? number_format($moySub,2) : 'NC' }}/{{ $base }}
@foreach($listeSous as $i => $note) @php $type = strtolower($note->evaluation_type); $base = in_array($type,['interro','interrogation']) ? 10 : (in_array($type,['composition','examen']) ? 40 : (in_array($type,['devoir','controle','contrôle']) ? 20 : 20)); $dateEval = $note->date_create ? \Carbon\Carbon::parse($note->date_create)->format('d/m/Y') : '-'; @endphp @endforeach
# Type d’évaluation Note Date d’évaluation
Note {{ $i+1 }} {{ $note->evaluation_type }} {{ $note->note }}/{{ $note->notee * 20 }} {{ $dateEval }}
@endforeach @endif {{-- Matière principale --}} @if(isset($groupes['principale'])) @foreach($groupes['principale'] as $i => $note) @php $type = strtolower($note->evaluation_type); $base = in_array($type,['interro','interrogation']) ? 10 : (in_array($type,['composition','examen']) ? 40 : (in_array($type,['devoir','controle','contrôle']) ? 20 : 20)); $dateEval = $note->date_create ? \Carbon\Carbon::parse($note->date_create)->format('d/m/Y') : '-'; @endphp @endforeach
# Type d’évaluation Note Date d’évaluation
Note {{ $i+1 }} {{ $note->evaluation_type }} {{ $note->note }}/{{ $note->notee * 20 }} {{ $dateEval }}
@endif
@endforeach @endif
@endsection