From b3c323bdc7178fb20950e5038b41cdfa4566aef2 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 16 Jun 2017 17:05:12 -0400 Subject: [PATCH] cleanup --- .../org/bigbluebutton/core/models/Polls.scala | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Polls.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Polls.scala index 916fe004f8..70025d3e9e 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Polls.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Polls.scala @@ -27,7 +27,7 @@ object Polls { for { page <- lm.presModel.getCurrentPage() pageId: String = if (pollId.contains("deskshare")) "deskshare" else page.id - stampedPollId: String = pageId + "/" + System.currentTimeMillis() // TODO - is the timestamp needed? + stampedPollId: String = pageId + "/" + System.currentTimeMillis() numRespondents: Int = Users.numUsers(lm.users) - 1 // subtract the presenter poll <- createPoll(stampedPollId, numRespondents) @@ -63,7 +63,6 @@ object Polls { } yield { // send(result, shape) showPollResult(pollId, lm.polls) - // outGW.send(new PollShowResultMessage(props.meetingProp.intId, props.recordProp.record, msg.requesterId, msg.pollId, result)) result } } @@ -73,7 +72,6 @@ object Polls { poll <- getPoll(pollId, lm.polls) } yield { hidePollResult(pollId, lm.polls) - // outGW.send(new PollHideResultMessage(props.meetingProp.intId, props.recordProp.record, requesterId, pollId)) pollId } } @@ -87,15 +85,12 @@ object Polls { poll match { case Some(p) => { if (p.started && p.stopped && p.showResult) { - // outGW.send(new GetCurrentPollReplyMessage(props.meetingProp.intId, props.recordProp.record, msg.requesterId, true, Some(p))) Some(p) } else { - // outGW.send(new GetCurrentPollReplyMessage(props.meetingProp.intId, props.recordProp.record, msg.requesterId, false, None)) None } } case None => { - // outGW.send(new GetCurrentPollReplyMessage(props.meetingProp.intId, props.recordProp.record, msg.requesterId, false, None)) None } } @@ -116,7 +111,6 @@ object Polls { def handleStartCustomPollReqMsg(requesterId: String, pollId: String, pollType: String, answers: Seq[String], lm: LiveMeeting): Option[SimplePollOutVO] = { - // log.debug("Received StartCustomPollRequest for pollType=[" + pollType + "]") def createPoll(pollId: String, numRespondents: Int): Option[Poll] = { for { @@ -137,7 +131,6 @@ object Polls { } yield { startPoll(poll.id, lm.polls) simplePoll - //outGW.send(new PollStartedMessage(props.meetingProp.intId, props.recordProp.record, requesterId, pollId, simplePoll)) } } @@ -166,9 +159,7 @@ object Polls { user <- Users.findWithId(requesterId, lm.users) responder = new Responder(user.id, user.name) updatedPoll <- storePollResult(responder) - // curPres <- Users.getCurrentPresenter(lm.users) } yield { - // outGW.send(new UserRespondedToPollMessage(props.meetingProp.intId, props.recordProp.record, curPres.id, pollId, updatedPoll)) updatedPoll } @@ -574,7 +565,7 @@ class Answer(val id: Int, val key: String, val text: Option[String]) { } def numResponders(): Int = { - responders.length; + responders.length } def getResponders(): Array[Responder] = { @@ -594,7 +585,6 @@ class Answer(val id: Int, val key: String, val text: Option[String]) { class Polls { private val polls = new HashMap[String, Poll]() - // private var polls: collection.immutable.HashMap[String, PollVO] = new collection.immutable.HashMap[String, PollVO] private var currentPoll: Option[Poll] = None private def save(poll: Poll): Poll = { @@ -612,8 +602,4 @@ class Polls { polls.get(id) } - // private def setCurrentPoll(poll: PollVO) = { - // currentPoll = poll - // } - }