use of org.olat.modules.portfolio.model.AssignmentImpl in project openolat by klemens.
the class PortfolioServiceImpl method updateAssignment.
@Override
public Assignment updateAssignment(Assignment assignment, String title, String summary, String content, AssignmentType type, boolean onlyAutoEvaluation, boolean reviewerSeeAutoEvaluation, boolean anonymousExternEvaluation, RepositoryEntry formEntry) {
if (!StringHelper.containsNonWhitespace(assignment.getStorage())) {
File newStorage = portfolioFileStorage.generateAssignmentSubDirectory();
String newRelativeStorage = portfolioFileStorage.getRelativePath(newStorage);
((AssignmentImpl) assignment).setStorage(newRelativeStorage);
}
AssignmentImpl impl = (AssignmentImpl) assignment;
impl.setTitle(title);
impl.setSummary(summary);
impl.setContent(content);
impl.setType(type.name());
impl.setOnlyAutoEvaluation(onlyAutoEvaluation);
impl.setReviewerSeeAutoEvaluation(reviewerSeeAutoEvaluation);
impl.setAnonymousExternalEvaluation(anonymousExternEvaluation);
impl.setFormEntry(formEntry);
return assignmentDao.updateAssignment(assignment);
}
Aggregations