use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method doConfirmConversion.
private void doConfirmConversion(UserRequest ureq, QuestionItemShort item) {
Map<String, List<QuestionItemShort>> formatToItems = new HashMap<>();
List<QPoolSPI> spies = poolModule.getQuestionPoolProviders();
for (QPoolSPI sp : spies) {
if (sp != null && sp.isConversionPossible(item)) {
List<QuestionItemShort> convertItems;
if (formatToItems.containsKey(sp.getFormat())) {
convertItems = formatToItems.get(sp.getFormat());
} else {
convertItems = new ArrayList<>(1);
formatToItems.put(sp.getFormat(), Collections.singletonList(item));
}
convertItems.add(item);
}
}
conversionConfirmationCtrl = new ConversionConfirmationController(ureq, getWindowControl(), formatToItems, itemSource);
listenTo(conversionConfirmationCtrl);
cmc = new CloseableModalController(getWindowControl(), translate("close"), conversionConfirmationCtrl.getInitialComponent(), true, translate("convert.item"));
cmc.activate();
listenTo(cmc);
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method doConfirmCopy.
private void doConfirmCopy(UserRequest ureq, QuestionItemShort item) {
copyConfirmationCtrl = new CopyConfirmationController(ureq, getWindowControl(), Collections.singletonList(item), itemSource);
listenTo(copyConfirmationCtrl);
cmc = new CloseableModalController(getWindowControl(), translate("close"), copyConfirmationCtrl.getInitialComponent(), true, translate("confirm.copy.title"), true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method doConfirmStartReview.
private void doConfirmStartReview(UserRequest ureq) {
reviewStartCtrl = new ReviewStartController(ureq, getWindowControl(), metadatasCtrl.getItem(), itemSource.isAdminItemSource());
listenTo(reviewStartCtrl);
cmc = new CloseableModalController(getWindowControl(), null, reviewStartCtrl.getInitialComponent(), true, translate("process.start.review.title"), false);
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class QuestionItemDetailsController method openReview.
private void openReview(UserRequest ureq) {
reviewCtrl = new ReviewController(ureq, getWindowControl());
listenTo(reviewCtrl);
cmc = new CloseableModalController(getWindowControl(), null, reviewCtrl.getInitialComponent(), true, translate("process.rating.title"), true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class QuestionListController method doBulkChange.
private void doBulkChange(UserRequest ureq, List<ItemRow> items) {
removeAsListenerAndDispose(bulkChangeCtrl);
bulkChangeCtrl = new MetadataBulkChangeController(ureq, getWindowControl(), getSecurityCallback(), items, getSource().isAdminItemSource());
listenTo(bulkChangeCtrl);
cmc = new CloseableModalController(getWindowControl(), translate("close"), bulkChangeCtrl.getInitialComponent(), true, translate("bulk.change"));
cmc.activate();
listenTo(cmc);
}
Aggregations