Skip to content
Snippets Groups Projects
Commit 19bc44d8 authored by uhensler's avatar uhensler
Browse files

OO-4207: Hardening creation of assessment entries a little bit

parent 14bc71d4
No related branches found
No related tags found
No related merge requests found
......@@ -395,15 +395,11 @@ public class CourseAssessmentServiceImpl implements CourseAssessmentService, Nod
List<Identity> members = repositoryService.getMembers(courseEntry, RepositoryEntryRelationType.all, GroupRoles.participant.name());
identities.addAll(members);
int count = 0;
for(Identity identity: identities) {
evaluateAll(courseEnv, identity);
log.debug("Evaluated score accounting in course {} for {}", course, identity);
if(++count % 10 == 0) {
dbInstance.commitAndCloseSession();
}
dbInstance.commitAndCloseSession();
}
dbInstance.commitAndCloseSession();
}
private void evaluateAll(CourseEnvironment courseEnv, Identity assessedIdentity) {
......
......@@ -149,6 +149,8 @@ public class OLATUpgrade_15_pre_0 extends OLATUpgrade {
if (runStructure != null) {
CourseNode rootNode = runStructure.getRootNode();
if (rootNode != null) {
log.info("Assessment entries migration started: course {} ({}).",
repositoryEntry.getKey(), repositoryEntry.getDisplayname());
String ident = rootNode.getIdent();
setRootEntryTrue(repositoryEntry, ident);
setRootEntryFalse(repositoryEntry, ident);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment