Skip to content

Commit

Permalink
Iris: Only load settings on non exam exercise to prevent bad request …
Browse files Browse the repository at this point in the history
…banners
  • Loading branch information
krusche committed Dec 15, 2024
1 parent 1435bfe commit 1f0f75b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class ProgrammingExerciseDetailComponent implements OnInit, OnDestroy {
this.localVCEnabled = profileInfo.activeProfiles.includes(PROFILE_LOCALVC);
this.localCIEnabled = profileInfo.activeProfiles.includes(PROFILE_LOCALCI);
this.irisEnabled = profileInfo.activeProfiles.includes(PROFILE_IRIS);
if (this.irisEnabled) {
if (this.irisEnabled && !this.isExamExercise) {
this.irisSettingsSubscription = this.irisSettingsService.getCombinedCourseSettings(this.courseId).subscribe((settings) => {
this.irisChatEnabled = settings?.irisChatSettings?.enabled ?? false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ export class TextEditorComponent implements OnInit, OnDestroy, ComponentCanDeact
this.updateParticipation(this.participation);
});
this.profileService.getProfileInfo().subscribe((profileInfo) => {
if (profileInfo?.activeProfiles?.includes(PROFILE_IRIS)) {
// only load the settings if Iris is available and this is not an exam exercise
if (profileInfo?.activeProfiles?.includes(PROFILE_IRIS) && !this.examMode) {
this.route.params.subscribe((params) => {
this.irisSettingsService.getCombinedExerciseSettings(params['exerciseId']).subscribe((irisSettings) => {
this.irisSettings = irisSettings;
Expand Down

0 comments on commit 1f0f75b

Please sign in to comment.