{% extends 'bootstrap-modal-layout.html.twig' %}
{% set modal_class= "modal-lg" %}

{% do script(['libs/echarts.js','app/js/homework/manage/graph/index.js']) %}

{% block title %}
  {% if task.isOptional %}
    {{ 'course.testpaper_check.optional_task_title'|trans({'%title%':task.title}) }}
  {% else %}
    {{ 'course.catalogue.task_status.task'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans),'%taskNumber%':task.number, '%taskTitle%':task.title}) }}
  {% endif %}
{% endblock %}

{% block body %}
  <div class="testpaper-mark-graph">
    <div class="testpaper-mark-graph__data">{{ 'course.testpaper_check.graph_passed_percent'|trans({'%percent%':analysis.passPercent|default(0)}) }}</div>
    <div class="testpaper-mark-graph__chart" id="line-data"></div>
    <input id="data" type="hidden" value='{% if data %}{{data}}{% endif %}'>
  </div>
{% endblock %}

{% block footer %}{% endblock %}