code cleanup

This commit is contained in:
anhefti 2024-07-04 16:31:00 +02:00
parent fb8df62f59
commit 9ad13ffe3f
2 changed files with 6 additions and 6 deletions

View file

@ -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()

View file

@ -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<RemoteProctoringRoom, TreeItem> 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;
}
}