SEBSERV-335 added room type attribute to join instruction
This commit is contained in:
parent
02196951e1
commit
8cf05d21f8
2 changed files with 30 additions and 4 deletions
|
@ -36,6 +36,18 @@ public final class ClientInstruction {
|
||||||
LEAVE
|
LEAVE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static enum ProctoringRoomType {
|
||||||
|
COLLECTING_ROOM("proctoring"),
|
||||||
|
TOWNHALL("townhall"),
|
||||||
|
BREAKOUT_ROOM("breakout");
|
||||||
|
|
||||||
|
public final String roomTypeName;
|
||||||
|
|
||||||
|
ProctoringRoomType(final String roomTypeName) {
|
||||||
|
this.roomTypeName = roomTypeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public interface SEB_INSTRUCTION_ATTRIBUTES {
|
public interface SEB_INSTRUCTION_ATTRIBUTES {
|
||||||
public interface SEB_PROCTORING {
|
public interface SEB_PROCTORING {
|
||||||
public static final String SERVICE_TYPE = "service-type";
|
public static final String SERVICE_TYPE = "service-type";
|
||||||
|
@ -60,6 +72,8 @@ public final class ClientInstruction {
|
||||||
public static final String ZOOM_RECEIVE_AUDIO = "zoomReceiveAudio";
|
public static final String ZOOM_RECEIVE_AUDIO = "zoomReceiveAudio";
|
||||||
public static final String ZOOM_RECEIVE_VIDEO = "zoomReceiveVideo";
|
public static final String ZOOM_RECEIVE_VIDEO = "zoomReceiveVideo";
|
||||||
public static final String ZOOM_ALLOW_CHAT = "zoomFeatureFlagChat";
|
public static final String ZOOM_ALLOW_CHAT = "zoomFeatureFlagChat";
|
||||||
|
|
||||||
|
public static final String PROCTORING_ROOM_TYPE = "roomType";
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface SEB_RECONFIGURE_SETTINGS {
|
public interface SEB_RECONFIGURE_SETTINGS {
|
||||||
|
|
|
@ -31,7 +31,9 @@ import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringRoomConnection;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringServiceSettings;
|
import ch.ethz.seb.sebserver.gbl.model.exam.ProctoringServiceSettings;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection;
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData;
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientInstruction;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientInstruction.InstructionType;
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientInstruction.InstructionType;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.model.session.ClientInstruction.ProctoringRoomType;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.RemoteProctoringRoom;
|
import ch.ethz.seb.sebserver.gbl.model.session.RemoteProctoringRoom;
|
||||||
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Result;
|
import ch.ethz.seb.sebserver.gbl.util.Result;
|
||||||
|
@ -669,7 +671,8 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
examId,
|
examId,
|
||||||
connectionToken,
|
connectionToken,
|
||||||
roomConnection,
|
roomConnection,
|
||||||
examProctoringService);
|
examProctoringService,
|
||||||
|
ProctoringRoomType.TOWNHALL);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log.error("Failed to send join for town-hall room assignment to connection: {}", cc);
|
log.error("Failed to send join for town-hall room assignment to connection: {}", cc);
|
||||||
this.clientConnectionDAO
|
this.clientConnectionDAO
|
||||||
|
@ -725,7 +728,8 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
proctoringSettings.examId,
|
proctoringSettings.examId,
|
||||||
connectionToken,
|
connectionToken,
|
||||||
proctoringConnection,
|
proctoringConnection,
|
||||||
examProctoringService);
|
examProctoringService,
|
||||||
|
ProctoringRoomType.BREAKOUT_ROOM);
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log.error("Failed to send join to break-out room: {} connection: {}",
|
log.error("Failed to send join to break-out room: {} connection: {}",
|
||||||
|
@ -790,7 +794,8 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
proctoringSettings.examId,
|
proctoringSettings.examId,
|
||||||
clientConnection.clientConnection.connectionToken,
|
clientConnection.clientConnection.connectionToken,
|
||||||
proctoringConnection,
|
proctoringConnection,
|
||||||
examProctoringService);
|
examProctoringService,
|
||||||
|
ProctoringRoomType.COLLECTING_ROOM);
|
||||||
|
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log.error("Failed to send proctoring room join instruction to client: {}", connectionToken, e);
|
log.error("Failed to send proctoring room join instruction to client: {}", connectionToken, e);
|
||||||
|
@ -802,7 +807,8 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
final Long examId,
|
final Long examId,
|
||||||
final String connectionToken,
|
final String connectionToken,
|
||||||
final ProctoringRoomConnection proctoringConnection,
|
final ProctoringRoomConnection proctoringConnection,
|
||||||
final ExamProctoringService examProctoringService) {
|
final ExamProctoringService examProctoringService,
|
||||||
|
final ProctoringRoomType roomType) {
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Register proctoring join instruction for connection: {}, room: {}",
|
log.debug("Register proctoring join instruction for connection: {}, room: {}",
|
||||||
|
@ -813,6 +819,12 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService
|
||||||
final Map<String, String> attributes = examProctoringService
|
final Map<String, String> attributes = examProctoringService
|
||||||
.createJoinInstructionAttributes(proctoringConnection);
|
.createJoinInstructionAttributes(proctoringConnection);
|
||||||
|
|
||||||
|
if (roomType != null) {
|
||||||
|
attributes.put(
|
||||||
|
ClientInstruction.SEB_INSTRUCTION_ATTRIBUTES.SEB_PROCTORING.PROCTORING_ROOM_TYPE,
|
||||||
|
roomType.roomTypeName);
|
||||||
|
}
|
||||||
|
|
||||||
this.sebInstructionService
|
this.sebInstructionService
|
||||||
.registerInstruction(
|
.registerInstruction(
|
||||||
examId,
|
examId,
|
||||||
|
|
Loading…
Reference in a new issue