From c043f0460e021dd3761c5a78b1c377e727a87aaa Mon Sep 17 00:00:00 2001 From: anhefti Date: Mon, 12 Jul 2021 11:35:41 +0200 Subject: [PATCH] SEBSERV-204 removed "Audio Broadcast" button from Zoom Proc Window --- .../page/impl/AbstractProctoringView.java | 16 ++++++++++------ .../service/page/impl/ZoomProctoringView.java | 16 ++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/AbstractProctoringView.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/AbstractProctoringView.java index 3fb42ab3..f990e5c9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/AbstractProctoringView.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/AbstractProctoringView.java @@ -93,12 +93,16 @@ public abstract class AbstractProctoringView implements RemoteProctoringView { final BroadcastActionState state = (BroadcastActionState) videoAction.getData(BroadcastActionState.KEY_NAME); - this.pageService.getPolyglotPageService().injectI18n( - audioAction, - state.video ? BROADCAST_AUDIO_ON_TEXT_KEY : BROADCAST_AUDIO_OFF_TEXT_KEY); - this.pageService.getPolyglotPageService().injectI18n( - videoAction, - state.video ? BROADCAST_VIDEO_ON_TEXT_KEY : BROADCAST_VIDEO_OFF_TEXT_KEY); + if (audioAction != null) { + this.pageService.getPolyglotPageService().injectI18n( + audioAction, + state.video ? BROADCAST_AUDIO_ON_TEXT_KEY : BROADCAST_AUDIO_OFF_TEXT_KEY); + } + if (videoAction != null) { + this.pageService.getPolyglotPageService().injectI18n( + videoAction, + state.video ? BROADCAST_VIDEO_ON_TEXT_KEY : BROADCAST_VIDEO_OFF_TEXT_KEY); + } state.video = !state.video; state.audio = state.video; diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/ZoomProctoringView.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/ZoomProctoringView.java index 311bb3b6..90013704 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/ZoomProctoringView.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/page/impl/ZoomProctoringView.java @@ -117,13 +117,13 @@ public class ZoomProctoringView extends AbstractProctoringView { final BroadcastActionState broadcastActionState = new BroadcastActionState(); if (proctoringSettings.enabledFeatures.contains(ProctoringFeature.BROADCAST)) { - final Button broadcastAudioAction = widgetFactory.buttonLocalized(footer, BROADCAST_AUDIO_ON_TEXT_KEY); - broadcastAudioAction.setLayoutData(new RowData()); - broadcastAudioAction.addListener(SWT.Selection, event -> toggleBroadcastAudio( - proctoringWindowData.examId, - proctoringWindowData.connectionData.roomName, - broadcastAudioAction)); - broadcastAudioAction.setData(BroadcastActionState.KEY_NAME, broadcastActionState); +// final Button broadcastAudioAction = widgetFactory.buttonLocalized(footer, BROADCAST_AUDIO_ON_TEXT_KEY); +// broadcastAudioAction.setLayoutData(new RowData()); +// broadcastAudioAction.addListener(SWT.Selection, event -> toggleBroadcastAudio( +// proctoringWindowData.examId, +// proctoringWindowData.connectionData.roomName, +// broadcastAudioAction)); +// broadcastAudioAction.setData(BroadcastActionState.KEY_NAME, broadcastActionState); final Button broadcastVideoAction = widgetFactory.buttonLocalized(footer, BROADCAST_VIDEO_ON_TEXT_KEY); broadcastVideoAction.setLayoutData(new RowData()); @@ -131,7 +131,7 @@ public class ZoomProctoringView extends AbstractProctoringView { proctoringWindowData.examId, proctoringWindowData.connectionData.roomName, broadcastVideoAction, - broadcastAudioAction)); + null)); broadcastVideoAction.setData(BroadcastActionState.KEY_NAME, broadcastActionState); } if (proctoringSettings.enabledFeatures.contains(ProctoringFeature.ENABLE_CHAT)) {