Index: lams_gradebook/web/gradebookCourseMonitor.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_gradebook/web/gradebookCourseMonitor.jsp,v
diff -u -r1.3 -r1.4
--- lams_gradebook/web/gradebookCourseMonitor.jsp 20 Apr 2009 00:10:32 -0000 1.3
+++ lams_gradebook/web/gradebookCourseMonitor.jsp 6 Jul 2009 07:25:50 -0000 1.4
@@ -11,7 +11,21 @@
-
+
+
+
Index: lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml,v
diff -u -r1.26 -r1.27
--- lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml 2 Jul 2009 13:03:15 -0000 1.26
+++ lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml 6 Jul 2009 07:25:49 -0000 1.27
@@ -44,7 +44,7 @@
PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
@@ -54,7 +54,9 @@
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED,readOnly
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.98 -r1.99
--- lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 2 Jul 2009 13:03:15 -0000 1.98
+++ lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerService.java 6 Jul 2009 07:25:49 -0000 1.99
@@ -283,7 +283,7 @@
}
// Use TimeStamp rather than Date directly to keep consistent with Hibnerate persiste object.
learnerProgress.setStartDate(new Timestamp(new Date().getTime()));
- learnerProgressDAO.saveLearnerProgress(learnerProgress);
+ learnerProgressDAO.saveLearnerProgress(learnerProgress);
} else {
Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/LearningWebUtil.java
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/LearningWebUtil.java,v
diff -u -r1.28 -r1.29
--- lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/LearningWebUtil.java 2 Jul 2009 08:19:33 -0000 1.28
+++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/util/LearningWebUtil.java 6 Jul 2009 07:25:50 -0000 1.29
@@ -48,6 +48,7 @@
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.springframework.dao.CannotAcquireLockException;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -61,17 +62,16 @@
public class LearningWebUtil {
private static Logger log = Logger.getLogger(LearningWebUtil.class);
- //---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
// Class level constants - session attributes
- //---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
public static final String PARAM_PROGRESS_ID = "progressID";
- // public static final String POPUP_WINDOW_NAME = "LearnerActivity";
- // public static final String LEARNER_WINDOW_NAME = "lWindow";
+ // public static final String POPUP_WINDOW_NAME = "LearnerActivity";
+ // public static final String LEARNER_WINDOW_NAME = "lWindow";
/**
- * Helper method to retrieve the user data. Gets the id from the user
- * details in the shared session
+ * Helper method to retrieve the user data. Gets the id from the user details in the shared session
*
* @return the user id
*/
@@ -82,8 +82,8 @@
}
/**
- * Helper method to retrieve the user data. Gets the id from the user
- * details in the shared session then retrieves the real user object.
+ * Helper method to retrieve the user data. Gets the id from the user details in the shared session then retrieves
+ * the real user object.
*/
public static User getUser(ICoreLearnerService learnerService) {
HttpSession ss = SessionManager.getSession();
@@ -93,9 +93,8 @@
}
/**
- * Put the learner progress in the request. This allows some optimisation
- * between the code that updates the progress and the next action which will
- * access the progress.
+ * Put the learner progress in the request. This allows some optimisation between the code that updates the progress
+ * and the next action which will access the progress.
*/
public static void putLearnerProgressInRequest(HttpServletRequest request, LearnerProgress progress) {
if (progress != null) {
@@ -106,22 +105,20 @@
}
/**
- * Get the current learner progress. Check the request - in some cases it
- * may be there.
+ * Get the current learner progress. Check the request - in some cases it may be there.
*
- * If not, the learner progress id might be in the request (if we've just
- * come from complete activity). If so, get it from the db using the learner
- * progress.
+ * If not, the learner progress id might be in the request (if we've just come from complete activity). If so, get
+ * it from the db using the learner progress.
*
- * If the learner progress id isn't available, then we have to look it up
- * using activity based on the activity / activity id in the request.
+ * If the learner progress id isn't available, then we have to look it up using activity based on the activity /
+ * activity id in the request.
*/
public static LearnerProgress getLearnerProgress(HttpServletRequest request, ICoreLearnerService learnerService) {
LearnerProgress learnerProgress = (LearnerProgress) request
.getAttribute(ActivityAction.LEARNER_PROGRESS_REQUEST_ATTRIBUTE);
if (learnerProgress != null) {
- if (log.isDebugEnabled()) {
- log.debug("getLearnerProgress: found progress in the request");
+ if (LearningWebUtil.log.isDebugEnabled()) {
+ LearningWebUtil.log.debug("getLearnerProgress: found progress in the request");
}
return learnerProgress;
}
@@ -131,14 +128,16 @@
// temp hack until Flash side updates it call.
if (learnerProgressId == null) {
learnerProgressId = WebUtil.readLongParam(request, "progressId", true);
- if (learnerProgressId != null)
- log.warn("Flash client still using progressId, instead of progressID in a learner call");
+ if (learnerProgressId != null) {
+ LearningWebUtil.log
+ .warn("Flash client still using progressId, instead of progressID in a learner call");
+ }
}
if (learnerProgressId != null) {
learnerProgress = learnerService.getProgressById(new Long(learnerProgressId));
- if (learnerProgress != null && log.isDebugEnabled()) {
- log.debug("getLearnerProgress: found progress via progress id");
+ if (learnerProgress != null && LearningWebUtil.log.isDebugEnabled()) {
+ LearningWebUtil.log.debug("getLearnerProgress: found progress via progress id");
}
}
@@ -149,8 +148,8 @@
Activity act = getActivityFromRequest(request, learnerService);
Lesson lesson = learnerService.getLessonByActivity(act);
learnerProgress = learnerService.getProgress(learnerId, lesson.getLessonId());
- if (learnerProgress != null && log.isDebugEnabled()) {
- log.debug("getLearnerProgress: found progress via learner id and activity");
+ if (learnerProgress != null && LearningWebUtil.log.isDebugEnabled()) {
+ LearningWebUtil.log.debug("getLearnerProgress: found progress via learner id and activity");
}
}
@@ -159,9 +158,8 @@
}
/**
- * Get the activity from request. We assume there is a parameter coming in
- * if there is no activity can be found in the http request. Then the
- * activity id parameter is used to retrieve from database.
+ * Get the activity from request. We assume there is a parameter coming in if there is no activity can be found in
+ * the http request. Then the activity id parameter is used to retrieve from database.
*
* @param request
* @return
@@ -183,9 +181,8 @@
}
/**
- * Put an activity into the request. Calls LearnerService to get the
- * activity, to ensure that it is a "real" activity, not one of the cglib
- * proxies. activity.
+ * Put an activity into the request. Calls LearnerService to get the activity, to ensure that it is a "real"
+ * activity, not one of the cglib proxies. activity.
*
* @param request
* @param activity
@@ -201,18 +198,16 @@
}
/**
- * "Complete" an activity from the web layer's perspective. Used for
- * CompleteActivityAction and the Gate and Grouping actions. Calls the
- * learningService to actually complete the activity and progress.
+ * "Complete" an activity from the web layer's perspective. Used for CompleteActivityAction and the Gate and
+ * Grouping actions. Calls the learningService to actually complete the activity and progress.
*
* @param redirect
- * Should this call redirect to the next screen (true) or use
- * a forward (false)
+ * Should this call redirect to the next screen (true) or use a forward (false)
* @param windowName
- * Name of the window that triggered this code. Normally
- * LearnerActivity (the popup window) or lWindow (normal
- * learner window)
+ * Name of the window that triggered this code. Normally LearnerActivity (the popup window) or
+ * lWindow (normal learner window)
* @throws UnsupportedEncodingException
+ * @throws InterruptedException
*
*/
public static ActionForward completeActivity(HttpServletRequest request, HttpServletResponse response,
@@ -228,12 +223,24 @@
} else if (progress.getCompletedActivities().containsKey(currentActivity)) {
return actionMappings.getCloseForward(currentActivity, lesson.getLessonId());
} else {
- // Set activity as complete
- progress = learnerService.completeActivity(learnerId, currentActivity, progress);
+ // Set activity as complete; synchronized and repeated because of deadlock exceptions
+ try {
+ progress = learnerService.completeActivity(learnerId, currentActivity, progress);
+ } catch (CannotAcquireLockException e) {
+ LearningWebUtil.log.warn("Can not acquire lock to complete activity " + currentActivity.getActivityId()
+ + " by learner " + learnerId + ". Retrying...");
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e1) {
+ // do nothing, it does not hurt us...
+ }
+ progress = learnerService.completeActivity(learnerId, currentActivity, progress);
+ }
}
- if (currentActivity != null && currentActivity.isFloating())
+ if (currentActivity != null && currentActivity.isFloating()) {
return actionMappings.getCloseForward(currentActivity, lesson.getLessonId());
+ }
LearningWebUtil.putActivityInRequest(request, progress.getNextActivity(), learnerService);
LearningWebUtil.putLearnerProgressInRequest(request, progress);
@@ -267,19 +274,20 @@
activityForm.setLessonID(currentLesson.getLessonId());
LearningDesign currentDesign = currentLesson.getLearningDesign();
- if (currentDesign != null)
+ if (currentDesign != null) {
activityForm.setVersion(currentDesign.getDesignVersion());
+ }
}
- if (log.isDebugEnabled())
- log.debug("Entering activity: progress summary is " + activityForm.getProgressSummary());
+ if (LearningWebUtil.log.isDebugEnabled()) {
+ LearningWebUtil.log.debug("Entering activity: progress summary is " + activityForm.getProgressSummary());
+ }
}
/**
- * Setup the progress string, version and lesson id in the actionForm. The
- * values will go in the map with the keys "progressSummary", "lessonID",
- * "version".
+ * Setup the progress string, version and lesson id in the actionForm. The values will go in the map with the keys
+ * "progressSummary", "lessonID", "version".
*/
public static void setupProgressInRequest(DynaActionForm actionForm, HttpServletRequest request,
LearnerProgress learnerProgress) {
@@ -299,12 +307,14 @@
actionForm.set("lessonID", currentLesson.getLessonId());
LearningDesign currentDesign = currentLesson.getLearningDesign();
- if (currentDesign != null)
+ if (currentDesign != null) {
actionForm.set("version", currentDesign.getDesignVersion());
+ }
}
- if (log.isDebugEnabled())
- log.debug("Entering activity: progress summary is " + actionForm.get("progressSummary"));
+ if (LearningWebUtil.log.isDebugEnabled()) {
+ LearningWebUtil.log.debug("Entering activity: progress summary is " + actionForm.get("progressSummary"));
+ }
}
Index: lams_learning/web/includes/presenceChat.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presenceChat.jsp,v
diff -u -r1.5 -r1.6
--- lams_learning/web/includes/presenceChat.jsp 7 May 2009 06:15:38 -0000 1.5
+++ lams_learning/web/includes/presenceChat.jsp 6 Jul 2009 07:25:49 -0000 1.6
@@ -36,7 +36,7 @@
// otherwise enable presence chat
else{
// if presence im is enabled
-
+
// make visible
$("#presenceChat").removeClass("startHidden");
Index: lams_tool_daco/web/includes/css/daco.css
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_daco/web/includes/css/daco.css,v
diff -u -r1.8 -r1.9
--- lams_tool_daco/web/includes/css/daco.css 2 Jul 2009 08:19:37 -0000 1.8
+++ lams_tool_daco/web/includes/css/daco.css 6 Jul 2009 07:25:49 -0000 1.9
@@ -109,11 +109,4 @@
padding: 0px 20px 0px 0px;
background: url('../images/next.png') no-repeat;
background-position: right;
-}
-
-.nextActivity {
- padding: 0px 20px 0px 0px;
- background: url('../images/next.png') no-repeat;
- background-position: right;
-
-}
+}
\ No newline at end of file
Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java,v
diff -u -r1.5 -r1.6
--- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java 7 May 2009 06:15:46 -0000 1.5
+++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java 6 Jul 2009 07:25:48 -0000 1.6
@@ -125,13 +125,6 @@
+ " contains invalid fileType: " + att.getFileType());
}
}
-
- for (Iterator iter = videoRecorder.getVideoRecorderSessions().iterator(); iter.hasNext();) {
- VideoRecorderSession session = (VideoRecorderSession) iter.next();
- VideoRecorderSessionDTO sessionDTO = new VideoRecorderSessionDTO(session);
-
- sessionDTOs.add(sessionDTO);
- }
}
/* Getters / Setters */