Search in sources :

Example 1 with FinalItemsSource

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

the class FinalTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new FinalItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), taxonomyLevel);
        String resName = FINAL + "_" + taxonomyLevel.getIdentifier();
        OLATResourceable ores = OresHelper.createOLATResourceableInstanceWithoutCheck(resName, taxonomyLevel.getKey());
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, FINAL + taxonomyLevel.getKey(), false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : FinalItemsSource(org.olat.modules.qpool.ui.datasource.FinalItemsSource) OLATResourceable(org.olat.core.id.OLATResourceable) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 2 with FinalItemsSource

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

the class FinalTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new FinalItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), taxonomyLevel);
        String resName = FINAL + "_" + taxonomyLevel.getIdentifier();
        OLATResourceable ores = OresHelper.createOLATResourceableInstanceWithoutCheck(resName, taxonomyLevel.getKey());
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, FINAL + taxonomyLevel.getKey(), false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : FinalItemsSource(org.olat.modules.qpool.ui.datasource.FinalItemsSource) OLATResourceable(org.olat.core.id.OLATResourceable) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 3 with FinalItemsSource

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

the class ItemListMyCompetencesController method doSelectLevel.

private void doSelectLevel(UserRequest ureq, String levelKey) {
    TaxonomyLevel level = qpoolTaxonomyTreeBuilder.getTaxonomyLevel(levelKey);
    if (level == null) {
        updateSource(new EmptyItemsSource());
    } else {
        FinalItemsSource source = new FinalItemsSource(getIdentity(), ureq.getUserSession().getRoles(), level);
        source.getDefaultParams().setFormat(restrictToFormat);
        updateSource(source);
    }
}
Also used : FinalItemsSource(org.olat.modules.qpool.ui.datasource.FinalItemsSource) EmptyItemsSource(org.olat.modules.qpool.ui.datasource.EmptyItemsSource) TaxonomyLevel(org.olat.modules.taxonomy.TaxonomyLevel)

Example 4 with FinalItemsSource

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

the class ItemListMyCompetencesController method doSelectLevel.

private void doSelectLevel(UserRequest ureq, String levelKey) {
    TaxonomyLevel level = qpoolTaxonomyTreeBuilder.getTaxonomyLevel(levelKey);
    if (level == null) {
        updateSource(new EmptyItemsSource());
    } else {
        FinalItemsSource source = new FinalItemsSource(getIdentity(), ureq.getUserSession().getRoles(), level);
        source.getDefaultParams().setFormat(restrictToFormat);
        updateSource(source);
    }
}
Also used : FinalItemsSource(org.olat.modules.qpool.ui.datasource.FinalItemsSource) EmptyItemsSource(org.olat.modules.qpool.ui.datasource.EmptyItemsSource) TaxonomyLevel(org.olat.modules.taxonomy.TaxonomyLevel)

Aggregations

FinalItemsSource (org.olat.modules.qpool.ui.datasource.FinalItemsSource)4 WindowControl (org.olat.core.gui.control.WindowControl)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 QuestionItemsSource (org.olat.modules.qpool.ui.QuestionItemsSource)2 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)2 EmptyItemsSource (org.olat.modules.qpool.ui.datasource.EmptyItemsSource)2 TaxonomyLevel (org.olat.modules.taxonomy.TaxonomyLevel)2