use of org.olat.modules.portfolio.SectionRef in project openolat by klemens.
the class RestorePageController method getSelectedSection.
private SectionRef getSelectedSection() {
SectionRef selectSection = null;
if (sectionsEl != null && sectionsEl.isOneSelected() && sectionsEl.isEnabled() && sectionsEl.isVisible()) {
String selectedKey = sectionsEl.getSelectedKey();
selectSection = new SectionKeyRef(new Long(selectedKey));
}
return selectSection;
}
use of org.olat.modules.portfolio.SectionRef in project openolat by klemens.
the class SectionEditController method formOK.
@Override
protected void formOK(UserRequest ureq) {
if (section == null) {
String title = titleEl.getValue();
String description = descriptionEl.getValue();
SectionRef sectionRef = portfolioService.appendNewSection(title, description, beginDateEl.getDate(), endDateEl.getDate(), binder);
section = portfolioService.getSection(sectionRef);
} else {
Section reloadedSection = portfolioService.getSection(section);
reloadedSection.setTitle(titleEl.getValue());
reloadedSection.setDescription(descriptionEl.getValue());
reloadedSection.setBeginDate(beginDateEl.getDate());
reloadedSection.setEndDate(endDateEl.getDate());
section = portfolioService.updateSection(reloadedSection);
}
fireEvent(ureq, Event.DONE_EVENT);
}
Aggregations