Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Jul 4, 2024
1 parent fb8df62 commit 9ad13ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private void updateScreenProctoringAction(
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(
Expand All @@ -224,7 +224,7 @@ private void updateScreenProctoringAction(
group.size)
.noEventPropagation()
.create(),
_treeItem -> proctoringGUIService.registerScreeProcotringGroupAction(group, _treeItem));
_treeItem -> proctoringGUIService.registerScreeProctoringGroupAction(group, _treeItem));
}
}

Expand Down Expand Up @@ -355,7 +355,7 @@ private PageAction openScreenProctoringTab(

// 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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ public ProctoringGUIService(final RestService restService) {
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);
}

Expand Down Expand Up @@ -119,7 +119,7 @@ public boolean isCollectingRoomEnabled(final String roomName) {
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;
}
}
Expand Down

0 comments on commit 9ad13ff

Please sign in to comment.