You are here

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

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

Default theme implementation to display learnign path course.

Available variables:

  • passed
  • score
  • step
  • completed
  • badges
  • time_spent

File

templates/opigno-learning-path-training-course.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display learnign path course.
  5. *
  6. * Available variables:
  7. * - passed
  8. * - score
  9. * - step
  10. * - completed
  11. * - badges
  12. * - time_spent
  13. */
  14. #}
  15. {% set is_passed = passed.percent == 100 %}
  16. {% set process = (100 * step.progress)|round() %}
  17. <div class="px-3 d-md-flex justify-content-center flex-wrap">
  18. <div class="float-left mr-3 mr-md-0">
  19. <div class="h4 mb-0 {{ is_passed ? 'color-green' : 'color-red' }}">{{ passed.value }}</div>
  20. <div>{{ 'Module'|t }}<br>{{ 'passed'|t }}</div>
  21. </div>
  22. <div class="lp_step_summary_course_step_passed_chart donut-wrapper ml-3 mb-3 mb-md-0 {{ is_passed ? 'passed' : 'not_passed' }}">
  23. <canvas class="donut"
  24. data-value="{{ passed.percent }}"
  25. data-width="7"
  26. data-color="{{ is_passed ? '#c2e76b' : '#ff5440' }}"
  27. data-track-color="#eeeeee"
  28. width="67"
  29. height="67"
  30. style="box-shadow: rgb(238, 238, 238) 0 0 0 3.5px inset;">
  31. </canvas>
  32. </div>
  33. <div class="ml-md-5 float-left mr-3 mr-md-0">
  34. <div class="h4 color-blue mb-0">{{ process ~ '%' }}</div>
  35. <div>{{ 'Completion'|t }}</div>
  36. </div>
  37. <div class="lp_step_summary_completion_chart donut-wrapper ml-3 mb-3 mb-md-0">
  38. <canvas class="donut"
  39. data-value="{{ process }}"
  40. data-width="7"
  41. data-color="#5bb4d8"
  42. data-track-color="#eeeeee"
  43. width="67"
  44. height="67"
  45. style="box-shadow: rgb(238, 238, 238) 0 0 0 3.5px inset;">
  46. </canvas>
  47. </div>
  48. <div class="ml-md-5 float-left mr-3 mr-md-0">
  49. <div class="h4 color-blue mb-0">{{ score ~ '%' }}</div>
  50. <div>{{ 'Score'|t }}</div>
  51. </div>
  52. <div class="lp_step_summary_approved_chart donut-wrapper ml-3 mb-3 mb-md-0">
  53. <canvas class="donut"
  54. data-value="{{ score }}"
  55. data-width="7"
  56. data-color="#5bb4d8"
  57. data-track-color="#eeeeee"
  58. width="67"
  59. height="67"
  60. style="box-shadow: rgb(238, 238, 238) 0 0 0 3.5px inset;">
  61. </canvas>
  62. </div>
  63. <div class="ml-md-5">
  64. <div class="text-italic">{{ 'Time spent'|t }}</div>
  65. <div class="h4 color-blue">{{ time_spent }}</div>
  66. <div class="text-italic">{{ 'Completed on'|t }}</div>
  67. <div class="h4 color-blue">{{ completed }}</div>
  68. <div class="text-italic">{{ 'Badges earned'|t }}</div>
  69. <div class="h4 color-blue">{{ badges }}</div>
  70. </div>
  71. </div>
  72. <hr class="lp_course_steps_wrapper ml-3 ml-md-7 mr-3 mr-md-5 my-4">