some small fixes in the polling workflow
This commit is contained in:
parent
1df0a4c4ba
commit
5697f7c30a
@ -42,7 +42,7 @@ package org.bigbluebutton.modules.polling.managers
|
||||
import org.bigbluebutton.modules.polling.views.PollCreateWindow;
|
||||
import org.bigbluebutton.modules.polling.views.PollMainWindow;
|
||||
import org.bigbluebutton.modules.polling.views.TakePollWindow;
|
||||
import org.bigbluebutton.modules.polling.views.UpdatePollWindow;
|
||||
import org.bigbluebutton.modules.polling.views.UpdatePollWindow;
|
||||
|
||||
public class PollingWindowManager {
|
||||
private static const LOG:String = "Poll::PollingWindowManager - ";
|
||||
|
@ -95,5 +95,14 @@ package org.bigbluebutton.modules.polling.model
|
||||
if (p.id == pollID) p.userResponded();
|
||||
}
|
||||
}
|
||||
|
||||
public function hasUserResponded(pollID:String):Boolean {
|
||||
for (var i:int = 0; i < _polls.length; i++) {
|
||||
var p:Poll = _polls.getItemAt(i) as Poll;
|
||||
if (p.id == pollID) return p.hasResponded();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -16,8 +16,8 @@ package org.bigbluebutton.modules.polling.model
|
||||
_model = model;
|
||||
}
|
||||
|
||||
public function hasUserResponded(pollID:String):void {
|
||||
return _model.userHasResponded(pollID);
|
||||
public function hasUserResponded(pollID:String):Boolean {
|
||||
return _model.hasUserResponded(pollID);
|
||||
}
|
||||
|
||||
public function getPoll(pollID:String):PollVO {
|
||||
|
@ -7,6 +7,7 @@
|
||||
import org.bigbluebutton.modules.polling.events.TakePollWindowEvent;
|
||||
import org.bigbluebutton.modules.polling.events.PollEvent;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
import org.bigbluebutton.modules.polling.events.PollMainWindowEvent;
|
||||
|
||||
private static const LOG:String = "CreatedPollsRenderer - ";
|
||||
|
||||
@ -15,7 +16,10 @@
|
||||
private function startPoll():void {
|
||||
trace(LOG + "::startPoll() " + data.id);
|
||||
var event:PollEvent = new PollEvent(PollEvent.START_POLL, data.id);
|
||||
globalDispatch.dispatchEvent(event);
|
||||
globalDispatch.dispatchEvent(event);
|
||||
|
||||
//Close main window because we are just going to focus on the polling
|
||||
globalDispatch.dispatchEvent(new PollMainWindowEvent(PollMainWindowEvent.CLOSE_WINDOW));
|
||||
}
|
||||
|
||||
private function deletePoll():void {
|
||||
|
@ -12,6 +12,7 @@
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.modules.polling.events.PollEvent;
|
||||
import org.bigbluebutton.modules.polling.model.PollingViewModel;
|
||||
import org.bigbluebutton.modules.polling.events.PollResultWindowEvent;
|
||||
|
||||
[Bindable] public var viewModel:PollingViewModel;
|
||||
[Bindable] public var pollID:String;
|
||||
@ -33,8 +34,13 @@
|
||||
}
|
||||
|
||||
private function stop():void {
|
||||
btnStop.visible = false;
|
||||
dispatchEvent(new PollEvent(PollEvent.STOP_POLL, pollID));
|
||||
}
|
||||
|
||||
private function close():void {
|
||||
dispatchEvent(new PollResultWindowEvent());
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
@ -48,9 +54,11 @@
|
||||
<mx:Spacer height="5"/>
|
||||
<mx:HBox height="5%" width="100%" horizontalAlign="right">
|
||||
<mx:Spacer width="5"/>
|
||||
<mx:Label text="Time remaining:" fontSize="12" styleName="micSettingsWindowTitleStyle"/>
|
||||
<mx:Label text="Time remaining:" fontSize="12" styleName="micSettingsWindowTitleStyle" visible="false" />
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button label="Stop" visible="{_showStopButton}" click="stop()"/>
|
||||
<mx:Button id="btnStop" label="Stop Polling" visible="{_showStopButton}" click="stop()"/>
|
||||
<mx:Spacer width="5"/>
|
||||
<mx:Button id="btnClose" label="Close" click="close()"/>
|
||||
<mx:Spacer width="5"/>
|
||||
</mx:HBox>
|
||||
</mx:VBox>
|
||||
|
Loading…
Reference in New Issue
Block a user