work on maintaining correct state (current presentation in pod)
This commit is contained in:
parent
1efe354031
commit
d38a05105c
@ -60,8 +60,13 @@ object PresentationPodsApp {
|
|||||||
PresentationVO(pres.id, pres.name, pres.current, pres.pages.values.toVector, pres.downloadable)
|
PresentationVO(pres.id, pres.name, pres.current, pres.pages.values.toVector, pres.downloadable)
|
||||||
}
|
}
|
||||||
|
|
||||||
def setCurrentPresentationInPod(pod: PresentationPod, nextCurrentPresId: String): Option[PresentationPod] = {
|
def setCurrentPresentationInPod(state: MeetingState2x, podId: String, nextCurrentPresId: String): Option[PresentationPod] = {
|
||||||
pod.setCurrentPresentation(nextCurrentPresId)
|
for {
|
||||||
|
pod <- getPresentationPod(state, podId)
|
||||||
|
updatedPod <- pod.setCurrentPresentation(nextCurrentPresId)
|
||||||
|
} yield {
|
||||||
|
updatedPod
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add ownerId to default presentation pod -- in some cases we add it before first user is available
|
// add ownerId to default presentation pod -- in some cases we add it before first user is available
|
||||||
|
@ -28,20 +28,20 @@ trait SetCurrentPresentationPubMsgHdlr {
|
|||||||
val presId = msg.body.presentationId
|
val presId = msg.body.presentationId
|
||||||
|
|
||||||
val newState = for {
|
val newState = for {
|
||||||
pod <- PresentationPodsApp.getPresentationPod(state, podId)
|
updatedPod <- PresentationPodsApp.setCurrentPresentationInPod(state, podId, presId)
|
||||||
// presentation <- setCurrentPresentation(liveMeeting, pod.id, presId)
|
|
||||||
} yield {
|
} yield {
|
||||||
|
|
||||||
// unset old current
|
|
||||||
PresentationPodsApp.getPresentationPod(state, podId)
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
// set new current
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
broadcastSetCurrentPresentationEvent(podId, msg.header.userId, presId)
|
broadcastSetCurrentPresentationEvent(podId, msg.header.userId, presId)
|
||||||
|
|
||||||
|
log.warning("_____ SetCurrentPresentationPubMsgHdlr _____________________~~~~~_________" + state.presentationPodManager.printPods())
|
||||||
|
val pods = state.presentationPodManager.addPod(updatedPod)
|
||||||
|
log.warning("_____ SetCurrentPresentationPubMsgHdlr _____________________~~~~~_________" + pods.printPods())
|
||||||
|
state.update(pods)
|
||||||
|
}
|
||||||
|
|
||||||
|
newState match {
|
||||||
|
case Some(ns) => ns
|
||||||
|
case None => state
|
||||||
}
|
}
|
||||||
state
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,16 +40,8 @@ case class PresentationInPod(id: String, name: String, current: Boolean = false,
|
|||||||
case class PresentationPod(id: String, ownerId: String, currentPresenter: String,
|
case class PresentationPod(id: String, ownerId: String, currentPresenter: String,
|
||||||
presentations: collection.immutable.Map[String, PresentationInPod]) {
|
presentations: collection.immutable.Map[String, PresentationInPod]) {
|
||||||
def addPresentation(presentation: PresentationInPod): PresentationPod = {
|
def addPresentation(presentation: PresentationInPod): PresentationPod = {
|
||||||
println(s" 1 PresentationPods::addPresentation ${presentation.id} ")
|
println(s" 1 PresentationPods::addPresentation ${presentation.id} presName=${presentation.name} current=${presentation.current} ")
|
||||||
copy(presentations = presentations + (presentation.id -> presentation))
|
copy(presentations = presentations + (presentation.id -> presentation))
|
||||||
// for {
|
|
||||||
// nextPresentation <- setCurrentPresentation(presentation.id)
|
|
||||||
// } yield {
|
|
||||||
// println(s" 2 PresentationPods::addPresentation ${nextPresentation.id} ")
|
|
||||||
// copy(presentations = presentations + (nextPresentation.id -> nextPresentation))
|
|
||||||
// }
|
|
||||||
// //Some(copy(presentations = presentations + (presentation.id -> presentation)))
|
|
||||||
// // setCurrentPresentation(presentation.id)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def removePresentation(id: String): PresentationPod = copy(presentations = presentations - id)
|
def removePresentation(id: String): PresentationPod = copy(presentations = presentations - id)
|
||||||
@ -61,22 +53,27 @@ case class PresentationPod(id: String, ownerId: String, currentPresenter: String
|
|||||||
def getPresentation(presentationId: String): Option[PresentationInPod] =
|
def getPresentation(presentationId: String): Option[PresentationInPod] =
|
||||||
presentations.values find (p => p.id == presentationId)
|
presentations.values find (p => p.id == presentationId)
|
||||||
|
|
||||||
def setCurrentPresentation(presId: String): Option[PresentationPod] = { // copy(currentPresenter = userId) // ****
|
def setCurrentPresentation(presId: String): Option[PresentationPod] = {
|
||||||
|
var tempPod: PresentationPod = this
|
||||||
presentations.values foreach (curPres => { // unset previous current presentation
|
presentations.values foreach (curPres => { // unset previous current presentation
|
||||||
if (curPres.id != presId) {
|
if (curPres.id != presId) {
|
||||||
val newPres = curPres.copy(current = false)
|
val newPres = curPres.copy(current = false)
|
||||||
addPresentation(newPres)
|
println(s" ____PresentationPod::setCurrentPresentation presId=${newPres.id} presName=${newPres.name}" +
|
||||||
|
s" current=${newPres.current}")
|
||||||
|
tempPod = tempPod.addPresentation(newPres)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
presentations.get(presId) match { // set new current presentation
|
presentations.get(presId) match { // set new current presentation
|
||||||
case Some(pres) =>
|
case Some(pres) =>
|
||||||
val cp = pres.copy(current = true)
|
val cp = pres.copy(current = true)
|
||||||
Some(addPresentation(cp))
|
// println(s" ____PresentationPod::setCurrentPresentation presId=${newPres.id} presName=${newPres.name} " +
|
||||||
// Some(cp)
|
// s" current=${newPres.current}")
|
||||||
|
tempPod = tempPod.addPresentation(cp)
|
||||||
case None => None
|
case None => None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some(tempPod)
|
||||||
}
|
}
|
||||||
|
|
||||||
def setCurrentPage(presentationId: String, pageId: String): Option[PresentationPod] = {
|
def setCurrentPage(presentationId: String, pageId: String): Option[PresentationPod] = {
|
||||||
@ -106,7 +103,7 @@ case class PresentationPod(id: String, ownerId: String, currentPresenter: String
|
|||||||
def printPod(): String = {
|
def printPod(): String = {
|
||||||
val b = s"printPod (${presentations.values.size}):"
|
val b = s"printPod (${presentations.values.size}):"
|
||||||
var d = ""
|
var d = ""
|
||||||
presentations.values.foreach(p => d += s"PRES_ID=${p.id} NAME=${p.name} CURRENT=${p.current}\n")
|
presentations.values.foreach(p => d += s"\nPRES_ID=${p.id} NAME=${p.name} CURRENT=${p.current}\n")
|
||||||
b.concat(s"PODID=$id OWNERID=$ownerId CURRENTPRESENTER=$currentPresenter PRESENTATIONS={{{$d}}}\n")
|
b.concat(s"PODID=$id OWNERID=$ownerId CURRENTPRESENTER=$currentPresenter PRESENTATIONS={{{$d}}}\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,9 +127,6 @@ case class PresentationPodManager(presentationPods: collection.immutable.Map[Str
|
|||||||
println(s"\n\n------- addPresentationToPod ${pres.name} + ${pres.current} before\n")
|
println(s"\n\n------- addPresentationToPod ${pres.name} + ${pres.current} before\n")
|
||||||
val updatedManager = for {
|
val updatedManager = for {
|
||||||
pod <- getPod(podId)
|
pod <- getPod(podId)
|
||||||
// updatedPod <- pod.addPresentation(pres)
|
|
||||||
// currentPresPod <- pod.setCurrentPresentation(updatedPod.id)
|
|
||||||
//podWithAddedPresentation <- pod.addPresentation(pres)
|
|
||||||
} yield {
|
} yield {
|
||||||
println(s"\n\n------- addPresentationToPod ${pres.name} + ${pres.current} after\n")
|
println(s"\n\n------- addPresentationToPod ${pres.name} + ${pres.current} after\n")
|
||||||
updatePresentationPod(pod.addPresentation(pres))
|
updatePresentationPod(pod.addPresentation(pres))
|
||||||
|
56
bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as
Normal file → Executable file
56
bigbluebutton-client/src/org/bigbluebutton/modules/present/managers/PresentManager.as
Normal file → Executable file
@ -19,10 +19,10 @@
|
|||||||
package org.bigbluebutton.modules.present.managers
|
package org.bigbluebutton.modules.present.managers
|
||||||
{
|
{
|
||||||
import com.asfusion.mate.events.Dispatcher;
|
import com.asfusion.mate.events.Dispatcher;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.geom.Point;
|
import flash.geom.Point;
|
||||||
|
|
||||||
import mx.core.FlexGlobals;
|
import mx.core.FlexGlobals;
|
||||||
import mx.collections.ArrayCollection;
|
import mx.collections.ArrayCollection;
|
||||||
|
|
||||||
@ -32,12 +32,10 @@ package org.bigbluebutton.modules.present.managers
|
|||||||
import org.bigbluebutton.common.events.CloseWindowEvent;
|
import org.bigbluebutton.common.events.CloseWindowEvent;
|
||||||
import org.bigbluebutton.core.Options;
|
import org.bigbluebutton.core.Options;
|
||||||
import org.bigbluebutton.core.PopUpUtil;
|
import org.bigbluebutton.core.PopUpUtil;
|
||||||
import org.bigbluebutton.core.UsersUtil;
|
|
||||||
import org.bigbluebutton.modules.present.events.ExportEvent;
|
import org.bigbluebutton.modules.present.events.ExportEvent;
|
||||||
import org.bigbluebutton.modules.present.events.PresentModuleEvent;
|
import org.bigbluebutton.modules.present.events.PresentModuleEvent;
|
||||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||||
import org.bigbluebutton.modules.present.events.NewPresentationPodCreated;
|
import org.bigbluebutton.modules.present.events.NewPresentationPodCreated;
|
||||||
import org.bigbluebutton.modules.present.events.RequestNewPresentationPodEvent;
|
|
||||||
import org.bigbluebutton.modules.present.events.PresentationPodRemoved;
|
import org.bigbluebutton.modules.present.events.PresentationPodRemoved;
|
||||||
import org.bigbluebutton.modules.present.events.RequestAllPodsEvent;
|
import org.bigbluebutton.modules.present.events.RequestAllPodsEvent;
|
||||||
import org.bigbluebutton.modules.present.events.GetAllPodsRespEvent;
|
import org.bigbluebutton.modules.present.events.GetAllPodsRespEvent;
|
||||||
@ -48,19 +46,17 @@ package org.bigbluebutton.modules.present.managers
|
|||||||
import org.bigbluebutton.modules.present.ui.views.FileUploadWindow;
|
import org.bigbluebutton.modules.present.ui.views.FileUploadWindow;
|
||||||
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
|
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
|
||||||
|
|
||||||
|
|
||||||
public class PresentManager
|
public class PresentManager
|
||||||
{
|
{
|
||||||
private var globalDispatcher:Dispatcher;
|
private var globalDispatcher:Dispatcher;
|
||||||
private var windows: Array = [];
|
private var windows: Array = [];
|
||||||
private var podsManager: PresentationPodManager;
|
private var podsManager: PresentationPodManager;
|
||||||
|
|
||||||
|
|
||||||
public function PresentManager() {
|
public function PresentManager() {
|
||||||
globalDispatcher = new Dispatcher();
|
globalDispatcher = new Dispatcher();
|
||||||
podsManager = PresentationPodManager.getInstance();
|
podsManager = PresentationPodManager.getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleStartModuleEvent(e:PresentModuleEvent):void{
|
public function handleStartModuleEvent(e:PresentModuleEvent):void{
|
||||||
if (windows.length >= 1) {
|
if (windows.length >= 1) {
|
||||||
return;
|
return;
|
||||||
@ -74,30 +70,37 @@ package org.bigbluebutton.modules.present.managers
|
|||||||
var podId: String = e.podId;
|
var podId: String = e.podId;
|
||||||
var ownerId: String = e.ownerId;
|
var ownerId: String = e.ownerId;
|
||||||
|
|
||||||
if(!windows.hasOwnProperty(podId)) {
|
if(windows.hasOwnProperty(podId)) {
|
||||||
var newWindow:PresentationWindow = new PresentationWindow();
|
// remove pod and replace with the updated version
|
||||||
newWindow.onPodCreated(podId, ownerId);
|
handlePresentationPodRemovedHelper(podId, ownerId);
|
||||||
|
|
||||||
var presentOptions:PresentOptions = Options.getOptions(PresentOptions) as PresentOptions;
|
|
||||||
newWindow.visible = true; // TODO
|
|
||||||
// newWindow.visible = presentOptions.showPresentWindow;
|
|
||||||
newWindow.showControls = presentOptions.showWindowControls;
|
|
||||||
|
|
||||||
windows[podId] = newWindow;
|
|
||||||
|
|
||||||
var openEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
|
||||||
openEvent.window = newWindow;
|
|
||||||
globalDispatcher.dispatchEvent(openEvent);
|
|
||||||
|
|
||||||
podsManager.handleAddPresentationPod(podId, ownerId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var newWindow:PresentationWindow = new PresentationWindow();
|
||||||
|
newWindow.onPodCreated(podId, ownerId);
|
||||||
|
|
||||||
|
var presentOptions:PresentOptions = Options.getOptions(PresentOptions) as PresentOptions;
|
||||||
|
newWindow.visible = true; // TODO
|
||||||
|
// newWindow.visible = presentOptions.showPresentWindow;
|
||||||
|
newWindow.showControls = presentOptions.showWindowControls;
|
||||||
|
|
||||||
|
windows[podId] = newWindow;
|
||||||
|
|
||||||
|
var openEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||||
|
openEvent.window = newWindow;
|
||||||
|
globalDispatcher.dispatchEvent(openEvent);
|
||||||
|
|
||||||
|
podsManager.handleAddPresentationPod(podId, ownerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handlePresentationPodRemoved(e: PresentationPodRemoved): void {
|
public function handlePresentationPodRemoved(e: PresentationPodRemoved): void {
|
||||||
var podId: String = e.podId;
|
var podId: String = e.podId;
|
||||||
var ownerId: String = e.ownerId;
|
var ownerId: String = e.ownerId;
|
||||||
|
|
||||||
podsManager.handlePresentationPodRemoved(podId, ownerId); // GOOD
|
handlePresentationPodRemovedHelper(podId, ownerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function handlePresentationPodRemovedHelper(podId: String, ownerId: String): void {
|
||||||
|
podsManager.handlePresentationPodRemoved(podId, ownerId);
|
||||||
|
|
||||||
var destroyWindow:PresentationWindow = windows[podId];
|
var destroyWindow:PresentationWindow = windows[podId];
|
||||||
if (destroyWindow != null) {
|
if (destroyWindow != null) {
|
||||||
@ -178,5 +181,8 @@ package org.bigbluebutton.modules.present.managers
|
|||||||
PopUpUtil.removePopUp(FileExportWindow);
|
PopUpUtil.removePopUp(FileExportWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function handleSetPresenterInPodRespEvent(event: SetPresenterInPodRespEvent): void {
|
||||||
|
//
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ package org.bigbluebutton.modules.present.model
|
|||||||
import org.as3commons.logging.api.ILogger;
|
import org.as3commons.logging.api.ILogger;
|
||||||
import org.as3commons.logging.api.getClassLogger;
|
import org.as3commons.logging.api.getClassLogger;
|
||||||
import org.bigbluebutton.modules.present.services.messages.PageChangeVO;
|
import org.bigbluebutton.modules.present.services.messages.PageChangeVO;
|
||||||
|
import org.bigbluebutton.main.api.JSLog;
|
||||||
|
|
||||||
public class PresentationModel
|
public class PresentationModel
|
||||||
{
|
{
|
||||||
@ -30,6 +31,24 @@ package org.bigbluebutton.modules.present.model
|
|||||||
_ownerId = ownerId;
|
_ownerId = ownerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function whichPageIsCurrent(presId: String): String {
|
||||||
|
var result: String = "[";
|
||||||
|
var pres:Presentation = getPresentation(presId);
|
||||||
|
if (pres == null) {
|
||||||
|
} else {
|
||||||
|
var curPage: Page = pres.getCurrentPage();
|
||||||
|
result = result + curPage.num;
|
||||||
|
}
|
||||||
|
return result + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function printPresentations(calledFrom: String): void {
|
||||||
|
for (var i:int = 0; i < _presentations.length; i++) {
|
||||||
|
var pres: Presentation = _presentations.getItemAt(i) as Presentation;
|
||||||
|
JSLog.warn("2001 " + calledFrom +" " + i + " " + pres.name + " " + pres.id + " " + pres.current.toString() + " " + whichPageIsCurrent(pres.id) , {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * Return the single instance of the PresentationModel class
|
// * Return the single instance of the PresentationModel class
|
||||||
// */
|
// */
|
||||||
@ -50,7 +69,9 @@ package org.bigbluebutton.modules.present.model
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function addPresentation(p: Presentation):void {
|
public function addPresentation(p: Presentation):void {
|
||||||
|
printPresentations("PresentationModel::addPresentation bef total=" + _presentations.length);
|
||||||
_presentations.addItem(p);
|
_presentations.addItem(p);
|
||||||
|
printPresentations("PresentationModel::addPresentation aft total=" + _presentations.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removePresentation(presId:String):Presentation {
|
public function removePresentation(presId:String):Presentation {
|
||||||
@ -205,5 +226,3 @@ package org.bigbluebutton.modules.present.model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SingletonEnforcer{}
|
|
@ -18,24 +18,25 @@ package org.bigbluebutton.modules.present.services
|
|||||||
import org.bigbluebutton.modules.present.services.messages.PageVO;
|
import org.bigbluebutton.modules.present.services.messages.PageVO;
|
||||||
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
|
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
|
||||||
import org.bigbluebutton.modules.present.services.messaging.MessageReceiver;
|
import org.bigbluebutton.modules.present.services.messaging.MessageReceiver;
|
||||||
import org.bigbluebutton.modules.present.services.messaging.MessageSender;
|
import org.bigbluebutton.main.api.JSLog;
|
||||||
|
|
||||||
public class PresentationService
|
public class PresentationService
|
||||||
{
|
{
|
||||||
private static const LOGGER:ILogger = getClassLogger(PresentationService);
|
private static const LOGGER:ILogger = getClassLogger(PresentationService);
|
||||||
private static const NUM_PRELOAD:uint = 3;
|
private static const NUM_PRELOAD:uint = 3;
|
||||||
private var podManager: PresentationPodManager;
|
private var podManager: PresentationPodManager;
|
||||||
private var sender:MessageSender;
|
|
||||||
private var receiver:MessageReceiver;
|
private var receiver:MessageReceiver;
|
||||||
private var dispatcher:Dispatcher;
|
private var dispatcher:Dispatcher;
|
||||||
|
|
||||||
public function PresentationService() {
|
public function PresentationService() {
|
||||||
podManager = PresentationPodManager.getInstance();
|
podManager = PresentationPodManager.getInstance();
|
||||||
|
podManager.setPresentationService(this);
|
||||||
receiver = new MessageReceiver(this);
|
receiver = new MessageReceiver(this);
|
||||||
dispatcher = new Dispatcher();
|
dispatcher = new Dispatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pageChanged(podId: String, pageId:String):void {
|
public function pageChanged(podId: String, pageId:String):void {
|
||||||
|
podManager.getPod(podId).printPresentations("PresentationService::pageChanged bef");
|
||||||
var np: Page = podManager.getPod(podId).getPage(pageId);
|
var np: Page = podManager.getPod(podId).getPage(pageId);
|
||||||
if (np != null) {
|
if (np != null) {
|
||||||
var oldPage: Page = podManager.getPod(podId).getCurrentPage();
|
var oldPage: Page = podManager.getPod(podId).getCurrentPage();
|
||||||
@ -44,7 +45,8 @@ package org.bigbluebutton.modules.present.services
|
|||||||
np.current = true;
|
np.current = true;
|
||||||
// trace(LOG + "Sending page changed event. page [" + np.id + "] oldpage current=[" + oldPage.current + "] newPage current=[" + np.current + "]");
|
// trace(LOG + "Sending page changed event. page [" + np.id + "] oldpage current=[" + oldPage.current + "] newPage current=[" + np.current + "]");
|
||||||
var changePageCommand: ChangePageCommand = new ChangePageCommand(podId, np.id, NUM_PRELOAD);
|
var changePageCommand: ChangePageCommand = new ChangePageCommand(podId, np.id, NUM_PRELOAD);
|
||||||
dispatcher.dispatchEvent(changePageCommand);
|
dispatcher.dispatchEvent(changePageCommand);
|
||||||
|
podManager.getPod(podId).printPresentations("PresentationService::pageChanged aft");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,11 +81,16 @@ package org.bigbluebutton.modules.present.services
|
|||||||
public function addPresentation(podId: String, pres:PresentationVO):void {
|
public function addPresentation(podId: String, pres:PresentationVO):void {
|
||||||
var presentation:Presentation = presentationVOToPresentation(pres);
|
var presentation:Presentation = presentationVOToPresentation(pres);
|
||||||
|
|
||||||
|
JSLog.warn("__ PresentationService::addPresentation: " + presentation.id, {});
|
||||||
|
|
||||||
podManager.getPod(podId).addPresentation(presentation);
|
podManager.getPod(podId).addPresentation(presentation);
|
||||||
LOGGER.debug("Added new presentation [{0}]", [presentation.id]);
|
LOGGER.debug("Added new presentation [{0}]", [presentation.id]);
|
||||||
|
|
||||||
if (presentation.current) {
|
if (presentation.current) {
|
||||||
LOGGER.debug("Making presentation [{0}] current [{1}]", [presentation.id, presentation.current]);
|
JSLog.warn("__ PresentationService::addPresentation: YES presentation was current. displaying "
|
||||||
|
+ presentation.name + " in " + podId, {});
|
||||||
|
LOGGER.debug("Making presentation [{0}] current [{1}]", [presentation.id, presentation.current]);
|
||||||
|
JSLog.debug("Making presentation " + presentation.id + " current " , presentation.current);
|
||||||
var event: PresentationChangedEvent = new PresentationChangedEvent(podId, pres.id);
|
var event: PresentationChangedEvent = new PresentationChangedEvent(podId, pres.id);
|
||||||
dispatcher.dispatchEvent(event);
|
dispatcher.dispatchEvent(event);
|
||||||
|
|
||||||
@ -93,9 +100,13 @@ package org.bigbluebutton.modules.present.services
|
|||||||
dispatcher.dispatchEvent(changePageCommand);
|
dispatcher.dispatchEvent(changePageCommand);
|
||||||
|
|
||||||
LOGGER.debug("Sending page moved event to position page [{0}] current=[{1}]", [curPage.id, curPage.current]);
|
LOGGER.debug("Sending page moved event to position page [{0}] current=[{1}]", [curPage.id, curPage.current]);
|
||||||
|
JSLog.debug("Sending page moved event to position page " + curPage.id + " current=", curPage.current);
|
||||||
var pageChangedEvent: PageChangedEvent = new PageChangedEvent(podId, curPage.id);
|
var pageChangedEvent: PageChangedEvent = new PageChangedEvent(podId, curPage.id);
|
||||||
dispatcher.dispatchEvent(pageChangedEvent);
|
dispatcher.dispatchEvent(pageChangedEvent);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
JSLog.warn("__ PresentationService::addPresentation: presentation was NOT current. not displaying "
|
||||||
|
+ presentation.name + " in " + podId, {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,17 +127,24 @@ package org.bigbluebutton.modules.present.services
|
|||||||
// We've switched presentations. Mark the old presentation as not current.
|
// We've switched presentations. Mark the old presentation as not current.
|
||||||
var curPres:Presentation = podManager.getPod(podId).getCurrentPresentation();
|
var curPres:Presentation = podManager.getPod(podId).getCurrentPresentation();
|
||||||
if (curPres != null) {
|
if (curPres != null) {
|
||||||
|
JSLog.debug("300005a " + curPres.name , curPres);
|
||||||
curPres.current = false;
|
curPres.current = false;
|
||||||
|
JSLog.debug("300005b " + curPres.name , curPres);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.debug("No previous active presentation.");
|
LOGGER.debug("No previous active presentation.");
|
||||||
|
JSLog.debug("No previous active presentation.", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
podManager.getPod(podId).printPresentations("PresentationService::changeCurrentPresentation bef");
|
||||||
var newPres:Presentation = podManager.getPod(podId).getPresentation(presentationId);
|
var newPres:Presentation = podManager.getPod(podId).getPresentation(presentationId);
|
||||||
if (newPres != null) {
|
if (newPres != null) {
|
||||||
LOGGER.debug("Making presentation [{0}] the active presentation.", [presentationId]);
|
LOGGER.debug("Making presentation [{0}] the active presentation.", [presentationId]);
|
||||||
|
JSLog.debug("Making presentation " + presentationId + " the active presentation.", {});
|
||||||
newPres.current = true;
|
newPres.current = true;
|
||||||
|
|
||||||
|
|
||||||
|
podManager.getPod(podId).printPresentations("PresentationService::changeCurrentPresentation aft");
|
||||||
|
|
||||||
var event: PresentationChangedEvent = new PresentationChangedEvent(podId, presentationId);
|
var event: PresentationChangedEvent = new PresentationChangedEvent(podId, presentationId);
|
||||||
dispatcher.dispatchEvent(event);
|
dispatcher.dispatchEvent(event);
|
||||||
|
|
||||||
@ -137,6 +155,7 @@ package org.bigbluebutton.modules.present.services
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOGGER.debug("Could not find presentation to make current. id="+presentationId);
|
LOGGER.debug("Could not find presentation to make current. id="+presentationId);
|
||||||
|
JSLog.debug("Could not find presentation to make current. id="+presentationId, {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +91,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
import org.bigbluebutton.core.Options;
|
import org.bigbluebutton.core.Options;
|
||||||
import org.bigbluebutton.core.PopUpUtil;
|
import org.bigbluebutton.core.PopUpUtil;
|
||||||
import org.bigbluebutton.core.UsersUtil;
|
import org.bigbluebutton.core.UsersUtil;
|
||||||
|
import org.bigbluebutton.main.api.JSLog;
|
||||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||||
|
import org.bigbluebutton.main.model.users.events.UserAddedToPresenterGroupEvent;
|
||||||
|
import org.bigbluebutton.main.model.users.events.UserRemovedFromPresenterGroupEvent;
|
||||||
import org.bigbluebutton.main.views.MainCanvas;
|
import org.bigbluebutton.main.views.MainCanvas;
|
||||||
import org.bigbluebutton.modules.polling.events.PollShowResultEvent;
|
import org.bigbluebutton.modules.polling.events.PollShowResultEvent;
|
||||||
import org.bigbluebutton.modules.polling.events.PollStartedEvent;
|
import org.bigbluebutton.modules.polling.events.PollStartedEvent;
|
||||||
@ -102,22 +105,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
import org.bigbluebutton.modules.polling.views.PollChoicesModal;
|
import org.bigbluebutton.modules.polling.views.PollChoicesModal;
|
||||||
import org.bigbluebutton.modules.polling.views.PollResultsModal;
|
import org.bigbluebutton.modules.polling.views.PollResultsModal;
|
||||||
import org.bigbluebutton.modules.present.commands.GoToNextPageCommand;
|
import org.bigbluebutton.modules.present.commands.GoToNextPageCommand;
|
||||||
import org.bigbluebutton.modules.present.commands.GoToPrevPageCommand;
|
|
||||||
import org.bigbluebutton.modules.present.commands.GoToPageLocalCommand;
|
|
||||||
import org.bigbluebutton.modules.present.commands.GoToPageCommand;
|
import org.bigbluebutton.modules.present.commands.GoToPageCommand;
|
||||||
|
import org.bigbluebutton.modules.present.commands.GoToPageLocalCommand;
|
||||||
|
import org.bigbluebutton.modules.present.commands.GoToPrevPageCommand;
|
||||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||||
import org.bigbluebutton.modules.present.events.DownloadEvent;
|
import org.bigbluebutton.modules.present.events.DownloadEvent;
|
||||||
import org.bigbluebutton.modules.present.events.ExportEvent;
|
import org.bigbluebutton.modules.present.events.ExportEvent;
|
||||||
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
||||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
|
||||||
import org.bigbluebutton.modules.present.events.RequestNewPresentationPodEvent;
|
|
||||||
import org.bigbluebutton.modules.present.events.RequestClosePresentationPodEvent;
|
import org.bigbluebutton.modules.present.events.RequestClosePresentationPodEvent;
|
||||||
import org.bigbluebutton.modules.present.events.SetPresenterInPodRespEvent;
|
import org.bigbluebutton.modules.present.events.RequestNewPresentationPodEvent;
|
||||||
import org.bigbluebutton.modules.present.events.SetPresenterInPodReqEvent;
|
import org.bigbluebutton.modules.present.events.SetPresenterInPodReqEvent;
|
||||||
import org.bigbluebutton.main.model.users.events.UserAddedToPresenterGroupEvent;
|
import org.bigbluebutton.modules.present.events.SetPresenterInPodRespEvent;
|
||||||
import org.bigbluebutton.main.model.users.events.UserRemovedFromPresenterGroupEvent;
|
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||||
import org.bigbluebutton.modules.present.model.Page;
|
import org.bigbluebutton.modules.present.model.Page;
|
||||||
import org.bigbluebutton.modules.present.model.PresentOptions;
|
import org.bigbluebutton.modules.present.model.PresentOptions;
|
||||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||||
@ -127,7 +128,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
import org.bigbluebutton.modules.whiteboard.views.WhiteboardTextToolbar;
|
import org.bigbluebutton.modules.whiteboard.views.WhiteboardTextToolbar;
|
||||||
import org.bigbluebutton.modules.whiteboard.views.WhiteboardToolbar;
|
import org.bigbluebutton.modules.whiteboard.views.WhiteboardToolbar;
|
||||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||||
import org.bigbluebutton.main.api.JSLog;
|
|
||||||
|
|
||||||
private static const LOGGER:ILogger = getClassLogger(PresentationWindow);
|
private static const LOGGER:ILogger = getClassLogger(PresentationWindow);
|
||||||
|
|
||||||
@ -238,7 +238,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function newPresentationWindowHandler(): void {
|
private function newPresentationWindowHandler(): void {
|
||||||
|
presentationPodControls.selectedIndex = 0;
|
||||||
var event:RequestNewPresentationPodEvent = new RequestNewPresentationPodEvent(RequestNewPresentationPodEvent.REQUEST_NEW_PRES_POD);
|
var event:RequestNewPresentationPodEvent = new RequestNewPresentationPodEvent(RequestNewPresentationPodEvent.REQUEST_NEW_PRES_POD);
|
||||||
|
|
||||||
event.requesterId = UsersUtil.getMyUserID();
|
event.requesterId = UsersUtil.getMyUserID();
|
||||||
localDispatcher.dispatchEvent(event);
|
localDispatcher.dispatchEvent(event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user