use of org.olat.modules.portfolio.model.SectionKeyRef in project OpenOLAT by OpenOLAT.
the class PageMetadataEditController 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.model.SectionKeyRef in project OpenOLAT by OpenOLAT.
the class PortfolioServiceImpl method appendNewSection.
@Override
public SectionRef appendNewSection(String title, String description, Date begin, Date end, BinderRef binder) {
Binder reloadedBinder = binderDao.loadByKey(binder.getKey());
SectionImpl newSection = binderDao.createSection(title, description, begin, end, reloadedBinder);
return new SectionKeyRef(newSection.getKey());
}
use of org.olat.modules.portfolio.model.SectionKeyRef in project OpenOLAT by OpenOLAT.
the class AssignmentMoveController method formOK.
@Override
protected void formOK(UserRequest ureq) {
Long newParentSectionKey = getSelectedSectionKey();
if (newParentSectionKey != null) {
if (newParentSectionKey.equals(section.getKey())) {
fireEvent(ureq, Event.CANCELLED_EVENT);
} else {
portfolioService.moveAssignment(section, assignment, new SectionKeyRef(newParentSectionKey));
fireEvent(ureq, Event.DONE_EVENT);
}
} else {
fireEvent(ureq, Event.CANCELLED_EVENT);
}
}
use of org.olat.modules.portfolio.model.SectionKeyRef in project OpenOLAT by OpenOLAT.
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.model.SectionKeyRef in project openolat by klemens.
the class AssignmentMoveController method formOK.
@Override
protected void formOK(UserRequest ureq) {
Long newParentSectionKey = getSelectedSectionKey();
if (newParentSectionKey != null) {
if (newParentSectionKey.equals(section.getKey())) {
fireEvent(ureq, Event.CANCELLED_EVENT);
} else {
portfolioService.moveAssignment(section, assignment, new SectionKeyRef(newParentSectionKey));
fireEvent(ureq, Event.DONE_EVENT);
}
} else {
fireEvent(ureq, Event.CANCELLED_EVENT);
}
}
Aggregations