Search in sources :

Example 6 with QItemEvent

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

the class QuestionItemDetailsController method doPostConvert.

private void doPostConvert(UserRequest ureq, Event event) {
    if (event instanceof QItemsProcessedEvent) {
        QItemsProcessedEvent ipEvent = (QItemsProcessedEvent) event;
        int numberOfCopies = ipEvent.getNumberOfItems();
        int numberOfFails = ipEvent.getNumberOfFails();
        if (numberOfFails == 0) {
            showInfo("convert.item.successful", new String[] { Integer.toString(numberOfCopies) });
            fireEvent(ureq, new QItemEvent("convert-item", ipEvent.getSuccessfullItems().get(0)));
        } else {
            showWarning("convert.item.warning", new String[] { Integer.toString(numberOfFails), Integer.toString(numberOfCopies) });
        }
    }
}
Also used : QItemEvent(org.olat.modules.qpool.ui.events.QItemEvent) QItemsProcessedEvent(org.olat.modules.qpool.ui.events.QItemsProcessedEvent)

Aggregations

QItemEvent (org.olat.modules.qpool.ui.events.QItemEvent)6 QItemsProcessedEvent (org.olat.modules.qpool.ui.events.QItemsProcessedEvent)4 ArrayList (java.util.ArrayList)2 List (java.util.List)2 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)2 BusinessGroup (org.olat.group.BusinessGroup)2 BusinessGroupSelectionEvent (org.olat.group.model.BusinessGroupSelectionEvent)2 ExportFormatOptions (org.olat.modules.qpool.ExportFormatOptions)2 QuestionItemShort (org.olat.modules.qpool.QuestionItemShort)2 QItemList (org.olat.modules.qpool.model.QItemList)2 ExportFormatSelectionEvent (org.olat.modules.qpool.ui.events.ExportFormatSelectionEvent)2 QItemCreationCmdEvent (org.olat.modules.qpool.ui.events.QItemCreationCmdEvent)2 QItemEdited (org.olat.modules.qpool.ui.events.QItemEdited)2 QPoolEvent (org.olat.modules.qpool.ui.events.QPoolEvent)2 QPoolSelectionEvent (org.olat.modules.qpool.ui.events.QPoolSelectionEvent)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 EntryChangedEvent (org.olat.repository.controllers.EntryChangedEvent)2