{% extends "courses/base-course.html" %}
{% load i18n %}
{% load dashboard_extras %}
{% load staticfiles %}
{% load rjs %}

{% block view-name %}view-course-enrollment view-dashboard{% endblock view-name %}

{% block child_content %}

<section class="view-section" data-section="performance-tags-distribution" aria-hidden="true">

    {% block content_nav %}
    {% endblock %}

    {% block module_meta %}
    {% endblock %}

    {% if js_data.course.hasData %}
      <div class="section-content section-data-graph">
        <div class="section-content section-data-viz">
          <div class="analytics-chart-container">
            {% block chart_info %}
              {% include "courses/submissions_chart_info.html" %}
            {% endblock chart_info %}
            {% captureas chart_tip_text %}{% block chart_tip_text %}{% endblock %}{% endcaptureas %}
            {% include "chart_tooltip.html" with tip_text=chart_tip_text track_category="bar" %}
            <div id="chart-view" class="analytics-chart">
              {% include "loading.html" %}
            </div>
          </div>
          {% block module_controls %}{% endblock %}
        </div>
      </div>
    {% else %}
      {% include "alert_information.html" with message=no_data_message %}
    {% endif %}
</section>

{% if js_data.course.hasData %}
<section class="view-section">

    <div class="section-heading section-data-table-title">
      <h4 class="section-title">{% block table_title %}{% endblock %}</h4>
      {% block table_download %}{% endblock %}
    </div>

    {% if js_data.course.tagsDistribution %}
      <div class="section-content section-data-table" data-role="data-table">
        {% include "loading.html" %}
      </div>
    {% else %}
      {% show_table_error %}
    {% endif %}
</section>
{% endif %}

{% endblock %}
