edit.mustache 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. <% if @assignment.title.nil? %>
  19. <% content_for :page_title, t("Create Assignment") %>
  20. <% else %>
  21. <% content_for :page_title, t("Edit Assignment") %>
  22. <% end %>
  23. <% content_for :right_side do %>
  24. <%= render "shared/wiki_sidebar" %>
  25. <% end %>
  26. <%
  27. css_bundle :assignments, :assignments_edit, :tinymce
  28. js_bundle :assignment_edit
  29. %>
  30. <% if @assignment.omit_from_final_grade %>
  31. <div class="alert alert-info omit-from-final-warning">
  32. {{#t}}This assignment does not count toward the final grade.{{/t}}
  33. </div>
  34. <% end %>
  35. <% if ConditionalRelease::Service.enabled_in_context?(@context) %>
  36. <div id="edit_assignment_header-cr" class="header-bar"></div>
  37. <% else %>
  38. <div id="edit_assignment_header" class="<%= 'no-line' if @assignment.quiz_lti? %> header-bar"></div>
  39. <% end %>
  40. <%= render "shared/select_content_dialog", :only => [:external_tools], lti_app_placements: [Lti::ResourcePlacement::ASSIGNMENT_SELECTION, Lti::ResourcePlacement::RESOURCE_SELECTION] %>
  41. <div id="edit_letter_grades_form" style="display: none;">
  42. <%= render partial: "shared/grading_standard", object: @assignment.grading_standard, locals: {read_only: false} %>
  43. <a href="<%= context_url(@context, :context_grading_standards_url) %>" style="display: none;" class="create_grading_standard_url">&nbsp;</a>
  44. <a href="<%= context_url(@context, :context_grading_standard_url, "{{ id }}") %>" style="display: none;" id="update_grading_standard_url">&nbsp;</a>
  45. </div>
  46. <% if @assignment.quiz_lti? && @assignment.persisted? %>
  47. <div class="ic-Label header-bar">
  48. <%= t 'links.add_rubric', "Rubric" %>
  49. </div>
  50. <% if can_do(@assignment, @current_user, :update) %>
  51. <div class="content-box">
  52. <a
  53. href="<%= context_url(@context, :context_rubrics_url) %>"
  54. class="add_rubric_link Button icon-plus"
  55. style="<%= hidden if @assignment.rubric_association %>"
  56. role="button"
  57. >
  58. <span aria-hidden="true"><%= t 'links.add_rubric', "Rubric" %></span>
  59. </a>
  60. </div>
  61. <% end %>
  62. <%= render partial: "shared/rubrics_component" %>
  63. <% end %>