Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java,v diff -u -r1.3.4.4 -r1.3.4.5 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java 7 May 2009 06:54:49 -0000 1.3.4.4 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java 13 May 2009 08:14:09 -0000 1.3.4.5 @@ -95,33 +95,45 @@ VideoRecorder videoRecorder = videoRecorderService .getVideoRecorderByContentId(toolContentID); + // prepare toolSessionID and userID, may not exist if just authoring + Long toolSessionID = new Long(-1); + Long vrUserUid = new Long(-1); + if (videoRecorder == null) { // TODO error page. } VideoRecorderDTO videoRecorderDT0 = new VideoRecorderDTO(videoRecorder); - // get first session + // get sessions in order to get first session Set sessions = videoRecorderDT0.getSessionDTOs(); - Object[] sessionsArray = sessions.toArray(); - VideoRecorderSessionDTO firstSession = (VideoRecorderSessionDTO)sessionsArray[0]; - - // get toolSessionId - Long toolSessionID = firstSession.getSessionID(); - // stupid shit to convert to Long - long primLongUserId = user.getUserID(); - Long longUserId = primLongUserId; - - // get user - VideoRecorderUser videoRecorderUser = videoRecorderService.getUserByUserIdAndSessionId(longUserId, toolSessionID); - + // if a session exists + if(!sessions.isEmpty()){ + // get first session + Object[] sessionsArray = sessions.toArray(); + VideoRecorderSessionDTO firstSession = (VideoRecorderSessionDTO)sessionsArray[0]; + + // get toolSessionId + toolSessionID = firstSession.getSessionID(); + + // stupid shit to convert to Long + long primLongUserId = user.getUserID(); + Long longUserId = primLongUserId; + + // get user + VideoRecorderUser videoRecorderUser = videoRecorderService.getUserByUserIdAndSessionId(longUserId, toolSessionID); + + vrUserUid = videoRecorderUser.getUid(); + } + Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB,true); videoRecorderDT0.setCurrentTab(currentTab); + request.setAttribute("toolSessions", sessions); request.setAttribute("contentEditable", true); request.setAttribute("mode", "author"); - request.setAttribute("userId", videoRecorderUser.getUid()); + request.setAttribute("userId", vrUserUid); request.setAttribute("toolSessionId", toolSessionID); request.setAttribute("toolContentId", toolContentID); request.setAttribute("videoRecorderDTO", videoRecorderDT0); Index: lams_tool_videorecorder/web/pages/monitoring/summary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/pages/monitoring/summary.jsp,v diff -u -r1.5.2.3 -r1.5.2.4 --- lams_tool_videorecorder/web/pages/monitoring/summary.jsp 7 May 2009 06:54:52 -0000 1.5.2.3 +++ lams_tool_videorecorder/web/pages/monitoring/summary.jsp 13 May 2009 08:14:09 -0000 1.5.2.4 @@ -168,101 +168,110 @@ -
- - -
+ + +

+ +

+
+ +
+ + +
+
+