use of org.olat.course.condition.Condition in project OpenOLAT by OpenOLAT.
the class ENEditController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
public void event(UserRequest urequest, Controller source, Event event) {
if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
courseNode.setPreConditionAccess(cond);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == easyGroupEditCtrllr) {
// somehting changed in the nodeconfig
moduleConfiguration = easyGroupEditCtrllr.getModuleConfiguration();
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
use of org.olat.course.condition.Condition in project OpenOLAT by OpenOLAT.
the class SPEditController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
public void event(UserRequest urequest, Controller source, Event event) {
if (source instanceof NodeEditController) {
if (combiLinkCtr != null && combiLinkCtr.isDoProposal()) {
combiLinkCtr.setRelFilePath(CourseEditorHelper.createUniqueRelFilePathFromShortTitle(courseNode, courseFolderBaseContainer));
}
} else if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
courseNode.setPreConditionAccess(cond);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == deliveryOptionsCtrl) {
if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
DeliveryOptions config = deliveryOptionsCtrl.getDeliveryOptions();
if (config != null) {
moduleConfiguration.set(CONFIG_KEY_DELIVERYOPTIONS, config);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
} else if (source == combiLinkCtr) {
if (event == Event.DONE_EVENT) {
String relPath = VFSManager.getRelativeItemPath(combiLinkCtr.getFile(), courseFolderBaseContainer, null);
combiLinkCtr.setEditable(hasEditRights(relPath));
moduleConfiguration.set(CONFIG_KEY_FILE, relPath);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
if (!myTabbedPane.containsTab(deliveryOptionsCtrl.getInitialComponent())) {
myTabbedPane.addTab(translate(PANE_TAB_DELIVERYOPTIONS), deliveryOptionsCtrl.getInitialComponent());
}
myContent.contextPut("editorEnabled", combiLinkCtr.isEditorEnabled());
}
} else if (source == securitySettingForm) {
if (event == Event.DONE_EVENT) {
boolean allowRelativeLinks = securitySettingForm.getAllowRelativeLinksConfig();
moduleConfiguration.set(CONFIG_KEY_ALLOW_RELATIVE_LINKS, allowRelativeLinks);
moduleConfiguration.set(CONFIG_KEY_ALLOW_COACH_EDIT, securitySettingForm.getAllowCoachEditConfig());
combiLinkCtr.setAllowEditorRelativeLinks(allowRelativeLinks);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
}
use of org.olat.course.condition.Condition in project OpenOLAT by OpenOLAT.
the class IQEditController method event.
@Override
public void event(UserRequest urequest, Controller source, Event event) {
if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
courseNode.setPreConditionAccess(cond);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == configurationCtrl) {
if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
layoutConfigurationCtrl.updateEditController(urequest);
}
} else if (source == highScoreNodeConfigController) {
if (event == Event.DONE_EVENT) {
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == layoutConfigurationCtrl) {
if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
configurationCtrl.updateEditController(urequest, false);
layoutConfigurationCtrl.updateEditController(urequest);
}
}
}
use of org.olat.course.condition.Condition in project OpenOLAT by OpenOLAT.
the class IQEditController method init.
private void init(UserRequest ureq) {
configurationCtrl = new IQConfigurationController(ureq, getWindowControl(), stackPanel, course, courseNode, type);
listenTo(configurationCtrl);
layoutConfigurationCtrl = new IQLayoutConfigurationController(ureq, getWindowControl(), course, courseNode, type);
listenTo(layoutConfigurationCtrl);
if (AssessmentInstance.QMD_ENTRY_TYPE_ASSESS.equals(type)) {
highScoreNodeConfigController = new HighScoreEditController(ureq, getWindowControl(), moduleConfiguration);
listenTo(highScoreNodeConfigController);
}
Condition accessCondition = courseNode.getPreConditionAccess();
accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), euce, accessCondition, AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), courseNode));
listenTo(accessibilityCondContr);
}
use of org.olat.course.condition.Condition in project OpenOLAT by OpenOLAT.
the class ChecklistEditController method event.
/**
* {@inheritDoc}
*/
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
courseNode.setPreConditionAccess(cond);
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == checklistFormContr && event == Event.CHANGED_EVENT) {
// checklist = ChecklistManager.getInstance().saveChecklist(checklist);
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
} else if (source == manageController && event == Event.DONE_EVENT) {
cmcManage.deactivate();
} else if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
// update title and description according to the course node
Checklist cl = ChecklistManager.getInstance().loadChecklist(checklist);
cl.setTitle(courseNode.getShortTitle());
cl.setDescription(courseNode.getLongTitle());
checklist = ChecklistManager.getInstance().saveChecklist(cl);
}
}
Aggregations