grading_box_extended.mustache 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. <label class="bold" for="grading-box-extended">{{#t}}Grade{{/t}}
  19. <% case assignment.grading_type %>
  20. <% when "points", "percent", "letter_grade", "gpa_scale" %>
  21. <input type="text" id="grading-box-extended" maxlength="254"/>
  22. <% when "pass_fail" %>
  23. <select id="grading-box-extended" class="pass_fail_grading_type">
  24. <option value="">---</option>
  25. <option value="complete">{{#t}}Complete{{/t}}</option>
  26. <option value="incomplete">{{#t}}Incomplete{{/t}}</option>
  27. <option value="EX">{{#t}}Excused{{/t}}</option>
  28. </select>
  29. <% end %>
  30. <% if assignment.grading_type == "points" %>
  31. <%=
  32. t(
  33. "out of %{points_possible}",
  34. points_possible: I18n.n(round_if_whole(assignment.points_possible))
  35. )
  36. %>
  37. <% elsif assignment.grading_type != "gpa_scale" %>
  38. (<span class="score">&nbsp;</span> / <%= I18n.n(round_if_whole(assignment.points_possible)) %>)
  39. <% end %>
  40. </label>
  41. <div id="deduction-box" class="hidden">
  42. <div class="deduction-box-labels">
  43. <div class="error">
  44. <%= I18n.t('Late Penalty:') %>
  45. </div>
  46. <div class="primary">
  47. <%= I18n.t('Final Grade:') %>
  48. </div>
  49. </div>
  50. <div class="deduction-box-values">
  51. <div id="points-deducted" class="error bold"></div>
  52. <div id="final-grade" class="primary bold"></div>
  53. </div>
  54. </div>