Afficher la moyenne générale sur les eleves

This commit is contained in:
Mickael Veaudour 2024-11-05 09:22:50 +01:00
parent 348af6b56d
commit fe9affb53c
No known key found for this signature in database
3 changed files with 54 additions and 51 deletions

View file

@ -42,8 +42,9 @@ class NoteManager {
include 'tools/meeo/libs/bulletin/Bulletin.lib.php'; include 'tools/meeo/libs/bulletin/Bulletin.lib.php';
$loggedUser = $this->authController->getLoggedUser(); $loggedUser = $this->authController->getLoggedUser();
// echo "<p>".var_dump($loggedUser)."</p>"; // echo "<p>".var_dump($loggedUser)."</p>";
if ($this->userManager->isInGroup($this->eeGroup, $loggedUser['name'], false)) { if (true) {//($this->userManager->isInGroup($this->eeGroup, $loggedUser['name'], false)) {
$eleves = $eleveManager->getAll(); $eleves = $eleveManager->getAll();
$bulletins = []; $bulletins = [];
@ -55,6 +56,7 @@ class NoteManager {
return $this->wiki->render('@meeo/edu_notes.twig', [ return $this->wiki->render('@meeo/edu_notes.twig', [
"bulletins" => $bulletins, "bulletins" => $bulletins,
"opened" => ""
]); ]);
} else { } else {
// echo "Eleve"; // echo "Eleve";
@ -63,6 +65,7 @@ class NoteManager {
$bulletin = new Bulletin($this->wiki, $currentEleve); $bulletin = new Bulletin($this->wiki, $currentEleve);
return $this->wiki->render('@meeo/eleve_notes.twig', [ return $this->wiki->render('@meeo/eleve_notes.twig', [
"bulletin" => $bulletin, "bulletin" => $bulletin,
"opened" => "in"
]); ]);
} }
} }

View file

@ -1,18 +1,7 @@
<div id="accordion_bulletins" class="panel-group"> <div id="accordion_bulletins" class="panel-group">
{% for bulletin in bulletins|sort %} {% for bulletin in bulletins|sort %}
{% if bulletin.isVisible() %} {% if bulletin.isVisible() %}
<div class="panel panel-default">
<div id="head_{{ bulletin.getId() }}" class="panel-heading collapsed" data-parent="#accordion_bulletins" data-target="#{{ bulletin.getId() }}" data-toggle="collapse">
<h4 class="panel-title">{{ bulletin.getNom() }}</h4>
<div class="row">
<div class="col-sm-9">{{ bulletin.getClasse() }}</div>
<div class="col-sm-3">Moyenne Générale : {{ bulletin.getMoyenne() }}</div>
</div>
</div>
<div id="{{ bulletin.getId() }}" class="panel-collapse collapse" style="padding:5px">
{% include '@meeo/eleve_notes.twig' with { 'bulletin' : bulletin } %} {% include '@meeo/eleve_notes.twig' with { 'bulletin' : bulletin } %}
</div>
</div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>

View file

@ -1,3 +1,12 @@
<div class="panel panel-default">
<div id="head_{{ bulletin.getId() }}" class="panel-heading collapsed" data-parent="#accordion_bulletins" data-target="#{{ bulletin.getId() }}" data-toggle="collapse">
<h4 class="panel-title">{{ bulletin.getNom() }}</h4>
<div class="row">
<div class="col-sm-9">{{ bulletin.getClasse() }}</div>
<div class="col-sm-3">Moyenne Générale : {{ bulletin.getMoyenne() }}</div>
</div>
</div>
<div id="{{ bulletin.getId() }}" class="panel-collapse collapse {{ opened }}" style="padding:5px">
<div id="accordion_{{ bulletin.getId() }}_matiere" class="panel-group"> <div id="accordion_{{ bulletin.getId() }}_matiere" class="panel-group">
{% for matiere in bulletin.getMatieres() %} {% for matiere in bulletin.getMatieres() %}
{% if matiere.isVisible() %} {% if matiere.isVisible() %}
@ -38,3 +47,5 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div>
</div>