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) });
}
}
}
Aggregations