Search in sources :

Example 6 with GroupSelectionController

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

the class GTAWorkflowEditController method doChooseGroup.

private void doChooseGroup(UserRequest ureq) {
    removeAsListenerAndDispose(cmc);
    removeAsListenerAndDispose(groupSelectionCtrl);
    groupSelectionCtrl = new GroupSelectionController(ureq, getWindowControl(), true, courseEditorEnv.getCourseGroupManager(), groupKeys);
    listenTo(groupSelectionCtrl);
    cmc = new CloseableModalController(getWindowControl(), "close", groupSelectionCtrl.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
}
Also used : GroupSelectionController(org.olat.course.condition.GroupSelectionController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 7 with GroupSelectionController

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

the class AssessmentModeEditController method doChooseGroups.

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

Example 8 with GroupSelectionController

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

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)8 GroupSelectionController (org.olat.course.condition.GroupSelectionController)8 AreaSelectionController (org.olat.course.condition.AreaSelectionController)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