%
# Copyright (C) 2020 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
%>
-
<%= t :due_at, 'Due' %>
<% if @assignment.multiple_due_dates? %>
<%= multiple_due_date_tooltip(@assignment, @current_user) %>
<% elsif @assignment.due_at %>
<% ot(:date_time_by, "%{date} by %{time}", :date => capture { %>
<%= date_string(@assignment.due_at) rescue '' %><% }, :time => capture { %>
<%= time_string(@assignment.due_at) rescue '' %><% }) %>
<% else %>
<%= t :no_due_date, 'No Due Date' %>
<% end %>
<% if !@assignment.restrict_quantitative_data?(@current_user) %>
-
<%= t :points, 'Points' %>
<%= n(round_if_whole(@assignment.points_possible)) || t(:no_points, 'None') %>
<%end%>
<% if @assignment.expects_submission? || @assignment.expects_external_submission? %>
<% turnitin_text = turnitin_active? ? ' ' + t(:turnitin_enabled_short, '(Turnitin enabled)') : '' %>
<% vericite_text = vericite_active? ? ' ' + t(:vericite_enabled_short, '(VeriCite enabled)') : '' %>
-
<%= t :submitting, 'Submitting' %>
<%= @assignment.readable_submission_types + turnitin_text %>
<% if @assignment.submission_types =~ /online_upload/ && !@assignment.allowed_extensions.blank? -%>
-
<%= t :submission_types, 'File Types' %>
<%= @assignment.allowed_extensions.to_sentence %>
<% end %>
<% end %>
<% if @assignment.allowed_attempts&.> 0 %>
-
<%= t :attempts, 'Attempts' %>
<%= @current_user_submission&.attempt || 0 %>
-
<%= t :allowed_attempts, 'Allowed Attempts' %>
<%= @assignment.allowed_attempts + (@current_user_submission&.extra_attempts || 0) %>
<% end %>
<%= render :partial => "shared/available_dates", :locals => {:association => @assignment} %>