Commit 23c9dc95 authored by Andreas Gärtner's avatar Andreas Gärtner
Browse files

Updated Statistics controller for questionDetailsPanel. Task #15584

parent ba75505d
......@@ -39,7 +39,9 @@ Ext.define("ARSnova.controller.Statistics", {
prepareSpeakerStatistics: function(panel) {
var target;
var activePanel = panel.getActiveItem();
var features = Ext.decode(sessionStorage.getItem("features"));
var questionObj = panel.getActiveItem().questionObj;
var animation = {
type: 'slide',
......@@ -52,13 +54,24 @@ Ext.define("ARSnova.controller.Statistics", {
}
};
panel.showcaseQuestionPanel.toolbar.statisticsButton.disable();
switch(activePanel) {
case panel.showcaseQuestionPanel:
questionObj = activePanel.getActiveItem().questionObj;
panel.showcaseQuestionPanel.toolbar.statisticsButton.disable();
break;
case panel.questionDetailsPanel:
questionObj = activePanel.questionObj;
break;
default:
}
target = panel.questionStatisticChart = Ext.create('ARSnova.view.speaker.QuestionStatisticChart', {
question: panel._activeItem._activeItem.questionObj
question: questionObj
});
if(features && features.pi) {
if(!panel.statisticTabPanel) {
panel.statisticTabPanel = Ext.create('ARSnova.view.speaker.StatisticTabPanel');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment