use of uk.ac.ed.ph.qtiworks.mathassess.MathEntryInteraction in project openolat by klemens.
the class AssessmentObjectComponentRenderer method renderCustomInteraction.
/**
* Render the interaction or the PositionStageObject
* @param renderer
* @param sb
* @param interaction
* @param assessmentItem
* @param itemSessionState
* @param component
* @param ubu
* @param translator
*/
private void renderCustomInteraction(AssessmentRenderer renderer, StringOutput sb, CustomInteraction<?> interaction, ResolvedAssessmentItem resolvedAssessmentItem, ItemSessionState itemSessionState, AssessmentObjectComponent component, URLBuilder ubu, Translator translator) {
Context ctx = new VelocityContext();
ctx.put("interaction", interaction);
String page;
if (interaction instanceof MathEntryInteraction) {
page = velocity_root.concat("/mathEntryInteraction.html");
} else {
page = velocity_root.concat("/unsupportedCustomInteraction.html");
}
renderVelocity(renderer, sb, interaction, ctx, page, resolvedAssessmentItem, itemSessionState, component, ubu, translator);
}
use of uk.ac.ed.ph.qtiworks.mathassess.MathEntryInteraction in project OpenOLAT by OpenOLAT.
the class AssessmentObjectComponentRenderer method renderCustomInteraction.
/**
* Render the interaction or the PositionStageObject
* @param renderer
* @param sb
* @param interaction
* @param assessmentItem
* @param itemSessionState
* @param component
* @param ubu
* @param translator
*/
private void renderCustomInteraction(AssessmentRenderer renderer, StringOutput sb, CustomInteraction<?> interaction, ResolvedAssessmentItem resolvedAssessmentItem, ItemSessionState itemSessionState, AssessmentObjectComponent component, URLBuilder ubu, Translator translator) {
Context ctx = new VelocityContext();
ctx.put("interaction", interaction);
String page;
if (interaction instanceof MathEntryInteraction) {
page = velocity_root.concat("/mathEntryInteraction.html");
} else {
page = velocity_root.concat("/unsupportedCustomInteraction.html");
}
renderVelocity(renderer, sb, interaction, ctx, page, resolvedAssessmentItem, itemSessionState, component, ubu, translator);
}
Aggregations