use of org.olat.core.gui.control.generic.iframe.DeliveryOptionsConfigurationController in project openolat by klemens.
the class CPRuntimeController method doLayout.
private void doLayout(UserRequest ureq) {
RepositoryEntry entry = getRepositoryEntry();
final OLATResource resource = entry.getOlatResource();
CPPackageConfig cpConfig = cpManager.getCPPackageConfig(resource);
DeliveryOptions config = cpConfig == null ? null : cpConfig.getDeliveryOptions();
WindowControl bwControl = getSubWindowControl("Layout");
final DeliveryOptionsConfigurationController deliveryOptionsCtrl = new DeliveryOptionsConfigurationController(ureq, addToHistory(ureq, bwControl), config, "Knowledge Transfer#_cp_layout");
deliveryOptionsCtrl.addControllerListener(new ControllerEventListener() {
@Override
public void dispatchEvent(UserRequest uureq, Controller source, Event event) {
if (source == deliveryOptionsCtrl && (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT)) {
DeliveryOptions newConfig = deliveryOptionsCtrl.getDeliveryOptions();
CPPackageConfig cConfig = cpManager.getCPPackageConfig(resource);
if (cConfig == null) {
cConfig = new CPPackageConfig();
}
cConfig.setDeliveryOptions(newConfig);
cpManager.setCPPackageConfig(resource, cConfig);
}
}
});
pushController(ureq, translate("tab.layout"), deliveryOptionsCtrl);
setActiveTool(deliveryOptionsLink);
}
use of org.olat.core.gui.control.generic.iframe.DeliveryOptionsConfigurationController in project openolat by klemens.
the class ScormRuntimeController method doLayout.
private void doLayout(UserRequest ureq) {
RepositoryEntry entry = getRepositoryEntry();
ScormPackageConfig scormConfig = ScormMainManager.getInstance().getScormPackageConfig(entry.getOlatResource());
DeliveryOptions config = scormConfig == null ? null : scormConfig.getDeliveryOptions();
final OLATResource resource = entry.getOlatResource();
WindowControl bwControl = getSubWindowControl("Layout");
final DeliveryOptionsConfigurationController deliveryOptionsCtrl = new DeliveryOptionsConfigurationController(ureq, addToHistory(ureq, bwControl), config, "Knowledge Transfer#_scorm_layout");
deliveryOptionsCtrl.addControllerListener(new ControllerEventListener() {
@Override
public void dispatchEvent(UserRequest uureq, Controller source, Event event) {
if (source == deliveryOptionsCtrl && (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT)) {
DeliveryOptions newConfig = deliveryOptionsCtrl.getDeliveryOptions();
ScormPackageConfig sConfig = ScormMainManager.getInstance().getScormPackageConfig(resource);
if (sConfig == null) {
sConfig = new ScormPackageConfig();
}
sConfig.setDeliveryOptions(newConfig);
ScormMainManager.getInstance().setScormPackageConfig(resource, sConfig);
}
}
});
pushController(ureq, translate("tab.layout"), deliveryOptionsCtrl);
setActiveTool(deliveryOptionsLink);
}
use of org.olat.core.gui.control.generic.iframe.DeliveryOptionsConfigurationController in project OpenOLAT by OpenOLAT.
the class ScormRuntimeController method doLayout.
private void doLayout(UserRequest ureq) {
RepositoryEntry entry = getRepositoryEntry();
ScormPackageConfig scormConfig = ScormMainManager.getInstance().getScormPackageConfig(entry.getOlatResource());
DeliveryOptions config = scormConfig == null ? null : scormConfig.getDeliveryOptions();
final OLATResource resource = entry.getOlatResource();
WindowControl bwControl = getSubWindowControl("Layout");
final DeliveryOptionsConfigurationController deliveryOptionsCtrl = new DeliveryOptionsConfigurationController(ureq, addToHistory(ureq, bwControl), config, "Knowledge Transfer#_scorm_layout");
deliveryOptionsCtrl.addControllerListener(new ControllerEventListener() {
@Override
public void dispatchEvent(UserRequest uureq, Controller source, Event event) {
if (source == deliveryOptionsCtrl && (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT)) {
DeliveryOptions newConfig = deliveryOptionsCtrl.getDeliveryOptions();
ScormPackageConfig sConfig = ScormMainManager.getInstance().getScormPackageConfig(resource);
if (sConfig == null) {
sConfig = new ScormPackageConfig();
}
sConfig.setDeliveryOptions(newConfig);
ScormMainManager.getInstance().setScormPackageConfig(resource, sConfig);
}
}
});
pushController(ureq, translate("tab.layout"), deliveryOptionsCtrl);
setActiveTool(deliveryOptionsLink);
}
use of org.olat.core.gui.control.generic.iframe.DeliveryOptionsConfigurationController in project OpenOLAT by OpenOLAT.
the class CPRuntimeController method doLayout.
private void doLayout(UserRequest ureq) {
RepositoryEntry entry = getRepositoryEntry();
final OLATResource resource = entry.getOlatResource();
CPPackageConfig cpConfig = cpManager.getCPPackageConfig(resource);
DeliveryOptions config = cpConfig == null ? null : cpConfig.getDeliveryOptions();
WindowControl bwControl = getSubWindowControl("Layout");
final DeliveryOptionsConfigurationController deliveryOptionsCtrl = new DeliveryOptionsConfigurationController(ureq, addToHistory(ureq, bwControl), config, "Knowledge Transfer#_cp_layout");
deliveryOptionsCtrl.addControllerListener(new ControllerEventListener() {
@Override
public void dispatchEvent(UserRequest uureq, Controller source, Event event) {
if (source == deliveryOptionsCtrl && (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT)) {
DeliveryOptions newConfig = deliveryOptionsCtrl.getDeliveryOptions();
CPPackageConfig cConfig = cpManager.getCPPackageConfig(resource);
if (cConfig == null) {
cConfig = new CPPackageConfig();
}
cConfig.setDeliveryOptions(newConfig);
cpManager.setCPPackageConfig(resource, cConfig);
}
}
});
pushController(ureq, translate("tab.layout"), deliveryOptionsCtrl);
setActiveTool(deliveryOptionsLink);
}
Aggregations