Search in sources :

Example 1 with EmptyItemsSource

use of org.olat.modules.qpool.ui.datasource.EmptyItemsSource 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 2 with EmptyItemsSource

use of org.olat.modules.qpool.ui.datasource.EmptyItemsSource 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)

Example 3 with EmptyItemsSource

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

the class ItemListMySharesController method doSelectPool.

private void doSelectPool(UserRequest ureq, Long poolKey) {
    Pool myPool = null;
    for (Pool pool : myPools) {
        if (poolKey.equals(pool.getKey())) {
            myPool = pool;
        }
    }
    if (myPool == null) {
        updateSource(new EmptyItemsSource());
    } else {
        PoolItemsSource source = new PoolItemsSource(getIdentity(), ureq.getUserSession().getRoles(), myPool);
        source.getDefaultParams().setFormat(restrictToFormat);
        updateSource(source);
    }
}
Also used : PoolItemsSource(org.olat.modules.qpool.ui.datasource.PoolItemsSource) EmptyItemsSource(org.olat.modules.qpool.ui.datasource.EmptyItemsSource) Pool(org.olat.modules.qpool.Pool)

Example 4 with EmptyItemsSource

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

the class ItemListMySharesController method doSelectBusinessGroup.

private void doSelectBusinessGroup(UserRequest ureq, Long businessGroupKey) {
    BusinessGroup myGroup = null;
    for (BusinessGroup group : myGroups) {
        if (businessGroupKey.equals(group.getKey())) {
            myGroup = group;
        }
    }
    if (myGroup == null) {
        updateSource(new EmptyItemsSource());
    } else {
        SharedItemsSource source = new SharedItemsSource(myGroup, getIdentity(), ureq.getUserSession().getRoles(), false);
        source.setRestrictToFormat(restrictToFormat);
        updateSource(source);
    }
}
Also used : SharedItemsSource(org.olat.modules.qpool.ui.datasource.SharedItemsSource) BusinessGroup(org.olat.group.BusinessGroup) EmptyItemsSource(org.olat.modules.qpool.ui.datasource.EmptyItemsSource)

Example 5 with EmptyItemsSource

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

the class ItemListMyListsController method doSelectCollection.

private void doSelectCollection(UserRequest ureq, Long collectionKey) {
    QuestionItemCollection myCollection = null;
    for (QuestionItemCollection coll : myCollections) {
        if (collectionKey.equals(coll.getKey())) {
            myCollection = coll;
        }
    }
    if (myCollection == null) {
        updateSource(new EmptyItemsSource());
    } else {
        CollectionOfItemsSource source = new CollectionOfItemsSource(myCollection, getIdentity(), ureq.getUserSession().getRoles());
        source.setRestrictToFormat(restrictToFormat);
        updateSource(source);
    }
}
Also used : QuestionItemCollection(org.olat.modules.qpool.QuestionItemCollection) EmptyItemsSource(org.olat.modules.qpool.ui.datasource.EmptyItemsSource) CollectionOfItemsSource(org.olat.modules.qpool.ui.datasource.CollectionOfItemsSource)

Aggregations

EmptyItemsSource (org.olat.modules.qpool.ui.datasource.EmptyItemsSource)8 BusinessGroup (org.olat.group.BusinessGroup)2 Pool (org.olat.modules.qpool.Pool)2 QuestionItemCollection (org.olat.modules.qpool.QuestionItemCollection)2 CollectionOfItemsSource (org.olat.modules.qpool.ui.datasource.CollectionOfItemsSource)2 FinalItemsSource (org.olat.modules.qpool.ui.datasource.FinalItemsSource)2 PoolItemsSource (org.olat.modules.qpool.ui.datasource.PoolItemsSource)2 SharedItemsSource (org.olat.modules.qpool.ui.datasource.SharedItemsSource)2 TaxonomyLevel (org.olat.modules.taxonomy.TaxonomyLevel)2