Search in sources :

Example 1 with TaxonomyLevelItemsSource

use of org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource in project OpenOLAT by OpenOLAT.

the class QuestionListController method doChooseNewItemType.

private void doChooseNewItemType(UserRequest ureq) {
    removeAsListenerAndDispose(newItemOptionsCtrl);
    if (getSource() instanceof TaxonomyLevelItemsSource) {
        TaxonomyLevelItemsSource tliSource = (TaxonomyLevelItemsSource) getSource();
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), tliSource.getTaxonomyLevel(), getSource().isAdminItemSource());
    } else {
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), getSource().isAdminItemSource());
    }
    listenTo(newItemOptionsCtrl);
    removeAsListenerAndDispose(cmc);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), newItemOptionsCtrl.getInitialComponent(), true, translate("new.item"));
    cmc.activate();
    listenTo(cmc);
}
Also used : TaxonomyLevelItemsSource(org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 2 with TaxonomyLevelItemsSource

use of org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource in project openolat by klemens.

the class QuestionListController method doChooseNewItemType.

private void doChooseNewItemType(UserRequest ureq) {
    removeAsListenerAndDispose(newItemOptionsCtrl);
    if (getSource() instanceof TaxonomyLevelItemsSource) {
        TaxonomyLevelItemsSource tliSource = (TaxonomyLevelItemsSource) getSource();
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), tliSource.getTaxonomyLevel(), getSource().isAdminItemSource());
    } else {
        newItemOptionsCtrl = new NewItemOptionsController(ureq, getWindowControl(), getSecurityCallback(), getSource().isAdminItemSource());
    }
    listenTo(newItemOptionsCtrl);
    removeAsListenerAndDispose(cmc);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), newItemOptionsCtrl.getInitialComponent(), true, translate("new.item"));
    cmc.activate();
    listenTo(cmc);
}
Also used : TaxonomyLevelItemsSource(org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 TaxonomyLevelItemsSource (org.olat.modules.qpool.ui.datasource.TaxonomyLevelItemsSource)2