<commit_before><div class='container instructor'>
  <div class="instructorSectionview">
    <course-title-banner section="section" course="course" link="/courses/{{course._id}}"></course-title-banner>

    <div class='row row-height' ng-hide='isInstructor || isStudent'  ng-cloak>
      <div class="col-sm-12">
        <h4><a href="/login">Log in</a> to learn more</h4>
      </div>
    </div>

    <div class='row' ng-cloak>
      <uib-tabset active="active">
        <uib-tab index="0" heading="Information">
          <table class="course-section text-center table table-hover section-information">
            <tr>
              <td class="text-right section-info">Instructor<span ng-show="section.instructors.length > 1">s</span></td>
              <td class="text-left section-info">
                <span ng-repeat="instructor in section.instructors">
                  <span ng-show="$last && !$first">& </span>{{instructor.firstName}} {{instructor.lastName}}<span ng-hide="$last">, </span>
                </span>
              </td>
            </tr>
            <tr>
              <td class="text-right">Section Number<span ng-show="section.sectionNumbers.length > 1">s</span></td>
              <td class="text-left">
                <span ng-repeat="number in section.sectionNumbers track by $index" ng-show="number > -1">
                  <span ng-show="$last && !$first">& </span>{{number}}<span ng-hide="$last || section.sectionNumbers.length < 3">, </span>
                </span>
              </td>
            </tr>

            <tr>
              <td class="text-right section-info">Students</td>
              <td class="text-left section-info">{{section.students.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Pending Students</td>
              <td class="text-left section-info">{{section.pendingStudents.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Events</td>
              <td class="text-left section-info">{{section.events.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Enrollment Policy</td>
              <td class="text-left section-info">{{(section.enrollmentPolicy === "approvalRequired")?"approval":section.enrollmentPolicy}}</td>
            </tr>
          </table>
          <a href="#" class="btn btn-default edit-section col-sm-2" ng-href="{{ viewEditSection() }}" role="button">Edit</a>
        </uib-tab>
        <uib-tab index="1" heading="Students">

          <div class="" ng-show="section.pendingStudents.length > 0">
            <h4>Pending Students</h4>
            <table class="pending-students text-center table table-hover">
              <tr ng-repeat="student in section.pendingStudents">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='verifyPendingStudent(student)' class='verify mdl-button mdl-js-button mdl-button--raised mdl-button--colored'> Verify </button>
                </td>
                <td class="text-center">
                  <button ng-click='ignorePendingStudent(student)' class='ignore mdl-button mdl-js-button mdl-button--raised'> Ignore </button>
                </td>
              </tr>
            </table>
          </div>

          <div class="" ng-show="section.students.length > 0">
            <h4>Enrolled Students</h4>

            <!-- display search bar -->
            <div class='col-xs-12 search-bar-container' ng-show="section.students.length">
              <div class="search-bar">
                <div class="input-group">
                   <input type="text" ng-model='searchText' class="form-control" placeholder="Search students">
                   <span class="input-group-btn">
                     <button class="btn btn-default" type="button">
                       <span class='glyphicon glyphicon-search'></span>
                     </button>
                   </span>
                 </div>
               </div>
            </div>
          

            <table class="students text-center table table-hover">              
              <tr ng-repeat="student in filteredStudents = (section.students | filter:searchText)" data="name" short="false">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='removeStudent(student)' class='ignore mdl-button mdl-js-button mdl-button--raised '> Remove </button>
                </td>
              </tr>
                <div class='no-results' ng-show='filteredStudents.length == 0'>
                  <td class="text-left align-middle">no students found matching search term</td>
                </div>
            </table>


            <!-- <table class="students text-center table table-hover">              
              <tr ng-repeat="student in section.students">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='removeStudent(student)' class='ignore mdl-button mdl-js-button mdl-button--raised '> Remove </button>
                </td>
              </tr>
            </table> -->


          </div>

        </uib-tab>

        <uib-tab index="2" heading="Events">
          <div ng-hide="section.events.length">
            <h4> No events yet. Assign one <a href="/instructor/newevent">here</a> </h4>
          </div>
          <div class="card-container card-flex-container" ng-show="section.events.length">
            <event-card class="card card-flex" ng-repeat='event in section.events  | orderBy: "-times[0].start"' data="event" short="true" preview="true" >  </event-card>
          </div>
        </uib-tab>

        <uib-tab index="3" heading="Submissions">
          <div class="events row">
            <div class="col-sm-12">
              <h4> View Submissions for Event Assignments </h4><commit_msg>Added search functionality. Seems to work without controller.<commit_after><div class='container instructor'>
  <div class="instructorSectionview">
    <course-title-banner section="section" course="course" link="/courses/{{course._id}}"></course-title-banner>

    <div class='row row-height' ng-hide='isInstructor || isStudent'  ng-cloak>
      <div class="col-sm-12">
        <h4><a href="/login">Log in</a> to learn more</h4>
      </div>
    </div>

    <div class='row' ng-cloak>
      <uib-tabset active="active">
        <uib-tab index="0" heading="Information">
          <table class="course-section text-center table table-hover section-information">
            <tr>
              <td class="text-right section-info">Instructor<span ng-show="section.instructors.length > 1">s</span></td>
              <td class="text-left section-info">
                <span ng-repeat="instructor in section.instructors">
                  <span ng-show="$last && !$first">& </span>{{instructor.firstName}} {{instructor.lastName}}<span ng-hide="$last">, </span>
                </span>
              </td>
            </tr>
            <tr>
              <td class="text-right">Section Number<span ng-show="section.sectionNumbers.length > 1">s</span></td>
              <td class="text-left">
                <span ng-repeat="number in section.sectionNumbers track by $index" ng-show="number > -1">
                  <span ng-show="$last && !$first">& </span>{{number}}<span ng-hide="$last || section.sectionNumbers.length < 3">, </span>
                </span>
              </td>
            </tr>

            <tr>
              <td class="text-right section-info">Students</td>
              <td class="text-left section-info">{{section.students.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Pending Students</td>
              <td class="text-left section-info">{{section.pendingStudents.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Events</td>
              <td class="text-left section-info">{{section.events.length}}</td>
            </tr>
            <tr>
              <td class="text-right section-info">Enrollment Policy</td>
              <td class="text-left section-info">{{(section.enrollmentPolicy === "approvalRequired")?"approval":section.enrollmentPolicy}}</td>
            </tr>
          </table>
          <a href="#" class="btn btn-default edit-section col-sm-2" ng-href="{{ viewEditSection() }}" role="button">Edit</a>
        </uib-tab>
        <uib-tab index="1" heading="Students">

          <div class="" ng-show="section.pendingStudents.length > 0">
            <h4>Pending Students</h4>
            <table class="pending-students text-center table table-hover">
              <tr ng-repeat="student in section.pendingStudents">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='verifyPendingStudent(student)' class='verify mdl-button mdl-js-button mdl-button--raised mdl-button--colored'> Verify </button>
                </td>
                <td class="text-center">
                  <button ng-click='ignorePendingStudent(student)' class='ignore mdl-button mdl-js-button mdl-button--raised'> Ignore </button>
                </td>
              </tr>
            </table>
          </div>

          <div class="" ng-show="section.students.length > 0">
            <h4>Enrolled Students</h4>

            <!-- display search bar -->
            <div class='col-xs-12 search-bar-container' ng-show="section.students.length">
              <div class="search-bar">
                <div class="input-group">
                   <input type="text" ng-model='searchText' class="form-control" placeholder="Search students">
                   <span class="input-group-btn">
                     <button class="btn btn-default" type="button">
                       <span class='glyphicon glyphicon-search'></span>
                     </button>
                   </span>
                 </div>
               </div>
            </div>
          

            <table class="students text-center table table-hover">              
              <tr ng-repeat="student in filteredStudents = (section.students | filter:searchText)" data="name" short="false">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='removeStudent(student)' class='ignore mdl-button mdl-js-button mdl-button--raised '> Remove </button>
                </td>
              </tr>
                <div class='no-results' ng-show='filteredStudents.length == 0'>
                  <td class="text-left align-middle">no students found matching search term</td>
                </div>
            </table>


            <!-- <table class="students text-center table table-hover">              
              <tr ng-repeat="student in section.students">
                <td class="text-left align-middle">{{student.firstName}} {{student.lastName}}</td>
                <td class="text-center">
                  <button ng-click='removeStudent(student)' class='ignore mdl-button mdl-js-button mdl-button-raised '> Remove </button>
                </td>
              </tr>
            </table> -->


          </div>

        </uib-tab>

        <uib-tab index="2" heading="Events">
          <div ng-hide="section.events.length">
            <h4> No events yet. Assign one <a href="/instructor/newevent">here</a> </h4>
          </div>
          <div class="card-container card-flex-container" ng-show="section.events.length">
            <event-card class="card card-flex" ng-repeat='event in section.events  | orderBy: "-times[0].start"' data="event" short="true" preview="true" >  </event-card>
          </div>
        </uib-tab>

        <uib-tab index="3" heading="Submissions">
          <div class="events row">
            <div class="col-sm-12">
              <h4> View Submissions for Event Assignments </h4>
{'fraction_non_alphanumeric': 0.1615002847612074, 'fraction_numerical': 0.004718900008136034, 'mean_word_length': 1.9301549463647198, 'pattern_counts': {'":': 2, '<': 309, '<?xml version=': 0, '>': 317, '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': '5404825', 'n_tokens_mistral': 3531, 'n_tokens_neox': 3375, 'n_words': 686}