Search in sources :

Example 61 with Reminder

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

the class CourseReminderLogsController method updateModel.

protected void updateModel() {
    List<SentReminder> sentReminders = reminderService.getSentReminders(repositoryEntry);
    List<SentReminderRow> rows = new ArrayList<>(sentReminders.size());
    for (SentReminder sentReminder : sentReminders) {
        Identity identity = sentReminder.getIdentity();
        Reminder reminder = sentReminder.getReminder();
        SentReminderRow row = new SentReminderRow(reminder, sentReminder, identity, userPropertyHandlers, getLocale());
        rows.add(row);
    }
    tableModel.setObjects(rows);
    tableEl.reset();
    tableEl.setVisible(rows.size() > 0);
}
Also used : Reminder(org.olat.modules.reminder.Reminder) SentReminder(org.olat.modules.reminder.SentReminder) ArrayList(java.util.ArrayList) Identity(org.olat.core.id.Identity) SentReminder(org.olat.modules.reminder.SentReminder) SentReminderRow(org.olat.course.reminder.model.SentReminderRow)

Example 62 with Reminder

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

the class CourseReminderLogsController method doOpenReminder.

private void doOpenReminder(UserRequest ureq, SentReminderRow row) {
    removeAsListenerAndDispose(reminderEditCtrl);
    Reminder reminder = reminderService.loadByKey(row.getReminderKey());
    reminderEditCtrl = new CourseReminderEditController(ureq, getWindowControl(), reminder);
    listenTo(reminderEditCtrl);
    toolbarPanel.pushController(translate("edit.reminder"), reminderEditCtrl);
}
Also used : Reminder(org.olat.modules.reminder.Reminder) SentReminder(org.olat.modules.reminder.SentReminder)

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