Search in sources :

Example 56 with Reminder

use of org.olat.modules.reminder.Reminder in project openolat by klemens.

the class CourseSendReminderListController method doResend.

private void doResend(SentReminderRow row) {
    Reminder reloadedReminder = reminderService.loadByKey(row.getReminderKey());
    Identity id = securityManager.loadIdentityByKey(row.getIdentityKey());
    List<Identity> identitiesToRemind = Collections.singletonList(id);
    MailerResult result = reminderService.sendReminder(reloadedReminder, identitiesToRemind);
    if (result.getReturnCode() != MailerResult.OK) {
        MailHelper.printErrorsAndWarnings(result, getWindowControl(), false, getLocale());
    } else {
        showInfo("reminder.resend");
    }
    updateModel();
}
Also used : Reminder(org.olat.modules.reminder.Reminder) SentReminder(org.olat.modules.reminder.SentReminder) MailerResult(org.olat.core.util.mail.MailerResult) Identity(org.olat.core.id.Identity)

Example 57 with Reminder

use of org.olat.modules.reminder.Reminder in project openolat by klemens.

the class CourseReminderListController method doDelete.

private void doDelete(ReminderRow row) {
    Reminder reminder = reminderManager.loadByKey(row.getKey());
    reminderManager.delete(reminder);
    updateModel();
}
Also used : Reminder(org.olat.modules.reminder.Reminder)

Example 58 with Reminder

use of org.olat.modules.reminder.Reminder in project openolat by klemens.

the class CourseReminderListController method doDuplicate.

private void doDuplicate(ReminderRow row) {
    Reminder reminder = reminderManager.loadByKey(row.getKey());
    reminderManager.duplicate(reminder, getIdentity());
    updateModel();
}
Also used : Reminder(org.olat.modules.reminder.Reminder)

Example 59 with Reminder

use of org.olat.modules.reminder.Reminder in project openolat by klemens.

the class CourseReminderListController method doSend.

private void doSend(ReminderRow row) {
    Reminder reminder = reminderManager.loadByKey(row.getKey());
    reminderManager.sendReminder(reminder);
    updateModel();
}
Also used : Reminder(org.olat.modules.reminder.Reminder)

Example 60 with Reminder

use of org.olat.modules.reminder.Reminder in project openolat by klemens.

the class CourseReminderListController method doSendReminderList.

private void doSendReminderList(UserRequest ureq, Long reminderKey) {
    removeAsListenerAndDispose(sendReminderListCtrl);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance("SentReminders", reminderKey);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    Reminder reminder = reminderManager.loadByKey(reminderKey);
    sendReminderListCtrl = new CourseSendReminderListController(ureq, bwControl, reminder);
    listenTo(sendReminderListCtrl);
    addToHistory(ureq, sendReminderListCtrl);
    toolbarPanel.pushController(translate("send.reminder"), sendReminderListCtrl);
}
Also used : Reminder(org.olat.modules.reminder.Reminder) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

Reminder (org.olat.modules.reminder.Reminder)62 SentReminder (org.olat.modules.reminder.SentReminder)46 Identity (org.olat.core.id.Identity)32 Test (org.junit.Test)26 RepositoryEntry (org.olat.repository.RepositoryEntry)26 SentReminderImpl (org.olat.modules.reminder.model.SentReminderImpl)10 Date (java.util.Date)8 ImportExportReminder (org.olat.modules.reminder.model.ImportExportReminder)6 File (java.io.File)4 ParseException (java.text.ParseException)4 ArrayList (java.util.ArrayList)4 MailerResult (org.olat.core.util.mail.MailerResult)4 ReminderModule (org.olat.modules.reminder.ReminderModule)4 ReminderRule (org.olat.modules.reminder.ReminderRule)4 ReminderService (org.olat.modules.reminder.ReminderService)4 RuleSPI (org.olat.modules.reminder.RuleSPI)4 ImportExportReminders (org.olat.modules.reminder.model.ImportExportReminders)4 ReminderRules (org.olat.modules.reminder.model.ReminderRules)4 FileInputStream (java.io.FileInputStream)2 FileOutputStream (java.io.FileOutputStream)2