return component;
} else if (wicketId.startsWith("showScore_")) {
IModel<Prompt> promptModel = getPrompt(elt);
IModel<User> studentModel = cwmSessionService.getUserModel();
ISortableDataProvider<Response> responseProvider = responseService.getResponseProviderForPrompt(promptModel, studentModel);
ScorePanel component = new StudentScorePanel(wicketId, responseProvider);
return component;
// A container for a single-select form and whiteboard, notebook links
} else if (wicketId.startsWith("responseContainer")) {
return new WebMarkupContainer(wicketId);
// A single-select, multiple choice form. MultipleChoiceItems will be added to a RadioGroup
// child of this form.
} else if (wicketId.startsWith("select1_immediate_")) {
return makeImmediateResponseForm(wicketId, elt);
// A single-select, multiple choice form. MultipleChoiceItems will be added to a RadioGroup
// child of this form.
} else if (wicketId.startsWith("select1_delay_")) {
return makeDelayedResponseForm(wicketId, elt);
// buttons for viewing in whiteboard and notebook
} else if (wicketId.startsWith("viewActions")) {
IModel<Prompt> mPrompt = getPrompt(elt, PromptType.SINGLE_SELECT);
Long promptId = mPrompt.getObject().getId();
ResponseViewActionsPanel component = new ResponseViewActionsPanel(wicketId, promptId);
component.add(new AttributeRemover("rgid", "title", "group", "type"));
return component;
// A single-select, multiple choice disabled form. MultipleChoiceItems will be added to a RadioGroup
// child of this form.
} else if (wicketId.startsWith("select1_view_immediate")) {
return makeImmediateResponseView(wicketId, elt);
// A single-select, multiple choice disabled form. MultipleChoiceItems will be added to a RadioGroup
// child of this form.
} else if (wicketId.startsWith("select1_view_delay")) {
return makeDelayedResponseView(wicketId, elt);
// A multiple choice radio button. Stores a "correct" value. This is
// added to a generic RadioGroup in a SingleSelectForm.
} else if (wicketId.startsWith("selectItem_")) {
Component mcItem = new SingleSelectItem(wicketId,
new Model<String>(wicketId.substring("selectItem_".length())),
Boolean.valueOf(elt.getAttribute("correct")));
mcItem.add(new AttributeRemover("correct"));
return mcItem;
// A message associated with a wicketId.startsWith("selectItem_").
// The wicketId of the associated SingleSelectItem should be provided as a "for" attribute.
// Visibility based on whether the corresponding radio button is selected in the enclosing form.
} else if (wicketId.startsWith("selectMessage_")) {
return new SingleSelectMessage(wicketId, elt.getAttribute("for")).add(new AttributeRemover("for"));
// A delayed feedback message associated with a wicketId.startsWith("selectItem_").
// The wicketId of the associated SingleSelectItem should be provided as a "for" attribute.
// Visibility based on whether the response has been reviewed.
} else if (wicketId.startsWith("selectDelayMessage_")) {
ISIXmlSection section = getISIXmlSection();
IModel<XmlSection> currentSectionModel = new XmlSectionModel(section);
SingleSelectDelayMessage component = new SingleSelectDelayMessage(wicketId, currentSectionModel);
return component.add(new AttributeRemover("for"));
} else if (wicketId.startsWith("responseList_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String responseGroupId = elt.getAttribute("rgid");
ResponseMetadata metadata = getResponseMetadata(responseGroupId);