Search in sources :

Example 6 with EmptyItemsSource

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

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)

Example 7 with EmptyItemsSource

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

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 8 with EmptyItemsSource

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

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)

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