diff --git a/src/main/webapp/app/exercises/programming/assess/code-editor-tutor-assessment-container.component.html b/src/main/webapp/app/exercises/programming/assess/code-editor-tutor-assessment-container.component.html index 2945fec0662b..9382ac324adf 100644 --- a/src/main/webapp/app/exercises/programming/assess/code-editor-tutor-assessment-container.component.html +++ b/src/main/webapp/app/exercises/programming/assess/code-editor-tutor-assessment-container.component.html @@ -98,12 +98,18 @@ + @if (isAtLeastEditor && localVCEnabled && !isTestRun) { + + + + + } - @if (!localVCEnabled) { + @if (isAtLeastEditor && !localVCEnabled) { { // Get all files with content from template repository @@ -194,6 +198,7 @@ export class CodeEditorTutorAssessmentContainerComponent implements OnInit, OnDe const observable = this.repositoryFileService.getFilesWithContent(); // Set back to student participation this.domainService.setDomain([DomainType.PARTICIPATION, this.participation]); + this.localRepositoryLink = getLocalRepositoryLink(this.courseId, this.exerciseId, this.participation.id!, this.exerciseGroupId, this.examId); return observable; }), tap((templateFilesObj) => { diff --git a/src/main/webapp/app/utils/navigation.utils.ts b/src/main/webapp/app/utils/navigation.utils.ts index e9b9d61f2697..5dfe70b1f1da 100644 --- a/src/main/webapp/app/utils/navigation.utils.ts +++ b/src/main/webapp/app/utils/navigation.utils.ts @@ -152,6 +152,14 @@ export const getExerciseDashboardLink = (courseId: number, exerciseId: number, e : ['/course-management', courseId.toString(), 'assessment-dashboard', exerciseId.toString()]; }; +export const getLocalRepositoryLink = (courseId: number, exerciseId: number, participationId: number, exerciseGroupId: number = 0, examId = 0): string[] => { + const suffix = ['programming-exercises', exerciseId.toString(), 'participations', participationId.toString(), 'repository']; + + return examId < 0 + ? ['/course-management', courseId.toString(), 'exams', examId.toString(), 'exercise-groups', exerciseGroupId.toString(), ...suffix] + : ['/course-management', courseId.toString(), ...suffix]; +}; + /** * A generic method which navigates into a subpage of an exam exercise * @router the router th component uses to navigate into different webpages