{{-- alert with content --}}
@include('partials.alert')
@include('partials.alert', [
"showAlert" => $errors->any(),
"success" => false,
"msg" => session('msg')
])
Fiche EC
Code | : {{$ecu['code_ecu']}} |
---|---|
Intitulé | : {{$ecu['intituleEcu']}} |
Filière | : {{$ecu['intituleFilieres']}} |
Niveau | : {{findNiveau($ecu['niveauFormation']).' '.$ecu['annee']}} |
Crédit{{$ecu['credit'] > 1 ? 's' : ''}} | : {{$ecu['credit']}} Cr |
Masse horaire | : {{$ecu['masse_horaire']}} h |
Chapitre{{ count($chapitres) > 1 ? 's' : ''}} | : {{count($chapitres)}} |
Section{{ $nbSecs > 1 ? 's' : ''}} | : {{ $nbSecs }} |
Média{{ $nbMedias > 1 ? 's' : ''}} | : {{$nbMedias}} |
Votre progression
-
@php
$p = $nbSecUploaded * 100 / ($nbSecsExpanded ? $nbSecsExpanded : 1);
@endphp
- Cours rendu disponible
{{ number_format($p,2) }}%{{ $nbSecUploaded.' sections/'.$nbSecsExpanded }}
-
@php
if ($ecu['Heures_effectuees'] > $ecu['masse_horaire']) {
$p = 100;
} else {
$p = $ecu['Heures_effectuees'] * 100 / ($ecu['masse_horaire'] ? $ecu['masse_horaire'] : 1);
}
$heureExec = explode(".",number_format($ecu['Heures_effectuees'],2));
@endphp
- Heures effectuées
{{ number_format($p,2) }}% {{ $heureExec[0].'h'.$heureExec[1].'min /'.$ecu['masse_horaire'].'h' }}
Progression des Etudiants
Tableau récapitulatif
@if (count($chapitres))
@else
@include('partials.nodata', [
"height" => '60vh',
"msg" => 'Aucun chapitre disponible pour cet EC'
])
@endif
@php
$mIndex = 0; // temp var to hold position of media in playlist
@endphp
@foreach ($chapitres as $pos => $chap)
@php
// UI purposes...
if (strlen($chap['chapitrenumero']) == 1) {
$chap["numero"] = '0'.$chap['chapitrenumero'];
} else {
$chap["numero"] = $chap['chapitrenumero'];
}
// nb of medias in the chapiter
if (empty($medias[$chap['id_chapitre']])) {
$nbMedChap = 0;
} else {
$nbMedChap = count($medias[$chap['id_chapitre']]);
}
// percentage of media present in chap
if ($nbMedias) {
$percent = $nbMedChap*100 / $nbMedias;
} else {
$percent = 0;
}
// sections of chap
$nbSec = count($chap['sections']); // nb of sections in chap
$secP = $nbSec*100 / ($nbSecs ? $nbSecs : 1) ;
@endphp
@endforeach
@if ($nbSec)
@else
@endif
-
@foreach ($chap["sections"] as $sec)
- ⋄ {{$sec}} @endforeach