You are here

opigno-learning-path-training-summary.html.twig in Opigno Learning path 8

Same filename and directory in other branches
  1. 3.x templates/opigno-learning-path-training-summary.html.twig

Default theme implementation to display the summary of traning.

Available variables:

  • progress: The percent of the process.
  • score: The percent of the score.
  • group_id: group/training id.
  • has_certificate: The certificate mark.
  • is_passed: The passed mark.
  • state_class: The extended class for status
  • registration_date: Registration date.
  • validation_message: Validation masssage with date.
  • time_spend: Time spends in training.

File

templates/opigno-learning-path-training-summary.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display the summary of traning.
  5. *
  6. * Available variables:
  7. * - progress: The percent of the process.
  8. * - score: The percent of the score.
  9. * - group_id: group/training id.
  10. * - has_certificate: The certificate mark.
  11. * - is_passed: The passed mark.
  12. * - state_class: The extended class for status
  13. * - registration_date: Registration date.
  14. * - validation_message: Validation masssage with date.
  15. * - time_spend: Time spends in training.
  16. */
  17. #}
  18. {% set certificate_class = not certificate_url ? 'lp_summary_certificate_inactive' %}
  19. <div class="lp_summary d-flex flex-wrap py-5">
  20. <div class="lp_summary_content">
  21. <div class="lp_step_summary_title h4 mb-0 text-uppercase">{{ 'Training Progress'|t }}</div>
  22. <div class="lp_step_summary_progress">{{ progress ~ '%' }}</div>
  23. </div>
  24. <div class="lp_summary_content {{ 'mobile--' ~ state_class }}">
  25. <div class="lp_step_summary_title h4 mb-0 text-uppercase">{{ 'Training Score'|t }}</div>
  26. <div class="lp_step_summary_score">{{ score ~ '%' }}</div>
  27. </div>
  28. <div class="{{ state_class }}"></div>
  29. <div class="lp_summary_certificate {{ certificate_class }}">
  30. {% if certificate_url %}
  31. <a href="{{ certificate_url }}" class="lp_summary_certificate_text">{{ 'Download certificate'|t }}</a>
  32. <a href="{{ certificate_url }}" class="lp_summary_certificate_icon">
  33. <span class="sr-only"> {{ 'Download certificate'|t }}</span>
  34. </a>
  35. {% else %}
  36. <span class="lp_summary_certificate_text">{{ 'Download certificate'|t }}</span>
  37. <span class="lp_summary_certificate_icon"></span>
  38. {% endif %}
  39. </div>
  40. <div class="mt-4 w-100 d-flex justify-content-center lp-step-summary">
  41. <div class="lp_step_summary_registration font-italic">
  42. {{ 'Registration date: @date'|t({'@date': registration_date}) }}</div>
  43. <div class="lp_step_summary_validation ml-3 ml-md-5 font-italic">
  44. {{ validation_message|raw }}
  45. </div>
  46. <div class="lp_step_summary_time_spent ml-3 ml-md-5 font-italic">
  47. {{ 'Time spent: @date'|t({'@date': time_spend}) }}
  48. </div>
  49. </div>
  50. </div>