<% # 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 . %> <% js_bundle :edit_rubric %> <% css_bundle :learning_outcomes %> <% if can_do(@assignment, @current_user, :update) %> <%# HACK! this is here because edit_rubric.js expects there to be a #add_rubric_url on the page and sets it's
to it %> <% end %>
<% if @assignment.rubric_association && @assignment.rubric_association.rubric %> <%= render :partial => "shared/rubric", :object => @assignment.rubric_association.rubric, :locals => {:association => @assignment, :rubric_association => @assignment.rubric_association, :editable => can_do(@assignment, @current_user, :update), :has_assessments => !@assignment.rubric_association.rubric_assessments.empty?, :edit_view => can_do(@assignment.rubric_association, @current_user, :update) } %> <% end %> <% if can_do(@assignment, @current_user, :update) %> <%= render :partial => "shared/rubric_dialog", :locals => {:assignment => @assignment, :rubric => @assignment.rubric_association && @assignment.rubric_association.rubric} %> <% end %> <%= render :partial => "shared/rubric_criterion_dialog" %>
<%= render :partial => "shared/rubric", :object => nil, :locals => {:association => @assignment, :editable => can_do(@assignment, @current_user, :update), :has_assessments => false, :edit_view => true} %>
<% if can_do(@assignment, @current_user, :update) %>
<%= t 'links.assign_rubric', 'Assign Rubric' %>
<% end %> <%= render :partial => "shared/sequence_footer", :locals => {:asset => @assignment} if !@assignment.context_module_tags.empty? %>