%
# 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 %>
<% else %>
<% if @assignment.omit_from_final_grade %>
<% 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, @first_annotation_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 %>
<% if @current_user_submission&.has_submission? && @domain_root_account&.feature_enabled?(:lti_before_assignment_results) %>
<% end %>
<% description = @assignment.description.present? ? public_user_content(@assignment.description) : t("No additional details were added for this assignment.") %>
<% if @assignment.annotated_document? %>
<%= I18n.t('Warning: For improved accessibility with Annotated Assignments, please use File Upload or Text Entry to leave comments.') %>
<% end %>
" data-resource-type="assignment.body" data-resource-id=<%= @assignment.id %>><%= description %>
<% if can_do(@context, @current_user, :read_as_admin) %>
<% if @context.account.feature_enabled?(:course_paces) && @context.enable_course_paces? && @assignment.context_module_tags.size > 0 %>
<% else %>
<%= t(:due, 'Due') %> |
<%= t(:for, 'For') %> |
<%= t(:available_from, 'Available from') %> |
<%= t(:until, 'Until') %> |
<%= render 'shared/override_list', :assignment => @assignment,
:user => @current_user %>
<% end %>
<% if can_do(@assignment, @current_user, :update) %>
<% if Rubric.enhanced_rubrics_assignments_enabled?(@context) %>
<% else %>
<% end %>
<% 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 %>
<% if !Rubric.enhanced_rubrics_assignments_enabled?(@context) %>
<%= render partial: "shared/rubrics_component" %>
<% end %>