Package org.olat.ims.qti.container

Examples of org.olat.ims.qti.container.DecimalVariable


        itres.addAttribute("asi_title", itemc.getEl_item().attributeValue("title"));
        Element it_duration = itres.addElement("duration");
        it_duration.addText(QTIHelper.getISODuration(itemc.getTimeSpent()));

        // process item score
        DecimalVariable scoreVar = (DecimalVariable) (itemc.getVariables().getSCOREVariable());
        Element it_score = itres.addElement("outcomes").addElement("score");
        it_score.addAttribute("varname", "SCORE");
        it_score.addElement("score_value").addText(StringHelper.formatFloat(scoreVar.getTruncatedValue(), 2));
        strVal = scoreVar.hasMinValue() ? "" + scoreVar.getMinValue() : "0.0";
        it_score.addElement("score_min").addText(strVal);
        strVal = scoreVar.hasMaxValue() ? "" + scoreVar.getMaxValue() : "N/A";
        it_score.addElement("score_max").addText(strVal);
        strVal = scoreVar.hasCutValue() ? "" + scoreVar.getCutValue() : "N/A";
        it_score.addElement("score_cut").addText(strVal);

        Element el_item = itemc.getEl_item();
        Map res_responsehash = new HashMap(3);
View Full Code Here


      if (varType.equals("Integer") || varType.equals("Decimal")) {
        String def = decvar.attributeValue("defaultval");
        String min = decvar.attributeValue("minvalue");
        String max = decvar.attributeValue("maxvalue");
        String cut = decvar.attributeValue("cutvalue");
        v = new DecimalVariable(varName, max, min, cut, def);
        variables.setVariable(v);
      } else throw new RuntimeException("vartype " + varType + " not supported (declaration)");

    }
    return variables;
View Full Code Here

TOP

Related Classes of org.olat.ims.qti.container.DecimalVariable

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.