Merge pull request #689 from ritzalam/display-poll-result

Display poll result
This commit is contained in:
Richard Alam 2015-07-08 13:08:49 -04:00
commit 905233b26b
4 changed files with 18 additions and 4 deletions

View File

@ -30,7 +30,7 @@ public class MeetingMessageReceiver implements MessageHandler {
}
public void handleMessage(String pattern, String channel, String message) {
LOG.debug("Checking message: " + pattern + " " + channel + " " + message);
// LOG.debug("Checking message: " + pattern + " " + channel + " " + message);
if (channel.equalsIgnoreCase(MessagingConstants.TO_MEETING_CHANNEL)) {
// System.out.println("Meeting message: " + channel + " " + message);
IPublishedMessage msg = MessageFromJsonConverter.convert(message);

View File

@ -6,6 +6,7 @@ import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
import org.bigbluebutton.core.service.whiteboard.WhiteboardKeyUtil
import com.google.gson.Gson
import java.util.ArrayList
trait PollApp {
this: MeetingActor =>
@ -77,7 +78,12 @@ trait PollApp {
val gson = new Gson()
shape += "result" -> gson.toJson(answers.toArray)
val display = Array(0, 0, 200, 200)
val display = new ArrayList[Double]()
display.add(21.845575)
display.add(23.145401)
display.add(46.516006)
display.add(61.42433)
shape += "points" -> display
shape.toMap
}

View File

@ -54,7 +54,15 @@ class WhiteboardEventRedisRecorder(recorder: RecorderApplication) extends OutMes
event.setPageNumber(getPageNum(msg.whiteboardId))
event.setWhiteboardId(msg.whiteboardId)
event.addAnnotation(mapAsJavaMap(msg.shape.shape))
recorder.record(msg.meetingID, event)
} else if ((msg.shape.shapeType == WhiteboardKeyUtil.POLL_RESULT_TYPE)) {
val event = new AddShapeWhiteboardRecordEvent()
event.setMeetingId(msg.meetingID)
event.setTimestamp(TimestampGenerator.generateTimestamp)
event.setPresentation(getPresentationId(msg.whiteboardId))
event.setPageNumber(getPageNum(msg.whiteboardId))
event.setWhiteboardId(msg.whiteboardId);
event.addAnnotation(mapAsJavaMap(msg.shape.shape))
recorder.record(msg.meetingID, event)
} else {
val event = new AddShapeWhiteboardRecordEvent()

View File

@ -26,7 +26,7 @@ class RedisPublisher(val system: ActorSystem) extends SystemConfiguration {
// system.scheduler.schedule(2 seconds, 5 seconds)(redis.publish("bigbluebutton:to-bbb-apps:users", "pattern value"))
def publish(channel: String, data: String) {
println("PUBLISH TO [" + channel + "]: \n [" + data + "]")
// println("PUBLISH TO [" + channel + "]: \n [" + data + "]")
redis.publish(channel, data)
}