@extends('layouts.base-refonte') @section('title','Details cours') @section('css') @endsection @section('content') @php $nbMed = array_sum(array_map("count", $medias)); // total of EC's media $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 : {{$nbMed}}
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
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") }}
@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

    {{ $nbMed }} média{{ ($nbMed > 1) ? 's' : '' }}
    @if ($chaps) @php $mIndex = 0; // temp var to hold position of media in playlist $nbMed = array_sum(array_map("count", $medias)); // total of EC's media @endphp
    @foreach ($chaps as $ind => $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 $percent = $nbMedChap*100 / $nbMed; @endphp
    @else
    @endif @endforeach
    @else @include('partials.nodata', [ "width" => "50%", "msg" => 'Aucun chapitre disponible pour cet EC' ]) @endif
    @endsection @section('script') {{-- --}} @endsection