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

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


   */
  public static Assessment createAssessment(String title, String type) {
    Assessment assessment = new Assessment();
    assessment.setIdent(CodeHelper.getGlobalForeverUniqueID());
    assessment.setTitle(title);
    Metadata meta = new Metadata();
    meta.setField(AssessmentInstance.QMD_LABEL_TYPE, type);
    assessment.setMetadata(meta);
    return assessment;
  }
View Full Code Here


   * @see org.olat.ims.qti.editor.beecom.IParser#parse(org.dom4j.Element)
   */
  public Object parse(Element element) {
    //assert element.getName().equalsIgnoreCase("qtimetadata");
         
    Metadata meta = new Metadata();
    List metadatafields = element.selectNodes("./qtimetadatafield");
    for (Iterator iter = metadatafields.iterator(); iter.hasNext();) {
      Element metadatafield = (Element) iter.next();
      String key = metadatafield.elementText("fieldlabel");
      String value = metadatafield.elementText("fieldentry");
      meta.setField(key, value);
    }
    return meta;
  }
View Full Code Here

    Element mattext = (Element)element.selectSingleNode("./objectives/material/mattext");
    if (mattext != null)
      assessment.setObjectives(mattext.getTextTrim());
   
    // METADATA
    Metadata metadata = (Metadata)parserManager.parse(element.element("qtimetadata"));
    if (metadata != null)
      assessment.setMetadata(metadata);
   
   
    return assessment;
View Full Code Here

        Document doc = loadQTIDocument();
        if(doc!=null) {
          ParserManager parser = new ParserManager();
          qtiDocument = (QTIDocument)parser.parse(doc);
          // grab assessment type
          Metadata meta = qtiDocument.getAssessment().getMetadata();
          String assessType = meta.getField(AssessmentInstance.QMD_LABEL_TYPE);
          if (assessType != null) {
            qtiDocument.setSurvey(assessType.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY));
          }
          resumed = false;
        } else {
View Full Code Here

TOP

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

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.