Search in sources :

Example 1 with SentReminderRow

use of org.olat.course.reminder.model.SentReminderRow in project OpenOLAT by OpenOLAT.

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 2 with SentReminderRow

use of org.olat.course.reminder.model.SentReminderRow in project OpenOLAT by OpenOLAT.

the class CourseSendReminderListController method updateModel.

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

Example 3 with SentReminderRow

use of org.olat.course.reminder.model.SentReminderRow in project openolat by klemens.

the class CourseReminderLogsController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            SentReminderRow row = tableModel.getObject(se.getIndex());
            if ("reminder".equals(cmd)) {
                doOpenReminder(ureq, row);
            } else if ("resend".equals(cmd)) {
                doResend(row);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) SentReminderRow(org.olat.course.reminder.model.SentReminderRow)

Example 4 with SentReminderRow

use of org.olat.course.reminder.model.SentReminderRow in project openolat by klemens.

the class CourseSendReminderListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            SentReminderRow row = tableModel.getObject(se.getIndex());
            if ("resend".equals(cmd)) {
                doResend(row);
            } else if (UserConstants.FIRSTNAME.equals(cmd) || UserConstants.LASTNAME.equals(cmd)) {
                doOpenIdentity(ureq, row);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) SentReminderRow(org.olat.course.reminder.model.SentReminderRow)

Example 5 with SentReminderRow

use of org.olat.course.reminder.model.SentReminderRow in project OpenOLAT by OpenOLAT.

the class CourseSendReminderListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            SentReminderRow row = tableModel.getObject(se.getIndex());
            if ("resend".equals(cmd)) {
                doResend(row);
            } else if (UserConstants.FIRSTNAME.equals(cmd) || UserConstants.LASTNAME.equals(cmd)) {
                doOpenIdentity(ureq, row);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) SentReminderRow(org.olat.course.reminder.model.SentReminderRow)

Aggregations

SentReminderRow (org.olat.course.reminder.model.SentReminderRow)8 ArrayList (java.util.ArrayList)4 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)4 Identity (org.olat.core.id.Identity)4 SentReminder (org.olat.modules.reminder.SentReminder)4 Reminder (org.olat.modules.reminder.Reminder)2