use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project openolat by klemens.
the class CopyConfirmationController method formOK.
@Override
protected void formOK(UserRequest ureq) {
List<QuestionItem> copyItems = qpoolService.copyItems(getIdentity(), itemsToCopy);
addToItemsSource(copyItems);
logAudit(copyItems);
fireEvent(ureq, new QItemsProcessedEvent(copyItems, itemsToCopy.size()));
}
use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent 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) });
}
}
}
Aggregations