Index: lams_build/common.properties =================================================================== RCS file: /usr/local/cvsroot/lams_build/common.properties,v diff -u -r1.36 -r1.37 --- lams_build/common.properties 2 Jul 2009 08:18:32 -0000 1.36 +++ lams_build/common.properties 6 Jul 2009 07:25:49 -0000 1.37 @@ -26,7 +26,7 @@ #conf.application=rams # which o/s related property file do you want? valid values "windows" or "unix" -osPropertiesName=unix +osPropertiesName=windows #Tool information name=lams_tool_${signature} Index: lams_build/conf/unix/jboss/jbossweb/context.xml =================================================================== RCS file: /usr/local/cvsroot/lams_build/conf/unix/jboss/jbossweb/context.xml,v diff -u -r1.2 -r1.3 --- lams_build/conf/unix/jboss/jbossweb/context.xml 2 Jul 2009 10:38:36 -0000 1.2 +++ lams_build/conf/unix/jboss/jbossweb/context.xml 6 Jul 2009 07:25:49 -0000 1.3 @@ -13,6 +13,10 @@ role for servlet init/destroy events. --> org.jboss.web.tomcat.security.RunAsListener - + Index: lams_build/conf/unix/jboss/jbossweb/server.xml =================================================================== RCS file: /usr/local/cvsroot/lams_build/conf/unix/jboss/jbossweb/server.xml,v diff -u -r1.2 -r1.3 --- lams_build/conf/unix/jboss/jbossweb/server.xml 2 Jul 2009 10:38:36 -0000 1.2 +++ lams_build/conf/unix/jboss/jbossweb/server.xml 6 Jul 2009 07:25:49 -0000 1.3 @@ -163,6 +163,12 @@ + Index: lams_central/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/Attic/web.xml,v diff -u -r1.44 -r1.45 --- lams_central/web/WEB-INF/web.xml 3 Jul 2009 04:57:02 -0000 1.44 +++ lams_central/web/WEB-INF/web.xml 6 Jul 2009 07:25:49 -0000 1.45 @@ -242,6 +242,11 @@ + PresenceChatLoggerServlet + org.lamsfoundation.lams.webservice.PresenceChatLoggerServlet + + + updateCollapsedGroup org.lamsfoundation.lams.web.UpdateCollapsedGroupServlet @@ -463,6 +468,10 @@ /fckeditor/editor/filemanager/upload/simpleuploader + PresenceChatLoggerServlet + /PresenceChatLogger + + updateCollapsedGroup /servlet/updateCollapsedGroup Index: lams_central/web/WEB-INF/struts/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/struts/Attic/struts-config.xml,v diff -u -r1.36 -r1.37 --- lams_central/web/WEB-INF/struts/struts-config.xml 3 Jul 2009 04:57:02 -0000 1.36 +++ lams_central/web/WEB-INF/struts/struts-config.xml 6 Jul 2009 07:25:49 -0000 1.37 @@ -64,7 +64,6 @@ - Index: lams_central/web/css/defaultMainHTML.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/defaultMainHTML.css,v diff -u -r1.10 -r1.11 --- lams_central/web/css/defaultMainHTML.css 18 Apr 2009 07:21:54 -0000 1.10 +++ lams_central/web/css/defaultMainHTML.css 6 Jul 2009 07:25:49 -0000 1.11 @@ -943,6 +943,9 @@ .mycourses-monitor-img {background: url('../images/css/mycourses_monitor.png') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; } +.mycourses-mark-img {background: url('../images/css/mark.png') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; +} + .mycourses-addlesson-img {background: url('../images/css/mycourses_addlesson.png') no-repeat 0 3px; margin-right:5px; padding:5px 0px 5px 25px; } @@ -1164,6 +1167,46 @@ display: run-in; } +#content a.my-grades-button { + background: url('../images/css/my-grades.png') no-repeat 0px 0px; + color: #666; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; + display: run-in; +} + +#content a:hover.my-grades-button { + background: url('../images/css/my-grades.png') no-repeat 0px 0px; + color: #47bc23; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; + display: run-in; +} + +#content a.course-gradebook-button { + background: url('../images/css/course_gradebook.png') no-repeat 0px 0px; + color: #666; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; + display: run-in; +} + +#content a:hover.course-gradebook-button { + background: url('../images/css/course_gradebook.png') no-repeat 0px 0px; + color: #47bc23; + padding: 5px 12px 6px 30px; + text-decoration: none; + border-right:1px solid #d2d2d2; + border-bottom: 0px; + display: run-in; +} + #content a.search-lesson { background: url('../images/css/search_lesson.png') no-repeat 0px 0px; color: #666; Index: lams_central/web/fckeditor/editor/plugins/paint/fckplugin.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/fckeditor/editor/plugins/paint/Attic/fckplugin.js,v diff -u -r1.3 -r1.4 --- lams_central/web/fckeditor/editor/plugins/paint/fckplugin.js 30 Apr 2009 02:17:12 -0000 1.3 +++ lams_central/web/fckeditor/editor/plugins/paint/fckplugin.js 6 Jul 2009 07:25:49 -0000 1.4 @@ -7,13 +7,13 @@ var PaintCommand = new Object(); PaintCommand.Add=function(source) { - FCK.InsertHtml('FCKPainting'); + FCK.InsertHtml(''); FCK.Focus(); } PaintCommand.startingImage = ""; PaintCommand.OnDoubleClick = function( image ) { - if(image.alt == "FCKPainting"){ + if(image.getAttribute('class') == "fckeditor_paint"){ PaintCommand.startingImage = image.src; FCKCommands.GetCommand('Paint canvas').Execute(); } Index: lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/fckeditor/editor/plugins/videorecorder/Attic/VideoRecorderFCKEditor.jsp,v diff -u -r1.4 -r1.5 --- lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 7 May 2009 06:15:05 -0000 1.4 +++ lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 6 Jul 2009 07:25:49 -0000 1.5 @@ -1,3 +1,7 @@ + + +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> <%@ page import="org.lamsfoundation.lams.util.Configuration" %> <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> @@ -23,7 +27,7 @@ // --> - + @@ -50,6 +54,7 @@ var requiredMinorVersion = 0; // Minor version of Flash required var requiredRevision = 124; +var requiredRevisionIE = 159; var oEditor = window.opener; var FCKVideoRecorder=null; @@ -81,7 +86,7 @@ 'videorecorder_tooltip_pause', 'videorecorder_tooltip_resume', 'videorecorder_tooltip_save_recording', 'videorecorder_tooltip_start_recording', 'videorecorder_tooltip_start_recording_again', 'videorecorder_tooltip_start_recording_next', 'videorecorder_tooltip_stop_recording', - 'videorecorder_disabled', 'button_save', 'button_ok', 'button_cancel', 'button_yes', 'button_no'); + 'videorecorder_disabled', 'button_save', 'button_ok', 'button_cancel', 'button_yes', 'button_no', 'videorecorder_camera_not_available', 'videorecorder_mic_not_available'); var languageOutput = ""; @@ -141,7 +146,7 @@ var hasProductInstall = DetectFlashVer(6, 0, 65); // Version check based upon the values defined in globals - var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); + var hasRequestedVersion = (isIE == true) ? DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevisionIE) : DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if ( hasProductInstall && !hasRequestedVersion ) { // DO NOT MODIFY THE FOLLOWING FOUR LINES Index: lams_central/web/fckeditor/editor/plugins/videorecorder/lang/en.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/fckeditor/editor/plugins/videorecorder/lang/Attic/en.js,v diff -u -r1.2 -r1.3 --- lams_central/web/fckeditor/editor/plugins/videorecorder/lang/en.js 7 May 2009 06:14:55 -0000 1.2 +++ lams_central/web/fckeditor/editor/plugins/videorecorder/lang/en.js 6 Jul 2009 07:25:49 -0000 1.3 @@ -30,4 +30,6 @@ FCKLang.videorecorder_tooltip_start_recording_next = 'Record another recording'; FCKLang.videorecorder_tooltip_stop_recording = 'Stop recording'; FCKLang.videorecorder_disabled = 'Disabled'; -FCKLang.videorecorder_error_noconfig = 'LAMS does not have a media server configured. Please contact your system administrator.'; \ No newline at end of file +FCKLang.videorecorder_error_noconfig = 'LAMS does not have a media server configured. Please contact your system administrator.'; +FCKLang.videorecorder_camera_not_available = 'No camera was detected. Please connect one and restart your browser if you want to record video.'; +FCKLang.videorecorder_mic_not_available = 'No microphone was detected. Please connect one and restart your browser if you want to record audio.'; \ No newline at end of file Index: lams_gradebook/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/build.xml,v diff -u -r1.2 -r1.3 --- lams_gradebook/build.xml 14 Apr 2009 05:05:00 -0000 1.2 +++ lams_gradebook/build.xml 6 Jul 2009 07:25:50 -0000 1.3 @@ -217,6 +217,8 @@ + + Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBActivityGridRowDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBActivityGridRowDTO.java,v diff -u -r1.4 -r1.5 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBActivityGridRowDTO.java 20 Apr 2009 00:10:31 -0000 1.4 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBActivityGridRowDTO.java 6 Jul 2009 07:25:50 -0000 1.5 @@ -44,6 +44,7 @@ String feedback; Date startDate; + // Properties for activity view String monitorUrl; Long groupId; @@ -65,6 +66,7 @@ ret.add(id.toString()); if (view == GBGridView.MON_USER) { + ret.add(marksAvailable != null ? marksAvailable.toString() : ""); if (activityUrl != null && activityUrl.length() != 0) { ret.add("" @@ -77,11 +79,13 @@ ret.add(competences); ret.add((timeTaken != null) ? convertTimeToString(timeTaken) : CELL_EMPTY); ret.add(feedback); - ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + + ret.add(markToString()); } else if (view == GBGridView.MON_ACTIVITY) { ret.add(groupId != null ? groupId.toString() : ""); + if (monitorUrl != null && monitorUrl.length() != 0) { ret.add("" + rowName + ""); @@ -91,15 +95,19 @@ ret.add((averageTimeTaken != null) ? convertTimeToString(averageTimeTaken) : CELL_EMPTY); ret.add(competences); - ret.add((averageMark != null) ? averageMark.toString() : CELL_EMPTY); + + + ret.add(averageMarkToString()); } else if (view == GBGridView.LRN_ACTIVITY) { ret.add(rowName); ret.add(status); ret.add(feedback); ret.add((averageTimeTaken != null) ? convertTimeToString(averageTimeTaken) : CELL_EMPTY); ret.add((timeTaken != null) ? convertTimeToString(timeTaken) : CELL_EMPTY); - ret.add((averageMark != null) ? averageMark.toString() : CELL_EMPTY); - ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + ret.add(averageMarkToString()); + + + ret.add(markToString()); } return ret; @@ -159,5 +167,5 @@ public void setStartDate(Date startDate) { this.startDate = startDate; - } + } } Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBUserGridRowDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBUserGridRowDTO.java,v diff -u -r1.4 -r1.5 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBUserGridRowDTO.java 20 Apr 2009 00:10:31 -0000 1.4 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/dto/GBUserGridRowDTO.java 6 Jul 2009 07:25:50 -0000 1.5 @@ -52,10 +52,12 @@ ret.add(status); ret.add((timeTaken != null) ? convertTimeToString(timeTaken) : CELL_EMPTY); ret.add(feedback); - ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + //ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + ret.add(markToString()); } else if (view == GBGridView.MON_ACTIVITY){ + ret.add(marksAvailable != null ? marksAvailable.toString() : ""); if (activityUrl != null && activityUrl.length() != 0) { ret.add("" + rowName + ""); @@ -66,14 +68,16 @@ ret.add((timeTaken != null) ? convertTimeToString(timeTaken) : CELL_EMPTY); ret.add((output != null) ? output.toString() : CELL_EMPTY); ret.add(feedback); - ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + //ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + ret.add(markToString()); } else if (view == GBGridView.MON_COURSE){ ret.add(rowName); ret.add(status); ret.add((timeTaken != null) ? convertTimeToString(timeTaken) : CELL_EMPTY); ret.add(feedback); - ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + //ret.add((mark != null) ? mark.toString() : CELL_EMPTY); + ret.add(markToString()); } return ret; Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/util/GradebookConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/util/GradebookConstants.java,v diff -u -r1.3 -r1.4 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/util/GradebookConstants.java 20 Apr 2009 00:10:31 -0000 1.3 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/util/GradebookConstants.java 6 Jul 2009 07:25:50 -0000 1.4 @@ -84,6 +84,9 @@ // Misc public static final String CONTENT_TYPE_TEXTXML = "text/xml"; + public static final String CONTENT_TYPE_TEXTPLAIN = "text/plain"; + public static final String CELL_EMPTY = "-"; + public static final String UTF8 = "UTF8"; } Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java,v diff -u -r1.3 -r1.4 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java 20 Apr 2009 00:10:31 -0000 1.3 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookAction.java 6 Jul 2009 07:25:50 -0000 1.4 @@ -23,7 +23,6 @@ /* $Id$ */ package org.lamsfoundation.lams.gradebook.web.action; -import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -36,6 +35,7 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.gradebook.GradebookUserLesson; import org.lamsfoundation.lams.gradebook.dto.GBLessonGridRowDTO; import org.lamsfoundation.lams.gradebook.dto.GBUserGridRowDTO; import org.lamsfoundation.lams.gradebook.dto.GradebookGridRowDTO; @@ -44,11 +44,9 @@ import org.lamsfoundation.lams.gradebook.util.GradebookConstants; import org.lamsfoundation.lams.gradebook.util.GradebookUtil; import org.lamsfoundation.lams.learningdesign.Activity; -import org.lamsfoundation.lams.learningdesign.Group; import org.lamsfoundation.lams.learningdesign.ToolActivity; import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.lesson.service.ILessonService; -import org.lamsfoundation.lams.monitoring.service.IMonitoringService; import org.lamsfoundation.lams.usermanagement.Organisation; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; @@ -79,7 +77,6 @@ private static IGradebookService gradebookService; private static IUserManagementService userService; private static ILessonService lessonService; - private static IMonitoringService monitoringService; public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -163,9 +160,7 @@ String ret = GradebookUtil.toGridXML(gradebookActivityDTOs, view, sortBy, isSearch, searchField, searchOper, searchString, sortOrder, rowLimit, page); - response.setContentType(GradebookConstants.CONTENT_TYPE_TEXTXML); - PrintWriter out = response.getWriter(); - out.print(ret); + writeResponse(response, CONTENT_TYPE_TEXT_XML, ENCODING_UTF8, ret); } else { logger.error("No lesson could be found for: " + lessonID); } @@ -237,7 +232,7 @@ // Getting the group id if it is there Long groupId = WebUtil.readLongParam(request, GradebookConstants.PARAM_GROUP_ID, true); - Activity activity = monitoringService.getActivityById(activityID); + Activity activity = gradebookService.getActivityById(activityID); if (activity != null && activity instanceof ToolActivity) { gradebookUserDTOs = gradebookService.getGBUserRowsForActivity(lesson, (ToolActivity)activity, groupId); } else { @@ -250,9 +245,7 @@ String ret = GradebookUtil.toGridXML(gradebookUserDTOs, view, sortBy, isSearch, searchField, searchOper, searchString, sortOrder, rowLimit, page); - response.setContentType(GradebookConstants.CONTENT_TYPE_TEXTXML); - PrintWriter out = response.getWriter(); - out.print(ret); + writeResponse(response, CONTENT_TYPE_TEXT_XML, ENCODING_UTF8, ret); } else { logger.error("No lesson could be found for: " + lessonID); } @@ -315,9 +308,8 @@ String ret = GradebookUtil.toGridXML(gradebookLessonDTOs, view, sortBy, isSearch, searchField, searchOper, searchString, sortOrder, rowLimit, page); - response.setContentType(GradebookConstants.CONTENT_TYPE_TEXTXML); - PrintWriter out = response.getWriter(); - out.print(ret); + + writeResponse(response, CONTENT_TYPE_TEXT_XML, ENCODING_UTF8, ret); } @@ -328,7 +320,110 @@ return null; } + + /** + * Gets the total mark for a user's lesson and writes the result in the + * response + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + @SuppressWarnings("unchecked") + public ActionForward getLessonMarkAggregate(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + initServices(); + Long lessonID = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID); + Integer userID = WebUtil.readIntParam(request, GradebookConstants.PARAM_USERID); + + Lesson lesson = lessonService.getLesson(lessonID); + User learner = (User) userService.findById(User.class, userID); + + + if (lesson != null && learner != null) { + GradebookUserLesson lessonMark = gradebookService.getGradebookUserLesson(lessonID, userID); + writeResponse(response, CONTENT_TYPE_TEXT_PLAIN, ENCODING_UTF8, lessonMark.getMark().toString()); + } else { + // Grid will handle error, just log and return null + logger.error("Error: request for course gradebook data with null user or lesson. lessonID: " + lessonID); + } + return null; + } + + /** + * Gets the average mark for an activity and writes the result in the + * response + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + @SuppressWarnings("unchecked") + public ActionForward getActivityMarkAverage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + initServices(); + + Long activityID = WebUtil.readLongParam(request, AttributeNames.PARAM_ACTIVITY_ID); + Activity activity = gradebookService.getActivityById(activityID); + + if (activity != null) { + Double averageMark = gradebookService.getAverageMarkForActivity(activityID); + + + if (averageMark != null) { + writeResponse(response, CONTENT_TYPE_TEXT_PLAIN, ENCODING_UTF8, averageMark.toString()); + } else { + writeResponse(response, CONTENT_TYPE_TEXT_PLAIN, ENCODING_UTF8, GradebookConstants.CELL_EMPTY); + } + } else { + // Grid will handle error, just log and return null + logger.error("Error: request for course gradebook data with null activity. actvity: " + activityID); + } + return null; + } + + /** + * Gets the average mark for lesson and writes the result in the response + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + @SuppressWarnings("unchecked") + public ActionForward getLessonMarkAverage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + initServices(); + + Long lessonID = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID); + Lesson lesson = lessonService.getLesson(lessonID); + + if (lesson != null) { + Double averageMark = gradebookService.getAverageMarkForLesson(lessonID); + + if (averageMark != null) { + writeResponse(response, CONTENT_TYPE_TEXT_PLAIN, ENCODING_UTF8, averageMark.toString()); + } else { + writeResponse(response, CONTENT_TYPE_TEXT_PLAIN, ENCODING_UTF8, GradebookConstants.CELL_EMPTY); + } + } else { + // Grid will handle error, just log and return null + logger.error("Error: request for course gradebook data with null lesson. lesson: " + lessonID); + } + return null; + } + + + private UserDTO getUser() { HttpSession ss = SessionManager.getSession(); return (UserDTO) ss.getAttribute(AttributeNames.USER); @@ -346,7 +441,6 @@ private void initServices() { getUserService(); getLessonService(); - getMonitoringServiceService(); getGradebookService(); } @@ -368,15 +462,6 @@ return lessonService; } - private IMonitoringService getMonitoringServiceService() { - if (monitoringService == null) { - WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() - .getServletContext()); - monitoringService = (IMonitoringService) ctx.getBean("monitoringService"); - } - return monitoringService; - } - private IGradebookService getGradebookService() { if (gradebookService == null) { WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() Index: lams_gradebook/web/gradebookCourseLearner.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/web/gradebookCourseLearner.jsp,v diff -u -r1.4 -r1.5 --- lams_gradebook/web/gradebookCourseLearner.jsp 15 Apr 2009 07:42:51 -0000 1.4 +++ lams_gradebook/web/gradebookCourseLearner.jsp 6 Jul 2009 07:25:50 -0000 1.5 @@ -11,6 +11,20 @@ Course Gradebook Learner + + @@ -58,7 +72,7 @@ ], loadError: function(xhr,st,err) { jQuery("#organisationGrid").clearGridData(); - alert(''); + info_dialog('', '', ''); }, subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { @@ -89,15 +103,15 @@ {name:'id', index:'id', sortable:false, hidden:true, hidedlg:true}, {name:'rowName', index:'rowName', sortable:false, editable: false, width:100}, {name:'status', index:'status', sortable:false, editable:false, width:50, align:"center"}, - {name:'feedback', index:'feedback', sortable:false, editable: false}, + {name:'feedback', index:'feedback', sortable:false, editable: false, hidden:true}, {name:'averageTimeTaken',index:'averageTimeTaken', sortable:true, hidden:true, editable:false, search:false, width:80, align:"center"}, {name:'timeTaken',index:'timeTaken', sortable:true, editable:false, hidden:true, search:false, width:80, align:"center"}, {name:'averageMark',index:'averageMark', sortable:true, editable:false, search:false, width:50, align:"center"}, {name:'mark', width:100, index:'mark', sortable:true, editable: false, width:50, align:"center"} ], loadError: function(xhr,st,err) { jQuery("#"+subgrid_table_id).clearGridData(); - alert(''); + info_dialog('', '', ''); }, gridComplete: function(){ toolTip($(".jqgrow")); @@ -148,6 +162,7 @@
+

@@ -156,7 +171,7 @@


-
+
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 @@ <fmt:message key="gradebook.title.window.courseMonitor"/> - + + + 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 */