use of org.olat.oo.xml.manifest.OpenOLATMetadataType in project openolat by klemens.
the class AssessmentItemMetadata method fromBuilder.
public void fromBuilder(ManifestMetadataBuilder metadata) {
// general
keywords = metadata.getGeneralKeywords();
coverage = metadata.getCoverage();
// educational
EducationalType educational = metadata.getEducational(false);
if (educational != null) {
level = metadata.getEducationContext();
}
typicalLearningTime = metadata.getEducationalLearningTime();
// taxonomy
taxonomyPath = metadata.getClassificationTaxonomy();
// rights
license = metadata.getLicense();
// qti metadata
QTIMetadataType qtiMetadata = metadata.getQtiMetadata(true);
if (qtiMetadata != null) {
if (qtiMetadata.getToolName() != null) {
editor = qtiMetadata.getToolName();
}
if (qtiMetadata.getToolVersion() != null) {
editorVersion = qtiMetadata.getToolVersion();
}
}
// openolat metadata
OpenOLATMetadataType openolatMetadata = metadata.getOpenOLATMetadata(false);
if (openolatMetadata != null) {
if (openolatMetadata.getDiscriminationIndex() != null) {
differentiation = new BigDecimal(openolatMetadata.getDiscriminationIndex());
}
if (openolatMetadata.getDifficulty() != null) {
difficulty = new BigDecimal(openolatMetadata.getDifficulty());
}
if (openolatMetadata.getStandardDeviation() != null) {
stdevDifficulty = new BigDecimal(openolatMetadata.getStandardDeviation());
}
if (openolatMetadata.getDistractors() != null) {
numOfAnswerAlternatives = openolatMetadata.getDistractors().intValue();
}
if (openolatMetadata.getTopic() != null) {
topic = openolatMetadata.getTopic();
}
if (openolatMetadata.getAssessmentType() != null) {
assessmentType = openolatMetadata.getAssessmentType();
}
if (openolatMetadata.getCreator() != null) {
creator = openolatMetadata.getCreator();
}
if (openolatMetadata.getAdditionalInformations() != null) {
additionalInformations = openolatMetadata.getAdditionalInformations();
}
}
}
Aggregations