certificate_report.tpl 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. {{ searchBySessionCourseDateForm }}
  28. <hr>
  29. {{ searchByStudentForm }}
  30. {% if errorMessage is defined %}
  31. <div class="alert alert-error">{{ errorMessage }}</div>
  32. {% endif %}
  33. {% if not certificateStudents is empty %}
  34. <h2 class="page-header">{{ "GradebookListOfStudentsCertificates" | get_lang }}</h2>
  35. {% if not exportAllLink is null %}
  36. <div class="actions">
  37. <a href="{{ exportAllLink }}" class="btn btn-info">
  38. <em class="fa fa-check"></em> {{ 'ExportAllCertificatesToPDF' | get_lang }}
  39. </a>
  40. </div>
  41. {% endif %}
  42. <table class="table table-striped">
  43. <thead>
  44. <tr>
  45. <th>{{ 'Student' | get_lang }}</th>
  46. <th>{{ 'Sesion' | get_lang }}</th>
  47. <th>{{ 'Course' | get_lang }}</th>
  48. <th>{{ 'Date' | get_lang }}</th>
  49. <th>{{ 'Certificate' | get_lang }}</th>
  50. </tr>
  51. </thead>
  52. <tfoot>
  53. <tr>
  54. <th>{{ 'Student' | get_lang }}</th>
  55. <th>{{ 'Sesion' | get_lang }}</th>
  56. <th>{{ 'Course' | get_lang }}</th>
  57. <th>{{ 'Date' | get_lang }}</th>
  58. <th>{{ 'Certificate' | get_lang }}</th>
  59. </tr>
  60. </tfoot>
  61. <tbody>
  62. {% for student in certificateStudents %}
  63. <tr>
  64. <td>{{ student.fullName }}</td>
  65. <td>{{ student.sessionName }}</td>
  66. <td>{{ student.courseName }}</td>
  67. <td>
  68. {% for certificate in student.certificates %}
  69. <p>{{ certificate.createdAt }}</p>
  70. {% endfor %}
  71. </td>
  72. <td>
  73. {% for certificate in student.certificates %}
  74. <a href="{{ _p.web }}certificates/index.php?id={{ certificate.id }}" class="btn btn-default"><em class="fa fa-floppy-o"></em> {{ 'Certificate' | get_lang }}</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 %}