Skip to content
Snippets Groups Projects
Commit c79a0853 authored by srosse's avatar srosse
Browse files

OO-5065: don't export folder element with link to shared folder

parent c720d308
No related branches found
No related tags found
No related merge requests found
......@@ -384,6 +384,8 @@ public class CourseExportMediaResource implements MediaResource, StreamingOutput
}
private void exportBCCourseNode(PersistingCourseImpl sourceCourse, BCCourseNode courseNode, ZipOutputStream zout) {
if(courseNode.isSharedFolder()) return;
try(ShieldOutputStream fOut = new ShieldOutputStream(zout)) {
VFSContainer nodeContainer = VFSManager.olatRootContainer(BCCourseNode.getFoldernodePathRelToFolderBase(sourceCourse.getCourseEnvironment(), courseNode), null);
......
......@@ -216,7 +216,7 @@ public class BCCourseNode extends AbstractAccessableCourseNode {
.olatRootContainer(getFoldernodePathRelToFolderBase(course.getCourseEnvironment(), this), null);
ZipUtil.unzipNonStrict(fFolderNodeZip, nodeContainer, owner, false);
} else {
// the whole folder can be moved back to the root direcotry of foldernodes
// the whole folder can be moved back to the root directory of foldernodes
// of this course
File fFolderNodeDir = new File(FolderConfig.getCanonicalRoot() + getFoldernodePathRelToFolderBase(course.getCourseEnvironment(), this));
fFolderNodeDir.mkdirs();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment