Skip to content

Commit

Permalink
merge aftermath
Browse files Browse the repository at this point in the history
  • Loading branch information
ole-ve committed Feb 25, 2025
1 parent 3094f01 commit 6f11b67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Controller;

import de.tum.cit.aet.artemis.exam.domain.StudentExam;
import de.tum.cit.aet.artemis.exam.service.ExamLiveEventsService;
import de.tum.cit.aet.artemis.exercise.domain.Exercise;

Expand All @@ -19,7 +18,7 @@ public ExamLiveEventsApi(ExamLiveEventsService examLiveEventsService) {
this.examLiveEventsService = examLiveEventsService;
}

public void createAndSendProblemStatementUpdateEvent(StudentExam studentExam, Exercise exercise, String message) {
examLiveEventsService.createAndSendProblemStatementUpdateEvent(studentExam, exercise, message);
public void createAndSendProblemStatementUpdateEvent(Exercise exercise, String message) {
examLiveEventsService.createAndSendProblemStatementUpdateEvent(exercise, message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,7 @@ public void notifyAboutExerciseChanges(Exercise originalExercise, Exercise updat
else if (now().plusMinutes(EXAM_START_WAIT_TIME_MINUTES).isAfter(originalExercise.getExam().getStartDate()) && originalExercise.isExamExercise()
&& !StringUtils.equals(originalExercise.getProblemStatement(), updatedExercise.getProblemStatement())) {
ExamLiveEventsApi api = examLiveEventsApi.orElseThrow(() -> new ApiNotPresentException(ExamLiveEventsApi.class, PROFILE_CORE));
User instructor = userRepository.getUser();
api.createAndSendProblemStatementUpdateEvent(updatedExercise, notificationText, instructor);
api.createAndSendProblemStatementUpdateEvent(updatedExercise, notificationText);
}
}

Expand Down

0 comments on commit 6f11b67

Please sign in to comment.