Search in sources :

Example 16 with ItemNode

use of org.olat.ims.qti.editor.tree.ItemNode in project openolat by klemens.

the class QTIStatisticResourceResult method getController.

public Controller getController(UserRequest ureq, WindowControl wControl, TooledStackedPanel stackPanel, TreeNode selectedNode, boolean printMode) {
    if (selectedNode instanceof StatisticResourceNode) {
        return createAssessmentController(ureq, wControl, stackPanel, printMode);
    } else if (selectedNode instanceof SectionNode) {
        return createAssessmentController(ureq, wControl, stackPanel, printMode);
    } else if (selectedNode instanceof ItemNode) {
        Section section = null;
        INode sectionNode = selectedNode.getParent();
        if (sectionNode instanceof SectionNode) {
            section = (Section) ((SectionNode) sectionNode).getUserObject();
        }
        Item item = (Item) ((ItemNode) selectedNode).getUserObject();
        return createItemController(ureq, wControl, section, item, printMode);
    }
    return null;
}
Also used : Item(org.olat.ims.qti.editor.beecom.objects.Item) ItemNode(org.olat.ims.qti.editor.tree.ItemNode) INode(org.olat.core.util.nodes.INode) StatisticResourceNode(org.olat.course.statistic.StatisticResourceNode) SectionNode(org.olat.ims.qti.editor.tree.SectionNode) Section(org.olat.ims.qti.editor.beecom.objects.Section)

Aggregations

ItemNode (org.olat.ims.qti.editor.tree.ItemNode)16 Item (org.olat.ims.qti.editor.beecom.objects.Item)14 Section (org.olat.ims.qti.editor.beecom.objects.Section)10 GenericQtiNode (org.olat.ims.qti.editor.tree.GenericQtiNode)10 SectionNode (org.olat.ims.qti.editor.tree.SectionNode)10 AssessmentNode (org.olat.ims.qti.editor.tree.AssessmentNode)6 Event (org.olat.core.gui.control.Event)4 INode (org.olat.core.util.nodes.INode)4 VFSContainer (org.olat.core.util.vfs.VFSContainer)4 ChoiceQuestion (org.olat.ims.qti.editor.beecom.objects.ChoiceQuestion)4 Question (org.olat.ims.qti.editor.beecom.objects.Question)4 ItemAndMetadata (org.olat.ims.qti.questionimport.ItemAndMetadata)4 QItemViewEvent (org.olat.modules.qpool.ui.events.QItemViewEvent)4 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Component (org.olat.core.gui.components.Component)2 JSAndCSSComponent (org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent)2