<commit_before><div class="form-dialog-content">
  <div class="form-horizontal">
    {{#unless can_change_weighting}}
    <div class="ag-settings-weights-message alert">{{#t}}Assignment group weights and drop rules can't be edited because
      there are assignments in one of the groups whose due dates are closed.{{/t}}</div>
    {{/unless}}

    <div class="control-group">
      <label class="control-label" for="ag_{{label_id}}_name">
        {{#t "group_name"}}Group Name:{{/t}}
      </label>
      <div class="controls">
        <input
          type="text"
          id="ag_{{label_id}}_name"
          name="name"
          value="{{name}}"
          placeholder='{{#t "example_group_name"}}e.g., Essay Group 1{{/t}}'
        />
      </div>
    </div>

    {{#if show_weight}}
    <div class="control-group">
      <div class="controls">
        <input
          type="text"
          id="ag_{{label_id}}_group_weight"
          class="span1 group_weight"
          name="group_weight"
          value="{{#if group_weight}}{{n group_weight}}{{/if}}"
          {{#unless can_change_weighting}}readonly{{/unless}}
        />
        <label style="display:inline-block" for="ag_{{label_id}}_group_weight">
          {{#t "percent_of_total"}}% of total grade{{/t}}
        </label>
      </div>
    </div>
    {{/if}}
    {{#if editable_drop}}
      <hr/>
      <fieldset>
        <legend class="drop_rules_section">{{#t}}Number of scores to ignore for each student{{/t}}</legend>

        <div class="control-group">
          <label class="control-label" for="ag_{{label_id}}_drop_lowest">
            {{#t "drop_lowest"}}Lowest Scores:{{/t}}
          </label>
          <div class="controls">
            <input
              type={{number_input}}
              id="ag_{{label_id}}_drop_lowest"
              class="span1 field"
              name="rules[drop_lowest]"
              value="{{n drop_lowest}}"
              {{#unless can_change_weighting}}readonly{{/unless}}
            />
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="ag_{{label_id}}_drop_highest">
            {{#t "drop_highest"}}Highest Scores:{{/t}}
          </label>
          <div class="controls">
            <input
              type={{number_input}}
              id="ag_{{label_id}}_drop_highest"
              class="span1 field"
              name="rules[drop_highest]"
              value="{{n drop_highest}}"
              {{#unless can_change_weighting}}readonly{{/unless}}
            />
          </div>
        </div>

        <hr/>
        <div class="control-group">
          <label class="control-label" id="ag_{{label_id}}_never_drop">
            {{#t "never_drop"}}Never Drop:{{/t}}
          </label>
          <div class="controls never_drop_rules_group">
          </div>
        </div>
      </fieldset>
    {{/if}}
  </div>
</div>
<div class="form-controls">
  <button
    class="cancel_button btn dialog_closer"
    type="button"
  >{{#t "cancel"}}Cancel{{/t}}</button>
  <button
    class="create_group btn btn-primary"
    data-text-while-loading='{{#t "saving"}}Saving...{{/t}}'
    type="submit"
  >{{#t "save"}}Save{{/t}}</button>
</div>
<commit_msg>prevent going below 0 on roles input<commit_after><div class="form-dialog-content">
  <div class="form-horizontal">
    {{#unless can_change_weighting}}
    <div class="ag-settings-weights-message alert">{{#t}}Assignment group weights and drop rules can't be edited because
      there are assignments in one of the groups whose due dates are closed.{{/t}}</div>
    {{/unless}}

    <div class="control-group">
      <label class="control-label" for="ag_{{label_id}}_name">
        {{#t "group_name"}}Group Name:{{/t}}
      </label>
      <div class="controls">
        <input
          type="text"
          id="ag_{{label_id}}_name"
          name="name"
          value="{{name}}"
          placeholder='{{#t "example_group_name"}}e.g., Essay Group 1{{/t}}'
        />
      </div>
    </div>

    {{#if show_weight}}
    <div class="control-group">
      <div class="controls">
        <input
          type="text"
          id="ag_{{label_id}}_group_weight"
          class="span1 group_weight"
          name="group_weight"
          value="{{#if group_weight}}{{n group_weight}}{{/if}}"
          {{#unless can_change_weighting}}readonly{{/unless}}
        />
        <label style="display:inline-block" for="ag_{{label_id}}_group_weight">
          {{#t "percent_of_total"}}% of total grade{{/t}}
        </label>
      </div>
    </div>
    {{/if}}
    {{#if editable_drop}}
      <hr/>
      <fieldset>
        <legend class="drop_rules_section">{{#t}}Number of scores to ignore for each student{{/t}}</legend>

        <div class="control-group">
          <label class="control-label" for="ag_{{label_id}}_drop_lowest">
            {{#t "drop_lowest"}}Lowest Scores:{{/t}}
          </label>
          <div class="controls">
            <input
              type={{number_input}}
              id="ag_{{label_id}}_drop_lowest"
              class="span1 field"
              name="rules[drop_lowest]"
              value="{{n drop_lowest}}"
              min="0"
              {{#unless can_change_weighting}}readonly{{/unless}}
            />
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="ag_{{label_id}}_drop_highest">
            {{#t "drop_highest"}}Highest Scores:{{/t}}
          </label>
          <div class="controls">
            <input
              type={{number_input}}
              id="ag_{{label_id}}_drop_highest"
              class="span1 field"
              name="rules[drop_highest]"
              value="{{n drop_highest}}"
              min="0"
              {{#unless can_change_weighting}}readonly{{/unless}}
            />
          </div>
        </div>

        <hr/>
        <div class="control-group">
          <label class="control-label" id="ag_{{label_id}}_never_drop">
            {{#t "never_drop"}}Never Drop:{{/t}}
          </label>
          <div class="controls never_drop_rules_group">
          </div>
        </div>
      </fieldset>
    {{/if}}
  </div>
</div>
<div class="form-controls">
  <button
    class="cancel_button btn dialog_closer"
    type="button"
  >{{#t "cancel"}}Cancel{{/t}}</button>
  <button
    class="create_group btn btn-primary"
    data-text-while-loading='{{#t "saving"}}Saving...{{/t}}'
    type="submit"
  >{{#t "save"}}Save{{/t}}</button>
</div>

{'fraction_non_alphanumeric': 0.17817235573243534, 'fraction_numerical': 0.0016837593754783406, 'mean_word_length': 2.173385138416707, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '818370', 'n_tokens_mistral': 2092, 'n_tokens_neox': 1990, 'n_words': 370}