Package de.bps.olat.modules.cl

Examples of de.bps.olat.modules.cl.ChecklistManager


  }
 
  @Override
  public void exportNode(File exportDirectory, ICourse course) {
    XStream xstream = new XStream();
    ChecklistManager cm = ChecklistManager.getInstance();
    Checklist checklist = loadOrCreateChecklist(course.getCourseEnvironment().getCoursePropertyManager());
    Checklist copy = cm.copyChecklistInRAM(checklist);
    String exportContent = xstream.toXML(copy);
    ExportUtil.writeContentToFile(getExportFilename(), exportContent, exportDirectory, WebappHelper.getDefaultCharset());
  }
View Full Code Here


  }
 
  @Override
  public CourseNode createInstanceForCopy(boolean isNewTitle) {
    CourseNode copyInstance = super.createInstanceForCopy(isNewTitle);
    ChecklistManager cm = ChecklistManager.getInstance();
    // load checklist
    Checklist checklist = cm.loadChecklist((Checklist) getModuleConfiguration().get(ChecklistCourseNode.CONF_CHECKLIST));
    // remove old config
    copyInstance.getModuleConfiguration().remove(ChecklistCourseNode.CONF_CHECKLIST);
    // create new checklist with same settings and save to db
    Checklist initialChecklist = cm.copyChecklist(checklist);
    // set to config
    copyInstance.getModuleConfiguration().set(CONF_CHECKLIST_COPY, initialChecklist);
   
    return copyInstance;
  }
View Full Code Here

TOP

Related Classes of de.bps.olat.modules.cl.ChecklistManager

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.