Examples of SectionStatus


Examples of org.cast.isi.data.SectionStatus

    else
      return getStringResource("isi.sectionToggleLinks.instructions.incomplete", "Incomplete Student Work");
  }

  protected boolean isReviewed() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getReviewed();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

    mTargetUser = ISISession.get().getTargetUserModel();
    teacher = mUser.getObject().getRole().equals(Role.TEACHER);

    ISIXmlSection currentPage = mCurrentPage != null ? (ISIXmlSection) mCurrentPage.getObject() : null;
     ISIXmlSection currentSection = ((ISIXmlSection) mSection.getObject()); // May be itself
    SectionStatus currentSectionStatus = sectionService.getSectionStatus(mTargetUser.getObject(), currentSection);

    // Page Number Repeater
    RepeatingView pageRepeater = new RepeatingView("pageRepeater");
    int pageNumDisplay = ISIApplication.get().getStudentContent().getLabelIndex(ISIXmlSection.SectionType.PAGE, currentSection.firstPage());

    for(ISIXmlSection page = currentSection.firstPage(); page != null; page = page.getNext(), pageNumDisplay++) {
      WebMarkupContainer pageLinkContainer = new WebMarkupContainer(pageRepeater.newChildId());
      pageRepeater.add(pageLinkContainer);
     
      BookmarkablePageLink<ISIStandardPage> link = new SectionLinkFactory().linkToPage("pageLink", page);
      pageLinkContainer.add(link);
      link.setVisible(ISIApplication.get().isPageNumbersOn());
      link.add(new Label("pageNum", String.valueOf(pageNumDisplay)).setRenderBodyOnly(true));

      feedbackRequired = false;

      Icon envelopImage;
      if (page.equals(currentPage)) {
        envelopImage = new EnvelopImageWithStatusUpdate("icon", new Model<ISIXmlSection>(page));
        link.setEnabled(false);
        link.add(new ClassAttributeModifier("current"));
      } else {
        envelopImage = new EnvelopeImage("icon", new Model<ISIXmlSection>(page));
      }
     
      // for teachers add any of the status icons, for students, just add the envelope if appropriate
      if (teacher && (currentSectionStatus != null)) {
        // if the page has feedback (red envelope) then display the envelope
        // otherwise, display the needs review icon or no icon at all
        if ((currentSectionStatus.getCompleted() == true) &&
          (currentSectionStatus.getReviewed() == false) &&
          (!feedbackRequired)) {
          Icon icon = new Icon("icon", "img/icons/status_ready.png", "Ready for review");
          link.add(icon);
          // don't display the status icon if there's no response group on this page
          icon.setVisible(page.hasResponseGroup());
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

    sectionService.setCompleted(getUser(), sectionContentLocation, !isComplete());
  }

  @Override
  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getCompleted();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

      return false;
    return status.getCompleted();
  }
 
  protected boolean isLocked() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getLocked();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

    sectionService.setCompleted(getUser(), sectionContentLocation, !isComplete());
  }

  @Override
  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getCompleted();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

      return false;
    return status.getCompleted();
  }
 
  protected boolean isLocked() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getLocked();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

  }

 
  // in this case isComplete means the teacher has reviewed
  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), getLocation());     
    if (status == null)
      return false;
    return status.getReviewed();
 
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

  protected User getUser() {
    return mTargetUser.getObject();
  }

  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getCompleted();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

      return getStringResource("isi.sectionToggleLinks.linkText.incomplete", "Incomplete Student Work");
  }

  @Override
  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getCompleted();
  }
View Full Code Here

Examples of org.cast.isi.data.SectionStatus

    }
    return image;
  }

  protected boolean isComplete() {
    SectionStatus status = sectionService.getSectionStatus(getUser(), sectionContentLocation);     
    if (status == null)
      return false;
    return status.getCompleted();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.