templates/Front/Scholar/PracticalCase/learner_messaging.html.twig line 1

Open in your IDE?
  1. {% extends 'Front/Scholar/PracticalCase/_base_messaging.html.twig' %}
  2. {% block messaging_form %}
  3. {% if form is not null %}
  4. <div data-toggle-by="edit-practical-case-response"
  5. class="practical-case-form-container{% if status is same as 'waiting' and formErrors is same as false %} d-none{% endif %}">
  6. {% include 'Front/Scholar/PracticalCase/PracticalCaseResponse/_form_response.html.twig' with {
  7. 'form': form
  8. } %}
  9. </div>
  10. {% endif %}
  11. {% endblock %}
  12. {% block practical_case_notification %}
  13. <div class="mb-4">
  14. {% set can_go_lesson_after = false %}
  15. {% if is_granted('FRONT_ACCESS_REVIEW', {
  16. 'training': training,
  17. 'module': module,
  18. 'lesson': lesson,
  19. }) is same as true %}
  20. {% set can_go_lesson_after = true %}
  21. {% endif %}
  22. {% if practicalCaseLastResponse is null %}
  23. {% set content = 'Vous n\'avez pas encore réalisé ce cas pratique.</br>Commencez-le dès maintenant !' %}
  24. {% set imageUrl = asset('build/common/notification-void.png', 'common') %}
  25. {% elseif status is same as 'waiting' %}
  26. {% set content = 'Votre cas pratique est en cours de correction.' %}
  27. {% set imageUrl = asset('build/common/notification-time.png', 'common') %}
  28. {% elseif status is same as 'refused' %}
  29. {% if can_go_lesson_after is same as true %}
  30. {% set content = 'Votre cas pratique n\'a pas été validé par le formateur.</br>Veuillez le recommencer.' %}
  31. {% else %}
  32. {% set content = 'Votre cas pratique n\'a pas été validé par le formateur, vous ne pourrez pas poursuivre vers le cours suivant.</br>Veuillez le recommencer.' %}
  33. {% endif %}
  34. {% set imageUrl = asset('build/common/notification-cancel.png', 'common') %}
  35. {% else %}
  36. {% set content = 'Félicitations ! Votre cas pratique a été validé.</br>Continuer votre formation !' %}
  37. {% set imageUrl = asset('build/common/notification-success.png', 'common') %}
  38. {% endif %}
  39. {% include 'Front/Scholar/PracticalCase/_practical_case_notification.html.twig' with {
  40. 'content': content,
  41. 'imageUrl': imageUrl
  42. } %}
  43. </div>
  44. {% endblock %}
  45. {% block notification %}
  46. {% if practicalCaseLastResponse is not null %}
  47. <div class="practical-case-response-alert-container">
  48. {% if practicalCaseLastResponse.status == 0 %}
  49. <div class="alert alert-success">
  50. <img src="{{ asset('build/common/icon-checkmark-filled.svg', 'common') }}" alt="icon check">{{ 'practical_case_learner.is_submit.label' | trans}}
  51. </div>
  52. {% elseif practicalCaseLastResponse.status == -1 %}
  53. <div class="alert alert-danger">
  54. <img src="{{ asset('build/common/error.png', 'common') }}" alt="icon failed">{{ 'practical_case_learner.is_refused.label' | trans}}
  55. </div>
  56. {% else %}
  57. <div class="alert alert-success">
  58. <img src="{{ asset('build/common/icon-checkmark-filled.svg', 'common') }}" alt="icon check">{{ 'practical_case_learner.is_valid.label' | trans}}
  59. </div>
  60. {% endif %}
  61. </div>
  62. {% endif %}
  63. {% endblock %}
  64. {% block messaging_cta %}
  65. {% if status is same as 'refused' %}
  66. <button data-custom-file-disable-submit form="{{ form.vars.attr.id }}" type="submit" class="nellapp-btn w-100">
  67. {{ 'practical_case_learner.submit.label' | trans}}
  68. <i class="fas fa-paper-plane ms-1"></i>
  69. </button>
  70. {% elseif status is same as 'waiting'%}
  71. <button data-toggle="edit-practical-case-response" data-toggle-by="edit-practical-case-response" class="nellapp-btn w-100 {% if formErrors is same as true %}d-none{%endif%}">
  72. {{ 'practical_case_learner.modify.label' | trans}}
  73. <i class="fal fa-pen ms-1"></i>
  74. </button>
  75. <div data-toggle-by="edit-practical-case-response" class="grouped-btn flex-wrap {% if formErrors is same as false %}d-none{%endif%}">
  76. <a
  77. href="{{ path('front_channel_practical_case_response_delete',
  78. {'lessonId': lesson.id, 'moduleId': module.id, 'practicalCaseId': practicalCase.id, 'trainingId': training.id, 'practicalCaseResponseId': practicalCaseLastResponse.id}
  79. ) }}"
  80. class="nellapp-outline-btn danger flex-grow-1 me-4">
  81. <i class="fal fa-trash-alt me-2"></i>
  82. {{ 'practical_case_learner.delete.label' | trans}}
  83. </a>
  84. <button data-custom-file-disable-submit form="practical-case-response-form" type="submit" class="nellapp-btn flex-grow-1">
  85. {{ 'practical_case_learner.validate.label' | trans}}
  86. <i class="fas fa-arrow-right ms-1"></i>
  87. </button>
  88. </div>
  89. {% else %}
  90. <button id="correction-tab-link" class="nellapp-btn w-100" data-toggle-target="#correction-tab"
  91. type="button" >{{ 'practical_case_learner.correction_type.label' | trans}}</button>
  92. {% endif %}
  93. {% endblock %}