progress.tpl 7.7 KB

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