Index: lams_common/db/sql/insert_test_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/Attic/insert_test_data.sql,v diff -u -r1.23 -r1.24 --- lams_common/db/sql/insert_test_data.sql 23 Feb 2005 07:05:27 -0000 1.23 +++ lams_common/db/sql/insert_test_data.sql 24 Feb 2005 01:29:09 -0000 1.24 @@ -295,7 +295,7 @@ (12,12,'Optional Activity Description','Optional Activity Title',10,20,null,'Help Text for Activity', 8,null,1,0, 1,null,'20050101','Offline Instructions ',0, -5,3,null,null, +1,3,null,null, null,'20050101','20050101','image'); insert into lams_learning_activity Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/Activity.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/Activity.java,v diff -u -r1.12 -r1.13 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/Activity.java 23 Feb 2005 05:17:34 -0000 1.12 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/Activity.java 24 Feb 2005 01:29:09 -0000 1.13 @@ -9,32 +9,24 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; +import org.lamsfoundation.lams.lesson.LearnerProgress; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.util.Nullable; - +import org.lamsfoundation.lams.lesson.ActivityStrategy; /** * @hibernate.class table="lams_learning_activity" */ public abstract class Activity implements Serializable,Nullable { public static final int TOOL_ACTIVITY_TYPE = 1; - public static final int RANDOM_GROUPING_ACTIVITY_TYPE = 2; - public static final int CHOSEN_GROUPING_ACTIVITY_TYPE = 3; - public static final int PERMISSION_GATE_ACTIVITY_TYPE = 4; - public static final int SCHEDULE_GATE_ACTIVITY_TYPE = 5; - public static final int SYNCH_GATE_ACTIVITY_TYPE = 6; - public static final int PARALLEL_ACTIVITY_TYPE = 7; - public static final int OPTIONS_ACTIVITY_TYPE = 8; - public static final int SEQUENCE_ACTIVITY_TYPE = 9; - public static final String OBJECT_TYPE ="Activity"; /** identifier field */ @@ -106,6 +98,8 @@ /** persistent field */ private Integer parentUIID; + protected ActivityStrategy activityStrategy; + /** full constructor */ public Activity( Long activityId, @@ -508,4 +502,17 @@ { return getActivityTypeId().intValue()==TOOL_ACTIVITY_TYPE; } + + /** + * Delegate to activity strategy to check up the status of all children. + * @param learnerProgress the current learner progress that record the + * all completed activities. + * @return the boolean to indicate the status of children. + */ + public boolean areChildrenCompleted(LearnerProgress learnerProgress) + { + return activityStrategy.areChildrenCompleted(this,learnerProgress); + } + + } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/OptionsActivity.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/OptionsActivity.java,v diff -u -r1.7 -r1.8 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/OptionsActivity.java 23 Feb 2005 05:17:34 -0000 1.7 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/OptionsActivity.java 24 Feb 2005 01:29:09 -0000 1.8 @@ -5,6 +5,7 @@ import java.util.HashSet; import org.apache.commons.lang.builder.ToStringBuilder; +import org.lamsfoundation.lams.lesson.OptionsActivityStrategy; /** @@ -68,11 +69,12 @@ this.maxNumberOfOptions = maxNumberOfOptions; this.minNumberOfOptions = minNumberOfOptions; this.optionsInstructions = options_instructions; + super.activityStrategy = new OptionsActivityStrategy(); } /** default constructor */ public OptionsActivity() { - + super.activityStrategy = new OptionsActivityStrategy(); } /** minimal constructor */ @@ -98,6 +100,7 @@ transitionTo, transitionFrom, activities); + super.activityStrategy = new OptionsActivityStrategy(); } public static OptionsActivity createCopy(OptionsActivity originalActivity){ OptionsActivity newOptionsActivity = new OptionsActivity(); Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/ParallelActivity.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/ParallelActivity.java,v diff -u -r1.8 -r1.9 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/ParallelActivity.java 23 Feb 2005 05:17:34 -0000 1.8 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/ParallelActivity.java 24 Feb 2005 01:29:09 -0000 1.9 @@ -5,6 +5,7 @@ import java.util.HashSet; import org.apache.commons.lang.builder.ToStringBuilder; +import org.lamsfoundation.lams.lesson.ParallelActivityStrategy; /** * @hibernate.class @@ -52,10 +53,12 @@ transitionTo, transitionFrom, activities); + super.activityStrategy = new ParallelActivityStrategy(); } /** default constructor */ public ParallelActivity() { + super.activityStrategy = new ParallelActivityStrategy(); } /** minimal constructor */ @@ -81,6 +84,7 @@ transitionTo, transitionFrom, activities); + super.activityStrategy = new ParallelActivityStrategy(); } /** * Makes a copy of the ParallelActivity for authoring, preview and monitoring enviornment Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/SequenceActivity.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/SequenceActivity.java,v diff -u -r1.7 -r1.8 --- lams_common/src/java/org/lamsfoundation/lams/learningdesign/SequenceActivity.java 23 Feb 2005 05:17:34 -0000 1.7 +++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/SequenceActivity.java 24 Feb 2005 01:29:09 -0000 1.8 @@ -5,6 +5,7 @@ import java.util.HashSet; import org.apache.commons.lang.builder.ToStringBuilder; +import org.lamsfoundation.lams.lesson.SequenceActivityStrategy; /** @@ -53,11 +54,13 @@ transitionTo, transitionFrom, activities); + super.activityStrategy = new SequenceActivityStrategy(); } /** default constructor */ public SequenceActivity() { + super.activityStrategy = new SequenceActivityStrategy(); } /** minimal constructor */ @@ -83,6 +86,7 @@ transitionTo, transitionFrom, activities); + super.activityStrategy = new SequenceActivityStrategy(); } /** Index: lams_common/src/java/org/lamsfoundation/lams/lesson/ActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/lesson/Attic/ActivityStrategy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/src/java/org/lamsfoundation/lams/lesson/ActivityStrategy.java 24 Feb 2005 01:29:09 -0000 1.1 @@ -0,0 +1,72 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *This program is free software; you can redistribute it and/or modify + *it under the terms of the GNU General Public License as published by + *the Free Software Foundation; either version 2 of the License, or + *(at your option) any later version. + * + *This program is distributed in the hope that it will be useful, + *but WITHOUT ANY WARRANTY; without even the implied warranty of + *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *GNU General Public License for more details. + * + *You should have received a copy of the GNU General Public License + *along with this program; if not, write to the Free Software + *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.lesson; + +import java.util.Iterator; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ComplexActivity; +import org.lamsfoundation.lams.lesson.LearnerProgress; + + +/** + * Typical implementation of strategy pattern avoid complicated conditional + * logic to process activity object hierarchy. It is responsible for all + * polymorphism caculation regarding different type of activity. + * + * @author Jacky Fang 2005-2-23 + * + */ +public abstract class ActivityStrategy +{ + /** + * Check up all children status for a complex activity. + * @param activity + * @param learnerProgress + * @return + */ + public boolean areChildrenCompleted(Activity activity, LearnerProgress learnerProgress) + { + ComplexActivity complexActivity = (ComplexActivity)activity; + + int numOfCompletedActivities=0; + for(Iterator i = complexActivity.getActivities().iterator();i.hasNext();) + { + Activity currentActivity = (Activity)i.next(); + if(learnerProgress.getCompletedActivities().contains(currentActivity)) + numOfCompletedActivities++; + } + + return isComplete(numOfCompletedActivities,complexActivity); + + } + + /** + * @param numOfCompletedActivities + * @return + */ + protected abstract boolean isComplete(int numOfCompletedActivities,ComplexActivity complexActivity); + + + + public abstract Activity getNextActivityFromParent(Activity activity); + +} Index: lams_common/src/java/org/lamsfoundation/lams/lesson/OptionsActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/lesson/Attic/OptionsActivityStrategy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/src/java/org/lamsfoundation/lams/lesson/OptionsActivityStrategy.java 24 Feb 2005 01:29:09 -0000 1.1 @@ -0,0 +1,54 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *This program is free software; you can redistribute it and/or modify + *it under the terms of the GNU General Public License as published by + *the Free Software Foundation; either version 2 of the License, or + *(at your option) any later version. + * + *This program is distributed in the hope that it will be useful, + *but WITHOUT ANY WARRANTY; without even the implied warranty of + *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *GNU General Public License for more details. + * + *You should have received a copy of the GNU General Public License + *along with this program; if not, write to the Free Software + *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.lesson; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ComplexActivity; +import org.lamsfoundation.lams.learningdesign.OptionsActivity; + + +/** + * + * @author Jacky Fang 2005-2-24 + * + */ +public class OptionsActivityStrategy extends ActivityStrategy +{ + + /** + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#getNextActivityFromParent(Activity) + */ + public Activity getNextActivityFromParent(Activity activity) + { + // TODO Auto-generated method stub + return null; + } + + /** + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#isComplete(int, org.lamsfoundation.lams.learningdesign.ComplexActivity) + */ + protected boolean isComplete(int numOfCompletedActivities, ComplexActivity complexActivity) + { + OptionsActivity optionsActivity = (OptionsActivity)complexActivity; + return numOfCompletedActivities>=optionsActivity.getMaxNumberOfOptions().intValue()?true:false; + } + +} Index: lams_common/src/java/org/lamsfoundation/lams/lesson/ParallelActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/lesson/Attic/ParallelActivityStrategy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/src/java/org/lamsfoundation/lams/lesson/ParallelActivityStrategy.java 24 Feb 2005 01:29:09 -0000 1.1 @@ -0,0 +1,53 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *This program is free software; you can redistribute it and/or modify + *it under the terms of the GNU General Public License as published by + *the Free Software Foundation; either version 2 of the License, or + *(at your option) any later version. + * + *This program is distributed in the hope that it will be useful, + *but WITHOUT ANY WARRANTY; without even the implied warranty of + *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *GNU General Public License for more details. + * + *You should have received a copy of the GNU General Public License + *along with this program; if not, write to the Free Software + *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.lesson; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ComplexActivity; +import org.lamsfoundation.lams.learningdesign.ParallelActivity; + + +/** + * + * @author Jacky Fang 2005-2-24 + * + */ +public class ParallelActivityStrategy extends ActivityStrategy +{ + /** + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#getNextActivityFromParent(Activity) + */ + public Activity getNextActivityFromParent(Activity activity) + { + // TODO Auto-generated method stub + return null; + } + + /** + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#isComplete(int, org.lamsfoundation.lams.learningdesign.ComplexActivity) + */ + protected boolean isComplete(int numOfCompletedActivities, ComplexActivity complexActivity) + { + ParallelActivity parallelActivity = (ParallelActivity)complexActivity; + return numOfCompletedActivities==parallelActivity.getActivities().size()?true:false; + } + +} Index: lams_common/src/java/org/lamsfoundation/lams/lesson/SequenceActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/lesson/Attic/SequenceActivityStrategy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/src/java/org/lamsfoundation/lams/lesson/SequenceActivityStrategy.java 24 Feb 2005 01:29:09 -0000 1.1 @@ -0,0 +1,57 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *This program is free software; you can redistribute it and/or modify + *it under the terms of the GNU General Public License as published by + *the Free Software Foundation; either version 2 of the License, or + *(at your option) any later version. + * + *This program is distributed in the hope that it will be useful, + *but WITHOUT ANY WARRANTY; without even the implied warranty of + *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *GNU General Public License for more details. + * + *You should have received a copy of the GNU General Public License + *along with this program; if not, write to the Free Software + *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.lesson; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.learningdesign.ComplexActivity; +import org.lamsfoundation.lams.learningdesign.SequenceActivity; + +/** + * Activity calculation strategy for sequence activity. + * + * @author Jacky Fang 2005-2-24 + * + */ +public class SequenceActivityStrategy extends ActivityStrategy +{ + /** + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#getNextActivityFromParent(Activity) + */ + public Activity getNextActivityFromParent(Activity activity) + { + // TODO Auto-generated method stub + return null; + } + + /** + * Implementation for sequence activity. It returns true if all children + * of this sequence activity appear in the completed activities set from + * current learner progress. + * + * @see org.lamsfoundation.lams.lesson.ActivityStrategy#isComplete(int, org.lamsfoundation.lams.learningdesign.ComplexActivity) + */ + protected boolean isComplete(int numOfCompletedActivities, ComplexActivity complexActivity) + { + SequenceActivity sequenceActivity = (SequenceActivity)complexActivity; + return numOfCompletedActivities==sequenceActivity.getActivities().size()?true:false; + } + +} Index: lams_common/test/java/org/lamsfoundation/lams/lesson/TestActivityStrategy.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/lesson/Attic/TestActivityStrategy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/test/java/org/lamsfoundation/lams/lesson/TestActivityStrategy.java 24 Feb 2005 01:29:09 -0000 1.1 @@ -0,0 +1,119 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *This program is free software; you can redistribute it and/or modify + *it under the terms of the GNU General Public License as published by + *the Free Software Foundation; either version 2 of the License, or + *(at your option) any later version. + * + *This program is distributed in the hope that it will be useful, + *but WITHOUT ANY WARRANTY; without even the implied warranty of + *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + *GNU General Public License for more details. + * + *You should have received a copy of the GNU General Public License + *along with this program; if not, write to the Free Software + *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.lesson; + +import org.lamsfoundation.lams.learningdesign.Activity; +import org.lamsfoundation.lams.lesson.dao.TestLearnerProgressDAO; + + +/** + * + * @author Jacky Fang 2005-2-24 + * + */ +public class TestActivityStrategy extends TestLearnerProgressDAO +{ + + private Activity testSubOptionsActivityNB; + private Activity testSubOptionsActivityMC; + private Activity testSubParallelActivityQA; + private Activity testSubParallelActivityMB; + private Activity testSubSeuquencActivitySR; + private Activity testSubSeuqenceActivityQNA; + + //this is survey id we inserted in test data sql script + protected static final Long TEST_NB_ACTIVITY_ID = new Long(16); + protected static final Long TEST_MC_ACTIVITY_ID = new Long(17); + protected static final Long TEST_QA_ACTIVITY_ID = new Long(18); + protected static final Long TEST_MB_ACTIVITY_ID = new Long(19); + protected static final Long TEST_SR_ACTIVITY_ID = new Long(22); + protected static final Long TEST_QNA_ACTIVITY_ID = new Long(25); + /* + * @see LessonDataAccessTestCase#setUp() + */ + protected void setUp() throws Exception + { + super.setUp(); + testSubOptionsActivityNB = activityDAO.getActivityByActivityId(TEST_NB_ACTIVITY_ID); + testSubOptionsActivityMC = activityDAO.getActivityByActivityId(TEST_MC_ACTIVITY_ID); + testSubParallelActivityQA = activityDAO.getActivityByActivityId(TEST_QA_ACTIVITY_ID); + testSubParallelActivityMB = activityDAO.getActivityByActivityId(TEST_MB_ACTIVITY_ID); + testSubSeuquencActivitySR = activityDAO.getActivityByActivityId(TEST_SR_ACTIVITY_ID); + testSubSeuqenceActivityQNA = activityDAO.getActivityByActivityId(TEST_QNA_ACTIVITY_ID); + } + + /* + * @see LessonDataAccessTestCase#tearDown() + */ + protected void tearDown() throws Exception + { + super.tearDown(); + } + + /** + * Constructor for TestActivityStrategy. + * @param arg0 + */ + public TestActivityStrategy(String name) + { + super(name); + } + + public void testChildrenCompletedForParallelActivity() + { + super.testLearnerProgress.setProgressState(testSubParallelActivityQA,LearnerProgress.ACTIVITY_COMPLETED); + super.testLearnerProgress.setProgressState(testSubParallelActivityMB,LearnerProgress.ACTIVITY_COMPLETED); + + assertTrue("should be completed",this.testParallelActivity.areChildrenCompleted(super.testLearnerProgress)); + } + + public void testChildrenInCompletedForParallelActivity() + { + super.testLearnerProgress.setProgressState(testSubParallelActivityQA,LearnerProgress.ACTIVITY_COMPLETED); + + assertTrue("should not be completed",!this.testParallelActivity.areChildrenCompleted(super.testLearnerProgress)); + } + + public void testChildrenCompletedForSequenceActivity() + { + super.testLearnerProgress.setProgressState(testSubSeuquencActivitySR,LearnerProgress.ACTIVITY_COMPLETED); + super.testLearnerProgress.setProgressState(testSubSeuqenceActivityQNA,LearnerProgress.ACTIVITY_COMPLETED); + assertTrue("should be completed",this.testSequenceActivity.areChildrenCompleted(super.testLearnerProgress)); + } + + public void testChildrenInCompletedForSequenceActivity() + { + super.testLearnerProgress.setProgressState(testSubSeuquencActivitySR,LearnerProgress.ACTIVITY_COMPLETED); + assertTrue("should not be completed",!this.testSequenceActivity.areChildrenCompleted(super.testLearnerProgress)); + } + + public void testChildrenCompletedForOptionsActivity() + { + super.testLearnerProgress.setProgressState(testSubOptionsActivityNB,LearnerProgress.ACTIVITY_COMPLETED); + assertTrue("should be completed",this.testOptionsActivity.areChildrenCompleted(super.testLearnerProgress)); + } + + public void testChildrenInCompletedForOptionsActivity() + { + assertTrue("should not be completed",!this.testOptionsActivity.areChildrenCompleted(super.testLearnerProgress)); + } + +} Index: lams_common/test/java/org/lamsfoundation/lams/lesson/dao/TestLearnerProgressDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/test/java/org/lamsfoundation/lams/lesson/dao/Attic/TestLearnerProgressDAO.java,v diff -u -r1.5 -r1.6 --- lams_common/test/java/org/lamsfoundation/lams/lesson/dao/TestLearnerProgressDAO.java 22 Feb 2005 06:30:09 -0000 1.5 +++ lams_common/test/java/org/lamsfoundation/lams/lesson/dao/TestLearnerProgressDAO.java 24 Feb 2005 01:29:09 -0000 1.6 @@ -25,13 +25,17 @@ */ public class TestLearnerProgressDAO extends LessonDataAccessTestCase { - private IActivityDAO activityDAO; - private Activity testToolActivity; - private Activity testComplexActivity; + protected IActivityDAO activityDAO; + protected Activity testToolActivity; + protected Activity testParallelActivity; + protected Activity testOptionsActivity; + protected Activity testSequenceActivity; //this is survey id we inserted in test data sql script - private static final Long TEST_TOOL_ACTIVITY_ID = new Long(15); - private static final Long TEST_COMPLEX_ACTIVITY_ID = new Long(13); + protected static final Long TEST_TOOL_ACTIVITY_ID = new Long(15); + protected static final Long TEST_PARALLEL_ACTIVITY_ID = new Long(13); + protected static final Long TEST_OPTIONS_ACTIVITY_ID = new Long(12); + protected static final Long TEST_SEQUENCE_ACTIVITY_ID = new Long(14); /* * @see LessonDataAccessTestCase#setUp() */ @@ -43,7 +47,9 @@ activityDAO =(ActivityDAO) context.getBean("activityDAO"); testToolActivity = activityDAO.getActivityByActivityId(TEST_TOOL_ACTIVITY_ID); - testComplexActivity = activityDAO.getActivityByActivityId(TEST_COMPLEX_ACTIVITY_ID); + testParallelActivity = activityDAO.getActivityByActivityId(TEST_PARALLEL_ACTIVITY_ID); + testOptionsActivity = activityDAO.getActivityByActivityId(TEST_OPTIONS_ACTIVITY_ID); + testSequenceActivity = activityDAO.getActivityByActivityId(TEST_SEQUENCE_ACTIVITY_ID); } /* @@ -126,7 +132,7 @@ Activity firstActivity = this.testLesson.getLearningDesign().getFirstActivity(); progress.setProgressState(firstActivity,LearnerProgress.ACTIVITY_COMPLETED); - progress.setProgressState(testComplexActivity,LearnerProgress.ACTIVITY_COMPLETED); + progress.setProgressState(testParallelActivity,LearnerProgress.ACTIVITY_COMPLETED); progress.setProgressState(testToolActivity,LearnerProgress.ACTIVITY_ATTEMPTED); super.learnerProgressDao.updateLearnerProgress(progress);