<%! from django.utils.translation import ugettext as _ %>
<%page args="section_data"/>


<h2>${_("Data Download")}</h2>

<input type="button" name="list-profiles" value="${_("List enrolled students with profile information")}" data-endpoint="${ section_data['get_students_features_url'] }">
<input type="button" name="list-profiles" value="CSV" data-csv="true">
<br>
## <input type="button" name="list-grades" value="Student grades">
## <input type="button" name="list-profiles" value="CSV" data-csv="true" class="csv">
## <br>
## <input type="button" name="list-answer-distributions" value="Answer distributions (x students got y points)">
## <br>
<input type="button" name="dump-gradeconf" value="${_("Grading Configuration")}" data-endpoint="${ section_data['get_grading_config_url'] }">
<input type="button" name="list-anon-ids" value="${_("Get Student Anonymized IDs CSV")}" data-csv="true" class="csv" data-endpoint="${ section_data['get_anon_ids_url'] }" class="${'is-disabled' if disable_buttons else ''}">

<div class="data-display">
  <div class="data-display-text"></div>
  <div class="data-display-table"></div>
  <div class="request-response-error"></div>

%if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'):
  <div class="running-tasks-container action-type-container">
    <hr>
    <h2> ${_("Pending Instructor Tasks")} </h2>
    <p>${_("The status for any active tasks appears in a table below.")} </p>
    <br />

    <div class="running-tasks-table" data-endpoint="${ section_data['list_instructor_tasks_url'] }"></div>
  </div>

%endif
</div>
