Index: lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java,v diff -u -r1.96 -r1.96.4.1 --- lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 23 Feb 2009 21:00:47 -0000 1.96 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 22 Apr 2009 04:28:00 -0000 1.96.4.1 @@ -109,8 +109,9 @@ } /** - * Creates a new instance of LearnerService. To be used by Spring, assuming the Spring will set up the progress - * engine via method injection. If you are creating the bean manually then use the other constructor. + * Creates a new instance of LearnerService. To be used by Spring, assuming + * the Spring will set up the progress engine via method injection. If you + * are creating the bean manually then use the other constructor. */ public LearnerService() { } @@ -219,7 +220,8 @@ } /** - * Get the lesson data for a particular lesson. In a DTO format suitable for sending to the client. + * Get the lesson data for a particular lesson. In a DTO format suitable for + * sending to the client. */ public LessonDTO getLessonData(Long lessonId) { Lesson lesson = getLesson(lessonId); @@ -228,18 +230,21 @@ /** *

- * Joins a User to a lesson as a learner. It could either be a new lesson or a lesson that has been started. + * Joins a User to a lesson as a learner. It could either be a new lesson or + * a lesson that has been started. *

* *

- * In terms of new lesson, a new learner progress would be initialized. Tool session for the next activity will be - * initialized if necessary. + * In terms of new lesson, a new learner progress would be initialized. Tool + * session for the next activity will be initialized if necessary. *

* *

- * In terms of an started lesson, the learner progress will be returned without calculation. Tool session will be - * initialized if necessary. Note that we won't initialize tool session for current activity because we assume tool - * session will always initialize before it becomes a current activity.

- * Create a lams tool session for learner against a tool activity. This will have concurrency issues interms of - * grouped tool session because it might be inserting some tool session that has already been inserted by other - * member in the group. If the unique_check is broken, we need to query the database to get the instance instead of - * inserting it. It should be done in the Spring rollback strategy. + * Create a lams tool session for learner against a tool activity. This will + * have concurrency issues interms of grouped tool session because it might + * be inserting some tool session that has already been inserted by other + * member in the group. If the unique_check is broken, we need to query the + * database to get the instance instead of inserting it. It should be done + * in the Spring rollback strategy. *

* - * Once lams tool session is inserted, we need to notify the tool to its own session. + * Once lams tool session is inserted, we need to notify the tool to its own + * session. * * @param toolActivity * @param learner @@ -940,7 +956,8 @@ /** * @throws LearnerServiceException * @see org.lamsfoundation.lams.learning.service.ICoreLearnerService#determineBranch(org.lamsfoundation.lams.lesson.Lesson, - * org.lamsfoundation.lams.learningdesign.BranchingActivity, java.lang.Integer) + * org.lamsfoundation.lams.learningdesign.BranchingActivity, + * java.lang.Integer) */ public SequenceActivity determineBranch(Lesson lesson, BranchingActivity branchingActivity, Integer learnerId) throws LearnerServiceException { @@ -969,9 +986,10 @@ } /** - * Get all the conditions for this branching activity, ordered by order id. Go through each condition until we find - * one that passes and that is the required branch. If no conditions match, use the branch that is the "default" - * branch for this branching activity. + * Get all the conditions for this branching activity, ordered by order id. + * Go through each condition until we find one that passes and that is the + * required branch. If no conditions match, use the branch that is the + * "default" branch for this branching activity. */ private SequenceActivity determineToolBasedBranch(Lesson lesson, ToolBranchingActivity branchingActivity, User learner) { @@ -1103,7 +1121,8 @@ * gate to check * @param learner * learner who is knocking to the gate - * @return true if learner satisfied any of the conditions and is allowed to pass + * @return true if learner satisfied any of the conditions + * and is allowed to pass */ private boolean determineConditionGateStatus(GateActivity gate, User learner) { boolean shouldOpenGate = false; @@ -1163,11 +1182,13 @@ } /** - * Select a particular branch - we are in preview mode and the author has selected a particular activity. + * Select a particular branch - we are in preview mode and the author has + * selected a particular activity. * * @throws LearnerServiceException * @see org.lamsfoundation.lams.learning.service.ICoreLearnerService#determineBranch(org.lamsfoundation.lams.lesson.Lesson, - * org.lamsfoundation.lams.learningdesign.BranchingActivity, java.lang.Integer) + * org.lamsfoundation.lams.learningdesign.BranchingActivity, + * java.lang.Integer) */ public SequenceActivity selectBranch(Lesson lesson, BranchingActivity branchingActivity, Integer learnerId, Long branchId) throws LearnerServiceException {