Skip to content

Commit

Permalink
Rename JOL event
Browse files Browse the repository at this point in the history
  • Loading branch information
kaancayli committed Jun 20, 2024
1 parent bfa40da commit e29a43c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import de.tum.in.www1.artemis.repository.CompetencyRepository;
import de.tum.in.www1.artemis.repository.UserRepository;
import de.tum.in.www1.artemis.repository.competency.CompetencyJolRepository;
import de.tum.in.www1.artemis.service.connectors.pyris.event.CompetencyJolEvent;
import de.tum.in.www1.artemis.service.connectors.pyris.event.CompetencyJolSetEvent;
import de.tum.in.www1.artemis.service.connectors.pyris.event.PyrisEventService;
import de.tum.in.www1.artemis.web.rest.dto.competency.CompetencyJolDTO;
import de.tum.in.www1.artemis.web.rest.dto.competency.CompetencyJolPairDTO;
Expand Down Expand Up @@ -88,7 +88,7 @@ public void setJudgementOfLearning(long competencyId, long userId, short jolValu
// Inform Iris so it can send a message to the user
try {
if (userId % 3 > 0) { // HD3-GROUPS: Iris groups are 1 & 2
service.trigger(new CompetencyJolEvent(jol));
service.trigger(new CompetencyJolSetEvent(jol));
}
}
catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import de.tum.in.www1.artemis.domain.competency.CompetencyJol;
import de.tum.in.www1.artemis.service.iris.session.IrisCourseChatSessionService;

public class CompetencyJolEvent extends PyrisEvent<IrisCourseChatSessionService, CompetencyJol> {
public class CompetencyJolSetEvent extends PyrisEvent<IrisCourseChatSessionService, CompetencyJol> {

private final CompetencyJol event;

public CompetencyJolEvent(CompetencyJol event) {
public CompetencyJolSetEvent(CompetencyJol event) {
this.event = event;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public PyrisEventService(IrisCourseChatSessionService irisCourseChatSessionServi
*/
public void trigger(PyrisEvent event) {
switch (event) {
case CompetencyJolEvent competencyJolEvent -> {
competencyJolEvent.handleEvent(irisCourseChatSessionService);
case CompetencyJolSetEvent competencyJolSetEvent -> {
competencyJolSetEvent.handleEvent(irisCourseChatSessionService);
}
default -> throw new UnsupportedOperationException("Unsupported event: " + event);
}
Expand Down

0 comments on commit e29a43c

Please sign in to comment.