Search in sources :

Example 1 with AreaSelectionController

use of org.olat.course.condition.AreaSelectionController in project OpenOLAT by OpenOLAT.

the class AssessmentModeEditController method doChooseAreas.

private void doChooseAreas(UserRequest ureq) {
    if (areaChooseCtrl != null)
        return;
    ICourse course = CourseFactory.loadCourse(courseOres);
    CourseGroupManager groupManager = course.getCourseEnvironment().getCourseGroupManager();
    areaChooseCtrl = new AreaSelectionController(ureq, getWindowControl(), true, groupManager, areaKeys);
    listenTo(areaChooseCtrl);
    cmc = new CloseableModalController(getWindowControl(), null, areaChooseCtrl.getInitialComponent(), true, translate("popup.chooseareas"), false);
    listenTo(cmc);
    cmc.activate();
}
Also used : CourseGroupManager(org.olat.course.groupsandrights.CourseGroupManager) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ICourse(org.olat.course.ICourse) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Example 2 with AreaSelectionController

use of org.olat.course.condition.AreaSelectionController in project OpenOLAT by OpenOLAT.

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);
    }
}
Also used : GroupSelectionController(org.olat.course.condition.GroupSelectionController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Example 3 with AreaSelectionController

use of org.olat.course.condition.AreaSelectionController in project OpenOLAT by OpenOLAT.

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);
    }
}
Also used : GroupSelectionController(org.olat.course.condition.GroupSelectionController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OLATResource(org.olat.resource.OLATResource) NewAreaController(org.olat.group.ui.NewAreaController) RepositoryEntry(org.olat.repository.RepositoryEntry) NewBGController(org.olat.group.ui.NewBGController) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Example 4 with AreaSelectionController

use of org.olat.course.condition.AreaSelectionController in project OpenOLAT by OpenOLAT.

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();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Example 5 with AreaSelectionController

use of org.olat.course.condition.AreaSelectionController in project openolat by klemens.

the class AssessmentModeEditController method doChooseAreas.

private void doChooseAreas(UserRequest ureq) {
    if (areaChooseCtrl != null)
        return;
    ICourse course = CourseFactory.loadCourse(courseOres);
    CourseGroupManager groupManager = course.getCourseEnvironment().getCourseGroupManager();
    areaChooseCtrl = new AreaSelectionController(ureq, getWindowControl(), true, groupManager, areaKeys);
    listenTo(areaChooseCtrl);
    cmc = new CloseableModalController(getWindowControl(), null, areaChooseCtrl.getInitialComponent(), true, translate("popup.chooseareas"), false);
    listenTo(cmc);
    cmc.activate();
}
Also used : CourseGroupManager(org.olat.course.groupsandrights.CourseGroupManager) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ICourse(org.olat.course.ICourse) AreaSelectionController(org.olat.course.condition.AreaSelectionController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)8 AreaSelectionController (org.olat.course.condition.AreaSelectionController)8 GroupSelectionController (org.olat.course.condition.GroupSelectionController)4 ICourse (org.olat.course.ICourse)2 CourseGroupManager (org.olat.course.groupsandrights.CourseGroupManager)2 NewAreaController (org.olat.group.ui.NewAreaController)2 NewBGController (org.olat.group.ui.NewBGController)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 OLATResource (org.olat.resource.OLATResource)2