Search in sources :

Example 6 with QItemViewEvent

use of org.olat.modules.qpool.ui.events.QItemViewEvent in project openolat by klemens.

the class ItemListMyListsController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (selectLink == source) {
        Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
        if (!selections.isEmpty()) {
            List<QuestionItemView> items = getItemViews(selections);
            fireEvent(ureq, new QItemViewEvent("select-item", items));
        }
    } else if (myListEl == source) {
        String selectedCollKey = myListEl.getSelectedKey();
        if (StringHelper.isLong(selectedCollKey)) {
            Long collectionKey = Long.parseLong(selectedCollKey);
            doSelectCollection(ureq, collectionKey);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : QItemViewEvent(org.olat.modules.qpool.ui.events.QItemViewEvent) QuestionItemView(org.olat.modules.qpool.QuestionItemView)

Example 7 with QItemViewEvent

use of org.olat.modules.qpool.ui.events.QItemViewEvent in project openolat by klemens.

the class ItemListMySharesController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (selectLink == source) {
        Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
        if (!selections.isEmpty()) {
            List<QuestionItemView> items = getItemViews(selections);
            fireEvent(ureq, new QItemViewEvent("select-item", items));
        }
    } else if (myShareEl == source) {
        String selectedKey = myShareEl.getSelectedKey();
        if (selectedKey != null && selectedKey.length() > 4) {
            String key = selectedKey.substring(4);
            if (StringHelper.isLong(key)) {
                Long resourceKey = Long.parseLong(key);
                if (selectedKey.startsWith("pool")) {
                    doSelectPool(ureq, resourceKey);
                } else if (selectedKey.startsWith("grou")) {
                    doSelectBusinessGroup(ureq, resourceKey);
                }
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : QItemViewEvent(org.olat.modules.qpool.ui.events.QItemViewEvent) QuestionItemView(org.olat.modules.qpool.QuestionItemView)

Example 8 with QItemViewEvent

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

the class ItemListMyCompetencesController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (selectLink == source) {
        Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
        if (!selections.isEmpty()) {
            List<QuestionItemView> items = getItemViews(selections);
            fireEvent(ureq, new QItemViewEvent("select-item", items));
        }
    } else if (myCompetenceLevelsEl == source) {
        String selectedKey = myCompetenceLevelsEl.getSelectedKey();
        if (StringHelper.isLong(selectedKey)) {
            doSelectLevel(ureq, selectedKey);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : QItemViewEvent(org.olat.modules.qpool.ui.events.QItemViewEvent) QuestionItemView(org.olat.modules.qpool.QuestionItemView)

Example 9 with QItemViewEvent

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

the class ItemListMySharesController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (selectLink == source) {
        Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
        if (!selections.isEmpty()) {
            List<QuestionItemView> items = getItemViews(selections);
            fireEvent(ureq, new QItemViewEvent("select-item", items));
        }
    } else if (myShareEl == source) {
        String selectedKey = myShareEl.getSelectedKey();
        if (selectedKey != null && selectedKey.length() > 4) {
            String key = selectedKey.substring(4);
            if (StringHelper.isLong(key)) {
                Long resourceKey = Long.parseLong(key);
                if (selectedKey.startsWith("pool")) {
                    doSelectPool(ureq, resourceKey);
                } else if (selectedKey.startsWith("grou")) {
                    doSelectBusinessGroup(ureq, resourceKey);
                }
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : QItemViewEvent(org.olat.modules.qpool.ui.events.QItemViewEvent) QuestionItemView(org.olat.modules.qpool.QuestionItemView)

Example 10 with QItemViewEvent

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

the class ItemListMyListsController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (selectLink == source) {
        Set<Integer> selections = getItemsTable().getMultiSelectedIndex();
        if (!selections.isEmpty()) {
            List<QuestionItemView> items = getItemViews(selections);
            fireEvent(ureq, new QItemViewEvent("select-item", items));
        }
    } else if (myListEl == source) {
        String selectedCollKey = myListEl.getSelectedKey();
        if (StringHelper.isLong(selectedCollKey)) {
            Long collectionKey = Long.parseLong(selectedCollKey);
            doSelectCollection(ureq, collectionKey);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : QItemViewEvent(org.olat.modules.qpool.ui.events.QItemViewEvent) QuestionItemView(org.olat.modules.qpool.QuestionItemView)

Aggregations

QItemViewEvent (org.olat.modules.qpool.ui.events.QItemViewEvent)12 QuestionItemView (org.olat.modules.qpool.QuestionItemView)10 ArrayList (java.util.ArrayList)2 List (java.util.List)2 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)2 TreeNode (org.olat.core.gui.components.tree.TreeNode)2 TreePosition (org.olat.core.gui.components.tree.TreePosition)2 Event (org.olat.core.gui.control.Event)2 Memento (org.olat.core.util.memento.Memento)2 QTIChangeLogMessage (org.olat.ims.qti.QTIChangeLogMessage)2 GenericQtiNode (org.olat.ims.qti.editor.tree.GenericQtiNode)2 ItemsPackage (org.olat.ims.qti.questionimport.ItemsPackage)2 AssessmentItemsPackage (org.olat.ims.qti21.questionimport.AssessmentItemsPackage)2 AssessmentItemEvent (org.olat.ims.qti21.ui.editor.events.AssessmentItemEvent)2 AssessmentSectionEvent (org.olat.ims.qti21.ui.editor.events.AssessmentSectionEvent)2 AssessmentTestEvent (org.olat.ims.qti21.ui.editor.events.AssessmentTestEvent)2 AssessmentTestPartEvent (org.olat.ims.qti21.ui.editor.events.AssessmentTestPartEvent)2 DetachFromPoolEvent (org.olat.ims.qti21.ui.editor.events.DetachFromPoolEvent)2 ContactFormController (org.olat.modules.co.ContactFormController)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2