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;
}
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);
}
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());
}
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;
}
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);
}
Aggregations