Search in sources :

Example 6 with SectionKeyRef

use of org.olat.modules.portfolio.model.SectionKeyRef in project openolat by klemens.

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 7 with SectionKeyRef

use of org.olat.modules.portfolio.model.SectionKeyRef in project OpenOLAT by OpenOLAT.

the class AssignmentEditController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    String title = titleEl.getValue();
    String summary = summaryEl.getValue();
    String content = contentEl.getValue();
    AssignmentType type = AssignmentType.valueOf(typeEl.getSelectedKey());
    boolean onlyAutoEvaluation = evaluationFormEl.isOneSelected() && evaluationFormEl.isSelected(0);
    boolean reviewerCanSeeAutoEvaluation = reviewerSeeAutoEvaEl.isAtLeastSelected(1);
    boolean anonymousExternEvaluation = anonymousExternEvaEl.isAtLeastSelected(1);
    Section selectedSection = section;
    if (sectionsEl != null && sectionsEl.isOneSelected()) {
        String selectedKey = sectionsEl.getSelectedKey();
        Long selectedSectionKey = new Long(selectedKey);
        selectedSection = portfolioService.getSection(new SectionKeyRef(selectedSectionKey));
    }
    if (assignment == null) {
        assignment = portfolioService.addAssignment(title, summary, content, type, selectedSection, onlyAutoEvaluation, reviewerCanSeeAutoEvaluation, anonymousExternEvaluation, formEntry);
    } else {
        assignment = portfolioService.updateAssignment(assignment, title, summary, content, type, onlyAutoEvaluation, reviewerCanSeeAutoEvaluation, anonymousExternEvaluation, formEntry);
    }
    persistUploadedFiles();
    deleteTempStorage();
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : AssignmentType(org.olat.modules.portfolio.AssignmentType) SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef) Section(org.olat.modules.portfolio.Section)

Example 8 with SectionKeyRef

use of org.olat.modules.portfolio.model.SectionKeyRef in project openolat by klemens.

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 9 with SectionKeyRef

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

Example 10 with SectionKeyRef

use of org.olat.modules.portfolio.model.SectionKeyRef in project openolat by klemens.

the class AssignmentEditController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    String title = titleEl.getValue();
    String summary = summaryEl.getValue();
    String content = contentEl.getValue();
    AssignmentType type = AssignmentType.valueOf(typeEl.getSelectedKey());
    boolean onlyAutoEvaluation = evaluationFormEl.isOneSelected() && evaluationFormEl.isSelected(0);
    boolean reviewerCanSeeAutoEvaluation = reviewerSeeAutoEvaEl.isAtLeastSelected(1);
    boolean anonymousExternEvaluation = anonymousExternEvaEl.isAtLeastSelected(1);
    Section selectedSection = section;
    if (sectionsEl != null && sectionsEl.isOneSelected()) {
        String selectedKey = sectionsEl.getSelectedKey();
        Long selectedSectionKey = new Long(selectedKey);
        selectedSection = portfolioService.getSection(new SectionKeyRef(selectedSectionKey));
    }
    if (assignment == null) {
        assignment = portfolioService.addAssignment(title, summary, content, type, selectedSection, onlyAutoEvaluation, reviewerCanSeeAutoEvaluation, anonymousExternEvaluation, formEntry);
    } else {
        assignment = portfolioService.updateAssignment(assignment, title, summary, content, type, onlyAutoEvaluation, reviewerCanSeeAutoEvaluation, anonymousExternEvaluation, formEntry);
    }
    persistUploadedFiles();
    deleteTempStorage();
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : AssignmentType(org.olat.modules.portfolio.AssignmentType) SectionKeyRef(org.olat.modules.portfolio.model.SectionKeyRef) Section(org.olat.modules.portfolio.Section)

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