AnsweredAssumed Answered

Copying Content Collection items to a new Course

Question asked by vw36780 on Apr 6, 2017

I am currently cloning course content from one course to another using the code below. However, it does not copy items within the Content Collection for the course. Any ideas on how I can also copy this content to the new course?

 

   CourseSitePersister coursePersister = CourseSitePersister.Default.getInstance();

 

  CloneConfig cloneConfig = new CloneConfig();

  cloneConfig.setReconcileFlag(true);

  cloneConfig.includeArea(CloneConfig.Area.DEFAULT);

  cloneConfig.includeArea(CloneConfig.Area.CONTENT);

  cloneConfig.excludeArea(CloneConfig.Area.MEMBERSHIP);

  cloneConfig.excludeArea(CloneConfig.Area.DISCUSSION_BOARD);

  cloneConfig.excludeArea(CloneConfig.Area.DISCUSSION_BOARD_ARCHIVE);

  cloneConfig.excludeArea(CloneConfig.Area.DROP_BOX);

  cloneConfig.excludeArea(CloneConfig.Area.ANNOUNCEMENT);

  cloneConfig.excludeArea(CloneConfig.Area.BLOG);

  cloneConfig.excludeArea(CloneConfig.Area.JOURNAL);

  cloneConfig.setCloneOptions(CloneOptions.LINKS_AND_COURSE_FILES);

 

  coursePersister.clone(srcCrsBatchUid, tgtCrsBatchUid, cloneConfig);

 

 

// where srcCrsBathUid is the courseID of the FROM course and tgtCrsBatchUid is the courseID of the TO course

Outcomes