UserModel mUser = new UserModel(ISISession.get().getUser());
IModel<User> mTargetUser = ISISession.get().getTargetUserModel();
boolean teacher = mUser.getObject().getRole().equals(Role.TEACHER);
ISIXmlSection currentPage = (ISIXmlSection) mSection.getObject(); // FIXME: XmlSectionModel should be genericized to fix this and similar hacks
ISIXmlSection currentSection = currentPage.getSectionAncestor(); // May be itself
add(new PageLinkPanel("pageLinkPanel", new XmlSectionModel(currentSection), mSection));
// Previous & Next Links
int currentPageNum = ISIApplication.get().getStudentContent().getLabelIndex(ISIXmlSection.SectionType.PAGE, currentPage);
add(new PageNumberLink("previousPage", currentPageNum-1));
add(new PageNumberLink("nextPage", currentPageNum+1));
add(new Label("sectionTitle", currentSection.getTitle()));
// If this is a student then add the checkbox for a student. If this is a teacher then add the checkbox for the teacher
if (!teacher) {
// Section Complete Toggle Icon
SectionCompleteToggleLink toggle = new StudentSectionCompleteToggleImageLink("sectionCompleteToggle", new XmlSectionModel(currentSection)) {