use of org.olat.repository.RepositoryEntryImportExport in project openolat by klemens.
the class ScormCourseNode method importNode.
@Override
public void importNode(File importDirectory, ICourse course, Identity owner, Locale locale, boolean withReferences) {
RepositoryEntryImportExport rie = new RepositoryEntryImportExport(importDirectory, getIdent());
if (withReferences && rie.anyExportedPropertiesAvailable()) {
RepositoryHandler handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(ScormCPFileResource.TYPE_NAME);
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(), rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
ScormEditController.setScormCPReference(re, getModuleConfiguration());
} else {
CPEditController.removeCPReference(getModuleConfiguration());
}
}
use of org.olat.repository.RepositoryEntryImportExport in project openolat by klemens.
the class PortfolioCourseNode method exportNode.
@Override
public void exportNode(File exportDirectory, ICourse course) {
RepositoryEntry re = getReferencedRepositoryEntry();
if (re == null)
return;
File fExportDirectory = new File(exportDirectory, getIdent());
fExportDirectory.mkdirs();
RepositoryEntryImportExport reie = new RepositoryEntryImportExport(re, fExportDirectory);
reie.exportDoExport();
}
use of org.olat.repository.RepositoryEntryImportExport in project openolat by klemens.
the class ScormCourseNode method exportNode.
@Override
public void exportNode(File exportDirectory, ICourse course) {
RepositoryEntry re = CPEditController.getCPReference(getModuleConfiguration(), false);
if (re == null)
return;
File fExportDirectory = new File(exportDirectory, getIdent());
fExportDirectory.mkdirs();
RepositoryEntryImportExport reie = new RepositoryEntryImportExport(re, fExportDirectory);
reie.exportDoExport();
}
use of org.olat.repository.RepositoryEntryImportExport in project openolat by klemens.
the class VideoCourseNode method importNode.
@Override
public void importNode(File importDirectory, ICourse course, Identity owner, Locale locale, boolean withReferences) {
RepositoryEntryImportExport rie = new RepositoryEntryImportExport(importDirectory, getIdent());
if (withReferences && rie.anyExportedPropertiesAvailable()) {
// TODO: test
RepositoryHandler handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(VideoFileResource.TYPE_NAME);
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(), rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
VideoEditController.setVideoReference(re, getModuleConfiguration());
} else {
VideoEditController.removeVideoReference(getModuleConfiguration());
}
}
use of org.olat.repository.RepositoryEntryImportExport in project openolat by klemens.
the class WikiCourseNode method exportNode.
@Override
public void exportNode(File exportDirectory, ICourse course) {
RepositoryEntry re = WikiEditController.getWikiReference(getModuleConfiguration(), false);
if (re == null)
return;
File fExportDirectory = new File(exportDirectory, getIdent());
fExportDirectory.mkdirs();
RepositoryEntryImportExport reie = new RepositoryEntryImportExport(re, fExportDirectory);
reie.exportDoExport();
}
Aggregations