templates/evaluation/liststudents.html.twig line 1

Open in your IDE?
  1. {% if courses is defined%}
  2. <div class="col-12 col-sm-1 col-md-1 col-lg-2 ">
  3. </div>
  4. <div class="col-12 col-sm-10 col-md-10 col-lg-8 ">
  5. <select id="evaluation_course" required="required" class="ChoiceCourse form-control" name="ChoiceCourse">
  6. {%for course in courses%}
  7. <option value="{{course.id}}">{{course.wording}}</option>
  8. {% endfor %}
  9. </select>
  10. <br/>
  11. </div>
  12. <div class="col-12 col-sm-1 col-md-1 col-lg-2 ">
  13. </div>
  14. {% endif %}
  15. {% if students is defined%}
  16. <div class="col-12">
  17. <table class="table table-bordered table-hover table-sortable table-responsive" id="tab_logic">
  18. <thead>
  19. <tr>
  20. <th class="text-center col-12 col-sm-5 col-md-5 col-lg-3" >Nom et prénom</th>
  21. <th class="text-center col-12 col-sm-5 col-md-5 col-lg-3" >Note de session</th>
  22. <th class="text-center col-12 col-sm-3 col-md-3 col-lg-3" >Appr.</th>
  23. <th class="text-center col-12 col-sm-3 col-md-3 col-lg-3" >Poids</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {%for student in students%}
  28. <tr id='addr0' data-id="0" class="hidden">
  29. <td data-name="name">
  30. {{student.lastname}} {{student.firstname}}
  31. </td>
  32. <td data-name="desc">
  33. <input type="number" id="{{student.matricule}}" placeholder="0...20"
  34. min="0" max="20" class="form-control value" name="{{student.matricule}}note"/>
  35. </td>
  36. <td data-name="desc">
  37. <input type="text" placeholder="Appréciation" class="form-control appreciation" name="{{student.matricule}}appr"/>
  38. </td>
  39. <td data-name="desc">
  40. <input type="number" min="0" max="1" class="form-control appreciation" value="1" name="{{student.matricule}}appr"/>
  41. </td>
  42. </tr>
  43. {% endfor %}
  44. </tbody>
  45. </table>
  46. </div>
  47. {% endif %}
  48. {% block javascripts %}
  49. <script type="text/javascript" src="{{ asset('assets/js/jquery.js') }}"></script>
  50. <script type="text/javascript" >
  51. $(function () {
  52. $("td input.value").change(function () {
  53. var note = $(this).val();
  54. note = parseInt(note);
  55. if (note >= 0 && note < 10) {
  56. $(this).parent().next().children().val("NA");
  57. }
  58. if (note >= 10 && note < 14) {
  59. $(this).parent().next().children().val("EA/IA");
  60. }
  61. if (note >= 14 && note < 17) {
  62. $(this).parent().next().children().val("A");
  63. }
  64. if (note >= 17 && note <= 20) {
  65. $(this).parent().next().children().val("E");
  66. }
  67. });
  68. });
  69. </script>
  70. {% endblock javascripts %}