Package org.cast.isi.data

Examples of org.cast.isi.data.ContentLoc


      @Override
      protected void onSubmit() {
        super.onSubmit();
        // only reload the page if the user has selected a new chapter
        ContentLoc newLoc = new ContentLoc((ISIXmlSection)chapterChoice.getModelObject());
        if (!newLoc.equals(currentChapterLoc)) {
          currentLoc = newLoc;
          PageParameters param = new PageParameters();
          param.add("loc", currentLoc.getLocation());
          setResponsePage(ISIApplication.get().getNotebookPageClass(), param);
        }
View Full Code Here


    ISIXmlSection currentChapterSection = currentChapterLoc.getSection();
    for (ISIResponse r : responseList.getObject()) {

      // check if the response is a child of the current chapter, if so add it to the response map
      ISIPrompt prompt = (ISIPrompt) r.getPrompt();
      ISIXmlSection promptSection = new ContentLoc(prompt.getContentElement().getContentLocation()).getSection();
     
      if (promptSection != null) {
        if (currentChapterSection.isAncestorOf(promptSection)) {
          if (responseMap.containsKey(r.getPrompt()))
            responseMap.get(r.getPrompt()).add(r);
View Full Code Here

   */
  public SectionStatus getSectionStatus(User person, ISIXmlSection xs) {
    xs = xs.getSectionAncestor();
    if (xs == null)
      return null;
    return getSectionStatus(person, new ContentLoc(xs).getLocation());
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.cast.isi.service.ISectionService#setCompleted(org.cast.cwm.data.User, java.lang.String, boolean)
   */
  public SectionStatus setCompleted(User user, String location, boolean complete) {
    return setCompleted(user, new ContentLoc(location), complete);
  }
View Full Code Here

    if (sec == null)
      return null;
    Session s = Databinder.getHibernateSession();
    SectionStatus stat = getSectionStatus(person, sec);
    if (stat == null) {
      stat = new SectionStatus(person, new ContentLoc(sec).getLocation(), complete);
      s.save(stat);
    } else {
      stat.setCompleted(complete);
    }
    // If there are no response groups, automatically mark as Reviewed
View Full Code Here

      throw new IllegalArgumentException("Content Location not valid");
    }
    Session s = Databinder.getHibernateSession();
    SectionStatus stat = getSectionStatus(student, sec);
    if (stat == null) {
      stat = new SectionStatus(student, new ContentLoc(sec).getLocation(), false);
      s.save(stat);
    }
    if (role.equals(Role.STUDENT))
      stat.setUnreadStudentMessages(stat.getUnreadStudentMessages() + amount);
    else
View Full Code Here

 
  /* (non-Javadoc)
   * @see org.cast.isi.service.ISectionService#setCompleted(org.cast.cwm.data.User, java.lang.String, boolean)
   */
  public SectionStatus setReviewed(User user, String location, boolean reviewed) {
    return setReviewed(user, new ContentLoc(location), reviewed);
  }
View Full Code Here

  public PeriodResponseListPanel(String wicketId, IModel<Prompt> mPrompt) {
    super(wicketId);
    setOutputMarkupId(true);
   
    ContentLoc location = ((ISIPrompt)mPrompt.getObject()).getContentElement().getContentLocObject();

    List<User> studentList = getUserListModel().getObject();

    // iterate over all the users to get the responses for the prompt
    RepeatingView rv1 = new RepeatingView("studentRepeater");
View Full Code Here

   */
  public String locationOfFirstUnreadMessage(User student, ISIXmlSection sec) {
    List<String> locations = new ArrayList<String>();
    if (sec.hasChildren()) {
      for (XmlSection sec3 : sec.getChildren()) {
        locations.add((new ContentLoc(sec3)).getLocation());
      }
    } else {
      locations.add(new ContentLoc(sec).getLocation());
    }
    Query q = Databinder.getHibernateSession().getNamedQuery("FeedbackMessage.getFirstUnreadMessageByStudentAndSection");
    q.setParameter("student", student);
    q.setParameterList("locationList", locations);
    q.setMaxResults(1);
View Full Code Here

TOP

Related Classes of org.cast.isi.data.ContentLoc

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.