<commit_before><div
  class="course-rollover"
  {{did-insert (perform this.load) @course}}
  {{did-update (perform this.load) @course}}
>
  {{#let (unique-id) as |templateId|}}
    <div class="backtolink">
      <LinkTo @route="course" @model={{@course}}>
        {{t "general.backToTitle" title=@course.title}}
      </LinkTo>
    </div>
    <div class="rollover-form" {{scroll-into-view}}>
      <h3 class="title">
        {{t "general.courseRollover"}}
      </h3>
      <p class="rollover-summary">
        {{t "general.courseRolloverSummary"}}
      </p>
      <div class="item title">
        <label for="title-{{templateId}}">
          {{t "general.title"}}:
        </label>
        <input
          id="title-{{templateId}}"
          type="text"
          value={{this.title}}
          {{on "input" (pick "target.value" (set this.title))}}
          {{on "input" (fn this.addErrorDisplayFor "title")}}
          disabled={{this.save.isRunning}}
          placeholder={{t "general.courseTitlePlaceholder"}}
          data-test-title
        >
        <ValidationError @errors={{get-errors-for this.title}} />
      </div>
      <div class="item year-select">
        <label for="year-{{templateId}}">
          {{t "general.year"}}:
        </label>
        {{#if (is-array this.allCourses)}}
          <select
            id="year-{{templateId}}"
            data-test-year
            {{on "change" this.setSelectedYear}}
          >
            {{#each this.years as |year|}}
              <option
                disabled={{includes year this.unavailableYears}}
                value={{year}}
                selected={{is-equal year this.selectedYear}}
              >
                {{#if this.academicYearCrossesCalendarYearBoundaries}}
                  {{year}} - {{inc year}}
                {{else}}
                  {{year}}
                {{/if}}
                {{#if (includes year this.unavailableYears)}}
                  ({{t "general.courseRolloverYearUnavailable"}})
                {{/if}}
              </option>
            {{/each}}
          </select>
        {{else}}
          <LoadingSpinner />
        {{/if}}
        <ValidationError @errors={{get-errors-for this.selectedYear}} />
      </div>
      <div class="advanced-options">
        <div class="item">
          <label>
            {{t "general.startDate"}}:
            <br>
            <small>
              ({{t "general.mustBeSameDayOfWeekAsCurrentStartDate"}})
            </small>
          </label>
          <Course::RolloverDatePicker
            @course={{@course}}
            @value={{this.startDate}}
            @onChange={{set this.startDate}}
          />
        </div>
        <div class="included">
          <label class="title" for="included-{{templateId}}">
            {{t "general.include"}}:
          </label>
          <div class="include">
            <input
              id="included-{{templateId}}"
              type="checkbox"
              checked={{not this.skipOfferings}}
              data-test-skip-offerings
              {{on "click" (toggle "skipOfferings" this)}}
            >
            <span>
              {{t "general.offerings"}}
            </span>
          </div>
        </div>
        <div class="cohorts">
          <span class="title">
            {{t "general.selectCohortsToAttach"}}:
          </span>
          <DetailCohortManager
            @selectedCohorts={{this.selectedCohorts}}
            @school={{await @course.school}}
            @add={{this.addCohort}}
            @remove={{this.removeCohort}}
          />
        </div>
      </div>
      <div class="buttons">
        <button
          type="button"
          disabled={{if
            (or
              this.isSaving
              (not this.selectedYear)
              (includes this.selectedYear this.unavailableYears)
            )
            true
          }}
          class="done text"
          {{on "click" (perform this.save)}}
        >
          {{#if this.isSaving}}
            <LoadingSpinner />
          {{else}}
            {{t "general.done"}}
          {{/if}}
        </button>
        <LinkTo @route="course" @model={{@course}}>
          <button class="cancel text" type="button">
            {{t "general.cancel"}}
          </button>
        </LinkTo>
      </div>
    </div>
  {{/let}}
</div><commit_msg>overlay screen while course rolls over.<commit_after><div
  class="course-rollover"
  {{did-insert (perform this.load) @course}}
  {{did-update (perform this.load) @course}}
>
  {{#if this.save.isRunning}}
    <WaitSaving
      @showProgress={{false}}
    />
  {{/if}}
  {{#let (unique-id) as |templateId|}}
    <div class="backtolink">
      <LinkTo @route="course" @model={{@course}}>
        {{t "general.backToTitle" title=@course.title}}
      </LinkTo>
    </div>
    <div class="rollover-form" {{scroll-into-view}}>
      <h3 class="title">
        {{t "general.courseRollover"}}
      </h3>
      <p class="rollover-summary">
        {{t "general.courseRolloverSummary"}}
      </p>
      <div class="item title">
        <label for="title-{{templateId}}">
          {{t "general.title"}}:
        </label>
        <input
          id="title-{{templateId}}"
          type="text"
          value={{this.title}}
          {{on "input" (pick "target.value" (set this.title))}}
          {{on "input" (fn this.addErrorDisplayFor "title")}}
          disabled={{this.save.isRunning}}
          placeholder={{t "general.courseTitlePlaceholder"}}
          data-test-title
        >
        <ValidationError @errors={{get-errors-for this.title}} />
      </div>
      <div class="item year-select">
        <label for="year-{{templateId}}">
          {{t "general.year"}}:
        </label>
        {{#if (is-array this.allCourses)}}
          <select
            id="year-{{templateId}}"
            data-test-year
            {{on "change" this.setSelectedYear}}
          >
            {{#each this.years as |year|}}
              <option
                disabled={{includes year this.unavailableYears}}
                value={{year}}
                selected={{is-equal year this.selectedYear}}
              >
                {{#if this.academicYearCrossesCalendarYearBoundaries}}
                  {{year}} - {{inc year}}
                {{else}}
                  {{year}}
                {{/if}}
                {{#if (includes year this.unavailableYears)}}
                  ({{t "general.courseRolloverYearUnavailable"}})
                {{/if}}
              </option>
            {{/each}}
          </select>
        {{else}}
          <LoadingSpinner />
        {{/if}}
        <ValidationError @errors={{get-errors-for this.selectedYear}} />
      </div>
      <div class="advanced-options">
        <div class="item">
          <label>
            {{t "general.startDate"}}:
            <br>
            <small>
              ({{t "general.mustBeSameDayOfWeekAsCurrentStartDate"}})
            </small>
          </label>
          <Course::RolloverDatePicker
            @course={{@course}}
            @value={{this.startDate}}
            @onChange={{set this.startDate}}
          />
        </div>
        <div class="included">
          <label class="title" for="included-{{templateId}}">
            {{t "general.include"}}:
          </label>
          <div class="include">
            <input
              id="included-{{templateId}}"
              type="checkbox"
              checked={{not this.skipOfferings}}
              data-test-skip-offerings
              {{on "click" (toggle "skipOfferings" this)}}
            >
            <span>
              {{t "general.offerings"}}
            </span>
          </div>
        </div>
        <div class="cohorts">
          <span class="title">
            {{t "general.selectCohortsToAttach"}}:
          </span>
          <DetailCohortManager
            @selectedCohorts={{this.selectedCohorts}}
            @school={{await @course.school}}
            @add={{this.addCohort}}
            @remove={{this.removeCohort}}
          />
        </div>
      </div>
      <div class="buttons">
        <button
          type="button"
          disabled={{if
            (or
              (not this.selectedYear)
              (includes this.selectedYear this.unavailableYears)
            )
            true
          }}
          class="done text"
          {{on "click" (perform this.save)}}
        >
          {{t "general.done"}}
        </button>
        <LinkTo @route="course" @model={{@course}}>
          <button class="cancel text" type="button">
            {{t "general.cancel"}}
          </button>
        </LinkTo>
      </div>
    </div>
  {{/let}}
</div>
{'fraction_non_alphanumeric': 0.16381586499827805, 'fraction_numerical': 0.0004591895304787051, 'mean_word_length': 1.5548387096774194, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, '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': '6522595', 'n_tokens_mistral': 2512, 'n_tokens_neox': 2496, 'n_words': 453}