| 1º Trimestre | 2º Trimestre | 3º Trimestre | M. Anual | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Nr | Nome | G | M. ACS |
AT | MT | M. ACS |
AT | MT | M. ACS |
AT | MT | |||||||||||||
| {{ $i }}ª | @endfor @for ($i = 1; $i <= 4; $i++){{ $i }}ª | @endfor @for ($i = 1; $i <= 4; $i++){{ $i }}ª | @endfor||||||||||||||||||||||
| {{ $aluno->numero }} | {{ $aluno->aluno->pessoa->nome }} | {{ substr($aluno->aluno->pessoa->genero, 0, 1) }} | @php $mediaFinal = 0; @endphp @foreach(range(1, 3) as $trimestre) @php // 4 testes (ACS) $testes = [ $aluno->{'teste1Tr' . $trimestre}, $aluno->{'teste2Tr' . $trimestre}, $aluno->{'teste3Tr' . $trimestre}, $aluno->{'teste4Tr' . $trimestre}, ]; $validos = array_filter($testes, fn($t) => $t > 0); $mediaTestes = count($validos) > 0 ? array_sum($validos) / count($validos) : 0; $notaFinal = round((2 * $mediaTestes + $aluno->{'apTr' . $trimestre}) / 3); $mediaFinal += $notaFinal; @endphp @foreach($testes as $teste){{ $teste > 0 ? $teste : '' }} | @endforeach{{ $mediaTestes > 0 ? round($mediaTestes) : '' }} | {{ $aluno->{'apTr' . $trimestre} > 0 ? $aluno->{'apTr' . $trimestre} : '' }} | @if($aluno->{'apTr' . $trimestre} > 0) {{ $notaFinal }} @endif | @endforeach@if($aluno->apTr1 > 0 && $aluno->apTr2 > 0 && $aluno->apTr3 > 0) {{ round($mediaFinal / 3) }} @endif | |||||||||||||||||
____________________________________________