<commit_before><template>
  <div>
    <h5 :class="{'sr-only': showRowHeader}">
      Enrollment
    </h5>
    <div v-if="useLegacyViewClasslist">
      <p>
        View class list in
        <b-link
          class="myuw-muted"
          :href="legacyLink"
          target="_blank"
          :rel="`class_list_${section.section_label}`"
          :title="`View ${section.section_label} class list`"
        >
          My Class Resources
        </b-link>
        <b-button id="`cl_info_${section.id}`">
          <font-awesome-icon :icon="faQuestionCircle" />
          <span class="sr-only">More information</span>
        </b-button>
        <b-popover
          :target="`cl_info_${section.id}`"
          triggers="hover focus"
        >
          Class lists for independent study and secondary sections
          in previous quarters are only available via My Class Resources.
        </b-popover>
      </p>
    </div>
    <div v-else-if="section.isPrevTermEnrollment">
      <p>Registration opens
        {{  toFriendlyDate(section.registrationStart) }}
         at 6:00 AM PST.
      </p>
      <p>
        ({{section.current_enrollment}} of {{section.limit_estimate_enrollment}}
        students registered for course in 
        {{ titleCaseWord(section.quarter) }}
        {{ section.prevEnrollmentYear }})
      </p>
    </div>
    <div v-else-if="section.enrollment_student_name">
      <span>{{ section.enrollment_student_name }}</span>
      <b-link
        target="_blank"
        :href="`/teaching/${section.apiTag}/students`"
        :rel="section.section_label"
      >
        View student
      </b-link>
    </div>
    <div v-else-if="section.current_enrollment">
      <span>
        {{ section.current_enrollment }}
        <span v-if="!section.is_independent_study">
          &nbsp;of&nbsp; {{ section.limit_estimate_enrollment }}
        </span>
      </span>
      <span v-if="section.no_2nd_registration"
        title="There is no enrollment/registration data for secondary sections once the course work has been posted to transcripts"
        class="myuw-muted"
      >
        Class list not available
      </span>
      <span v-else>
        <b-link
          target="_blank"
          :href="`/teaching/${section.apiTag}/students`"
          :rel="section.section_label"
        >
          View class list
        </b-link>

        <b-link v-if="displayDownloadLink"
          id="csv_download_class_list"
          @click="downloadCL"
        >
          <font-awesome-icon :icon="faDownload" /> Download (CSV)
        </b-link>
      </span>
    </div>
  </div>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import {<commit_msg>Handle prev-term enrollment<commit_after><template>
  <div>
    <h5 :class="{'sr-only': showRowHeader}">
      Enrollment
    </h5>
    <div v-if="useLegacyViewClasslist">
      <p>
        View class list in
        <b-link
          class="myuw-muted"
          :href="legacyLink"
          target="_blank"
          :rel="`class_list_${section.section_label}`"
          :title="`View ${section.section_label} class list`"
        >
          My Class Resources
        </b-link>
        <b-button id="`cl_info_${section.id}`">
          <font-awesome-icon :icon="faQuestionCircle" />
          <span class="sr-only">More information</span>
        </b-button>
        <b-popover
          :target="`cl_info_${section.id}`"
          triggers="hover focus"
        >
          Class lists for independent study and secondary sections
          in previous quarters are only available via My Class Resources.
        </b-popover>
      </p>
    </div>
    <div v-else-if="section.isPrevTermEnrollment">
      <p>Registration opens
        {{  toFriendlyDate(section.registrationStart) }}
         at 6:00 AM PST.
      </p>
      <p>
        ({{section.current_enrollment}} of {{section.limit_estimate_enrollment}}
        students registered for course in
        {{ titleCaseWord(section.quarter) }}
        {{ section.prevEnrollmentYear }})
      </p>
    </div>
    <div v-else-if="section.enrollment_student_name">
      <span>{{ section.enrollment_student_name }}</span>
      <b-link
        target="_blank"
        :href="`/teaching/${section.apiTag}/students`"
        :rel="section.section_label"
      >
        View student
      </b-link>
    </div>
    <div v-else-if="section.current_enrollment">
      <span>
        {{ section.current_enrollment }}
        <span v-if="!section.is_independent_study">
          &nbsp;of&nbsp; {{ section.limit_estimate_enrollment }}
        </span>
      </span>
      <span>
        <b-link
          target="_blank"
          :href="`/teaching/${section.apiTag}/students`"
          :rel="section.section_label"
        >
          View class list
        </b-link>

        <b-link v-if="displayDownloadLink"
          id="csv_download_class_list"
          @click="downloadCL"
        >
          <font-awesome-icon :icon="faDownload" /> Download (CSV)
        </b-link>
      </span>
    </div>
  </div>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import {
{'fraction_non_alphanumeric': 0.14027588886730133, 'fraction_numerical': 0.002137167281911793, 'mean_word_length': 2.0863309352517985, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5524247', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1614, 'n_words': 300}