Examples of findBGContextsForResource()


Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

  /**
   * @see org.olat.course.groupsandrights.CourseGroupManager#initGroupContextsList()
   */
  public void initGroupContextsList() {
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    learningGroupContexts = contextManager.findBGContextsForResource(courseResource, BusinessGroup.TYPE_LEARNINGROUP, true, true);
    rightGroupContexts = contextManager.findBGContextsForResource(courseResource, BusinessGroup.TYPE_RIGHTGROUP, true, true);
  }

  /**
   * @param course The current course
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

   * @see org.olat.course.groupsandrights.CourseGroupManager#initGroupContextsList()
   */
  public void initGroupContextsList() {
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    learningGroupContexts = contextManager.findBGContextsForResource(courseResource, BusinessGroup.TYPE_LEARNINGROUP, true, true);
    rightGroupContexts = contextManager.findBGContextsForResource(courseResource, BusinessGroup.TYPE_RIGHTGROUP, true, true);
  }

  /**
   * @param course The current course
   * @return A course group manager that uses persisted data
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

   */
  public void deleteCourseGroupmanagement() {
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    // contextManager.removeAllBGContextsFromResource(courseResource);

    List allContexts = contextManager.findBGContextsForResource(courseResource, true, true);
    Iterator iter = allContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (context.isDefaultContext()) {
        contextManager.deleteBGContext(context);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    BGContext c1 = cm.createAndAddBGContextToResource("c1name", course1, BusinessGroup.TYPE_LEARNINGROUP, null, true);
    cm.createAndAddBGContextToResource("c2name", course1, BusinessGroup.TYPE_LEARNINGROUP, id1, false);
    cm.createAndAddBGContextToResource("c3name", course1, BusinessGroup.TYPE_RIGHTGROUP, id2, false);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 3);
    assertTrue(cm.findBGContextsForResource(course1, true, false).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, false, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    cm.createAndAddBGContextToResource("c2name", course1, BusinessGroup.TYPE_LEARNINGROUP, id1, false);
    cm.createAndAddBGContextToResource("c3name", course1, BusinessGroup.TYPE_RIGHTGROUP, id2, false);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 3);
    assertTrue(cm.findBGContextsForResource(course1, true, false).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, false, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    assertTrue(cm.findBGContextsForIdentity(id1, true, true).size() == 1);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    cm.createAndAddBGContextToResource("c3name", course1, BusinessGroup.TYPE_RIGHTGROUP, id2, false);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 3);
    assertTrue(cm.findBGContextsForResource(course1, true, false).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, false, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    assertTrue(cm.findBGContextsForIdentity(id1, true, true).size() == 1);
    assertTrue(cm.findBGContextsForIdentity(id1, true, false).size() == 0);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    DBFactory.getInstance().closeSession(); // simulate user clicks
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 3);
    assertTrue(cm.findBGContextsForResource(course1, true, false).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, false, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    assertTrue(cm.findBGContextsForIdentity(id1, true, true).size() == 1);
    assertTrue(cm.findBGContextsForIdentity(id1, true, false).size() == 0);
    assertTrue(cm.findBGContextsForIdentity(id1, false, true).size() == 1);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    DBFactory.getInstance().closeSession(); // simulate user clicks
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 3);
    assertTrue(cm.findBGContextsForResource(course1, true, false).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, false, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    assertTrue(cm.findBGContextsForIdentity(id1, true, true).size() == 1);
    assertTrue(cm.findBGContextsForIdentity(id1, true, false).size() == 0);
    assertTrue(cm.findBGContextsForIdentity(id1, false, true).size() == 1);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    assertTrue(cm.findBGContextsForIdentity(id1, true, false).size() == 0);
    assertTrue(cm.findBGContextsForIdentity(id1, false, true).size() == 1);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    cm.removeBGContextFromResource(c1, course1);
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    // cm.removeAllBGContextsFromResource(course1);
View Full Code Here

Examples of org.olat.group.context.BGContextManager.findBGContextsForResource()

    assertTrue(cm.findBGContextsForIdentity(id1, false, true).size() == 1);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    cm.removeBGContextFromResource(c1, course1);
    assertTrue(cm.findBGContextsForResource(course1, true, true).size() == 2);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_LEARNINGROUP, true, true).size() == 1);
    assertTrue(cm.findBGContextsForResource(course1, BusinessGroup.TYPE_RIGHTGROUP, true, true).size() == 1);

    DBFactory.getInstance().closeSession(); // simulate user clicks
    // cm.removeAllBGContextsFromResource(course1);
    CourseGroupManager cgm = PersistingCourseGroupManager.getInstance(course1);
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.