@extends('layouts.base-refonte', ["fixedHeader" => true]) @section('title','GestStudentElearning | Details cours') @section('css') @endsection @section('content') @php $string = [ 'class="edit_zone" align="justify" contenteditable="true" style="color: black; padding: 5px; border-radius: 5px; background: rgba(51, 122, 183, 0.12);"', '', '-   ' ]; @endphp
@include('partials.alert')
@if ($m)
@if (mediaType($m['ext'], "video")) {{-- --}} @endif
Zoom 100%
Angle 0°
NO IMAGE
@else
@include('partials.nodata', [ "width" => "100%", "msg" => 'Aucun média disponible pour ce cours' ])
@endif

@if ($m) {{$m['titre']}} @elseif ($ecu) EC : {{$ecu['intituleEcu']}} @endif

Aperçu du cours

{{-- --}}
EC : {{$ecu['intituleEcu']}}
Niveau : {{findNiveau($ecu['niveauFormation']).' '.$ecu['annee']}}
Médias : 00
Méthode d'enseignement : {!! str_replace($string, " ", $ecu['methode']) !!}
Objectifs d'apprentissage : {!! str_replace($string, " ", $ecu['apprentissage']) !!}
Mode de composition : {{ $ecu['mode_compo'] }}
Bibliographie : {!! str_replace($string, " ", $ecu['reference']) !!}
Webographie : {!! str_replace($string, " ", $ecu['webography']) !!}
Étudiants : 25
{!! $ecu['objectif_formation'] !!}
@if ($m)

Description

@foreach ($chaps as $chap) @if (!empty($medias[$chap['id_chapitre']])) @foreach ($medias[$chap['id_chapitre']] as $mcpos => $media) @php if($chap['sections']){ $secs = array_column($chap['sections'],"intitule","id_sectionchapitre"); } else { $secs = []; } $pos = array_search($m['id'], array_column($medias[$m['chap_id']],'id')); $date = date_create($media['published_at']); @endphp @if (mediaType($media['ext'], "video")) @endif @if ($media['id'] == $m['id']) @endif
Chapitre {{$chap['chapitrenumero']}} : {{$chap['chapitreintitule']}}
Section(s) : @php $mSecId = json_decode($media['sequences']); @endphp @if ($mSecId)
    @foreach ($mSecId as $secId)
  • ⋄ {{$secs[$secId]}}
@endforeach @else Aucune section n'a été associé au média @endif
Titre : {{$media['titre']}}
Description : {{$media['description']}}
Type : @if (mediaType($media['ext'], "video")) {{-- --}} Vidéo @elseif (mediaType($media['ext'], "pdf")) {{-- --}} PDF @else {{-- --}} Image @endif
Durée : {{$media['duree_video']}}
Publié le : {{ date_format($date,"d/m/Y \à H:i:s") }}
Progression : @if ($m['evolution'] == "finished") Lecture bouclée @elseif ($m['evolution'] == 'started') Média en cours de lecture @else Lecture non débutée @endif
@endforeach @endif @endforeach
{{-- TODO Get rate informations for this media --}}
0.0

Avis (00+)

{{-- TODO Get reviews for this media --}}

Commentaires (0)

    @csrf
    Author
    @endif
    Author
    {{$prof['nom']. ' ' .$prof['prenom']}} {{--

    {{$prof['nom']. ' ' .$prof['prenom']}}

    --}}
    ({{$prof['code_pays']}}) {{$prof['phone']}}
    {{$prof['email']}}
    Profil

    Contenu du cours

    Aucun média(s)
    @if ($chaps) @php $found = false; // last media viewed by the student hasn't been found yet $foundAt = -1; $openNextChap = false; $mIndex = 0; // temp var to hold position of media in playlist @endphp
    @foreach ($chaps as $chap) @php if (strlen($chap['chapitrenumero']) == 1) { $chap["numero"] = '0'.$chap['chapitrenumero']; } else { $chap["numero"] = $chap['chapitrenumero']; } @endphp @if (!empty($medias[$chap['id_chapitre']])) @php $nbMedChap = count($medias[$chap['id_chapitre']]); // nb of medias in the chapiter $pos = array_search($m['id'], array_column($medias[$chap['id_chapitre']],'id')); if($pos !== false){ $nbMedViewed = $pos + (($m['evolution'] == 'finished') ? 1 : (($m["evolution"] == "started") ? 0.5 : 0)); $found = true; $foundAt = $mIndex + $pos; $openNextChap = (($nbMedViewed === $nbMedChap) && ($m['evolution'] == "finished")) ? true : false; // Open next chapter only if he finished the last video of the current chapter } else { $nbMedViewed = $found ? 0 : $nbMedChap; $pos = -1; } $percent = $nbMedViewed*100 / $nbMedChap; // can view media list of chap ? if ( ($nbMedViewed != 0) || $openNextChap || (($pos !== -1) && ($nbMedViewed === 0) && ($m['evolution'] === 'NONE')) ) { $slide = "true"; $openNextChap = false; } else { $slide = "false"; } @endphp
    @else
    @endif @endforeach
    @else @include('partials.nodata', [ "width" => "50%", "msg" => 'Aucun chapitre disponible pour cet EC' ]) @endif
    {{-- --}}
    @endsection @section('script') {{-- include page's specific scripts here --}} {{-- --}} @endsection