%
# Copyright (C) 2011 - 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 .
%>
<% provide :page_title, @assignment.title %>
<% provide :right_side, render(:partial => "assignment_sidebar") %>
<% if @show_locked_page %>
<% if can_do(@context, @current_user, :read_as_admin) %>
<% else %>
<% if show_confetti %>
<%= render partial: "confetti" %>
<% end %>
<%= @assignment.title %>
<%= render "shared/mark_as_done" %>
<%= assignment_submission_button(@assignment, @current_user, @current_user_submission) %>
<%= render "student_assignment_overview" %>
<% end %>
<% if @locked %>
<%= @locked.is_a?(Hash) ? lock_explanation(@locked, 'assignment', @context) : t('messages.locked', "This assignment is currently locked.") %>
<% end %>
<% description = !@assignment.description.blank? ? public_user_content(@assignment.description) : t('defaults.no_content', "No Content") %>
"><%= description %>
<% if can_do(@context, @current_user, :read_as_admin) %>
<%= t(:due, 'Due') %> |
<%= t(:for, 'For') %> |
<%= t(:available_from, 'Available from') %> |
<%= t(:until, 'Until') %> |
<%= render 'shared/override_list', :assignment => @assignment,
:user => @current_user %>
<% if can_do(@assignment, @current_user, :update) %>
<% end %>
<%= @context.id if @context && @context.is_a?(Course) %>
<% end %>
<%= @assignment.due_at.to_i %>
<%= @assignment.due_at.strftime("%m/%d/%Y") rescue "" %>
<%= @assignment.due_at.strftime("%I:%M%p").downcase rescue "" %>
<% end %>
<% if !@locked && can_do(@assignment, @current_user, :submit) %>
<%= render :partial => "submit_assignment", locals: { eula_url: eula_url }%>
<% end %>
<%= render partial: "shared/rubrics_component" %>