use of org.olat.course.condition.AreaSelectionController in project openolat by klemens.
the class ENEditGroupAreaFormController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == allowMultipleEnroll) {
if (allowMultipleEnroll.isSelected(0)) {
multipleEnrollCount.setVisible(true);
} else {
multipleEnrollCount.setVisible(false);
}
} else if (source == chooseGroupsLink) {
removeAsListenerAndDispose(groupChooseC);
groupChooseC = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupList));
listenTo(groupChooseC);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseC.getInitialComponent());
listenTo(cmc);
cmc.activate();
subm.setEnabled(false);
} else if (source == chooseAreasLink) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaChooseC);
// already areas -> choose areas
areaChooseC = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaList));
listenTo(areaChooseC);
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseC.getInitialComponent());
listenTo(cmc);
cmc.activate();
subm.setEnabled(false);
} else if (source == fixGroupError) {
/*
* user wants to fix problem with fixing group error link e.g. create one
* or more group at once.
*/
String[] csvGroupName = (String[]) fixGroupError.getUserObject();
easyGroupList.setEnabled(false);
removeAsListenerAndDispose(groupCreateCntrllr);
OLATResource courseResource = this.cev.getCourseGroupManager().getCourseResource();
RepositoryEntry courseRe = RepositoryManager.getInstance().lookupRepositoryEntry(courseResource, false);
groupCreateCntrllr = new NewBGController(ureq, getWindowControl(), courseRe, true, csvGroupName[0]);
listenTo(groupCreateCntrllr);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", groupCreateCntrllr.getInitialComponent());
listenTo(cmc);
cmc.activate();
subm.setEnabled(false);
} else if (source == fixAreaError) {
/*
* user wants to fix problem with fixing area error link e.g. create one
* or more areas at once.
*/
String[] csvAreaName = (String[]) fixAreaError.getUserObject();
easyAreaList.setEnabled(false);
removeAsListenerAndDispose(areaCreateCntrllr);
OLATResource courseResource = this.cev.getCourseGroupManager().getCourseResource();
areaCreateCntrllr = new NewAreaController(ureq, getWindowControl(), courseResource, true, csvAreaName[0]);
listenTo(areaCreateCntrllr);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", areaCreateCntrllr.getInitialComponent());
listenTo(cmc);
cmc.activate();
subm.setEnabled(false);
}
}
use of org.olat.course.condition.AreaSelectionController in project openolat by klemens.
the class GTAWorkflowEditController method doChooseArea.
private void doChooseArea(UserRequest ureq) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaSelectionCtrl);
areaSelectionCtrl = new AreaSelectionController(ureq, getWindowControl(), true, courseEditorEnv.getCourseGroupManager(), areaKeys);
listenTo(areaSelectionCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", areaSelectionCtrl.getInitialComponent());
listenTo(cmc);
cmc.activate();
}
use of org.olat.course.condition.AreaSelectionController in project openolat by klemens.
the class MembersSelectorFormFragment method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == chooseGroupCoachesLink) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(groupChooseCoaches);
groupChooseCoaches = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupCoachSelectionList));
listenTo(groupChooseCoaches);
String title = chooseGroupCoachesLink.getLinkTitleText();
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseCoaches.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseGroupParticipantsLink) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(groupChooseParticipants);
groupChooseParticipants = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupParticipantsSelectionList));
listenTo(groupChooseParticipants);
String title = chooseGroupParticipantsLink.getLabelText();
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseParticipants.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseAreasCoachesLink) {
// already areas -> choose areas
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaChooseCoaches);
areaChooseCoaches = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaCoachSelectionList));
listenTo(areaChooseCoaches);
String title = chooseAreasCoachesLink.getLinkTitleText();
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseCoaches.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseAreasParticipantsLink) {
// already areas -> choose areas
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaChooseParticipants);
areaChooseParticipants = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaParticipantsSelectionList));
listenTo(areaChooseParticipants);
String title = chooseAreasParticipantsLink.getLabelText();
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseParticipants.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
}
}
Aggregations