use of uk.ac.ed.ph.jqtiplus.node.item.interaction.DrawingInteraction in project openolat by klemens.
the class AssessmentTestHelper method needManualCorrection.
public static boolean needManualCorrection(AssessmentItemRef itemRef, ResolvedAssessmentTest resolvedAssessmentTest) {
ResolvedAssessmentItem resolvedAssessmentItem = resolvedAssessmentTest.getResolvedAssessmentItem(itemRef);
if (resolvedAssessmentItem != null && resolvedAssessmentItem.getItemLookup() != null && resolvedAssessmentItem.getItemLookup().getRootNodeHolder() != null) {
AssessmentItem assessmentItem = resolvedAssessmentItem.getItemLookup().getRootNodeHolder().getRootNode();
List<Interaction> interactions = assessmentItem.getItemBody().findInteractions();
for (Interaction interaction : interactions) {
if (interaction instanceof UploadInteraction || interaction instanceof DrawingInteraction || interaction instanceof ExtendedTextInteraction) {
return true;
}
}
}
return false;
}
use of uk.ac.ed.ph.jqtiplus.node.item.interaction.DrawingInteraction in project openolat by klemens.
the class DrawingAssessmentItemBuilder method extractExtendedTextInteraction.
private void extractExtendedTextInteraction() {
try (StringOutput sb = new StringOutput()) {
List<Block> blocks = assessmentItem.getItemBody().getBlocks();
for (Block block : blocks) {
if (block instanceof DrawingInteraction) {
drawingInteraction = (DrawingInteraction) block;
responseIdentifier = drawingInteraction.getResponseIdentifier();
break;
} else {
serializeJqtiObject(block, sb);
}
}
question = sb.toString();
} catch (IOException e) {
log.error("", e);
}
}
Aggregations