<%
# Copyright (C) 2014 - 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 <http://www.gnu.org/licenses/>.
%>

<% js_bundle 'module_sequence_footer' %>
<% if @tag.context.is_a?(Assignment) %>
  <% provide :right_side do %>
    <% assignment = @tag.context %>
    <% course = assignment.context %>
    <% assignment_presenter = AssignmentPresenter.new(assignment) %>
    <% if course.grants_right?(@current_user, :manage_assignments) %>
      <a href="<%= context_url(assignment.context, :edit_context_assignment_url, assignment.id, :return_to => request.url) %>" class="btn button-sidebar-wide">
        <i class="icon-edit"></i>
        <%= t :edit_assignment_settings, "Edit Assignment Settings" %>
      </a>
    <% end %>
    <% if assignment_presenter.can_view_speed_grader_link?(@current_user) %>
      <div id="student_group_filter_container"></div>
      <div id="speed_grader_link_container"></div>
    <% end %>
  <% end %>
<% end %>
<% if @module_tag %>
  <%= render :partial => 'shared/sequence_footer', :locals => {:asset => @module_tag} %>
<% end %>
