CreateAssignment.handlebars 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <div class="form-dialog-content create_assignment_dialog">
  2. <div class="form-horizontal">
  3. {{#if canChooseType}}
  4. <div class="control-group">
  5. <label class="control-label" for="{{uniqLabel}}_assignment_type">
  6. {{#t "assignment_type"}}Type:{{/t}}
  7. </label>
  8. <div class="controls">
  9. <select type="text" id="{{uniqLabel}}_assignment_type" name="submission_types">
  10. <option value="none">{{#t "assignment"}}Assignment{{/t}}</option>
  11. <option value="discussion_topic">{{#t "discussion_type"}}Discussion{{/t}}</option>
  12. <option value="online_quiz">{{#t "quiz_type"}}Quiz{{/t}}</option>
  13. <option value="external_tool">{{#t "external_tool_type"}}External Tool{{/t}}</option>
  14. <option value="not_graded">{{#t "not_graded_type"}}Not Graded{{/t}}</option>
  15. </select>
  16. </div>
  17. </div>
  18. {{/if}}
  19. <div class="control-group">
  20. <label class="control-label" for="{{uniqLabel}}_assignment_name">
  21. {{#t "assignment_name"}}Name:{{/t}}
  22. </label>
  23. <div class="controls">
  24. {{#if master_course_restrictions.content}}
  25. <h3 id="{{uniqLabel}}_assignment_name">{{name}}</h3>
  26. <input
  27. type="hidden"
  28. name="name"
  29. value="{{name}}"
  30. {{disabledIfIncludes frozenAttributes "title"}}/>
  31. {{else}}
  32. <input
  33. id="{{uniqLabel}}_assignment_name"
  34. type={{#if master_course_restrictions.content}}"hidden"{{else}}"text"{{/if}}
  35. name="name"
  36. value="{{name}}"
  37. {{disabledIfIncludes frozenAttributes "title"}}/>
  38. {{/if}}
  39. </div>
  40. </div>
  41. {{#if hasDueDate}}
  42. <div class="control-group">
  43. <label class="control-label" for="{{uniqLabel}}_assignment_due_at">
  44. {{#t "assignment_due_at"}}Due:{{/t}}
  45. </label>
  46. <div class="controls">
  47. {{#ifAny multipleDueDates isOnlyVisibleToOverrides nonBaseDates}}
  48. <span class="datetime_field multiple_due_dates" title
  49. data-tooltip-selector="#vdd_tooltip_{{uniqLabel}}"
  50. aria-labelledby="vdd_tooltip_{{uniqLabel}}">
  51. <input
  52. class="input-medium"
  53. type="text"
  54. {{#if multipleDueDates}}
  55. value="{{#t 'multiple_due_dates'}}Multiple due dates{{/t}}"
  56. {{else}}
  57. value="{{#t 'differentiated_due_dates'}}Differentiated due date{{/t}}"
  58. {{/if}}
  59. disabled="disabled" />
  60. </span>
  61. <div id="vdd_tooltip_{{uniqLabel}}" style="display:none;">
  62. <dl class="vdd_tooltip_content dl-horizontal">
  63. {{#each allDates}}
  64. <div class="clearfix">
  65. <dt>{{dueFor}}</dt>
  66. <dd>{{#if dueAt}} {{tDateToString (fudge dueAt) 'short'}} {{else}} - {{/if}}</dd>
  67. </div>
  68. {{/each}}
  69. </dl>
  70. </div>
  71. {{else}}
  72. <div class="date_field_container {{#if master_course_restrictions.due_dates}}readonly{{/if}}">
  73. {{#unless master_course_restrictions.due_dates}}
  74. <label class="screenreader-only" id="due_at_label_{{uniqLabel}}">
  75. {{#t}}Due At: {{/t}}
  76. {{datepickerScreenreaderPrompt}}
  77. </label>
  78. {{/unless}}
  79. <input
  80. id="{{uniqLabel}}_assignment_due_at"
  81. class="datetime_field input-medium"
  82. type="text"
  83. name="due_at"
  84. value="{{datetimeFormatted dueAt}}"
  85. {{#unless master_course_restrictions.due_dates}}
  86. aria-labelledby="due_at_label_{{uniqLabel}}"
  87. title="{{accessibleDateFormat}}"
  88. {{/unless}}
  89. data-tooltip
  90. {{disabledIf disableDueAt}}
  91. {{#if master_course_restrictions.due_dates}}readonly{{/if}}
  92. />
  93. {{#if isInClosedPeriod}}
  94. <div>
  95. <span>{{#t}}Due date falls in a closed Grading Period{{/t}}</span>
  96. </div>
  97. {{/if}}
  98. </div>
  99. {{/ifAny}}
  100. </div>
  101. </div>
  102. {{/if}}
  103. {{#if hasPointsPossible}}
  104. <div class="control-group">
  105. <label class="control-label" for="{{uniqLabel}}_assignment_points">
  106. {{#t "assignment_points"}}Points:{{/t}}
  107. </label>
  108. <div class="controls">
  109. <input
  110. id="{{uniqLabel}}_assignment_points"
  111. class="input-small points_possible"
  112. type="text"
  113. name="points_possible"
  114. value="{{n pointsPossible}}"
  115. {{disabledIfIncludes frozenAttributes "points_possible"}}
  116. {{#if master_course_restrictions.points}}readonly{{/if}}
  117. />
  118. </div>
  119. </div>
  120. {{/if}}
  121. {{#if postToSISEnabled}}
  122. <fieldset>
  123. <div class="control-group">
  124. <label class="control-label" id="post_to_sis_label">
  125. {{#t}}Sync to {{postToSISName}}:{{/t}}
  126. </label>
  127. <label>
  128. {{checkbox "postToSIS"
  129. id="assignment_post_to_sis"
  130. name="post_to_sis"
  131. aria-labelledby="post_to_sis_label"
  132. class="post_to_sis_checkbox"
  133. }}
  134. </label>
  135. </div>
  136. </fieldset>
  137. {{/if}}
  138. </div>
  139. </div>
  140. <div class="form-controls">
  141. <button
  142. class="more_options btn pull-left"
  143. type="button"
  144. >{{#t "more"}}More Options{{/t}}</button>
  145. <button
  146. class="cancel_button btn dialog_closer"
  147. type="button"
  148. >{{#t "cancel"}}Cancel{{/t}}</button>
  149. {{#unless published}}
  150. <button
  151. class="btn btn-default save_and_publish"
  152. data-text-while-loading='{{#t "saving"}}Saving...{{/t}}'
  153. type="button"
  154. >{{#t "buttons.save_and_publish"}}Save & Publish{{/t}}</button>
  155. {{/unless}}
  156. <button
  157. class="create_assignment btn btn-primary"
  158. data-text-while-loading='{{#t "saving"}}Saving...{{/t}}'
  159. type="submit"
  160. >{{#t "save"}}Save{{/t}}</button>
  161. </div>