use of org.olat.ims.cp.ui.CPEditMainController in project OpenOLAT by OpenOLAT.
the class ImsCPHandler method createEditorController.
@Override
public Controller createEditorController(RepositoryEntry re, UserRequest ureq, WindowControl wControl, TooledStackedPanel toolbar) {
// only unzips, if not already unzipped
OlatRootFolderImpl cpRoot = FileResourceManager.getInstance().unzipContainerResource(re.getOlatResource());
Quota quota = QuotaManager.getInstance().getCustomQuota(cpRoot.getRelPath());
if (quota == null) {
Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_REPO);
quota = QuotaManager.getInstance().createQuota(cpRoot.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
}
VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
cpRoot.setLocalSecurityCallback(secCallback);
return new CPEditMainController(ureq, wControl, toolbar, cpRoot, re.getOlatResource());
}
use of org.olat.ims.cp.ui.CPEditMainController in project openolat by klemens.
the class ImsCPHandler method createEditorController.
@Override
public Controller createEditorController(RepositoryEntry re, UserRequest ureq, WindowControl wControl, TooledStackedPanel toolbar) {
// only unzips, if not already unzipped
OlatRootFolderImpl cpRoot = FileResourceManager.getInstance().unzipContainerResource(re.getOlatResource());
Quota quota = QuotaManager.getInstance().getCustomQuota(cpRoot.getRelPath());
if (quota == null) {
Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_REPO);
quota = QuotaManager.getInstance().createQuota(cpRoot.getRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
}
VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
cpRoot.setLocalSecurityCallback(secCallback);
return new CPEditMainController(ureq, wControl, toolbar, cpRoot, re.getOlatResource());
}
Aggregations