Examples of copyAndAddBGContextToResource()


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

    while (iter.hasNext()) {
      BGContext origContext = (BGContext) iter.next();
      if (origContext.isDefaultContext()) {
        // we found default context, copy this one
        String learningGroupContextName = CourseGroupManager.DEFAULT_NAME_LC_PREFIX + courseTitle;
        contextManager.copyAndAddBGContextToResource(learningGroupContextName, this.courseResource, origContext);
        // no need to add it to list of contexts, already done by copyAndAddBGContextToResource
      } else {
        // not a course default context but an associated context - copy only
        // reference
        contextManager.addBGContextToResource(origContext, courseResource);
View Full Code Here

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

    while (iter.hasNext()) {
      BGContext origContext = (BGContext) iter.next();
      if (origContext.isDefaultContext()) {
        // we found default context, copy this one
        String rightGroupContextName = CourseGroupManager.DEFAULT_NAME_RC_PREFIX + courseTitle;
        contextManager.copyAndAddBGContextToResource(rightGroupContextName, this.courseResource, origContext);
        // no need to add it to list of contexts, already done by copyAndAddBGContextToResource
      } else {
        // not a course default context but an associated context - copy only
        // reference
        contextManager.addBGContextToResource(origContext, courseResource);
View Full Code Here

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

    am.addBGToBGArea(g1, a1);
    am.addBGToBGArea(g2, a1);
    am.addBGToBGArea(g1, a2);
    DBFactory.getInstance().closeSession(); // simulate user clicks

    BGContext c1copy = bgcm.copyAndAddBGContextToResource(c1.getName(), course1, c1);
    DBFactory.getInstance().closeSession(); // simulate user clicks
    try {
      bgcm.copyAndAddBGContextToResource(c2.getName(), course1, c2);
      fail("expecting exeption");
    } catch (AssertException e) {
View Full Code Here

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

    DBFactory.getInstance().closeSession(); // simulate user clicks

    BGContext c1copy = bgcm.copyAndAddBGContextToResource(c1.getName(), course1, c1);
    DBFactory.getInstance().closeSession(); // simulate user clicks
    try {
      bgcm.copyAndAddBGContextToResource(c2.getName(), course1, c2);
      fail("expecting exeption");
    } catch (AssertException e) {
      // ok, passed
    }
    DBFactory.getInstance().closeSession(); // simulate user clicks
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.