Search in sources :

Example 71 with CloseableModalController

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);
}
Also used : HashMap(java.util.HashMap) QPoolSPI(org.olat.modules.qpool.QPoolSPI) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) QuestionItemShort(org.olat.modules.qpool.QuestionItemShort) List(java.util.List) ArrayList(java.util.ArrayList)

Example 72 with CloseableModalController

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();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 73 with CloseableModalController

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();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 74 with CloseableModalController

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();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 75 with CloseableModalController

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);
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) MetadataBulkChangeController(org.olat.modules.qpool.ui.metadata.MetadataBulkChangeController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)789 RepositoryEntry (org.olat.repository.RepositoryEntry)52 ArrayList (java.util.ArrayList)48 Identity (org.olat.core.id.Identity)42 ReferencableEntriesSearchController (org.olat.repository.controllers.ReferencableEntriesSearchController)38 VFSContainer (org.olat.core.util.vfs.VFSContainer)24 Component (org.olat.core.gui.components.Component)20 ContactMessage (org.olat.core.util.mail.ContactMessage)20 ContactFormController (org.olat.modules.co.ContactFormController)20 File (java.io.File)17 List (java.util.List)16 UserSearchController (org.olat.admin.user.UserSearchController)16 TableEvent (org.olat.core.gui.components.table.TableEvent)16 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)16 ContactList (org.olat.core.util.mail.ContactList)16 MailTemplate (org.olat.core.util.mail.MailTemplate)14 OLATResourceable (org.olat.core.id.OLATResourceable)12 MailNotificationEditController (org.olat.core.util.mail.MailNotificationEditController)12 OLATSecurityException (org.olat.core.logging.OLATSecurityException)10 Roles (org.olat.core.id.Roles)8