GroupCategorySelector.handlebars 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <div class="form-column-left">
  2. {{#if sectionLabel}}{{sectionLabel}}{{else}}{{#t 'group_assignment_header'}}Group Assignment{{/t}}{{/if}}
  3. </div>
  4. <div class="form-column-right">
  5. <div class="border border-trbl border-round">
  6. {{!-- Group Assignment selection --}}
  7. <label class="checkbox flush" for="has_group_category">
  8. {{#if inClosedGradingPeriod}}
  9. {{checkbox "has_group_category"
  10. id="has_group_category"
  11. prefix=prefix
  12. checked=groupCategoryId
  13. aria-role="option"
  14. aria-checked=ariaChecked
  15. aria-controls="group_category_options"
  16. readonly="readonly"
  17. aria-readonly="true"
  18. disabled=hasGroupCategoryDisabled
  19. }}
  20. {{else}}
  21. {{checkbox "has_group_category"
  22. id="has_group_category"
  23. prefix=prefix
  24. checked=groupCategoryId
  25. aria-role="option"
  26. aria-checked=ariaChecked
  27. aria-controls="group_category_options"
  28. disabled=hasGroupCategoryDisabled
  29. }}
  30. {{/if}}
  31. {{#if fieldLabel}}{{fieldLabel}}{{else}}{{#t "is_group_assignment"}}This is a Group Assignment{{/t}}{{/if}}
  32. </label>
  33. {{!-- Individual grading? --}}
  34. <div id="group_category_options" style="{{hiddenUnless groupCategoryId}}">
  35. <div class="nested">
  36. {{#unless hideGradeIndividually}}
  37. <label class="checkbox" for="assignment_grade_students_individually">
  38. {{#if inClosedGradingPeriod}}
  39. {{checkbox "grade_group_students_individually"
  40. id="assignment_grade_students_individually"
  41. prefix=prefix
  42. checked=gradeGroupStudentsIndividually
  43. readonly="readonly"
  44. aria-readonly="true"
  45. disabled=gradeIndividuallyDisabled
  46. }}
  47. {{else}}
  48. {{checkbox "grade_group_students_individually"
  49. id="assignment_grade_students_individually"
  50. prefix=prefix
  51. checked=gradeGroupStudentsIndividually
  52. disabled=gradeIndividuallyDisabled
  53. }}
  54. {{/if}}
  55. {{#t "grade_group_students_individually"}}
  56. Assign Grades to Each Student Individually
  57. {{/t}}
  58. </label>
  59. {{/unless}}
  60. {{!-- Group selection --}}
  61. <label id="assignment_group_category_id_label" for="group_category_id">
  62. {{#t "group_set"}}Group Set{{/t}}
  63. </label>
  64. <select id="assignment_group_category_id"
  65. name="{{#if nested}}assignment[group_category_id]{{else}}group_category_id{{/if}}"
  66. {{#if inClosedGradingPeriod}}
  67. readonly
  68. aria-readonly="true"
  69. {{/if}}
  70. aria-labelledby="assignment_group_category_id_label"
  71. {{disabledIf groupCategoryIdDisabled}}>
  72. {{#each groupCategories}}
  73. <option value="{{id}}" {{selectedIf ../groupCategoryId this.id}}>
  74. {{name}}
  75. </option>
  76. {{/each}}
  77. <option value="blank" {{selectedIf originalGroupRemoved}}></option>
  78. </select>
  79. <div>
  80. <button
  81. class="Button"
  82. type="button"
  83. id="create_group_category_id"
  84. {{disabledIf inClosedGradingPeriod}}
  85. {{disabledIf groupCategoryIdDisabled}}
  86. >
  87. {{#t}}New Group Category{{/t}}
  88. </button>
  89. </div>
  90. </div>
  91. </div>
  92. {{#if groupCategoryLocked}}
  93. <div class="group_category_locked_explanation alert assignment-edit-group-alert">
  94. {{#if lockedMessage}}{{lockedMessage}}{{else}}
  95. {{#t "group_category_locked_explanation"}}Students have already
  96. submitted homework on this assignment, so group settings cannot be
  97. changed.{{/t}}
  98. {{/if}}
  99. </div>
  100. {{/if}}
  101. </div>
  102. </div>