diff --git a/src/main/java/org/olat/modules/coach/manager/CoachingDAO.java b/src/main/java/org/olat/modules/coach/manager/CoachingDAO.java index 6075eebbb84b0e8ce8c71075cc69ad4fd490e9b4..6c00ffbcf852d0b3cf5ac515f356ff5c50c71cbb 100644 --- a/src/main/java/org/olat/modules/coach/manager/CoachingDAO.java +++ b/src/main/java/org/olat/modules/coach/manager/CoachingDAO.java @@ -898,6 +898,7 @@ public class CoachingDAO { .append(" and sg_ae.a_entry_root=").appendTrue(); } sb.append(")") + .append(" and ae.a_completion is not null") .append(" group by ae.fk_identity"); List<?> rawList = dbInstance.getCurrentEntityManager() diff --git a/src/test/java/org/olat/modules/coach/manager/CoachingDAOTest.java b/src/test/java/org/olat/modules/coach/manager/CoachingDAOTest.java index eff357256cea4d02c6906ea4f5dae22d658be2e3..42447b0548ae8503c4ee28ced7efd8a5e25c7e13 100644 --- a/src/test/java/org/olat/modules/coach/manager/CoachingDAOTest.java +++ b/src/test/java/org/olat/modules/coach/manager/CoachingDAOTest.java @@ -778,7 +778,7 @@ public class CoachingDAOTest extends OlatTestCase { RepositoryEntry re4 = JunitTestHelper.deployCourse(null, "Coaching course 4", courseUrl); dbInstance.commitAndCloseSession(); - Identity coach = JunitTestHelper.createAndPersistIdentityAsAuthor("Coach-1-" + UUID.randomUUID()); + Identity coach = JunitTestHelper.createAndPersistIdentityAsRndAuthor("Coach-1-"); Identity participant1 = JunitTestHelper.createAndPersistIdentityAsRndUser("Coaching-Part-1"); Identity participant2 = JunitTestHelper.createAndPersistIdentityAsRndUser("Coaching-Part-2"); Identity participant3 = JunitTestHelper.createAndPersistIdentityAsRndUser("Coaching-Part-3");