Index: lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LearnerProgressDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LearnerProgressDAO.java,v diff -u -r1.17 -r1.17.6.1 --- lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LearnerProgressDAO.java 3 Mar 2008 04:41:12 -0000 1.17 +++ lams_common/src/java/org/lamsfoundation/lams/lesson/dao/hibernate/LearnerProgressDAO.java 7 May 2009 03:42:10 -0000 1.17.6.1 @@ -55,11 +55,13 @@ "from LearnerProgress p where p.lessonComplete > 0 and p.lesson.id = :lessonId"; private final static String COUNT_ATTEMPTED_ACTIVITY ="select count(*) from LearnerProgress prog, " - +" Activity act where act.id = :activityId and " - +" act in elements(prog.attemptedActivities)"; + +" Activity act join prog.attemptedActivities attAct " + +" where act.id = :activityId and " + +" index(attAct) = act"; private final static String COUNT_COMPLETED_ACTIVITY ="select count(*) from LearnerProgress prog, " - +" Activity act where act.id = :activityId and " - +" act in elements(prog.completedActivities)"; + +" Activity act join prog.completedActivities compAct " + +" where act.id = :activityId and " + +" index(compAct) = act"; private final static String COUNT_PROGRESS_BY_LESSON = "select count(*) from LearnerProgress p where p.lesson.id = :lessonId";