Search in sources :

Example 1 with QuestionItemsSource

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

the class BusinessGroupTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        boolean shareAdmin = isShareAdmin(ureq, group);
        QuestionItemsSource source = new SharedItemsSource(group, ureq.getIdentity(), ureq.getUserSession().getRoles(), shareAdmin);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, group, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, TABLE_PREFERENCE_PREFIX + group.getKey(), false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : SharedItemsSource(org.olat.modules.qpool.ui.datasource.SharedItemsSource) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 2 with QuestionItemsSource

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

the class WithoutAuthorTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new WithoutAuthorItemSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), WITHOUT_AUTHOR);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, WITHOUT_AUTHOR, true);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : WithoutAuthorItemSource(org.olat.modules.qpool.ui.datasource.WithoutAuthorItemSource) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 3 with QuestionItemsSource

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

the class AllQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new AllItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), ALL);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, ALL, true);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : AllItemsSource(org.olat.modules.qpool.ui.datasource.AllItemsSource) QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController)

Example 4 with QuestionItemsSource

use of org.olat.modules.qpool.ui.QuestionItemsSource 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 5 with QuestionItemsSource

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

the class MyQuestionsTreeNode method getController.

@Override
public Controller getController(UserRequest ureq, WindowControl wControl) {
    if (questionsCtrl == null) {
        QuestionItemsSource source = new MyItemsSource(ureq.getIdentity(), ureq.getUserSession().getRoles(), ITEM_SOURCE_NAME);
        WindowControl swControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ORES, null, wControl, true);
        questionsCtrl = new QuestionsController(ureq, swControl, stackPanel, source, securityCallback, TABLE_PREFERENCE_PREFIX, false);
    } else {
        questionsCtrl.updateSource();
    }
    return questionsCtrl;
}
Also used : QuestionItemsSource(org.olat.modules.qpool.ui.QuestionItemsSource) WindowControl(org.olat.core.gui.control.WindowControl) QuestionsController(org.olat.modules.qpool.ui.QuestionsController) MyItemsSource(org.olat.modules.qpool.ui.datasource.MyItemsSource)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)18 QuestionItemsSource (org.olat.modules.qpool.ui.QuestionItemsSource)18 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)18 OLATResourceable (org.olat.core.id.OLATResourceable)4 AllItemsSource (org.olat.modules.qpool.ui.datasource.AllItemsSource)2 CollectionOfItemsSource (org.olat.modules.qpool.ui.datasource.CollectionOfItemsSource)2 FinalItemsSource (org.olat.modules.qpool.ui.datasource.FinalItemsSource)2 MarkedItemsSource (org.olat.modules.qpool.ui.datasource.MarkedItemsSource)2 MyItemsSource (org.olat.modules.qpool.ui.datasource.MyItemsSource)2 MyTaxonomyLevelItemsSource (org.olat.modules.qpool.ui.datasource.MyTaxonomyLevelItemsSource)2 SharedItemsSource (org.olat.modules.qpool.ui.datasource.SharedItemsSource)2 WithoutAuthorItemSource (org.olat.modules.qpool.ui.datasource.WithoutAuthorItemSource)2 WithoutTaxonomyLevelItemSource (org.olat.modules.qpool.ui.datasource.WithoutTaxonomyLevelItemSource)2