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);
IModel<Prompt> mPrompt = responseService.getOrCreatePrompt(PromptType.RESPONSEAREA, loc, responseGroupId, metadata.getCollection());
ResponseList dataView = new ResponseList (wicketId, mPrompt, metadata, loc, ISISession.get().getTargetUserModel());
dataView.setContext(getResponseListContext(false));
dataView.setAllowEdit(!isTeacher);
dataView.setAllowNotebook(!inGlossary && !isTeacher && ISIApplication.get().isNotebookOn());
dataView.setAllowWhiteboard(!inGlossary && ISIApplication.get().isWhiteboardOn());
dataView.add(new AttributeRemover("rgid", "group"));
return dataView;
} else if (wicketId.startsWith("locking_responseList_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String responseGroupId = elt.getAttribute("rgid");
ResponseMetadata metadata = getResponseMetadata(responseGroupId);
IModel<Prompt> mPrompt = responseService.getOrCreatePrompt(PromptType.RESPONSEAREA, loc, responseGroupId, metadata.getCollection());
ResponseList dataView = new LockingResponseList (wicketId, mPrompt, metadata, loc, ISISession.get().getTargetUserModel());
dataView.setContext(getResponseListContext(false));
dataView.setAllowNotebook(!inGlossary && !isTeacher && ISIApplication.get().isNotebookOn());
dataView.setAllowWhiteboard(!inGlossary && ISIApplication.get().isWhiteboardOn());
dataView.add(new AttributeRemover("rgid", "group"));
return dataView;
} else if (wicketId.startsWith("period_responseList_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String responseGroupId = elt.getAttribute("rgid");
ResponseMetadata metadata = getResponseMetadata(responseGroupId);
IModel<Prompt> mPrompt = responseService.getOrCreatePrompt(PromptType.RESPONSEAREA, loc, responseGroupId, metadata.getCollection());
PeriodResponseList dataView = new PeriodResponseList(wicketId, mPrompt, metadata, loc, ISISession.get().getCurrentPeriodModel());
dataView.setContext(getResponseListContext(true));
dataView.setAllowEdit(!isTeacher);
dataView.setAllowNotebook(!inGlossary && !isTeacher && ISIApplication.get().isNotebookOn());
dataView.setAllowWhiteboard(!inGlossary && ISIApplication.get().isWhiteboardOn());
dataView.add(new AttributeRemover("rgid", "group"));
return dataView;
} else if (wicketId.startsWith("responseButtons_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String responseGroupId = elt.getAttribute("rgid");
Element xmlElement = getModel().getObject().getElement().getOwnerDocument().getElementById(responseGroupId);
ResponseMetadata metadata = new ResponseMetadata(xmlElement);
if (!ISIApplication.get().isUseAuthoredResponseType()) {
// set all the response types to the default per application configuration here
metadata = addMetadata(metadata);
}
IModel<Prompt> mPrompt = responseService.getOrCreatePrompt(PromptType.RESPONSEAREA, loc, metadata.getId(), metadata.getCollection());
ResponseButtons buttons = new ResponseButtons(wicketId, mPrompt, metadata, loc);
buttons.setVisible(!isTeacher);
return buttons;
} else if (wicketId.startsWith("locking_responseButtons_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String responseGroupId = elt.getAttribute("rgid");
Element xmlElement = getModel().getObject().getElement().getOwnerDocument().getElementById(responseGroupId);
ResponseMetadata metadata = new ResponseMetadata(xmlElement);
if (!ISIApplication.get().isUseAuthoredResponseType()) {
// set all the response types to the default per application configuration here
metadata = addMetadata(metadata);
}
IModel<Prompt> mPrompt = responseService.getOrCreatePrompt(PromptType.RESPONSEAREA, loc, metadata.getId(), metadata.getCollection());
return new LockingResponseButtons(wicketId, mPrompt, metadata, loc, cwmSessionService.getUserModel());
} else if (wicketId.startsWith("ratePanel_")) {
ContentLoc loc = new ContentLoc(getModel().getObject());
String promptText = null;