Search in sources :

Example 1 with SectionKeyRef

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;
}
Also used : SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef) SectionRef(org.olat.modules.portfolio.SectionRef)

Example 2 with SectionKeyRef

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());
}
Also used : Binder(org.olat.modules.portfolio.Binder) AssessedBinder(org.olat.modules.portfolio.model.AssessedBinder) SynchedBinder(org.olat.modules.portfolio.model.SynchedBinder) SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef) SectionImpl(org.olat.modules.portfolio.model.SectionImpl) AssessmentSectionImpl(org.olat.modules.portfolio.model.AssessmentSectionImpl)

Example 3 with SectionKeyRef

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);
    }
}
Also used : SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef)

Example 4 with SectionKeyRef

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;
}
Also used : SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef) SectionRef(org.olat.modules.portfolio.SectionRef)

Example 5 with SectionKeyRef

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);
    }
}
Also used : SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef)

Aggregations

SectionKeyRef (org.olat.modules.portfolio.model.SectionKeyRef)10 SectionRef (org.olat.modules.portfolio.SectionRef)4 AssignmentType (org.olat.modules.portfolio.AssignmentType)2 Binder (org.olat.modules.portfolio.Binder)2 Section (org.olat.modules.portfolio.Section)2 AssessedBinder (org.olat.modules.portfolio.model.AssessedBinder)2 AssessmentSectionImpl (org.olat.modules.portfolio.model.AssessmentSectionImpl)2 SectionImpl (org.olat.modules.portfolio.model.SectionImpl)2 SynchedBinder (org.olat.modules.portfolio.model.SynchedBinder)2