use of org.olat.modules.reminder.ReminderRule in project openolat by klemens.
the class CourseReminderEditController method formOK.
@Override
protected void formOK(UserRequest ureq) {
String description = descriptionEl.getValue();
reminder.setDescription(description);
ReminderRules rules = new ReminderRules();
for (RuleElement ruleEl : ruleEls) {
ReminderRule rule = ruleEl.getEditor().getConfiguration();
if (rule != null) {
rules.getRules().add(rule);
}
}
String configuration = reminderManager.toXML(rules);
reminder.setConfiguration(configuration);
String emailSubject = subjectEl.getValue();
reminder.setEmailSubject(emailSubject);
String emailBody = emailEl.getValue();
reminder.setEmailBody(emailBody);
reminder = reminderManager.save(reminder);
fireEvent(ureq, Event.DONE_EVENT);
}
Aggregations