use of uk.ac.ed.ph.jqtiplus.node.item.interaction.UploadInteraction 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.UploadInteraction in project openolat by klemens.
the class UploadAssessmentItemBuilder method getQuestionBlocks.
/**
* @return A copy of the list of blocks which make the question.
* The list is a copy and modification will not be persisted.
*/
public List<Block> getQuestionBlocks() {
List<Block> blocks = assessmentItem.getItemBody().getBlocks();
List<Block> questionBlocks = new ArrayList<>(blocks.size());
for (Block block : blocks) {
if (block instanceof UploadInteraction) {
break;
} else {
questionBlocks.add(block);
}
}
return questionBlocks;
}
Aggregations