rubrics_component.mustache 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% js_bundle :edit_rubric %>
  19. <% css_bundle :learning_outcomes %>
  20. <% if can_do(@assignment, @current_user, :update) %>
  21. <%# HACK! this is here because edit_rubric.js expects there to be a #add_rubric_url on the page and sets it's <form action="..."> to it %>
  22. <a href="<%= context_url(@context, :context_rubrics_url) %>" id="add_rubric_url" style="display: none;"></a>
  23. <% end %>
  24. <div id="rubrics" style="margin-bottom: 10px;">
  25. <% if @assignment.rubric_association && @assignment.rubric_association.rubric %>
  26. {{> views/shared/rubric}}
  27. <% end %>
  28. <div style="display: none;" id="rubric_parameters">
  29. <input type="hidden" name="rubric_association[association_type]" value="Assignment"/>
  30. <input type="hidden" name="rubric_association[association_id]" value="<%= @assignment.id %>"/>
  31. <input type="hidden" name="rubric_association[purpose]" value="grading"/>
  32. </div>
  33. <% if can_do(@assignment, @current_user, :update) %>
  34. {{> views/shared/rubric_dialog}}
  35. <% end %>
  36. {{> views/shared/rubric_criterion_dialog}}
  37. </div>
  38. {{> views/shared/rubric}}
  39. <% if can_do(@assignment, @current_user, :update) %>
  40. <div style="text-align: center; font-size: 1.2em; margin-top: 10px; display: none;">
  41. <a href="<%= context_url(@context, :context_rubrics_url) %>" class="add_rubric_link rubric" style="<%= hidden if @assignment.rubric_association %>"><%= t 'links.assign_rubric', 'Assign Rubric' %></a>
  42. </div>
  43. {{> views/shared/rubric_forms}}
  44. <% end %>
  45. {{> views/shared/sequence_footer}}