Skip to content
Snippets Groups Projects
Commit 22d37add authored by Christoph Thelen's avatar Christoph Thelen
Browse files

Send average feedback data to clients when they join a session

parent a8b61a7d
No related merge requests found
......@@ -265,6 +265,13 @@ public class ARSnovaSocketIOServer {
client.sendEvent("activeUserCountData", sessionService.activeUsers(sessionKey));
final de.thm.arsnova.entities.Feedback fb = feedbackService.getFeedback(sessionKey);
client.sendEvent("feedbackData", fb.getValues());
try {
final long averageFeedback = feedbackService.getAverageFeedbackRounded(sessionKey);
client.sendEvent("feedbackDataRoundedAverage", averageFeedback);
} catch (final NoContentException e) {
final Object object = null; // can't directly use "null".
client.sendEvent("feedbackDataRoundedAverage", object);
}
}
public void reportUpdatedFeedbackForSession(final de.thm.arsnova.entities.Session session) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment