Updating poll id and setting polling whiteboard id according to the poll Id
This commit is contained in:
parent
66deee9fb2
commit
4d13d7e20f
@ -25,7 +25,7 @@ class BigBlueButtonInGW(val system: ActorSystem, recorderApp: RecorderApplicatio
|
||||
def handleBigBlueButtonMessage(message: IBigBlueButtonMessage) {
|
||||
message match {
|
||||
case msg: StartCustomPollRequestMessage => {
|
||||
bbbActor ! new StartCustomPollRequest(msg.payload.meetingId, msg.payload.requesterId, msg.payload.pollType, msg.payload.answers)
|
||||
bbbActor ! new StartCustomPollRequest(msg.payload.meetingId, msg.payload.requesterId, msg.payload.pollId, msg.payload.pollType, msg.payload.answers)
|
||||
}
|
||||
case msg: PubSubPingMessage => {
|
||||
bbbActor ! new PubSubPing(msg.payload.system, msg.payload.timestamp)
|
||||
@ -491,7 +491,7 @@ class BigBlueButtonInGW(val system: ActorSystem, recorderApp: RecorderApplicatio
|
||||
}
|
||||
|
||||
def startPoll(meetingId: String, requesterId: String, pollId: String, pollType: String) {
|
||||
bbbActor ! new StartPollRequest(meetingId, requesterId, pollType)
|
||||
bbbActor ! new StartPollRequest(meetingId, requesterId, pollId, pollType)
|
||||
}
|
||||
|
||||
def stopPoll(meetingId: String, userId: String, pollId: String) {
|
||||
|
@ -89,8 +89,8 @@ case class PresentationConversionCompleted(meetingID: String, messageKey: String
|
||||
|
||||
// Polling
|
||||
//case class CreatePollRequest(meetingID: String, requesterId: String, pollId: String, pollType: String) extends InMessage
|
||||
case class StartCustomPollRequest(meetingID: String, requesterId: String, pollType: String, answers: Seq[String]) extends InMessage
|
||||
case class StartPollRequest(meetingID: String, requesterId: String, pollType: String) extends InMessage
|
||||
case class StartCustomPollRequest(meetingID: String, requesterId: String, pollId: String, pollType: String, answers: Seq[String]) extends InMessage
|
||||
case class StartPollRequest(meetingID: String, requesterId: String, pollId: String, pollType: String) extends InMessage
|
||||
case class StopPollRequest(meetingID: String, requesterId: String) extends InMessage
|
||||
case class ShowPollResultRequest(meetingID: String, requesterId: String, pollId: String) extends InMessage
|
||||
case class HidePollResultRequest(meetingID: String, requesterId: String, pollId: String) extends InMessage
|
||||
|
@ -102,10 +102,12 @@ trait PollApp {
|
||||
case Some(poll) => {
|
||||
pollModel.showPollResult(poll.id)
|
||||
val shape = pollResultToWhiteboardShape(poll, msg)
|
||||
log.debug("handleShowPollResultRequest for pollId=[" + poll.id + "]")
|
||||
|
||||
for {
|
||||
page <- presModel.getCurrentPage()
|
||||
annotation = new AnnotationVO(poll.id, WhiteboardKeyUtil.DRAW_END_STATUS, WhiteboardKeyUtil.POLL_RESULT_TYPE, shape, page.id)
|
||||
pageId = if (poll.id.contains("deskshare")) "deskshare" else page.id
|
||||
annotation = new AnnotationVO(poll.id, WhiteboardKeyUtil.DRAW_END_STATUS, WhiteboardKeyUtil.POLL_RESULT_TYPE, shape, pageId)
|
||||
} this.context.self ! new SendWhiteboardAnnotationRequest(mProps.meetingID, msg.requesterId, annotation)
|
||||
|
||||
outGW.send(new PollShowResultMessage(mProps.meetingID, mProps.recorded, msg.requesterId, msg.pollId, poll))
|
||||
@ -140,7 +142,10 @@ trait PollApp {
|
||||
log.debug("Received StartCustomPollRequest for pollType=[" + msg.pollType + "]")
|
||||
|
||||
presModel.getCurrentPage() foreach { page =>
|
||||
val pollId = page.id + "/" + System.currentTimeMillis()
|
||||
val pageId = if (msg.pollId.contains("deskshare")) "deskshare" else page.id;
|
||||
|
||||
val pollId = pageId + "/" + System.currentTimeMillis()
|
||||
log.debug("handleStartCustomPollRequest: new pollId = " + pollId);
|
||||
|
||||
val numRespondents = usersModel.numUsers() - 1 // subtract the presenter
|
||||
PollFactory.createPoll(pollId, msg.pollType, numRespondents, Some(msg.answers)) foreach (poll => pollModel.addPoll(poll))
|
||||
@ -159,10 +164,13 @@ trait PollApp {
|
||||
}
|
||||
|
||||
def handleStartPollRequest(msg: StartPollRequest) {
|
||||
log.debug("Received StartPollRequest for pollType=[" + msg.pollType + "]")
|
||||
log.debug("Received StartPollRequest for pollType=[" + msg.pollType + "] (pollId = " + msg.pollId + ")")
|
||||
|
||||
presModel.getCurrentPage() foreach { page =>
|
||||
val pollId = page.id + "/" + System.currentTimeMillis()
|
||||
val pageId = if (msg.pollId.contains("deskshare")) "deskshare" else page.id;
|
||||
|
||||
val pollId = pageId + "/" + System.currentTimeMillis()
|
||||
log.debug("handleStartPollRequest: new pollId = " + pollId);
|
||||
|
||||
val numRespondents = usersModel.numUsers() - 1 // subtract the presenter
|
||||
PollFactory.createPoll(pollId, msg.pollType, numRespondents, None) foreach (poll => pollModel.addPoll(poll))
|
||||
|
@ -57,7 +57,13 @@ package org.bigbluebutton.modules.polling.service
|
||||
var curPres:Presentation = PresentationModel.getInstance().getCurrentPresentation();
|
||||
if (curPres != null) {
|
||||
var date:Date = new Date();
|
||||
var pollId: String = curPres.id + "/" + curPres.getCurrentPage().num + "/" + date.time;
|
||||
|
||||
var pollId:String;
|
||||
if(PresentationModel.getInstance().getCurrentPresentation().sharingDesktop)
|
||||
pollId = "deskshare/1/" + date.time;
|
||||
else
|
||||
pollId = curPres.id + "/" + curPres.getCurrentPage().num + "/" + date.time;
|
||||
|
||||
return pollId;
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,8 @@ package org.bigbluebutton.modules.present.model
|
||||
|
||||
private var _current:Boolean = false;
|
||||
private var _downloadable:Boolean = false;
|
||||
|
||||
private var _sharingDesktop:Boolean = false;
|
||||
|
||||
public function Presentation(id: String, name: String, current: Boolean, pages: ArrayCollection, downloadable: Boolean) {
|
||||
_id = id;
|
||||
@ -75,5 +77,14 @@ package org.bigbluebutton.modules.present.model
|
||||
public function get downloadable():Boolean {
|
||||
return _downloadable;
|
||||
}
|
||||
|
||||
|
||||
public function get sharingDesktop():Boolean {
|
||||
return _sharingDesktop;
|
||||
}
|
||||
|
||||
public function set sharingDesktop(val:Boolean):void {
|
||||
_sharingDesktop = val;
|
||||
}
|
||||
}
|
||||
}
|
@ -1032,6 +1032,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
presenterTabs.getTabAt(DESKSHARE_VIEW_TAB_INDEX).includeInLayout = false;
|
||||
dispatchEvent(new ShareEvent(ShareEvent.STOP_SHARING));
|
||||
sharing = false;
|
||||
PresentationModel.getInstance().getCurrentPresentation().sharingDesktop = false;
|
||||
}
|
||||
|
||||
private function createDesktopPublishTab(e:ShareEvent):void {
|
||||
@ -1072,6 +1073,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if (UsersUtil.amIPresenter()) {
|
||||
sharing = true;
|
||||
PresentationModel.getInstance().getCurrentPresentation().sharingDesktop = true;
|
||||
presenterTabs.getTabAt(DESKSHARE_PUBLISH_TAB_INDEX).visible = false;
|
||||
presenterTabs.getTabAt(DESKSHARE_PUBLISH_TAB_INDEX).includeInLayout = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user