student download all the things

closes CNVS-20007

test plan:
 - navigate to a student's profile settings page
 > there should be a button on the right side bar that says 'Download Submissions'
 - click that link
 > it should take you to /dashboard/data_exports
 > the page should say 'Download Submissions' with a friendly message underneath it
 > you should be able to click 'Create Export' and download all your submissions

Change-Id: Ifefeaffbabd1ddd211ead43f95c81b26b4001fef
Reviewed-on: https://gerrit.instructure.com/53233
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
This commit is contained in:
Cameron Sutter 2015-04-30 14:52:08 -06:00
parent 9019608758
commit a9bf672783
2 changed files with 17 additions and 4 deletions

View File

@ -1,15 +1,25 @@
<% title = @context.is_a?(Course) ? t('content_exports', "Content Exports") : t('user_data_exports', "User Data Exports") %>
<%
title = @context.is_a?(Course) ? t('content_exports', "Content Exports") : t('user_data_exports', "Download Submissions")
friendly_message = @context.is_a?(Course) ? nil : t("Creating a Submission Export will allow you to download a zip file of all your assignment submissions in all of your present and past courses. This could be a big file, so it may take a while. You can navigate away from the page and come back later.")
%>
<% add_crumb title %>
<% content_for :page_title do %><%= title %><% end %>
<div>
<h1><%= title %></h1>
<% if friendly_message %>
<p><%= friendly_message %></p>
<% end %>
<div class="export_messages" style="<%= hidden %>">
<div class="ui-state-error error_message"></div>
</div>
<hr />
<div id="export_files">
<% @exports.each do |export| %>
<% unless export.running? %>
@ -32,6 +42,8 @@
<% end %>
</div>
<hr />
<div class="form" style="<%= hidden if @current_export_id %>">
<% if @context.is_a?(Course) %>
<%= form_tag course_content_exports_path(@context.id), :id => "exporter_form" do %>
@ -67,7 +79,7 @@
<% end %>
<% end %>
</div>
<div class="progress_bar_holder" style="<%= hidden unless @current_export_id %> margin-top: 10px;">
<div class="export_progress"></div>
<% if @context.is_a?(Course) %>

View File

@ -15,6 +15,7 @@
<% if mfa_settings == :optional && @user.otp_secret_key %>
<a href="<%= disable_mfa_path('self') %>" class="btn button-sidebar-wide" id="disable_mfa_link"><%= image_tag "unlock.png" %> <%= t('links.disable_mfa', "Disable Multi-Factor Authentication") %></a>
<% end %>
<a href="<%= dashboard_content_exports_path %>" class="btn button-sidebar-wide"><i class="icon-download"></i> <%= t("Download Submissions") %></a>
<% if show_request_delete_account %>
<a href="<%= request_delete_account_link %>" class="btn button-sidebar-wide"> <%= t('Delete My Account') %></a>
<% end %>