use of uk.ac.ed.ph.jqtiplus.node.item.template.declaration.TemplateDeclaration in project openolat by klemens.
the class AssessmentItemComponentRenderer method renderPrintedVariable.
@Override
protected void renderPrintedVariable(AssessmentRenderer renderer, StringOutput sb, AssessmentObjectComponent component, ResolvedAssessmentItem resolvedAssessmentItem, ItemSessionState itemSessionState, PrintedVariable printedVar) {
Identifier identifier = printedVar.getIdentifier();
Value templateValue = itemSessionState.getTemplateValues().get(identifier);
Value outcomeValue = itemSessionState.getOutcomeValues().get(identifier);
sb.append("<span class='printedVariable'>");
if (outcomeValue != null) {
OutcomeDeclaration outcomeDeclaration = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful().getOutcomeDeclaration(identifier);
renderPrintedVariable(renderer, sb, printedVar, outcomeDeclaration, outcomeValue);
} else if (templateValue != null) {
TemplateDeclaration templateDeclaration = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful().getTemplateDeclaration(identifier);
renderPrintedVariable(renderer, sb, printedVar, templateDeclaration, templateValue);
} else {
sb.append("(variable ").append(identifier.toString()).append(" was not found)");
}
sb.append("</span>");
}
Aggregations