certificate_report.html.twig 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {% autoescape false %}
  2. <script>
  3. $(function () {
  4. $('select#session').on('change', function () {
  5. var sessionId = parseInt(this.value, 10),
  6. $selectCourse = $('select#course');
  7. $selectCourse.empty();
  8. $.get('{{ _p.web_main }}inc/ajax/course.ajax.php', {
  9. a: 'display_sessions_courses',
  10. session: sessionId
  11. }, function (courseList) {
  12. $('<option>', {
  13. value: 0,
  14. text: "{{ 'Select' | get_lang }}"
  15. }).appendTo($selectCourse);
  16. if (courseList.length > 0) {
  17. $.each(courseList, function (index, course) {
  18. $('<option>', {
  19. value: course.id,
  20. text: course.name
  21. }).appendTo($selectCourse);
  22. });
  23. }
  24. }, 'json');
  25. });
  26. });
  27. </script>
  28. {{ search_by_session_form }}
  29. <hr>
  30. {{ search_form }}
  31. {% if not certificate_students is empty %}
  32. <h2 class="page-header">{{ "GradebookListOfStudentsCertificates" | get_lang }}</h2>
  33. {% if not export_all_link is null %}
  34. <div class="actions">
  35. <a href="{{ export_all_link }}" class="btn btn-info">
  36. <em class="fa fa-check"></em> {{ 'ExportAllCertificatesToPDF' | get_lang }}
  37. </a>
  38. </div>
  39. {% endif %}
  40. <table class="table table-striped">
  41. <thead>
  42. <tr>
  43. <th>{{ 'Student' | get_lang }}</th>
  44. <th>{{ 'Sesion' | get_lang }}</th>
  45. <th>{{ 'Course' | get_lang }}</th>
  46. <th>{{ 'Date' | get_lang }}</th>
  47. <th>{{ 'Certificate' | get_lang }}</th>
  48. </tr>
  49. </thead>
  50. <tfoot>
  51. <tr>
  52. <th>{{ 'Student' | get_lang }}</th>
  53. <th>{{ 'Sesion' | get_lang }}</th>
  54. <th>{{ 'Course' | get_lang }}</th>
  55. <th>{{ 'Date' | get_lang }}</th>
  56. <th>{{ 'Certificate' | get_lang }}</th>
  57. </tr>
  58. </tfoot>
  59. <tbody>
  60. {% for student in certificate_students %}
  61. <tr>
  62. <td>{{ student.fullName }}</td>
  63. <td>{{ student.sessionName }}</td>
  64. <td>{{ student.courseName }}</td>
  65. <td>
  66. {% for certificate in student.certificates %}
  67. <p>{{ certificate.createdAt }}</p>
  68. {% endfor %}
  69. </td>
  70. <td>
  71. {% for certificate in student.certificates %}
  72. <a href="{{ _p.web }}certificates/index.php?id={{ certificate.id }}" class="btn btn-default">
  73. <em class="fa fa-floppy-o"></em> {{ 'Certificate' | get_lang }}
  74. </a>
  75. {% endfor %}
  76. </td>
  77. </tr>
  78. {% endfor %}
  79. </tbody>
  80. </table>
  81. {% else %}
  82. <p class="alert alert-info">{{ 'NoResults' | get_lang }}</p>
  83. {% endif %}
  84. {% endautoescape %}