canvas-lms/app/views/gradebooks/submissions_zip_upload.html...

91 lines
3.4 KiB
Plaintext

<% content_for :page_title do %><%= t(:submissions_upload, "%{assignment} Submissions Upload", :assignment => @assignment.title) %>: <%= t(:comments_made, {:one => "1 Comment Made", :other => "%{count} Comments Made"}, :count => @comments.length) %>, <%= t(:files_ignored, {:one => "1 File Ignored", :other => "%{count} Files Ignored"}, :count => @failures.length) %><% end %>
<% content_for :right_side do %>
<div class="rs-margin-all">
<p><%= t(:done, <<-TEXT)
Done! We took the files you uploaded and attached them with a short comment
to each user's submission page for this assignment. The students will get a
notification that a new comment was added.
TEXT
%></p>
<% if !@failures.empty? %>
<p><%= t(:failures, <<-TEXT)
There were some files we didn't know what to do with. They have not been
added to anyone's submission page. You can see the list to the left.
TEXT
%></p>
<% end %>
<a href="<%= context_url(@context, :context_assignment_url, @assignment.id) %>" class="back"><%= t('links.back_to_assignment', "Back to Assignment Page") %></a><br/>
<a href="<%= context_url(@context, :context_gradebook_url) %>#assignment_<%= @assignment.id %>" class="back"><%= t('links.back_to_gradebook', "Back to Gradebook") %></a>
</div>
<% end %>
<% content_for :stylesheets do %>
<style>
#student_list {
list-style-type: none;
margin: 0 0 20px;
font-size: 1.5em;
padding-left: 10px;
}
#student_list li {
padding: 2px 25px;
background-image: url(/images/person.png);
background-repeat: no-repeat;
background-position: 3px 10px;
}
#student_list .file_list {
list-style-type: none;
padding-left: 5px;
font-size: 0.8em;
margin-bottom: 5px;
}
#student_list .file_list li {
background-image: url(/images/file.png);
background-position: 3px 6px;
}
#failure_list {
list-style-type: none;
margin: 0;
padding-left: 10px;
}
#failure_list li {
padding: 3px 25px;
background-image: url(/images/file.png);
background-repeat: no-repeat;
background-position: 3px 6px;
}
</style>
<% end %>
<h2><%= t(:submissions_upload, "%{assignment} Submissions Upload", :assignment => @assignment.title) %></h2>
<h3 style="margin-top: 5px;"><%= t('headers.attached_files', "Attached files to the following user submissions") %></h3>
<ul id="student_list" style="margin-top: 10px;">
<% if @comments.empty? %>
<li><%= t(:no_comments_added, "No Comments Added") %></li>
<% end %>
<% @comments.flatten.each do |comment| %>
<li>
<a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, comment.submission.user_id) %>"><%= comment.submission.user.name %></a>
<ul class="file_list">
<% comment.attachments.each do |file| %>
<li>
<a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, comment.submission.user_id, :download => file.id, :comment_id => comment.id) %>"><%= file.display_name %></a>
<% if file.filename != file.display_name %>
<span style="font-size: 0.6em;">(<%= t(:renamed_file, "renamed from %{filename}", :filename => file.filename) %>)</span>
<% end %>
</li>
<% end %>
</ul>
</li>
<% end %>
</ul>
<% unless @failures.empty? %>
<h3 style="margin-top: 40px;"><%= t('header.ignored_files', "Ignored the following files") %></h3>
<ul id="failure_list">
<% @failures.each do |failure| %>
<li><%= failure.match(/\/([^\/]*)\z/)[1].to_s %></li>
<% end %>
</ul>
<% end %>