throw new OLATRuntimeException(this.getClass(), "Could not create course base path:" + courseRootContainer, null);
}
protected OlatRootFolderImpl getIsolatedCourseFolder() {
// create local course folder
OlatRootFolderImpl isolatedCourseFolder = new OlatRootFolderImpl(courseRootContainer.getRelPath() + File.separator + COURSEFOLDER, null);
// generate course folder
File fCourseFolder = isolatedCourseFolder.getBasefile();
if (!fCourseFolder.exists() && !fCourseFolder.mkdirs()) throw new OLATRuntimeException(this.getClass(),
"could not create course's coursefolder path:" + fCourseFolder.getAbsolutePath(), null);
QuotaManager qm = QuotaManager.getInstance();
Quota q = qm.getCustomQuota(isolatedCourseFolder.getRelPath());
if (q == null){
Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_COURSE);
q = QuotaManager.getInstance().createQuota(isolatedCourseFolder.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
}
FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(q);
isolatedCourseFolder.setLocalSecurityCallback(secCallback);
return isolatedCourseFolder;
}