show.mustache 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. <%
  19. title = join_title t("Upload Gradebook"), @context.name
  20. content_for :page_title, title
  21. css_bundle :slickgrid, :gradebook_uploads
  22. js_bundle :gradebook_uploads
  23. %>
  24. <h1><%= title %></h1>
  25. <div id="spinner" style="height:250px"></div>
  26. <form id="gradebook_importer_resolution_section" style="display:none;">
  27. <h3>{{#t}}There was some stuff I couldn't figure out with the data that you uploaded:{{/t}}</h3>
  28. <div class="student_section" style="display:none;">
  29. <h4>{{#t}}You uploaded rows for the following students, I couldn't decide which student in your class they are. Please tell me which student they are.{{/t}}</h4>
  30. <table cellspacing="0" class="ui-widget ui-widget-content">
  31. <thead>
  32. <tr>
  33. <th class="ui-widget-header">{{#t}}Student in question{{/t}}</th>
  34. <th class="ui-widget-header">{{#t}}This person is really{{/t}}</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr id="student_resolution_template" style="display:none">
  39. <th class='name'>{{#t}}Some Guy{{/t}}</th>
  40. <td>
  41. <select name="student_-iterator-">
  42. <option value="">{{#t}}-- Choose student --{{/t}}</option>
  43. <option value="ignore" class="ignore">{{#t}}Not in my class, Ignore this row.{{/t}}</option>
  44. </select>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. </div>
  50. <div class="assignment_section" style="display:none">
  51. <h4>{{#t}}You uploaded some assignments that don't appear to be in your gradebook before now. Please tell me if it is a new assignment, or if it represents an existing assignment.{{/t}}</h4>
  52. <table cellspacing="0" class="ui-widget ui-widget-content">
  53. <thead>
  54. <tr>
  55. <th class="ui-widget-header">{{#t}}Assignment in question{{/t}}</th>
  56. <th class="ui-widget-header">{{#t}}This Assignment is{{/t}}</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. <tr id="assignment_resolution_template" style="display:none;">
  61. <th class='title'>{{#t}}Equity Indices Quiz{{/t}}</th>
  62. <td>
  63. <select name="assignment_-iterator-">
  64. <option value="">{{#t}}-- Choose assignment --{{/t}}</option>
  65. <option value="new" class="new">{{#t}}A new assignment{{/t}}</option>
  66. <option value="ignore" class="ignore">{{#t}}Bogus, ignore it{{/t}}</option>
  67. </select>
  68. <span class="points_possible_section">
  69. <label for="points_possible">{{#t}}Points Possible{{/t}}</label>
  70. <input id="points_possible" type="text" class="points_possible" />
  71. </span>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </div>
  77. <div class="button-container">
  78. <button type="submit" class="btn"><%= t('buttons.continue', "Continue %{icon}", :icon => raw('&rarr;')) %></button>
  79. </div>
  80. </form>
  81. <div id="no_changes_detected" style="display:none;">
  82. <h2>{{#t}}There were no changes detected in the gradebook you uploaded.{{/t}}</h2>
  83. <p>
  84. <%= link_to(t('links.back', "Go back to Gradebook"), polymorphic_url([@context, 'gradebook'])) %>
  85. </p>
  86. </div>
  87. <%= form_tag({}, {:method => "put", :id => "gradebook_grid_form", :style => "display:none;"}) do %>
  88. <div id="gradebook_uploader_container">
  89. <div id="grid">
  90. <div id="gradebook_grid_header"></div>
  91. <div id="gradebook_grid"></div>
  92. </div>
  93. </div>
  94. <input type="hidden" name="json_data_to_submit" value="" />
  95. <div class="button-container" style="padding-left:7px;">
  96. <button type="submit" class="btn">{{#t}}Save Changes{{/t}}</button>
  97. <%= link_to t('#buttons.cancel', "Cancel"), :back , :class => "btn btn button-secondary" %>
  98. <span id="assignments_without_changes_alert" style="display:none; margin-left: 50px;">{{#t}}Note: You uploaded some assignments that had no grade changes detected. They have been hidden.{{/t}}</span>
  99. </div>
  100. <% end -%>
  101. <div id="prevented-new-assignment-in-closed-period" style="display:none;">
  102. <h4>{{#t}}Some assignments could not be created because they would fall in a closed grading period.{{/t}}</h4>
  103. </div>
  104. <div id="prevented-grading-ungradeable-submission" style="display:none;">
  105. <h4>{{#t}}Some submissions are not gradeable; grade changes for those submissions have been ignored.{{/t}}</h4>
  106. </div>
  107. <style>
  108. /*keep this here because jquery.rule needs it to stick in dynamic styles for the slick.grid to keep all of the columns the same width*/
  109. </style>