Package org.cast.cwm.xml

Examples of org.cast.cwm.xml.XmlSectionModel


    ISIPrompt prompt = ((ISIPrompt)mPrompt.getObject());
    if (prompt.getType().equals(PromptType.SINGLE_SELECT)) {
      ContentLoc location = prompt.getContentElement().getContentLocObject();
      ISIXmlSection section = location.getSection();
      String xmlId = prompt.getContentElement().getXmlId();
      ISIXmlComponent xml = new ISIXmlComponent("details", new XmlSectionModel(section), "compare-responses");
      xml.setTransformParameter(FilterElements.XPATH, String.format("//dtb:responsegroup[@id='%s']", xmlId));
      xml.setOutputMarkupId(true);
      add (xml);
    } else {
      add (new PeriodResponseListPanel("details", mPrompt));
View Full Code Here


  public AlternateNavBar1(String id, IModel<XmlSection> mCurrentPage, boolean teacher) {
    super(id, mCurrentPage);
    setOutputMarkupId(true);

    if (mCurrentPage == null) {
      setModel(new XmlSectionModel(ISIApplication.get().getPageNum(1)));
    }

    ISIXmlSection rootSection = ISIXmlSection.getRootSection(getCurrentSection());
 
    // Current Section's Page Repeater with prev/next
View Full Code Here

    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)) {
        private static final long serialVersionUID = 1L;
      };
      add(toggle);
    } else {
      // teacher is finished reviewing this section
      TeacherSectionCompleteToggleImageLink toggle = new TeacherSectionCompleteToggleImageLink("sectionCompleteToggle", new XmlSectionModel(currentSection)) {
        private static final long serialVersionUID = 1L;
      };
      // Teacher can only mark as reviewed if the student has marked this as completed
      // and there are no outstanding messages from the student.
      toggle.setEnabled(sectionService.sectionReviewable(mTargetUser.getObject(), currentSection));
View Full Code Here

   */
  protected void addChapterChoice() {
   
    // display only the titles in the dropdown
    ChoiceRenderer<XmlSection> renderer = new ChoiceRenderer<XmlSection>("title");
    chapterChoice = new DropDownChoice<XmlSection>("chapterChoice", new XmlSectionModel(currentChapterLoc.getSection()), mChapterList, renderer);
    chapterChoice.add(new SimpleAttributeModifier("autocomplete", "off"));
    chapterChoice.add(new SimpleAttributeModifier("ignore", "true"));

    Form<XmlSection> chapterSelectForm = new Form<XmlSection>("chapterSelectForm") {
      private static final long serialVersionUID = 1L;
View Full Code Here

TOP

Related Classes of org.cast.cwm.xml.XmlSectionModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.