<commit_before><div *ngIf="exercise">
    <h2>
        {{ exercise.course?.title }} - {{ exercise.title }}
        <small jhiTranslate="artemisApp.exercise.resultCount" [translateValues]="{ resultsLength: results.length }">results</small>
    </h2>
    <jhi-alert></jhi-alert>
    <div class="d-flex align-content-center">
        <div ngbDropdown class="d-inline-block mr-2">
            <button
                class="btn btn-outline-primary"
                id="dropdownBasic1"
                [innerHTML]="'artemisApp.exercise.resultsPerPage' | translate: { number: resultsPerPage }"
                ngbDropdownToggle
            >
                {{ resultsPerPage }} results per page
            </button>
            <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
                <button
                    *ngFor="let pagingValue of PAGING_VALUES"
                    (click)="setResultsPerPage(pagingValue)"
                    [innerHTML]="'artemisApp.exercise.resultsPerPage' | translate: { number: pagingValue }"
                    [style.background-color]="pagingValue === resultsPerPage ? '#3e8acc' : 'transparent'"
                    ngbDropdownItem
                >
                    <span>{{ pagingValue }} results per page</span>
                </button>
            </div>
        </div>
        <div class="ml-2 d-flex align-items-center">
            <label class="radio-inline mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.ALL)" [value]="FilterProp.ALL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showAll' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.UNSUCCESSFUL)" [value]="FilterProp.UNSUCCESSFUL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showUnsuccessful' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.SUCCESSFUL)" [value]="FilterProp.SUCCESSFUL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showSuccessful' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center" *ngIf="newManualResultAllowed">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.MANUAL)" [value]="FilterProp.MANUAL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showManual' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center" *ngIf="newManualResultAllowed">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.AUTOMATIC)" [value]="FilterProp.AUTOMATIC" />
                <span class="ml-1">{{ 'artemisApp.exercise.showAutomatic' | translate }}</span>
            </label>
        </div>
    </div>
    <div class="button-toolbar float-right">
        <button type="submit" routerLink="/exercise/{{ exercise.id }}/participation" class="btn btn-primary btn-sm mr-1">
            <fa-icon [icon]="'list-alt'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.participations">Participations</span>
        </button>
        <button class="btn btn-info btn-sm mr-1" (click)="exportNames()">
            <fa-icon [icon]="'download'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.exportNames">Export Names</span>
        </button>
        <button class="btn btn-info btn-sm mr-1" (click)="exportResults()">
            <fa-icon [icon]="'download'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.exportResults">Export Results</span>
        </button>
        <jhi-programming-assessment-repo-export *ngIf="exercise.type === PROGRAMMING" [exerciseId]="exercise.id" class="mr-1"></jhi-programming-assessment-repo-export>
        <button class="btn btn-primary btn-sm mr-1" (click)="refresh()">
            <fa-icon [icon]="'sync'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.refresh">Refresh</span>
        </button>
    </div>
    <br />
    <div class="d-flex mt-3">
        <input
            id="typeahead-basic"
            type="text"
            class="form-control"
            (selectItem)="onAutocompleteSelect($event.item)"
            [placeholder]="'artemisApp.exercise.searchForStudents' | translate"
            [ngbTypeahead]="onSearch"
            [resultFormatter]="searchResultFormatter"
            [inputFormatter]="searchInputFormatter"
        />
    </div>
    <div *ngIf="results && !isLoading; else loadingContainer" class="table-responsive">
        <ngx-datatable
            id="resultsTable"
            class="bootstrap"
            [limit]="resultsPerPage"
            [sortType]="SortType.multi"
            [columnMode]="ColumnMode.force"
            [headerHeight]="50"
            [footerHeight]="50"
            [rowHeight]="'auto'"
            [rows]="results"
            [rowClass]=""
            [scrollbarH]="true"
        >
            <ngx-datatable-column prop="" [minWidth]="50" [maxWidth]="50">
                <ng-template ngx-datatable-cell-template let-rowIndex="rowIndex">
                    {{ rowIndex + 1 }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="participation.student.name" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="200">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('participation.student.name')">{{
                            'artemisApp.exercise.studentName' | translate
                        }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="participation.student.login" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="100">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('participation.student.login')">{{
                            'artemisApp.exercise.studentId' | translate
                        }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="completionDate" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="150">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('completionDate')">{{ 'artemisApp.exercise.completionDate' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value | date: 'dd.MM.yyyy HH:mm' }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="" [resizeable]="false" [sortable]="true" [minWidth]="200" [maxWidth]="300">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('score')">{{ 'artemisApp.exercise.result' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    <jhi-updating-result [exercise]="exercise" [showTestNames]="true" [participation]="value.participation"></jhi-updating-result>
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="assessmentType" *ngIf="newManualResultAllowed" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="100">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('type')">{{ 'artemisApp.exercise.type' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="submissionCount" [resizeable]="false" [sortable]="true" [minWidth]="60" [maxWidth]="120">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('submissionCount')">{{ 'artemisApp.exercise.submissionCount' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="durationInMinutes" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="150">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('durationInMinutes')">{{ 'artemisApp.exercise.duration' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value"> {{ value }} min </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="" *ngIf="exercise.type === PROGRAMMING" [resizeable]="false" [minWidth]="400">
                <ng-template ngx-datatable-cell-template let-value="value">
                    <button *ngIf="exercise.type === PROGRAMMING" class="btn btn-primary btn-sm mr-1" (click)="goToRepository(value)">
                        <fa-icon icon="code-branch" class="mr-1"></fa-icon>Repository
                    </button>
                    <button *ngIf="exercise.type === PROGRAMMING" class="btn btn-primary btn-sm mr-1" (click)="goToBuildPlan(value)">
                        <fa-icon class="mr-1" [icon]="['far', 'file-code']"></fa-icon>Build plan
                    </button>
                    <button
                        routerLink="/code-editor/{{ value.participation.id }}"
                        class="btn btn-info btn-sm mr-1"
                        *ngIf="exercise.type === PROGRAMMING && value.participation.exercise.allowOnlineEditor"
                    >
                        <fa-icon class="mr-1" icon="folder-open" [fixedWidth]="true"></fa-icon>Online editor
                    </button>
                    <jhi-programming-assessment-manual-result
                        *ngIf="newManualResultAllowed"
                        [participationId]="value.participation.id"
                        [latestResult]="value"
                        (onResultCreated)="refresh()"
                        class="mr-1"
                    ></jhi-programming-assessment-manual-result>
                </ng-template>
            </ngx-datatable-column>
        </ngx-datatable>
    </div>
    <ng-template #loadingContainer>
        <div class="d-flex justify-content-center mt-3">
            <fa-icon size="lg" icon="circle-notch" [spin]="true"></fa-icon>
        </div>
    </ng-template>
</div>
<commit_msg>Link student's name on exercise scores page to submissions (#1046)<commit_after><div *ngIf="exercise">
    <h2>
        {{ exercise.course?.title }} - {{ exercise.title }}
        <small jhiTranslate="artemisApp.exercise.resultCount" [translateValues]="{ resultsLength: results.length }">results</small>
    </h2>
    <jhi-alert></jhi-alert>
    <div class="d-flex align-content-center">
        <div ngbDropdown class="d-inline-block mr-2">
            <button
                class="btn btn-outline-primary"
                id="dropdownBasic1"
                [innerHTML]="'artemisApp.exercise.resultsPerPage' | translate: { number: resultsPerPage }"
                ngbDropdownToggle
            >
                {{ resultsPerPage }} results per page
            </button>
            <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
                <button
                    *ngFor="let pagingValue of PAGING_VALUES"
                    (click)="setResultsPerPage(pagingValue)"
                    [innerHTML]="'artemisApp.exercise.resultsPerPage' | translate: { number: pagingValue }"
                    [style.background-color]="pagingValue === resultsPerPage ? '#3e8acc' : 'transparent'"
                    ngbDropdownItem
                >
                    <span>{{ pagingValue }} results per page</span>
                </button>
            </div>
        </div>
        <div class="ml-2 d-flex align-items-center">
            <label class="radio-inline mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.ALL)" [value]="FilterProp.ALL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showAll' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.UNSUCCESSFUL)" [value]="FilterProp.UNSUCCESSFUL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showUnsuccessful' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.SUCCESSFUL)" [value]="FilterProp.SUCCESSFUL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showSuccessful' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center" *ngIf="newManualResultAllowed">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.MANUAL)" [value]="FilterProp.MANUAL" />
                <span class="ml-1">{{ 'artemisApp.exercise.showManual' | translate }}</span>
            </label>
            <label class="radio-inline ml-2 mb-0 d-flex align-items-center" *ngIf="newManualResultAllowed">
                <input type="radio" [ngModel]="resultCriteria.filterProp" (click)="updateResultFilter(FilterProp.AUTOMATIC)" [value]="FilterProp.AUTOMATIC" />
                <span class="ml-1">{{ 'artemisApp.exercise.showAutomatic' | translate }}</span>
            </label>
        </div>
    </div>
    <div class="button-toolbar float-right">
        <button type="submit" routerLink="/exercise/{{ exercise.id }}/participation" class="btn btn-primary btn-sm mr-1">
            <fa-icon [icon]="'list-alt'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.participations">Participations</span>
        </button>
        <button class="btn btn-info btn-sm mr-1" (click)="exportNames()">
            <fa-icon [icon]="'download'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.exportNames">Export Names</span>
        </button>
        <button class="btn btn-info btn-sm mr-1" (click)="exportResults()">
            <fa-icon [icon]="'download'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.exportResults">Export Results</span>
        </button>
        <jhi-programming-assessment-repo-export *ngIf="exercise.type === PROGRAMMING" [exerciseId]="exercise.id" class="mr-1"></jhi-programming-assessment-repo-export>
        <button class="btn btn-primary btn-sm mr-1" (click)="refresh()">
            <fa-icon [icon]="'sync'"></fa-icon>
            <span class="d-none d-md-inline" jhiTranslate="artemisApp.exercise.refresh">Refresh</span>
        </button>
    </div>
    <br />
    <div class="d-flex mt-3">
        <input
            id="typeahead-basic"
            type="text"
            class="form-control"
            (selectItem)="onAutocompleteSelect($event.item)"
            [placeholder]="'artemisApp.exercise.searchForStudents' | translate"
            [ngbTypeahead]="onSearch"
            [resultFormatter]="searchResultFormatter"
            [inputFormatter]="searchInputFormatter"
        />
    </div>
    <div *ngIf="results && !isLoading; else loadingContainer" class="table-responsive">
        <ngx-datatable
            id="resultsTable"
            class="bootstrap"
            [limit]="resultsPerPage"
            [sortType]="SortType.multi"
            [columnMode]="ColumnMode.force"
            [headerHeight]="50"
            [footerHeight]="50"
            [rowHeight]="'auto'"
            [rows]="results"
            [rowClass]=""
            [scrollbarH]="true"
        >
            <ngx-datatable-column prop="" [minWidth]="50" [maxWidth]="50">
                <ng-template ngx-datatable-cell-template let-rowIndex="rowIndex">
                    {{ rowIndex + 1 }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="participation" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="200">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('participation.student.name')">{{
                            'artemisApp.exercise.studentName' | translate
                        }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    <a routerLink="/participation/{{ value.id }}/submissions">
                        {{ value.student.name }}
                    </a>
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="participation.student.login" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="100">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('participation.student.login')">{{
                            'artemisApp.exercise.studentId' | translate
                        }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="completionDate" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="150">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold sortable" (click)="onSort('completionDate')">{{ 'artemisApp.exercise.completionDate' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value | date: 'dd.MM.yyyy HH:mm' }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="" [resizeable]="false" [sortable]="true" [minWidth]="200" [maxWidth]="300">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('score')">{{ 'artemisApp.exercise.result' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    <jhi-updating-result [exercise]="exercise" [showTestNames]="true" [participation]="value.participation"></jhi-updating-result>
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="assessmentType" *ngIf="newManualResultAllowed" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="100">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('type')">{{ 'artemisApp.exercise.type' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="submissionCount" [resizeable]="false" [sortable]="true" [minWidth]="60" [maxWidth]="120">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('submissionCount')">{{ 'artemisApp.exercise.submissionCount' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value">
                    {{ value }}
                </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="durationInMinutes" [resizeable]="false" [sortable]="true" [minWidth]="100" [maxWidth]="150">
                <ng-template ngx-datatable-header-template>
                    <span class="datatable-header-cell-wrapper">
                        <span class="datatable-header-cell-label bold" (click)="onSort('durationInMinutes')">{{ 'artemisApp.exercise.duration' | translate }}</span>
                        <fa-icon icon="sort"></fa-icon>
                    </span>
                </ng-template>
                <ng-template ngx-datatable-cell-template let-value="value"> {{ value }} min </ng-template>
            </ngx-datatable-column>

            <ngx-datatable-column prop="" *ngIf="exercise.type === PROGRAMMING" [resizeable]="false" [minWidth]="400">
                <ng-template ngx-datatable-cell-template let-value="value">
                    <button *ngIf="exercise.type === PROGRAMMING" class="btn btn-primary btn-sm mr-1" (click)="goToRepository(value)">
                        <fa-icon icon="code-branch" class="mr-1"></fa-icon>Repository
                    </button>
                    <button *ngIf="exercise.type === PROGRAMMING" class="btn btn-primary btn-sm mr-1" (click)="goToBuildPlan(value)">
                        <fa-icon class="mr-1" [icon]="['far', 'file-code']"></fa-icon>Build plan
                    </button>
                    <button
                        routerLink="/code-editor/{{ value.participation.id }}"
                        class="btn btn-info btn-sm mr-1"
                        *ngIf="exercise.type === PROGRAMMING && value.participation.exercise.allowOnlineEditor"
                    >
                        <fa-icon class="mr-1" icon="folder-open" [fixedWidth]="true"></fa-icon>Online editor
                    </button>
                    <jhi-programming-assessment-manual-result
                        *ngIf="newManualResultAllowed"
                        [participationId]="value.participation.id"
                        [latestResult]="value"
                        (onResultCreated)="refresh()"
                        class="mr-1"
                    ></jhi-programming-assessment-manual-result>
                </ng-template>
            </ngx-datatable-column>
        </ngx-datatable>
    </div>
    <ng-template #loadingContainer>
        <div class="d-flex justify-content-center mt-3">
            <fa-icon size="lg" icon="circle-notch" [spin]="true"></fa-icon>
        </div>
    </ng-template>
</div>

{'fraction_non_alphanumeric': 0.15460921455419072, 'fraction_numerical': 0.007052350137559577, 'mean_word_length': 1.9760147601476015, 'pattern_counts': {'":': 0, '<': 399, '<?xml version=': 0, '>': 399, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4667211', 'n_tokens_mistral': 7663, 'n_tokens_neox': 7140, 'n_words': 1088}