Pages pour remplir les notes

This commit is contained in:
mckmonster 2024-07-20 20:03:52 +02:00
parent cd44b21a8a
commit 43d586f57b
3 changed files with 23 additions and 11 deletions

View file

@ -0,0 +1,9 @@
$(document).ready(function(){
$("#classe").on("change", function() {
var value = $(this).val().toLowerCase();
$("#eleves div.form-group").filter(function() {
var text = $(this).attr('classe').toLowerCase();
$(this).toggle(text.indexOf(value) > -1);
});
});
});

View file

@ -65,7 +65,6 @@ class NoteManager {
// echo var_dump($matieres); // echo var_dump($matieres);
$classes = $this->listManager->getOne('ListeClasses'); $classes = $this->listManager->getOne('ListeClasses');
// echo var_dump($classes); // echo var_dump($classes);
return $this->wiki->render('@meeo/edu_controle.twig', ['matieres' => $matieres['label'], 'classes' => $classes['label'], 'eleves' => $eleves]); return $this->wiki->render('@meeo/edu_controle.twig', ['matieres' => $matieres['label'], 'classes' => $classes['label'], 'eleves' => $eleves]);
} }
} }

View file

@ -1,14 +1,16 @@
{{ include_javascript('tools/meeo/javascripts/edu_controle_filter.js') }}
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="intitule">Intitulé:</label> <label class="control-label col-sm-2" for="intitule">Intitulé:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" id="intitule"> <input type="text" class="form-control" id="intitule" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="matiere">Matière:</label> <label class="control-label col-sm-2" for="matiere">Matière:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" id="matiere"> <select class="form-control" id="matiere" required>
{% for clef, matiere in matieres %} {% for clef, matiere in matieres %}
<option value="{{ clef }}">{{ matiere }}</option> <option value="{{ clef }}">{{ matiere }}</option>
{% endfor %} {% endfor %}
@ -18,7 +20,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="classe">Classe:</label> <label class="control-label col-sm-2" for="classe">Classe:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" id="classe"> <select class="form-control" id="classe" required>
{% for classe in classes %} {% for classe in classes %}
<option>{{ classe }}</option> <option>{{ classe }}</option>
{% endfor %} {% endfor %}
@ -33,14 +35,16 @@
</div> </div>
<div> <div>
<h2>Eleves</h2> <h2>Eleves</h2>
<div id="eleves">
{% for eleve in eleves %} {% for eleve in eleves %}
<div class="form-group"> <div class="form-group" classe="{{ eleve['listeListeClassesbf_classe'] }}" hidden>
<label class="control-label col-sm-2" for="{{ eleve['id_fiche'] }}">{{ eleve['bf_nom'] }}</label> <label class="control-label col-sm-2" for="{{ eleve['id_fiche'] }}">{{ eleve['bf_nom'] }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="number" class="form-control" id="{{ eleve['id_fiche'] }}" min="0" max="20" step="0.1"> <input type="number" class="form-control" id="{{ eleve['id_fiche'] }}" min="0" max="20" step="0.1" required>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
</div>
<button type="submit" class="btn btn-default">Envoyer</button> <button type="submit" class="btn btn-default">Envoyer</button>
</form> </form>