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.2.2.1 -r1.2.2.2 --- lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 24 Apr 2009 03:06:14 -0000 1.2.2.1 +++ lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 7 May 2009 06:54:32 -0000 1.2.2.2 @@ -2,7 +2,13 @@ <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> <%@ taglib uri="tags-lams" prefix="lams" %> +<%@ taglib uri="tags-core" prefix="c"%> +<% + String red5Url = Configuration.get(ConfigurationKeys.RED5_SERVER_URL); + String red5RecordingsUrl = Configuration.get(ConfigurationKeys.RED5_RECORDINGS_URL); +%> + @@ -31,24 +37,20 @@ + + + + - - - <%-- initial html / presence.js adds on html into here --%> -
+
<%-- only pop the message box if im is enabled --%>
@@ -93,6 +118,7 @@
+ <%-- always pop the roster --%>
+ + <%-- div reserved for storing context menus --%>
+
+ + <%-- floating div shown when IE6 is being used --%> +
+ Sorry, Internet Explorer 6 is not compatible with Presence Chat
\ No newline at end of file Index: lams_tool_videorecorder/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/build.properties,v diff -u -r1.1.4.2 -r1.1.4.3 --- lams_tool_videorecorder/build.properties 17 Apr 2009 08:21:37 -0000 1.1.4.2 +++ lams_tool_videorecorder/build.properties 7 May 2009 06:54:51 -0000 1.1.4.3 @@ -13,7 +13,7 @@ hideTool=false # Minimum compatible version -min.server.version.number=2.2 +min.server.version.number=2.3 # Language files package language.files.package=org.lamsfoundation.lams.tool.videoRecorder Index: lams_tool_videorecorder/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/build.xml,v diff -u -r1.3.2.3 -r1.3.2.4 --- lams_tool_videorecorder/build.xml 24 Apr 2009 03:06:22 -0000 1.3.2.3 +++ lams_tool_videorecorder/build.xml 7 May 2009 06:54:50 -0000 1.3.2.4 @@ -482,7 +482,7 @@ - Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/Attic/VideoRecorder.hbm.xml,v diff -u -r1.3.2.2 -r1.3.2.3 --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml 17 Apr 2009 08:21:43 -0000 1.3.2.2 +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml 7 May 2009 06:54:50 -0000 1.3.2.3 @@ -250,6 +250,14 @@ + + + + + + sessionDTOs = new TreeSet(); + public VideoRecorderRecordingDTO authorRecording; + public Long currentTab; /* Constructors */ @@ -101,10 +103,13 @@ exportOffline = videoRecorder.isExportOffline(); reflectOnActivity = videoRecorder.isReflectOnActivity(); reflectInstructions = videoRecorder.getReflectInstructions(); - onlineInstructionsFiles = new TreeSet(); offlineInstructionsFiles = new TreeSet(); + if(videoRecorder.getAuthorRecording() != null){ + authorRecording = new VideoRecorderRecordingDTO(); + } + for (Iterator i = videoRecorder.getVideoRecorderAttachments().iterator(); i.hasNext();) { VideoRecorderAttachment att = (VideoRecorderAttachment) i.next(); if (att.getFileType().equals(IToolContentHandler.TYPE_OFFLINE)) { @@ -158,6 +163,14 @@ return offlineInstructionsFiles; } + public VideoRecorderRecordingDTO getAuthorRecording() { + return authorRecording; + } + + public void setAuthorRecording(VideoRecorderRecordingDTO authorRecording) { + this.authorRecording = authorRecording; + } + public void setOfflineInstructionsFiles( Set offlineInstructionsFiles) { this.offlineInstructionsFiles = offlineInstructionsFiles; Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java,v diff -u -r1.3.4.3 -r1.3.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java 24 Apr 2009 03:06:17 -0000 1.3.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java 7 May 2009 06:54:42 -0000 1.3.4.4 @@ -63,6 +63,8 @@ public Float rating; public Boolean isJustSound; + + public Boolean isLocal; public VideoRecorderSession videoRecorderSession; @@ -85,6 +87,7 @@ this.description = videoRecorderRecording.getDescription(); this.rating = videoRecorderRecording.getRating(); this.isJustSound = videoRecorderRecording.getIsJustSound(); + this.isLocal = videoRecorderRecording.getIsLocal(); this.videoRecorderSession = videoRecorderRecording.getVideoRecorderSession(); this.filename = videoRecorderRecording.getFilename(); this.ratings = VideoRecorderRatingDTO.getVideoRecorderRatingDTOs(videoRecorderRecording.getRatings()); @@ -178,7 +181,15 @@ public void setIsJustSound(Boolean isJustSound) { this.isJustSound = isJustSound; } + + public Boolean getIsLocal() { + return isLocal; + } + public void setIsLocal(Boolean isLocal) { + this.isLocal = isLocal; + } + public VideoRecorderSession getVideoRecorderSession() { return this.videoRecorderSession; } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java,v diff -u -r1.1.4.3 -r1.1.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java 24 Apr 2009 03:06:17 -0000 1.1.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java 7 May 2009 06:54:42 -0000 1.1.4.4 @@ -36,17 +36,20 @@ Long sessionID; + String contentFolderId; + String sessionName; Set userDTOs = new TreeSet(); int numberOfLearners; - int numberOfFinishedLearners;; + int numberOfFinishedLearners; public VideoRecorderSessionDTO(VideoRecorderSession session) { this.sessionID = session.getSessionId(); this.sessionName = session.getSessionName(); + this.contentFolderId = session.getContentFolderId(); numberOfFinishedLearners = 0; for (Iterator iterator = session.getVideoRecorderUsers().iterator(); iterator.hasNext();) { @@ -80,6 +83,14 @@ this.sessionName = sessionName; } + public String getContentFolderId() { + return contentFolderId; + } + + public void setContentFolderId(String contentFolderId) { + this.contentFolderId = contentFolderId; + } + public int compareTo(Object o) { int returnValue; VideoRecorderSessionDTO toSession = (VideoRecorderSessionDTO)o; Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java,v diff -u -r1.4.4.3 -r1.4.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java 24 Apr 2009 03:06:21 -0000 1.4.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java 7 May 2009 06:54:48 -0000 1.4.4.4 @@ -100,6 +100,8 @@ private Set videoRecorderSessions; + private VideoRecorderRecording authorRecording; + private Set conditions = new TreeSet(new TextSearchConditionComparator()); // *********** NON Persisit fields @@ -116,8 +118,8 @@ boolean runOffline, boolean lockOnFinished, boolean filteringEnabled, String filterKeywords, String onlineInstructions, String offlineInstructions, boolean contentInUse, boolean defineLater, boolean allowUseVoice, boolean allowUseCamera, boolean allowLearnerVideoExport, boolean allowLearnerVideoVisibility, - Long toolContentId, Set videoRecorderAttachments, Set videoRecorderSessions, boolean exportAll, - boolean exportOffline, boolean reflectOnActivity, String reflectInstructions) { + Long toolContentId, Set videoRecorderAttachments, Set videoRecorderSessions, VideoRecorderRecording authorRecording, + boolean exportAll, boolean exportOffline, boolean reflectOnActivity, String reflectInstructions) { this.createDate = createDate; this.updateDate = updateDate; this.createBy = createBy; @@ -132,6 +134,7 @@ this.toolContentId = toolContentId; this.videoRecorderAttachments = videoRecorderAttachments; this.videoRecorderSessions = videoRecorderSessions; + this.authorRecording = authorRecording; this.allowUseVoice = allowUseVoice; this.allowUseCamera = allowUseCamera; this.allowLearnerVideoVisibility = allowLearnerVideoVisibility; @@ -446,7 +449,24 @@ public void setVideoRecorderSessions(Set videoRecorderSessions) { this.videoRecorderSessions = videoRecorderSessions; } + + /** + * @return Returns the first recording made by author + * + * @hibernate.one-to-one + * column="author_recording_id" + * cascade="none" + * + */ + public VideoRecorderRecording getAuthorRecording() { + return authorRecording; + } + + public void setAuthorRecording(VideoRecorderRecording authorRecording) { + this.authorRecording = authorRecording; + } + /** * @hibernate.set lazy="true" cascade="all" * sort="org.lamsfoundation.lams.learningdesign.TextSearchConditionComparator" Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderComment.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderComment.java,v diff -u -r1.1.4.3 -r1.1.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderComment.java 24 Apr 2009 03:06:21 -0000 1.1.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderComment.java 7 May 2009 06:54:49 -0000 1.1.4.4 @@ -142,7 +142,7 @@ } /** - * @return Returns the VideoRecorderUser of the person who created the recording + * @return Returns the VideoRecorderRecording of the comment * * @hibernate.many-to-one * column="videoRecorder_recording_uid" Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java,v diff -u -r1.3.4.3 -r1.3.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java 24 Apr 2009 03:06:21 -0000 1.3.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java 7 May 2009 06:54:48 -0000 1.3.4.4 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Set; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; @@ -60,6 +61,8 @@ private String filename; + private Boolean isLocal; + private Boolean isJustSound; private VideoRecorderUser createBy; @@ -84,6 +87,7 @@ this.title = recording.title; this.description = recording.description; this.rating = recording.rating; + this.isLocal = recording.isLocal; this.isJustSound = recording.isJustSound; this.ratings = VideoRecorderRating.getVideoRecorderRatings(recording.ratings); this.comments = VideoRecorderComment.getVideoRecorderComments(recording.comments); @@ -100,6 +104,7 @@ this.title = recording.title; this.description = recording.description; this.rating = recording.rating; + this.isLocal = recording.isLocal; this.isJustSound = false; this.ratings = null; this.comments = null; @@ -110,7 +115,7 @@ /** full constructor */ public VideoRecorderRecording( Date createDate, Date updateDate, VideoRecorderUser createBy, String title, String description, - Float rating, Boolean isJustSound, Long videoRecorderUid, VideoRecorderSession videoRecorderSession, String filename, + Float rating, Boolean isJustSound, Boolean isLocal, Long videoRecorderUid, VideoRecorderSession videoRecorderSession, String filename, Set ratings, Set comments, Long toolContentId) { this.createDate = createDate; @@ -120,13 +125,14 @@ this.description = description; this.rating = rating; this.isJustSound = isJustSound; + this.isLocal = isLocal; this.ratings = ratings; this.comments = comments; this.videoRecorderSession = videoRecorderSession; this.filename = filename; this.toolContentId = toolContentId; } - + // Property accessors /** * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" @@ -248,6 +254,19 @@ public void setIsJustSound(Boolean isJustSound) { this.isJustSound = isJustSound; } + + /** + * @hibernate.property column="is_local" + * + */ + + public Boolean getIsLocal() { + return isLocal; + } + + public void setIsLocal(Boolean isLocal) { + this.isLocal = isLocal; + } /** * Gets the toolSession Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java,v diff -u -r1.2.4.3 -r1.2.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java 24 Apr 2009 03:06:21 -0000 1.2.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java 7 May 2009 06:54:49 -0000 1.2.4.4 @@ -58,6 +58,8 @@ private Long sessionId; private String sessionName; + + private String contentFolderId; private VideoRecorder videoRecorder; @@ -71,13 +73,14 @@ /** full constructor */ public VideoRecorderSession(Date sessionEndDate, Date sessionStartDate, - Integer status, Long sessionId, String sessionName, VideoRecorder videoRecorder, + Integer status, Long sessionId, String sessionName, String contentFolderId, VideoRecorder videoRecorder, Set videoRecorderUsers) { this.sessionEndDate = sessionEndDate; this.sessionStartDate = sessionStartDate; this.status = status; this.sessionId = sessionId; this.sessionName = sessionName; + this.contentFolderId = contentFolderId; this.videoRecorder = videoRecorder; this.videoRecorderUsers = videoRecorderUsers; } @@ -165,7 +168,20 @@ public void setSessionName(String sessionName) { this.sessionName = sessionName; } + + /** + * @hibernate.property column="content_folder_id" length="32" + * + */ + public String getContentFolderId() { + return this.contentFolderId; + } + + public void setContentFolderId(String contentFolderId) { + this.contentFolderId = contentFolderId; + } + /** * @hibernate.many-to-one not-null="true" * @hibernate.column name="videoRecorder_uid" Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java,v diff -u -r1.5.2.3 -r1.5.2.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java 24 Apr 2009 03:06:20 -0000 1.5.2.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java 7 May 2009 06:54:47 -0000 1.5.2.4 @@ -88,6 +88,7 @@ import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderToolContentHandler; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.FileUtil; import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.util.audit.IAuditService; @@ -152,6 +153,8 @@ VideoRecorderSession session = new VideoRecorderSession(); session.setSessionId(toolSessionId); session.setSessionName(toolSessionName); + session.setContentFolderId(FileUtil.generateUniqueContentFolderID()); + // learner starts // TODO need to also set other fields. VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentId); @@ -283,8 +286,16 @@ // set ResourceToolContentHandler as null to avoid copy file node in // repository again. videoRecorder = VideoRecorder.newInstance(videoRecorder, toolContentId, null); + videoRecorder.setToolContentId(null); videoRecorder.setToolContentHandler(null); videoRecorder.setVideoRecorderSessions(null); + + VideoRecorderRecording authorRecording = (VideoRecorderRecording)getFirstRecordingByToolContentId(toolContentId).clone(); + authorRecording.setToolContentId(null); + authorRecording.setComments(null); + authorRecording.setRatings(null); + videoRecorder.setAuthorRecording(authorRecording); + Set atts = videoRecorder.getVideoRecorderAttachments(); for (VideoRecorderAttachment att : atts) { att.setVideoRecorder(null); @@ -317,12 +328,18 @@ + toolPOJO); } VideoRecorder videoRecorder = (VideoRecorder) toolPOJO; - + + VideoRecorderRecording recording = videoRecorder.getAuthorRecording(); + // reset it to new toolContentId videoRecorder.setToolContentId(toolContentId); - videoRecorder.setCreateBy(new Long(newUserUid.longValue())); + videoRecorder.getAuthorRecording().setToolContentId(toolContentId); videoRecorderDAO.saveOrUpdate(videoRecorder); + + if(recording != null){ + videoRecorderRecordingDAO.saveOrUpdate(recording); + } } catch (ImportToolContentException e) { throw new ToolException(e); } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java,v diff -u -r1.3.4.3 -r1.3.4.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java 24 Apr 2009 03:06:22 -0000 1.3.4.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java 7 May 2009 06:54:50 -0000 1.3.4.4 @@ -29,13 +29,16 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.dao.IBaseDAO; import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.ToolSession; import org.lamsfoundation.lams.tool.ToolSessionManager; import org.lamsfoundation.lams.tool.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; @@ -57,6 +60,8 @@ import org.lamsfoundation.lams.web.util.AttributeNames; import org.lamsfoundation.lams.util.Configuration; import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; /** * @author @@ -79,7 +84,7 @@ public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - + LearningForm learningForm = (LearningForm) form; // 'toolSessionID' and 'mode' paramters are expected to be present. @@ -135,6 +140,14 @@ request.setAttribute("toolSessionId", toolSessionID); request.setAttribute("toolContentId", toolContentID); + // getting the contentfolderid using the session and lesson + WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + IBaseDAO baseDAO =(IBaseDAO) ctx.getBean("baseDAO"); + ToolSession toolSession = (ToolSession)baseDAO.find(ToolSession.class, toolSessionID); + String contentFolderId = toolSession.getLesson().getLearningDesign().getContentFolderID(); + + request.setAttribute("contentFolderId", contentFolderId); + // set language xml request.setAttribute("languageXML", videoRecorderService.getLanguageXML()); Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/VideoRecorderAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java,v diff -u -r1.6.2.3 -r1.6.2.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java 24 Apr 2009 03:06:23 -0000 1.6.2.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java 7 May 2009 06:54:51 -0000 1.6.2.4 @@ -91,8 +91,6 @@ .getVideoRecorderService(getServletContext()); } - toolSessionID = new Long(request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID)); - try { if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { request.getSession().setAttribute(AttributeNames.ATTR_MODE, @@ -258,7 +256,7 @@ .getAttribute(AttributeNames.USER); // get video recording dtos from just tool content id - List videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionId(new Long(0), toolContentID); + List videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionId(toolSessionID, toolContentID); // get nb of recordings int nbRecordings = videoRecorderRecordingDTOs.size(); @@ -303,11 +301,14 @@ // bundling files try { - String[] urls = new String[1]; - urls[0] = VIDEORECORDER_INCLUDES_HTTP_FOLDER_URL; + String[] srcDirs = new String[2]; + srcDirs[0] = VIDEORECORDER_INCLUDES_HTTP_FOLDER_URL; + + String[] targetDirs = new String[2]; + targetDirs[0] = directoryName + File.separator + "files"; MultipleDirFileBundler fileBundler = new MultipleDirFileBundler(); - fileBundler.bundle(request, cookies, directoryName, urls, fileArray); + fileBundler.bundle(request, cookies, srcDirs, targetDirs, fileArray); } catch (Exception e) { logger.error("Could not bundle files", e); } @@ -316,9 +317,7 @@ private void bundleFilesForOffline(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies, List videoRecorderRecordingDTOs){ - // prepare the file array - // index 0 is for the files from VIDEORECORDER_INCLUDES_HTTP_FOLDER_URL - // index 1 is for the files from VIDEORECORDER_RECORDINGS_HTTP_FOLDER_URL + // prepare ArrayList[] fileArray = new ArrayList[2]; fileArray[0] = new ArrayList(); fileArray[1] = new ArrayList(); @@ -336,48 +335,24 @@ // get the video recording VideoRecorderRecordingDTO vr = (VideoRecorderRecordingDTO) iter.next(); - // success indicator - int success = 0; - - String absoluteFilePath = VIDEORECORDER_RECORDINGS_FOLDER_DEST + vr.getFilename() + FLV_EXTENSION; - - // fetch file locally - File f = new File(absoluteFilePath); - - // if file doesn't exist locally - if(!f.exists()){ - // create the file - f.createNewFile(); - // fetch from server - success = HttpUrlConnectionUtil.writeResponseToFile(VIDEORECORDER_RECORDINGS_FOLDER_SRC + vr.getFilename() + FLV_EXTENSION, VIDEORECORDER_RECORDINGS_FOLDER_DEST, vr.getFilename() + FLV_EXTENSION, cookies); - } - // if it does exists - else{ - // w00t - success = 1; - } - - // if we have a file - if(success == 1){ - // add the filename to the list - fileArray[1].add(vr.getFilename() + FLV_EXTENSION); - logger.debug("file copy complete"); - }else{ - logger.debug("file copy failed"); - } + fileArray[1].add(vr.getFilename() + FLV_EXTENSION); } } catch (Exception e) { logger.error("Could not find files on Red5 server", e); } // bundling files try { - String[] urls = new String[2]; - urls[0] = VIDEORECORDER_INCLUDES_HTTP_FOLDER_URL; - urls[1] = VIDEORECORDER_RECORDINGS_HTTP_FOLDER_URL; + String[] srcDirs = new String[2]; + srcDirs[0] = VIDEORECORDER_INCLUDES_HTTP_FOLDER_URL; + srcDirs[1] = VIDEORECORDER_RECORDINGS_FOLDER_SRC; + + String[] targetDirs = new String[2]; + targetDirs[0] = directoryName + File.separator + "files"; + targetDirs[1] = directoryName + File.separator + "files"; MultipleDirFileBundler fileBundler = new MultipleDirFileBundler(); - fileBundler.bundle(request, cookies, directoryName, urls, fileArray); + fileBundler.bundle(request, cookies, srcDirs, targetDirs, fileArray); } catch (Exception e) { logger.error("Could not bundle files", e); } Fisheye: Tag 1.6.2.4 refers to a dead (removed) revision in file `lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_videorecorder/web/images/soundOnly.png =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/images/soundOnly.png,v diff -u -r1.1.2.1 -r1.1.2.2 Binary files differ Index: lams_tool_videorecorder/web/includes/flash/VideoRecorder.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/includes/flash/VideoRecorder.swf,v diff -u -r1.6.2.3 -r1.6.2.4 Binary files differ Index: lams_tool_videorecorder/web/includes/flash/VideoRecorderFCKEditor.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/includes/flash/VideoRecorderFCKEditor.swf,v diff -u -r1.5.2.3 -r1.5.2.4 Binary files differ Index: lams_tool_videorecorder/web/pages/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/pages/authoring/authoring.jsp,v diff -u -r1.1.4.2 -r1.1.4.3 --- lams_tool_videorecorder/web/pages/authoring/authoring.jsp 17 Apr 2009 08:21:46 -0000 1.1.4.2 +++ lams_tool_videorecorder/web/pages/authoring/authoring.jsp 7 May 2009 06:54:50 -0000 1.1.4.3 @@ -24,7 +24,6 @@ - @@ -58,8 +57,6 @@ - <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> -<%@ taglib uri="tags-lams" prefix="lams" %> <%@ include file="/common/taglibs.jsp"%> - - @@ -46,8 +32,15 @@
-