{% extends 'base.html.twig' %} {% block title %}{{parent()}}: Planning{% endblock %} {% block body %} {% set joursFR = { "Monday" : "Lundi", "Tuesday" : "Mardi", "Wednesday" : "Mercredi", "Thursday" : "Jeudi", "Friday" : "Vendredi", "Saturday" : "Samedi", "Sunday" : "Dimanche" } %}

Planning "{{ cursus.libelle }}"

{% set coursAffiche = [] %} {% for semestre in cursus.semestres %}

{{ semestre.libelle }}

{% set cours = semestre.cours|sort((a, b) => a.ordre <=> b.ordre) %} {% for cours in cours %} {% for horaire in cours.horaires %} {% for groupe in horaire.groupes %} {% if (groupe.groupe.id in groupes or is_granted('ROLE_ADMIN')) and cours.id not in coursAffiche %} {% set coursAffiche = coursAffiche|merge([cours.id]) %} {% set colorCours = false %}
{% set horaireAffiche = [] %} {% set horaires = cours.horaires %} {% for horaire2 in cours.horaires|sort((a, b) => a.ordre <=> b.ordre )%} {% for horaire2 in cours.horaires|sort((a, b) => a.ordre <=> b.ordre) %} {% for groupe in horaire2.groupes %} {% if (groupe.groupe.id in groupes or is_granted('ROLE_ADMIN')) and horaire2.id not in horaireAffiche %} {% set horaireAffiche = horaireAffiche|merge([horaire2.id]) %}
{% if horaire2.dateCours|date("Y-m-d") ~ " " ~ horaire2.fin|date("H:i") > "now"|date("Y-m-d H:i") %} {% set colorCours = true %} {% endif %} {% if horaire2.debut == "" %}

A faire avant le :

{% endif %} {% if (horaire2.debut != "") and (horaire2.debut == horaire2.fin) %}

A faire le :

{% endif %}

{{ joursFR[horaire2.dateCours|date("l")] }} {{ horaire2.dateCours|date("d/m") }}

{% if (horaire2.debut != "") and (horaire2.debut != horaire2.fin) %}

{{ horaire2.debut|date("H:i") }} - {{ horaire2.fin|date("H:i") }}

{% endif %} {% if is_granted('ROLE_PROF') %} {% if groupe.groupe|length > 0 %}

{% for g in horaire2.groupes %} {% if g.groupe.id in groupes or is_granted('ROLE_ADMIN') %} {{ g.groupe.libelle }}{% if not loop.last %}, {% endif %} {% endif %} {% endfor %}

{% endif %} {% endif %} {% if horaire2.debut != "" %} {% if groupe.groupe.profs|length > 0 %}

{% set tabProf = [] %} Avec : {% for p in groupe.horaire.groupes %} {% for prof in p.groupe.profs %} {% if prof.prof.id not in tabProf %} {% set tabProf = tabProf|merge([prof.prof.id]) %}

{{ prof.prof.nom }} {{ prof.prof.prenom }}

{% endif %} {% endfor %} {% endfor %}

{% endif %} {% endif %}
{% endif %} {% endfor %} {% endfor %} {% endfor %}

{% if cours.type != null %}{{ cours.type.libelle }}{% endif %} {{ cours.libelle }}

{% for activite in cours.activites|sort((a, b) => a.ordre <=> b.ordre) %}
{{ activite.libelle }}
{% endfor %}
{% endif %} {% endfor %} {% endfor %} {% endfor %}
{% endfor %}

Programme {% for langue in langues %} {{ langue }}{% if not loop.last %}, {% endif %} {% endfor %}

{{ cursus.libelle| upper }}

Enseigné par {% for prof in profs %} {{ prof }}{% if not loop.last %}, {% endif %} {% endfor %}
Niveaux {% for niveau in niveaux %} {{ niveau }}, {% endfor %}

Objectifs :

{{ cursus.objectif | raw }}
{% endblock body %} {% block javascripts %} {{ parent() }} {% endblock %}