From 5dfa30894b4b583aa9f426b0d03b2fc3503af166 Mon Sep 17 00:00:00 2001 From: entholzer Date: Thu, 3 Apr 2025 20:49:07 +0200 Subject: [PATCH 1/3] removed localVCenabled --- ...ercise-assessment-dashboard.component.html | 16 +++---- ...exercise-assessment-dashboard.component.ts | 8 ---- ...rcise-details-student-actions.component.ts | 4 +- .../user-settings-container.component.html | 20 ++++----- .../user-settings-container.component.ts | 8 +--- .../exercise-groups.component.html | 6 +-- .../exercise-groups.component.ts | 4 +- ...ramming-exercise-group-cell.component.html | 38 +++------------- ...ogramming-exercise-group-cell.component.ts | 12 ++--- .../student-exams/student-exams.component.ts | 8 ---- .../programming-exam-summary.component.ts | 3 -- .../exam-exercise-row-buttons.component.html | 2 +- .../exam-exercise-row-buttons.component.ts | 4 +- .../exercise-scores.component.html | 19 +++----- .../exercise-scores.component.ts | 13 ------ .../participation.component.html | 24 +++------- .../participation/participation.component.ts | 14 ------ ...-tutor-assessment-container.component.html | 11 +---- ...or-tutor-assessment-container.component.ts | 8 ---- ...programming-exercise-detail.component.html | 4 +- .../programming-exercise-detail.component.ts | 4 +- .../programming-exercise.component.html | 44 ++++--------------- .../manage/programming-exercise.component.ts | 9 +--- .../repository-view.component.html | 2 +- .../repository-view.component.ts | 7 --- .../code-button/code-button.component.html | 30 ++++--------- .../code-button/code-button.component.ts | 19 +++----- .../detail-overview-list.component.ts | 8 +--- .../user-settings-container.component.spec.ts | 39 +++++----------- .../detail-overview-list.component.spec.ts | 3 -- ...ming-exercise-group-cell.component.spec.ts | 11 ++++- .../student-exams.component.spec.ts | 2 - .../exercise-scores.component.spec.ts | 3 -- .../localvc/repository-view.component.spec.ts | 3 -- ...tor-assessment-container.component.spec.ts | 4 +- 35 files changed, 94 insertions(+), 320 deletions(-) diff --git a/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.html b/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.html index 81b297d3f3bb..1e9e5c81e615 100644 --- a/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.html +++ b/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.html @@ -211,17 +211,11 @@ @if (exercise.type === ExerciseType.PROGRAMMING) {

- @if (!localVCEnabled) { - - - - } @else { - - } +
} diff --git a/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.ts b/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.ts index 38898593cf1e..d72704929594 100644 --- a/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.ts +++ b/src/main/webapp/app/assessment/shared/assessment-dashboard/exercise-dashboard/exercise-assessment-dashboard.component.ts @@ -51,7 +51,6 @@ import { LegendPosition, PieChartModule } from '@swimlane/ngx-charts'; import dayjs from 'dayjs/esm'; import { faCheckCircle, faExclamationTriangle, faFolderOpen, faListAlt, faQuestionCircle, faSort, faSpinner } from '@fortawesome/free-solid-svg-icons'; import { GraphColors } from 'app/exercise/shared/entities/statistics.model'; -import { PROFILE_LOCALVC } from 'app/app.constants'; import { isManualResult } from 'app/exercise/result/result.utils'; import { TutorParticipationGraphComponent } from 'app/shared/dashboards/tutor-participation-graph/tutor-participation-graph.component'; import { SecondCorrectionEnableButtonComponent } from './second-correction-button/second-correction-enable-button.component'; @@ -76,7 +75,6 @@ import { HeaderExercisePageWithDetailsComponent } from 'app/exercise/exercise-he import { InfoPanelComponent } from 'app/assessment/shared/info-panel/info-panel.component'; import { SecureLinkDirective } from 'app/assessment/manage/secure-link.directive'; import { ResultComponent } from 'app/exercise/result/result.component'; -import { ProfileService } from 'app/core/layouts/profiles/shared/profile.service'; import { TutorParticipationService } from 'app/assessment/shared/assessment-dashboard/exercise-dashboard/tutor-participation.service'; export interface ExampleSubmissionQueryParams { @@ -136,7 +134,6 @@ export class ExerciseAssessmentDashboardComponent implements OnInit { private programmingSubmissionService = inject(ProgrammingSubmissionService); private guidedTourService = inject(GuidedTourService); private sortService = inject(SortService); - private profileService = inject(ProfileService); readonly roundScoreSpecifiedByCourseSettings = roundValueSpecifiedByCourseSettings; readonly getCourseFromExercise = getCourseFromExercise; @@ -152,8 +149,6 @@ export class ExerciseAssessmentDashboardComponent implements OnInit { isTestRun = false; isLoading = false; - localVCEnabled = true; - statsForDashboard = new StatsForDashboard(); exerciseId: number; @@ -262,9 +257,6 @@ export class ExerciseAssessmentDashboardComponent implements OnInit { this.translateService.onLangChange.subscribe(() => { this.setupGraph(); }); - this.profileService.getProfileInfo().subscribe((profileInfo) => { - this.localVCEnabled = profileInfo.activeProfiles.includes(PROFILE_LOCALVC); - }); } setupGraph() { diff --git a/src/main/webapp/app/core/course/overview/exercise-details/exercise-details-student-actions.component.ts b/src/main/webapp/app/core/course/overview/exercise-details/exercise-details-student-actions.component.ts index e568dc4e176b..367ef157d6e8 100644 --- a/src/main/webapp/app/core/course/overview/exercise-details/exercise-details-student-actions.component.ts +++ b/src/main/webapp/app/core/course/overview/exercise-details/exercise-details-student-actions.component.ts @@ -14,7 +14,7 @@ import { faEye, faFolderOpen, faPlayCircle, faRedo, faUsers } from '@fortawesome import { ParticipationService } from 'app/exercise/participation/participation.service'; import dayjs from 'dayjs/esm'; import { QuizExercise } from 'app/quiz/shared/entities/quiz-exercise.model'; -import { PROFILE_ATHENA, PROFILE_LOCALVC } from 'app/app.constants'; +import { PROFILE_ATHENA } from 'app/app.constants'; import { AssessmentType } from 'app/assessment/shared/entities/assessment-type.model'; import { ButtonType } from 'app/shared/components/button.component'; import { NgTemplateOutlet } from '@angular/common'; @@ -79,7 +79,6 @@ export class ExerciseDetailsStudentActionsComponent implements OnInit, OnChanges hasRatedGradedResult: boolean; beforeDueDate: boolean; editorLabel?: string; - localVCEnabled = true; athenaEnabled = false; routerLink: string; @@ -98,7 +97,6 @@ export class ExerciseDetailsStudentActionsComponent implements OnInit, OnChanges } else if (this.exercise.type === ExerciseType.PROGRAMMING) { this.programmingExercise = this.exercise as ProgrammingExercise; this.profileService.getProfileInfo().subscribe((profileInfo) => { - this.localVCEnabled = profileInfo.activeProfiles?.includes(PROFILE_LOCALVC); this.athenaEnabled = profileInfo.activeProfiles?.includes(PROFILE_ATHENA); }); } else if (this.exercise.type === ExerciseType.MODELING) { diff --git a/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.html b/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.html index 771b5513693c..e049cbc93080 100644 --- a/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.html +++ b/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.html @@ -29,17 +29,15 @@ jhiTranslate="artemisApp.userSettings.notificationSettings" > - @if (localVCEnabled) { - - @if (isAtLeastTutor) { - - - } + + @if (isAtLeastTutor) { + + } diff --git a/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.ts b/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.ts index b06b4f966ae6..1f8f61a7fb97 100644 --- a/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.ts +++ b/src/main/webapp/app/core/user/settings/user-settings-container/user-settings-container.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit, inject } from '@angular/core'; import { faUser } from '@fortawesome/free-solid-svg-icons'; -import { ProfileService } from 'app/core/layouts/profiles/shared/profile.service'; -import { PROFILE_LOCALVC, addPublicFilePrefix } from 'app/app.constants'; +import { addPublicFilePrefix } from 'app/app.constants'; import { User } from 'app/core/user/user.model'; import { AccountService } from 'app/core/auth/account.service'; import { tap } from 'rxjs'; @@ -19,7 +18,6 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; imports: [TranslateDirective, RouterModule, FontAwesomeModule], }) export class UserSettingsContainerComponent implements OnInit { - private readonly profileService = inject(ProfileService); private readonly accountService = inject(AccountService); // Icons @@ -30,10 +28,6 @@ export class UserSettingsContainerComponent implements OnInit { isAtLeastTutor = false; ngOnInit() { - this.profileService.getProfileInfo().subscribe((profileInfo) => { - this.localVCEnabled = profileInfo.activeProfiles.includes(PROFILE_LOCALVC); - }); - this.accountService .getAuthenticationState() .pipe( diff --git a/src/main/webapp/app/exam/manage/exercise-groups/exercise-groups.component.html b/src/main/webapp/app/exam/manage/exercise-groups/exercise-groups.component.html index 43cd6963ce39..24b21b162d4e 100644 --- a/src/main/webapp/app/exam/manage/exercise-groups/exercise-groups.component.html +++ b/src/main/webapp/app/exam/manage/exercise-groups/exercise-groups.component.html @@ -132,11 +132,7 @@
{{ exerciseGroup.title }}