use of org.olat.ims.qti21.model.QTI21QuestionType in project openolat by klemens.
the class UnkownItemConversionConfirmationController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
if (formLayout instanceof FormLayoutContainer) {
FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
layoutCont.contextPut("warnings", report.getWarnings());
layoutCont.contextPut("questionType", translate("new." + report.getType().name()));
}
if (report.getAlternatives().size() > 0) {
String[] theKeys = new String[report.getAlternatives().size()];
String[] theValues = new String[theKeys.length];
for (int i = 0; i < report.getAlternatives().size(); i++) {
QTI21QuestionType alternative = report.getAlternatives().get(i);
theKeys[i] = alternative.name();
theValues[i] = translate("new." + alternative.name());
}
alternativeEl = uifactory.addDropdownSingleselect("questions.alternative", formLayout, theKeys, theValues, null);
alternativeEl.setDomReplacementWrapperRequired(false);
}
uifactory.addFormCancelButton("cancel", formLayout, ureq, getWindowControl());
uifactory.addFormSubmitButton("convert", formLayout);
}
Aggregations