Package org.dom4j

Examples of org.dom4j.Element.attributeValue()


                field.setFieldType(FieldType.TEXT);
              }
              field.setMandatory(XmlUtil.readBooleanAttr(element,
                  "mandatory", false));
              field.setValues(element.attributeValue("values"));
              field.setDefaultValue(element.attributeValue("defaultValue"));
              field.setHeight(XmlUtil.readIntAttr(element, "height", 0));
              field.setWidth(XmlUtil.readIntAttr(element, "width", 20));
              field.setIndex(XmlUtil.readIntAttr(element, "index", 0));
              getDaoTaskAdapter().fieldSave(field);
            }
View Full Code Here


            if (!processedSolutions.contains(solution)) {
              // Solutions are there twice because of the mastery feedback.
              // Only process solutions once.
              correctBlank = correctBlank + solution;
              if (iter.hasNext()) correctBlank = correctBlank + ";";
              correctBlankCaseAttribute = el_varequal.attributeValue("case");
              processedSolutions.add(solution);
            }
          }
          if (correctBlank.endsWith(";")) correctBlank = correctBlank.substring(0, correctBlank.length() - 1);
          fibresponse.setCorrectBlank(correctBlank);
View Full Code Here

    // else use default value
   
    // Set correct order type. Use sequential ordering als default if none defined
    Element order = (Element)element.selectSingleNode("//order");
    if (order != null) {
      String order_type = order.attributeValue(SelectionOrdering.ORDER_TYPE);
      if (order_type != null && order_type.equals(SelectionOrdering.RANDOM)) selectionOrdering.setOrderType(SelectionOrdering.RANDOM);
      // else use default value
    }

    return selectionOrdering;
View Full Code Here

   
    if (sw == null) { // no section switches dominate, take item switches
      // retrieve item switches
      Element el_control = (Element) el_orig_item.selectSingleNode("itemcontrol");
      if (el_control != null) {
        String feedbackswitch = el_control.attributeValue("feedbackswitch");
        String hintswitch = el_control.attributeValue("hintswitch");
        String solutionswitch = el_control.attributeValue("solutionswitch");
        boolean newFeedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
        boolean newHints = (hintswitch == null) ? true : hintswitch.equals("Yes");
        boolean newSolutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
View Full Code Here

    if (sw == null) { // no section switches dominate, take item switches
      // retrieve item switches
      Element el_control = (Element) el_orig_item.selectSingleNode("itemcontrol");
      if (el_control != null) {
        String feedbackswitch = el_control.attributeValue("feedbackswitch");
        String hintswitch = el_control.attributeValue("hintswitch");
        String solutionswitch = el_control.attributeValue("solutionswitch");
        boolean newFeedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
        boolean newHints = (hintswitch == null) ? true : hintswitch.equals("Yes");
        boolean newSolutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
        sw = new Switches(newFeedback, newHints, newSolutions);
View Full Code Here

      // retrieve item switches
      Element el_control = (Element) el_orig_item.selectSingleNode("itemcontrol");
      if (el_control != null) {
        String feedbackswitch = el_control.attributeValue("feedbackswitch");
        String hintswitch = el_control.attributeValue("hintswitch");
        String solutionswitch = el_control.attributeValue("solutionswitch");
        boolean newFeedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
        boolean newHints = (hintswitch == null) ? true : hintswitch.equals("Yes");
        boolean newSolutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
        sw = new Switches(newFeedback, newHints, newSolutions);
      }
View Full Code Here

    // outcomes_processing* , assessproc_extension? , assessfeedback* ,
    // selection_ordering? , reference? , (sectionref | section)+)>
    //<!ELEMENT assessmentcontrol (qticomment?)>
    Element el_control = (Element) el_assessment.selectSingleNode("assessmentcontrol");
    if (el_control != null) {
      String feedbackswitch = el_control.attributeValue("feedbackswitch");
      String hintswitch = el_control.attributeValue("hintswitch");
      String solutionswitch = el_control.attributeValue("solutionswitch");
      boolean feedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
      boolean hints = (hintswitch == null) ? true : hintswitch.equals("Yes");
      boolean solutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
View Full Code Here

    // selection_ordering? , reference? , (sectionref | section)+)>
    //<!ELEMENT assessmentcontrol (qticomment?)>
    Element el_control = (Element) el_assessment.selectSingleNode("assessmentcontrol");
    if (el_control != null) {
      String feedbackswitch = el_control.attributeValue("feedbackswitch");
      String hintswitch = el_control.attributeValue("hintswitch");
      String solutionswitch = el_control.attributeValue("solutionswitch");
      boolean feedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
      boolean hints = (hintswitch == null) ? true : hintswitch.equals("Yes");
      boolean solutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
      switches = new Switches(feedback, hints, solutions);
View Full Code Here

    //<!ELEMENT assessmentcontrol (qticomment?)>
    Element el_control = (Element) el_assessment.selectSingleNode("assessmentcontrol");
    if (el_control != null) {
      String feedbackswitch = el_control.attributeValue("feedbackswitch");
      String hintswitch = el_control.attributeValue("hintswitch");
      String solutionswitch = el_control.attributeValue("solutionswitch");
      boolean feedback = (feedbackswitch == null) ? true : feedbackswitch.equals("Yes");
      boolean hints = (hintswitch == null) ? true : hintswitch.equals("Yes");
      boolean solutions = (solutionswitch == null) ? true : solutionswitch.equals("Yes");
      switches = new Switches(feedback, hints, solutions);
    }
View Full Code Here

    // scoring model and outcomes processing
    Element el_outpro = (Element) el_assessment.selectSingleNode("outcomes_processing");
    if (el_outpro != null) {
      // get the scoring model: we need it later for calculating the score
      //<!ENTITY % I_ScoreModel " scoremodel CDATA #IMPLIED">
      scoremodel = el_outpro.attributeValue("scoremodel");
      // may be null -> then assume SumOfScores

      // set the cutvalue if given (only variable score)
      cutvalue = QTIHelper.getFloatAttribute(el_outpro, "outcomes/decvar[@varname='SCORE']", "cutvalue");
      List el_oft = el_outpro.selectNodes("outcomes_feedback_test");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.