assign_members.tpl 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
  2. {% block content %}
  3. <table class="table table-bordered">
  4. <tbody>
  5. <tr>
  6. <td>Revisar</td>
  7. {% for member in members %}
  8. {% if _u.user_id == member.user.userId %}
  9. <td class="hover">
  10. {% else %}
  11. <td>
  12. {% endif %}
  13. {# member.user.userId #}
  14. {% if member.role.role == 'ROLE_JURY_PRESIDENT' %}
  15. P{{ loop.index }}
  16. {% elseif member.role.role == 'ROLE_JURY_MEMBER' %}
  17. M{{ loop.index -1}}
  18. {% else %}
  19. S{{ loop.index -1}}
  20. {% endif %}
  21. </td>
  22. {% endfor %}
  23. <td>Mi estado</td>
  24. </tr>
  25. {% for attempt in attempts %}
  26. <tr>
  27. <td>
  28. Estudiante #{{ attempt.user.getUserId }}
  29. </td>
  30. {% for member in members %}
  31. {% if _u.user_id == member.user.userId %}
  32. {% set memberHover = 'hover' %}
  33. {% else %}
  34. {% set memberHover = '' %}
  35. {% endif %}
  36. {% if relations[attempt.exeId][attempt.user.getUserId][member.user.userId] %}
  37. {% set checkedSuccess = 'class="success"' %}
  38. {% else %}
  39. {% set checkedSuccess = '' %}
  40. {% endif %}
  41. {% set studentList = students_by_member[member.userId] %}
  42. {% if attempt.user.getUserId in studentList %}
  43. {% set checked = 'checked="checked"' %}
  44. {% else %}
  45. {% set checked = '' %}
  46. {% endif %}
  47. <td class="{{ memberHover }}">
  48. <div {{ checkedSuccess }}>
  49. <input disabled {{ checked }} type="checkbox">
  50. </div>
  51. </td>
  52. {% endfor %}
  53. <td>
  54. {% if my_student_status[attempt.exeId][attempt.user.getUserId] %}
  55. <a href="#" class="btn btn-success disabled">Evaluado</a>
  56. {% else %}
  57. {% if attempt.user.getUserId in students_by_member[_u.user_id] %}
  58. <a href="{{ url('jury_member.controller:scoreAttemptAction', { 'exeId': attempt.getExeId, 'juryId' : jury.id }) }}" class="btn btn-warning">
  59. Evaluar
  60. </a>
  61. {% else %}
  62. <a href="#" class="btn disabled">No asignado</a>
  63. {% endif %}
  64. {% endif %}
  65. </td>
  66. </tr>
  67. {% endfor %}
  68. </tbody>
  69. </table>
  70. </form>
  71. {% endblock %}