Package org.olat.ims.qti.editor.beecom.objects

Examples of org.olat.ims.qti.editor.beecom.objects.QTIObject


    if (label != null)
      material.setLable(label.getValue());

    // ELEMENTS
    for (Iterator i = materials.iterator(); i.hasNext();) {
      QTIObject obj = (QTIObject)parserManager.parse((Element)i.next());   
      if (obj != null)
        material.getElements().add(obj);
    }
    return material;
  }
View Full Code Here


      section.setTitle(element.attribute("title").getValue());
   
      // elements

      // DURATION
      QTIObject duration =
      (QTIObject) parserManager.parse(element.element("duration"));
      section.setDuration(duration);
     
      List sectioncontrolsXML = element.elements("sectioncontrol");
      List sectioncontrols = new ArrayList();
      for(Iterator i= sectioncontrolsXML.iterator();i.hasNext();) {
        sectioncontrols.add(parserManager.parse((Element)i.next()));
      }
      if (sectioncontrols.size() == 0) {
        sectioncontrols.add(new Control());
      }
      section.setSectioncontrols(sectioncontrols);
   
      // SELECTION ORDERING
      SelectionOrdering selectionOrdering = (SelectionOrdering)parserManager.parse(element.element("selection_ordering"));
      if (selectionOrdering != null){
        section.setSelection_ordering(selectionOrdering);
      } else {
        section.setSelection_ordering(new SelectionOrdering());
      }

      //SECTIONS
      List sectionsXML = element.elements("section");
      List sections = new ArrayList();
      for(Iterator i = sectionsXML.iterator();i.hasNext();) {
        sections.add(parserManager.parse((Element)i.next()))
      }
      section.setSections(sections);

   
      //ITEMS
      List itemsXML = element.elements("item");
      List items = new ArrayList();
      for(Iterator i = itemsXML.iterator();i.hasNext();) {
        items.add(parserManager.parse((Element)i.next()))
      }
      section.setItems(items);
     
      //OBJECTIVES
      Element mattext = (Element)element.selectSingleNode("./objectives/material/mattext");
      if (mattext != null)
        section.setObjectives(mattext.getTextTrim());
     
      //FEEDBACKS
      List feedbacksXML = element.elements("sectionfeedback");
      List feedbacks = new ArrayList();
      for(Iterator i = feedbacksXML.iterator();i.hasNext();) {
        QTIObject tmp = (QTIObject)parserManager.parse((Element)i.next());
        feedbacks.add(tmp);
      }
      section.setSectionfeedbacks(feedbacks);
      
      // OUTCOMES_PROCESSING
      // TODO: maybe we should use the OutcomesProcessing object and parser here? Same as on
      // assessment level?
      QTIObject outcomes_processing = (QTIObject)parserManager.parse(element.element("outcomes_processing"));
      section.setOutcomes_processing(outcomes_processing);
     
    return section;
  }
View Full Code Here

    if(attr!=null) assessment.setTitle(attr.getValue());
   
    // elements

    // DURATION
    QTIObject duration =
    (QTIObject) parserManager.parse(element.element("duration"));
    assessment.setDuration(duration);
   
    //ASSESSMENTCONTROL
    List assessmentcontrolsXML = element.elements("assessmentcontrol");
View Full Code Here

        question.setSolutionText(getMaterialAsString(el_solution));
      } else if (el_feedback.element("hint") != null) { // fetch hint
        Element el_hint = el_feedback.element("hint");
        question.setHintText(getMaterialAsString(el_hint));
      } else {
        QTIObject tmpObj = (QTIObject) parserManager.parse(el_feedback);
        if (tmpObj != null) feedbacks.add(tmpObj);
      }
    }

   
View Full Code Here

          }
        }
        // insert into menutree (insert on GenericNode do a remove from parent)
        parentTargetNode.insert(selectedNode, targetPos);
        // insert into model (remove from parent needed prior to insert)
        QTIObject subject = parentSelectedNode.removeQTIObjectAt(selectedPos);
        parentTargetNode.insertQTIObjectAt(subject, targetPos);
        qtiPackage.serializeQTIDocument();
        menuTree.setDirty(true); //force rerendering for ajax mode
      }
    } else if (source == copyTree) { // catch copy operations
View Full Code Here

TOP

Related Classes of org.olat.ims.qti.editor.beecom.objects.QTIObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.