use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project OpenOLAT by OpenOLAT.
the class QuestionListController 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) });
} else {
showWarning("convert.item.warning", new String[] { Integer.toString(numberOfFails), Integer.toString(numberOfCopies) });
}
getItemsTable().reset();
fireEvent(ureq, new QPoolEvent(QPoolEvent.EDIT));
}
}
use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project OpenOLAT by OpenOLAT.
the class QuestionListController method doPostCopy.
private void doPostCopy(UserRequest ureq, Event event) {
if (event instanceof QItemsProcessedEvent) {
QItemsProcessedEvent ipEvent = (QItemsProcessedEvent) event;
int numberOfCopies = ipEvent.getNumberOfItems();
showInfo("item.copied", Integer.toString(numberOfCopies));
getItemsTable().reset();
fireEvent(ureq, new QPoolEvent(QPoolEvent.EDIT));
}
}
use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project openolat by klemens.
the class QuestionListController method doPostCopy.
private void doPostCopy(UserRequest ureq, Event event) {
if (event instanceof QItemsProcessedEvent) {
QItemsProcessedEvent ipEvent = (QItemsProcessedEvent) event;
int numberOfCopies = ipEvent.getNumberOfItems();
showInfo("item.copied", Integer.toString(numberOfCopies));
getItemsTable().reset();
fireEvent(ureq, new QPoolEvent(QPoolEvent.EDIT));
}
}
use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project openolat by klemens.
the class ConversionConfirmationController method formOK.
@Override
protected void formOK(UserRequest ureq) {
String format = formatEl.isOneSelected() ? formatEl.getSelectedKey() : null;
List<QuestionItemShort> itemsToConvert = formatToItems.get(format);
List<QuestionItem> convertedItems = qpoolService.convertItems(getIdentity(), itemsToConvert, format, getLocale());
addToItemsSource(convertedItems);
logAudit(convertedItems);
fireEvent(ureq, new QItemsProcessedEvent(convertedItems, itemsToConvert.size(), itemsToConvert.size() - convertedItems.size()));
}
use of org.olat.modules.qpool.ui.events.QItemsProcessedEvent in project openolat by klemens.
the class QuestionItemDetailsController method doPostCopy.
private void doPostCopy(UserRequest ureq, Event event) {
if (event instanceof QItemsProcessedEvent) {
QItemsProcessedEvent ipEvent = (QItemsProcessedEvent) event;
int numberOfCopies = ipEvent.getNumberOfItems();
showInfo("item.copied", Integer.toString(numberOfCopies));
fireEvent(ureq, new QItemEvent("copy-item", ipEvent.getSuccessfullItems().get(0)));
}
}
Aggregations