diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java
index f194f983..4e101f29 100644
--- a/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java
+++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java
@@ -82,6 +82,10 @@ public class MonitoringRunningExam implements TemplateComposer {
new LocTextKey("sebserver.monitoring.exam.connection.action.instruction.quit.selected.confirm");
private static final LocTextKey CONFIRM_QUIT_ALL =
new LocTextKey("sebserver.monitoring.exam.connection.action.instruction.quit.all.confirm");
+ private static final LocTextKey CONFIRM_OPEN_TOWNHALL =
+ new LocTextKey("sebserver.monitoring.exam.connection.action.openTownhall.confirm");
+ private static final LocTextKey CONFIRM_CLOSE_TOWNHALL =
+ new LocTextKey("sebserver.monitoring.exam.connection.action.closeTownhall.confirm");
private static final LocTextKey CONFIRM_DISABLE_SELECTED =
new LocTextKey("sebserver.monitoring.exam.connection.action.instruction.disable.selected.confirm");
@@ -276,7 +280,15 @@ public class MonitoringRunningExam implements TemplateComposer {
actionBuilder.newAction(ActionDefinition.MONITOR_EXAM_OPEN_TOWNHALL_PROCTOR_ROOM)
.withEntityKey(entityKey)
- .withExec(action -> this.monitoringProctoringService.toggleTownhallRoom(proctoringGUIService,
+ .withConfirm(action -> {
+ if (!this.monitoringProctoringService.isTownhallRoomActive(action.getEntityKey().modelId)) {
+ return CONFIRM_OPEN_TOWNHALL;
+ } else {
+ return CONFIRM_CLOSE_TOWNHALL;
+ }
+ })
+ .withExec(action -> this.monitoringProctoringService.toggleTownhallRoom(
+ proctoringGUIService,
action))
.noEventPropagation()
.publish();
diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties
index ad9c9669..c9b7071c 100644
--- a/src/main/resources/messages.properties
+++ b/src/main/resources/messages.properties
@@ -1718,6 +1718,8 @@ sebserver.monitoring.exam.connection.action.hide.undefined=Hide Undefined
sebserver.monitoring.exam.connection.action.show.undefined=Show Undefined
sebserver.monitoring.exam.connection.action.proctoring=Single Room Proctoring
sebserver.monitoring.exam.connection.action.proctoring.examroom=Exam Room Proctoring
+sebserver.monitoring.exam.connection.action.openTownhall.confirm=You are about to open the town-hall room and force all SEB clients to join the town-hall room.
Are you sure to open the town-hall?
+sebserver.monitoring.exam.connection.action.closeTownhall.confirm=You are about to close the town-hall room and force all SEB clients to join it's proctoring room.
Are you sure to close the town-hall?
sebserver.monitoring.exam.connection.notificationlist.actions=
sebserver.monitoring.exam.connection.action.confirm.notification=Confirm Notification