certificate_report.tpl 3.0 KB

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