use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.
the class EPFrontendManager method submitMap.
private void submitMap(PortfolioStructureMap map, boolean logActivity, Role by) {
// add an exception
if (!(map instanceof EPStructuredMap))
return;
EPStructuredMap submittedMap = (EPStructuredMap) map;
structureManager.submitMap(submittedMap);
EPTargetResource resource = submittedMap.getTargetResource();
OLATResourceable courseOres = resource.getOLATResourceable();
ICourse course = CourseFactory.loadCourse(courseOres);
AssessmentManager am = course.getCourseEnvironment().getAssessmentManager();
CourseNode courseNode = course.getRunStructure().getNode(resource.getSubPath());
List<Identity> owners = policyManager.getOwners(submittedMap);
for (Identity owner : owners) {
if (courseNode != null) {
// courseNode might have been deleted meanwhile
IdentityEnvironment ienv = new IdentityEnvironment();
ienv.setIdentity(owner);
UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
if (logActivity) {
am.incrementNodeAttempts(courseNode, owner, uce, by);
} else {
am.incrementNodeAttemptsInBackground(courseNode, owner, uce);
}
RepositoryEntry referenceEntry = courseNode.getReferencedRepositoryEntry();
RepositoryEntry courseEntry = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
assessmentService.updateAssessmentEntry(owner, courseEntry, courseNode.getIdent(), referenceEntry, AssessmentEntryStatus.inReview);
}
assessmentNotificationsHandler.markPublisherNews(owner, course.getResourceableId());
log.audit("Map " + map + " from " + owner.getName() + " has been submitted.");
}
}
use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.
the class CheckListCourseNode method updateLastModifications.
@Override
public void updateLastModifications(UserCourseEnvironment userCourseEnvironment, Identity identity, Role by) {
AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
Identity assessedIdentity = userCourseEnvironment.getIdentityEnvironment().getIdentity();
am.updateLastModifications(this, assessedIdentity, userCourseEnvironment, by);
}
use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.
the class CheckListCourseNode method updateUserScoreEvaluation.
/**
* @see org.olat.course.nodes.AssessableCourseNode#updateUserScoreEvaluation(org.olat.course.run.scoring.ScoreEvaluation,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.core.id.Identity)
*/
@Override
public void updateUserScoreEvaluation(ScoreEvaluation scoreEvaluation, UserCourseEnvironment userCourseEnvironment, Identity coachingIdentity, boolean incrementAttempts, Role by) {
AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
am.saveScoreEvaluation(this, coachingIdentity, mySelf, new ScoreEvaluation(scoreEvaluation), userCourseEnvironment, incrementAttempts, by);
}
use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.
the class CheckListCourseNode method getUserAssessmentEntry.
@Override
public AssessmentEntry getUserAssessmentEntry(UserCourseEnvironment userCourseEnv) {
AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
Identity mySelf = userCourseEnv.getIdentityEnvironment().getIdentity();
return am.getAssessmentEntry(this, mySelf);
}
use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.
the class CheckListCourseNode method addIndividualAssessmentDocument.
@Override
public void addIndividualAssessmentDocument(File document, String filename, UserCourseEnvironment userCourseEnvironment, Identity coachingIdentity) {
if (document != null) {
AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
Identity assessedIdentity = userCourseEnvironment.getIdentityEnvironment().getIdentity();
am.addIndividualAssessmentDocument(this, coachingIdentity, assessedIdentity, document, filename);
}
}
Aggregations