- implement stop poll
This commit is contained in:
parent
ef7c97d848
commit
dc181437ae
@ -117,7 +117,12 @@ package org.bigbluebutton.modules.polling.managers
|
||||
}
|
||||
|
||||
public function handlePollStoppedEvent(event:PollEvent):void {
|
||||
|
||||
if (! UsersUtil.amIModerator() && ! UsersUtil.amIPresenter()) {
|
||||
if (! _viewModel.hasUserResponded(event.pollID)) {
|
||||
closeWindow(takePollWindow);
|
||||
openPollResultsWindow(event.pollID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function handleUserRespondedEvent(event:PollEvent):void {
|
||||
|
@ -16,6 +16,10 @@ package org.bigbluebutton.modules.polling.model
|
||||
_model = model;
|
||||
}
|
||||
|
||||
public function hasUserResponded(pollID:String):void {
|
||||
return _model.userHasResponded(pollID);
|
||||
}
|
||||
|
||||
public function getPoll(pollID:String):PollVO {
|
||||
var poll:Poll = _model.getPoll(pollID);
|
||||
if (poll != null) {
|
||||
|
@ -7,14 +7,21 @@
|
||||
creationComplete="onCreationComplete()">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.events.ItemClickEvent;
|
||||
import mx.events.ItemClickEvent;
|
||||
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.modules.polling.events.PollEvent;
|
||||
import org.bigbluebutton.modules.polling.model.PollingViewModel;
|
||||
|
||||
[Bindable] public var viewModel:PollingViewModel;
|
||||
[Bindable] public var pollID:String;
|
||||
[Bindable] private var _showStopButton:Boolean = false;
|
||||
|
||||
private function onCreationComplete():void{
|
||||
setCurrentState("PieChart");
|
||||
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) {
|
||||
_showStopButton = true;
|
||||
}
|
||||
}
|
||||
|
||||
private function switchChart(event:ItemClickEvent):void {
|
||||
@ -25,6 +32,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
private function stop():void {
|
||||
dispatchEvent(new PollEvent(PollEvent.STOP_POLL, pollID));
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
@ -39,7 +50,7 @@
|
||||
<mx:Spacer width="5"/>
|
||||
<mx:Label text="Time remaining:" fontSize="12" styleName="micSettingsWindowTitleStyle"/>
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button label="Stop"/>
|
||||
<mx:Button label="Stop" visible="{_showStopButton}" click="stop()"/>
|
||||
<mx:Spacer width="5"/>
|
||||
</mx:HBox>
|
||||
</mx:VBox>
|
||||
|
Loading…
Reference in New Issue
Block a user