progress.tpl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {{ actions }}
  2. {{ message }}
  3. {{ flash_messages }}
  4. {% if data is not empty %}
  5. {% set tutor = false | api_convert_and_format_date(true) %}
  6. <div id="course-progress" class="thematic">
  7. <div class="row">
  8. <div class="col-md-12">
  9. <div class="bar-progress">
  10. <div class="pull-right">
  11. <div class="score-progress">
  12. <h3>{{ 'Progress' | get_lang }}: <span id="div_result">{{ score_progress }}</span> %</h3>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="table-responsive">
  17. <table width="100%" class="table table-hover">
  18. <tr>
  19. <th style="width: 25%">{{ 'Thematic' | get_lang }}</th>
  20. <th style="width: 40%">{{ 'ThematicPlan' | get_lang }}</th>
  21. <th style="width: 35%">{{ 'ThematicAdvance' | get_lang }}</th>
  22. </tr>
  23. {% for item in data %}
  24. <tr>
  25. <td id="id-thematic-{{ item.id }}">
  26. {% if session_star is empty %}
  27. <h3>{{ item.title }}</h3>
  28. {% else %}
  29. <h3>{{ item.title }} {{ session_star }}</h3>
  30. {% endif %}
  31. {{ item.content }}
  32. <div class="btn-group btn-group-sm">
  33. {{ item.toolbar }}
  34. </div>
  35. </td>
  36. <td>
  37. {% if tutor %}
  38. <div class="pull-right">
  39. <a title="{{ 'EditThematicPlan' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&origin=thematic_details&action=thematic_plan_list&thematic_id={{ item.id }}&width=700&height=500'" class="btn btn-default">
  40. <i class="fa fa-pencil" aria-hidden="true"></i>
  41. </a>
  42. </div>
  43. {% endif %}
  44. <div class="thematic_plan_{{ item.id }}">
  45. {% if item.thematic_plan is empty %}
  46. <div class="alert-thematic">
  47. <div class="alert alert-info" role="alert">{{ 'StillDoNotHaveAThematicPlan' | get_lang }}</div>
  48. </div>
  49. {% else %}
  50. {% for subitem in item.thematic_plan %}
  51. <h4>{{ subitem.title }}</h4>
  52. <p>{{ subitem.description }}</p>
  53. {% endfor %}
  54. {% endif %}
  55. </div>
  56. </td>
  57. <td>
  58. {% if tutor %}
  59. <div class="pull-right">
  60. <a title="{{ 'NewThematicAdvance' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_add&thematic_id={{ item.id }}" class="btn btn-default">
  61. <i class="fa fa-plus-circle" aria-hidden="true"></i>
  62. </a>
  63. </div>
  64. {% endif %}
  65. <div class="thematic-advance">
  66. <table width="100%" class="table">
  67. {% if item.thematic_advance is not empty %}
  68. {% for advance in item.thematic_advance %}
  69. <tr>
  70. <td style="width: 90%" class="thematic_advance_content" id="thematic_advance_content_id_{{ advance.id }}">
  71. <div id="thematic_advance_{{ advance.id }}">
  72. <strong>{{ advance.start_date | format_date }}</strong>
  73. {{ advance.content }}
  74. </div>
  75. {% if tutor %}
  76. <div class="toolbar-actions">
  77. <div id="thematic_advance_tools_{{ advance.id }}" class="thematic_advance_actions">
  78. <div class="btn-group btn-group-sm">
  79. <a class="btn btn-default btn-sm" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_edit&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Edit' |get_lang }}">
  80. <i class="fa fa-pencil" aria-hidden="true"></i>
  81. </a>
  82. <a class="btn btn-default btn-sm" onclick="javascript:if(!confirm('{{ 'AreYouSureToDelete' | get_lang }}')) return false;" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_delete&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Delete' |get_lang }}">
  83. <i class="fa fa-trash" aria-hidden="true"></i>
  84. </a>
  85. </div>
  86. </div>
  87. </div>
  88. {% endif %}
  89. </div>
  90. </td>
  91. {% if advance.done_advance == 1 %}
  92. {% set color = "background-color:#E5EDF9;" %}
  93. {% else %}
  94. {% set color = "background-color:#FFFFFF;" %}
  95. {% endif %}
  96. {% if tutor %}
  97. <td style="width: 10%; {{ color }}" id="td_done_thematic_{{ advance.id }}">
  98. {% set check = "" %}
  99. {% if item.last_done == advance.id %}
  100. {% set check = "checked" %}
  101. {% endif %}
  102. <center>
  103. <input type="radio" class="done_thematic" id="done_thematic_{{ advance.id }}" name="done_thematic" value="{{ advance.id }}" {{ check }} onclick="update_done_thematic_advance(this.value)">
  104. </center>
  105. {% else %}
  106. </td>
  107. {% endif %}
  108. </tr>
  109. {% endfor %}
  110. {% else %}
  111. <div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicAdvance' | get_lang }}</div>
  112. {% endif %}
  113. </table>
  114. </div>
  115. </td>
  116. </tr>
  117. {% endfor %}
  118. </table>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. {% else %}
  124. <div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicSection' | get_lang }}</div>
  125. {% endif %}