From 9ad13ffe3fdc36d9cc946d9832207d6edb15d49d Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 4 Jul 2024 16:31:00 +0200 Subject: [PATCH] code cleanup --- .../session/proctoring/MonitoringProctoringService.java | 6 +++--- .../service/session/proctoring/ProctoringGUIService.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/MonitoringProctoringService.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/MonitoringProctoringService.java index 2192e439..91bd9d63 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/MonitoringProctoringService.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/MonitoringProctoringService.java @@ -202,7 +202,7 @@ public class MonitoringProctoringService { final EntityKey entityKey = pageContext.getEntityKey(); final I18nSupport i18nSupport = this.pageService.getI18nSupport(); - final TreeItem screeProctoringGroupAction = proctoringGUIService.getScreeProcotringGroupAction(group); + final TreeItem screeProctoringGroupAction = proctoringGUIService.getScreeProctoringGroupAction(group); if (screeProctoringGroupAction != null) { // update action screeProctoringGroupAction.setText(i18nSupport.getText(new LocTextKey( @@ -224,7 +224,7 @@ public class MonitoringProctoringService { group.size) .noEventPropagation() .create(), - _treeItem -> proctoringGUIService.registerScreeProcotringGroupAction(group, _treeItem)); + _treeItem -> proctoringGUIService.registerScreeProctoringGroupAction(group, _treeItem)); } } @@ -355,7 +355,7 @@ public class MonitoringProctoringService { // Open SPS Gui redirect URL with login token (jwt token) in new browser tab final String redirectLocation = redirect.getBody() + "/jwt?token=" + tokenRequest.getBody(); - final String script = "window.open("+ redirectLocation + ", 'seb_screen_proctoring')"; + // final String script = "var win = window.open('', 'seb_screen_proctoring'); win.location.href = '"+ redirectLocation + "';"; final UrlLauncher launcher = RWT.getClient().getService(UrlLauncher.class); launcher.openURL(redirectLocation); // RWT.getClient() diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ProctoringGUIService.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ProctoringGUIService.java index 2b60757f..fc1dbc2a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ProctoringGUIService.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ProctoringGUIService.java @@ -57,14 +57,14 @@ public class ProctoringGUIService { this.screenProctoringGroupState = new HashMap<>(); } - public void registerScreeProcotringGroupAction( + public void registerScreeProctoringGroupAction( final ScreenProctoringGroup screenProctoringGroup, final TreeItem actionItem) { this.screenProctoringGroupState.put(screenProctoringGroup.uuid, actionItem); } - public TreeItem getScreeProcotringGroupAction(final ScreenProctoringGroup screenProctoringGroup) { + public TreeItem getScreeProctoringGroupAction(final ScreenProctoringGroup screenProctoringGroup) { return this.screenProctoringGroupState.get(screenProctoringGroup.uuid); } @@ -119,7 +119,7 @@ public class ProctoringGUIService { final Pair pair = this.collectingRoomsActionState.get(roomName); return pair.a.roomSize > 0 /* && !pair.a.isOpen SEBSERV-236 */; } catch (final Exception e) { - log.error("Failed to get actual collecting room size for room: {} cause: ", roomName, e.getMessage()); + log.error("Failed to get actual collecting room size for room: {} cause: {}", roomName, e.getMessage()); return false; } }