Index: lams_central/src/java/org/lamsfoundation/lams/webservice/PaintAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/webservice/PaintAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/src/java/org/lamsfoundation/lams/webservice/PaintAction.java 24 Apr 2009 02:43:27 -0000 1.1 @@ -0,0 +1,89 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.webservice; + +import java.io.File; +import java.io.IOException; +import java.util.Date; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +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.util.Base64StringToImageUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; + +/** +* @author Paul Georges + +* ----------------XDoclet Tags-------------------- +* +* @struts:action path="/Paint" +* parameter="method" +* validate="false" +* +* ----------------XDoclet Tags-------------------- +*/ +public class PaintAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(PresenceChatLoggerAction.class); + + public ActionForward saveImage(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + try{ + String toolContentId = WebUtil.readStrParam(request, "toolContentId"); + String userId = WebUtil.readStrParam(request, "userId"); + String data = WebUtil.readStrParam(request, "data"); + + Date today = new Date(); + String filename = String.valueOf(today.getTime()); + String dir = File.separator + "lams-www.war" + File.separator + "secure" + File.separator + toolContentId + File.separator + "Paint" + File.separator + userId + File.separator; + + String absoluteFilePath = dir + filename + ".png"; + + File newPath = new File(dir); + newPath.mkdirs(); + + File newFile = new File(absoluteFilePath); + newFile.createNewFile(); + + boolean success = Base64StringToImageUtil.create(dir, filename, "png", data); + + if(success){ + writeAJAXResponse(response, absoluteFilePath); + }else{ + writeAJAXResponse(response, ""); + } + }catch(Exception e){ + writeAJAXResponse(response, e.getMessage()); + } + + return null; + } +} Index: lams_central/src/java/org/lamsfoundation/lams/webservice/PresenceChatLoggerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/webservice/Attic/PresenceChatLoggerAction.java,v diff -u -r1.1 -r1.2 --- lams_central/src/java/org/lamsfoundation/lams/webservice/PresenceChatLoggerAction.java 17 Apr 2009 07:08:14 -0000 1.1 +++ lams_central/src/java/org/lamsfoundation/lams/webservice/PresenceChatLoggerAction.java 24 Apr 2009 02:43:27 -0000 1.2 @@ -79,6 +79,8 @@ List messages = presenceChatLoggerService.getMessagesByConversation(from, to, roomName); + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, buildConversationXML(to, messages)); } catch (Exception e) { @@ -101,6 +103,8 @@ List messages = presenceChatLoggerService.getMessagesByRoomName(roomName); + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, buildGroupHistoryXML(messages)); } catch (Exception e) { logger.error(e.getMessage()); 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 -r1.3 --- lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 19 Mar 2009 06:35:46 -0000 1.2 +++ lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.jsp 24 Apr 2009 02:43:27 -0000 1.3 @@ -165,7 +165,7 @@ // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( "src", "VideoRecorderFCKEditor", - "FlashVars", "mode=recorderModeFCK"+'&serverUrl=<%= Configuration.get(ConfigurationKeys.SERVER_URL) %>'+'&red5ServerUrl=<%= Configuration.get(ConfigurationKeys.RED5_SERVER_URL) %>'+'&red5RecordingsUrl=<%= Configuration.get(ConfigurationKeys.RED5_RECORDINGS_URL) %>'+'&lamsEarDir=<%= Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) %>' +'&saveToLamsDestUrl=/lams-www.war/secure/' + FCKConfig.ContentFolderID + '/Recordings/' + '&contentFolderUrl=/lams/www/secure/' + FCKConfig.ContentFolderID + '/Recordings/' + '&languageXML=' + escape(getLanguageXML()) + "", + "FlashVars", "mode=recorderModeFCK"+'&serverUrl=<%= Configuration.get(ConfigurationKeys.SERVER_URL) %>'+'&red5ServerUrl=<%= Configuration.get(ConfigurationKeys.RED5_SERVER_URL) %>'+'&red5RecordingsUrl=<%= Configuration.get(ConfigurationKeys.RED5_RECORDINGS_URL) %>'+'&lamsEarDir=<%= Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) %>' +'&saveToLamsDestUrl=/lams-www.war/secure/' + FCKConfig.ContentFolderID + '/Recordings/' + '&contentFolderUrl=/lams//www/secure/' + FCKConfig.ContentFolderID + '/Recordings/' + '&languageXML=' + escape(getLanguageXML()) + "", "width", "361", "height", "331", "align", "middle", Index: lams_central/web/fckeditor/editor/plugins/videorecorder/VideoRecorderFCKEditor.swf =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/fckeditor/editor/plugins/videorecorder/Attic/VideoRecorderFCKEditor.swf,v diff -u -r1.4 -r1.5 Binary files differ Index: lams_flash/src/central/flex/VideoRecorder/.actionScriptProperties =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/.actionScriptProperties,v diff -u -r1.2 -r1.3 --- lams_flash/src/central/flex/VideoRecorder/.actionScriptProperties 3 Feb 2009 02:54:41 -0000 1.2 +++ lams_flash/src/central/flex/VideoRecorder/.actionScriptProperties 24 Apr 2009 02:43:26 -0000 1.3 @@ -7,6 +7,7 @@ + Index: lams_flash/src/central/flex/VideoRecorderFCKEditor/.actionScriptProperties =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorderFCKEditor/.actionScriptProperties,v diff -u -r1.1 -r1.2 --- lams_flash/src/central/flex/VideoRecorderFCKEditor/.actionScriptProperties 3 Feb 2009 02:54:41 -0000 1.1 +++ lams_flash/src/central/flex/VideoRecorderFCKEditor/.actionScriptProperties 24 Apr 2009 02:43:26 -0000 1.2 @@ -7,6 +7,7 @@ + Index: lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml,v diff -u -r1.3 -r1.4 --- lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml 17 Apr 2009 07:06:07 -0000 1.3 +++ lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml 24 Apr 2009 02:43:26 -0000 1.4 @@ -1,32 +1,33 @@ - + + + + - - + + - + Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml,v diff -u -r1.5 -r1.6 --- lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml 17 Apr 2009 07:06:07 -0000 1.5 +++ lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml 24 Apr 2009 02:43:26 -0000 1.6 @@ -3,7 +3,7 @@ ' + '
' + '' + - '' + - '' + - '' + - '' + + '' + + '' + + '' + '
' + '
' + ''; @@ -115,7 +114,8 @@ // add the content $("#" + tag).html(createPrivateTabContent(nick, tag)); - $.get(lamsUrl + "PresenceChatLogger.do", {method: "getConversationHistory", roomName:CONFERENCEROOM, from:NICK, to:nick}, handleGetConversation); + var anticache = new Date().getTime(); + $.get(lamsUrl + "PresenceChatLogger.do", {method: "getConversationHistory", roomName:CONFERENCEROOM, from:NICK, to:nick, anticache:anticache}, handleGetConversation); } function htmlEnc(str) { @@ -174,6 +174,16 @@ return tag + '_contextMenu'; } +function parseXml(xml) { + if (jQuery.browser.msie) { + var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); + xmlDoc.loadXML(xml); + xml = xmlDoc; + } + + return xml; +} + function getRosterUserByNick(nick) { for (var i = 0; i < this.users.length; i++) { if (this.users[i].nick == nick) { @@ -217,6 +227,10 @@ var minutes = currentTime.getMinutes(); var seconds = currentTime.getSeconds(); + if (hours < 10){ + hours = "0" + hours; + } + if (minutes < 10){ minutes = "0" + minutes; } @@ -232,40 +246,6 @@ return "(" + time.substring(11, 19) + ")"; } -function createElem(name, attrs, style, innerHTML) { - var e = document.createElement(name); - if (attrs) { - for (var key in attrs) { - if (key == "attrClass") { - e.className = attrs[key]; - } else { - if (key == "attrId") { - e.id = attrs[key]; - } else { - if(key == "onClick"){ - // for IE (attrId must have been set to e.id) - e.onclick = function() {handlePresenceLeftClick(e.id);}; - // for FF - e.setAttribute(key, attrs[key]); - } else { - e.setAttribute(key, attrs[key]); - } - } - } - } - } - if (style) { - for (key in style) { - e.style[key] = style[key]; - } - } - if (innerHTML) { - //e.appendChild(document.createTextNode(text)); - e.innerHTML = innerHTML; - } - return e; -} - function refreshContextMenu(tag, blocked){ var contextMenu = $('#' + tag + '_contextMenu'); @@ -318,8 +298,8 @@ } function handlePresenceLeftClick(divName){ - var div = document.getElementById(divName); - var rosterIndex = div.getAttribute("rosterIndex"); + var div = $("#" + divName); + var rosterIndex = div.attr("rosterIndex"); var user = roster.users[rosterIndex]; var tag = user.tag; var nick = user.nick; @@ -426,7 +406,7 @@ if(listing.length == 0){ // create listing div // note: attrId must be added to array before onClick - var listingDiv = createElem("div", {attrId:listingName, rosterIndex:i, onClick:"handlePresenceLeftClick('" + listingName + "');", attrClass:"presenceName"}, {}, createPresenceListing(nick, tag)); + var listingDiv = $('
' + createPresenceListing(nick, tag) + '
'); // add the listing div rosterDiv.append(listingDiv); @@ -445,7 +425,7 @@ rosterDiv.append(listing.remove()); // refresh roster index - listing.attr("rosterindex", i); + listing.attr("rosterIndex", i); } // get context menu div name @@ -497,26 +477,40 @@ } function generateMessageHTML(nick, message, date) { + var completeElem; var fromElem; + var msgElem; + completeElem = $('
'); + if(!date){ - fromElem = createElem("div", {attrClass:"presenceMessageFrom"}, null, getTime() + " " + nick); + fromElem = $('
' + getTime() + ' ' + nick + '
'); }else{ - fromElem = createElem("div", {attrClass:"presenceMessageFrom"}, null, trimTime(date) + " " + nick); + fromElem = $('
' + trimTime(date) + ' ' + nick + '
'); } - var msgElem = createElem("div", {attrClass:"presenceMessage"}, null, message); - msgElem.insertBefore(fromElem, msgElem.firstChild); - return msgElem; + msgElem = $('
' + message + '
'); + + completeElem.append(fromElem); + completeElem.append(msgElem); + + return completeElem; } -function generateEmoteHTML(nick, emote){ - return createElem("div", {attrClass:"presenceMessageEmote"}, null, getTime() + " " + nick + " " + emote); +function generateEmoteHTML(emote){ + return $('
' + getTime() + ' ' + emote + '
'); } -function updateMessageDisplay(div, htmlMessage) { - var messageArea = document.getElementById(div); - messageArea.appendChild(htmlMessage); - messageArea.scrollTop = messageArea.scrollHeight; + +function updateMessageDisplay(div, htmlMessage, prepend) { + var messageArea = $("#" + div); + + if(prepend){ + messageArea.prepend(htmlMessage); + }else{ + messageArea.append(htmlMessage); + } + + messageArea.attr("scrollTop", messageArea.attr("scrollHeight")); } function sendMsg(aForm) { @@ -571,7 +565,7 @@ // otherwise if not groupchat and user is unavailable else if(user != null && user.status == "unavailable"){ // generate the emote message and display it to user - var emoteMessage = generateEmoteHTML("Your", "previous message has not been sent because " + toNick + " is unavailable"); + var emoteMessage = generateEmoteHTML("Your previous message has not been sent because " + toNick + " is unavailable"); updateMessageDisplay(nickToMessageArea(toNick), emoteMessage); } @@ -612,20 +606,27 @@ if(document.getElementById(nickToMessageArea(nick)) == null){ // add a tab addTab(nick, tag); - } - - // get the selected tab - var selected = $("#presenceChatTabs").tabs().data('selected.tabs'); - - // if the selected tab is any other than sender's tab - if(getUserFromTabIndex(selected).tag != tag){ + // make the sender's tab label bold $('#' + tag + '_tabLabel').html('' + nick + ''); - $("#presenceChatTabs").tabs('_tabify', false); + + // don't add the message, let the log take care of that } - - // generate html - htmlMessage = generateMessageHTML(nick, message, null); + // if there is a tab for the send open + else{ + // get the selected tab + var selected = $("#presenceChatTabs").tabs().data('selected.tabs'); + + // if the selected tab is any other than sender's tab + if(getUserFromTabIndex(selected).tag != tag){ + // make the sender's tab label bold + $('#' + tag + '_tabLabel').html('' + nick + ''); + $("#presenceChatTabs").tabs('_tabify', false); + } + + // generate html + htmlMessage = generateMessageHTML(nick, message, null); + } // add the div to the sender's tab updateMessageDisplay(nickToMessageArea(nick), htmlMessage); @@ -721,10 +722,10 @@ // generate the emote message and display it to group chat var emoteMessage; if(user.status == "unavailable"){ - emoteMessage = generateEmoteHTML(nick, "has gone offline"); + emoteMessage = generateEmoteHTML(nick + "has gone offline"); } else if(user.status == "available"){ - emoteMessage = generateEmoteHTML(nick, "has come online"); + emoteMessage = generateEmoteHTML(nick + "has come online"); } updateMessageDisplay('groupchat_messageArea', emoteMessage); } @@ -741,10 +742,10 @@ // generate the emote message and display it to private chat var emoteMessage; if(user.status == "unavailable"){ - emoteMessage = generateEmoteHTML(nick, "has gone offline"); + emoteMessage = generateEmoteHTML(nick + "has gone offline"); } else if(user.status == "available"){ - emoteMessage = generateEmoteHTML(nick, "has come online"); + emoteMessage = generateEmoteHTML(nick + "has come online"); } updateMessageDisplay(nickToMessageArea(nick), emoteMessage); } @@ -759,7 +760,7 @@ // if presence im is enabled (there is a chatbox) if(presenceImEnabled == "true" && showStatus){ // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML("You", "have been connected to LAMS instant messaging"); + var emoteMessage = generateEmoteHTML("You have been connected to LAMS instant messaging"); updateMessageDisplay('groupchat_messageArea', emoteMessage); } @@ -777,14 +778,15 @@ roster = new Roster(); // get group chat history - $.get(lamsUrl + "PresenceChatLogger.do", {method: "getGroupHistory", roomName:CONFERENCEROOM}, handleGetGroupHistory); + var anticache = new Date().getTime(); + $.get(lamsUrl + "PresenceChatLogger.do", {method: "getGroupHistory", roomName:CONFERENCEROOM, anticache:anticache}, handleGetGroupHistory); } function handleDisconnected() { // if presence im is enabled (there is a chatbox) if(presenceImEnabled == "true" && showStatus){ // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML("You", "have been disconnected from LAMS instant messaging"); + var emoteMessage = generateEmoteHTML("You have been disconnected from LAMS instant messaging"); updateMessageDisplay('groupchat_messageArea', emoteMessage); } } @@ -807,31 +809,34 @@ } function handleGetGroupHistory(groupHistory){ - if(groupHistory){ - $(groupHistory).find("clause").each(function() { + var xml = parseXml(groupHistory); + if(xml){ + var groupHistory = $('
'); + $(xml).find("clause").each(function() { var from = $(this).find('from').text(); var dateSent = $(this).find('dateSent').text(); var message = $(this).find('message').text(); - var htmlMessage = generateMessageHTML(from, message, dateSent); - updateMessageDisplay('groupchat_messageArea', htmlMessage); + groupHistory.append(generateMessageHTML(from, message, dateSent)); }); + + updateMessageDisplay("groupchat_messageArea", groupHistory, true); } } function handleGetConversation(conversation){ - if(conversation) { - var nick = $(conversation).find('nick').text(); - $(conversation).find("clause").each(function() { + var xml = parseXml(conversation); + if(xml){ + var nick = $(xml).find('nick').text(); + var conversation = $('
'); + $(xml).find("clause").each(function() { var from = $(this).find('from').text(); var to = $(this).find('to').text(); var dateSent = $(this).find('dateSent').text(); var message = $(this).find('message').text(); - - var htmlMessage = generateMessageHTML(from, message, dateSent); - - // add the div to the sender's tab - updateMessageDisplay(nickToMessageArea(nick), htmlMessage); + conversation.append(generateMessageHTML(from, message, dateSent)); }); + + updateMessageDisplay(nickToMessageArea(nick), conversation, true); } } Index: lams_learning/web/includes/presenceChat.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presenceChat.jsp,v diff -u -r1.3 -r1.4 --- lams_learning/web/includes/presenceChat.jsp 17 Apr 2009 07:06:08 -0000 1.3 +++ lams_learning/web/includes/presenceChat.jsp 24 Apr 2009 02:43:28 -0000 1.4 @@ -31,7 +31,7 @@ // create chat tabs $("#presenceChatTabs").tabs({ scrollable: true }); - + // bind the select function which resets label to non-bold when clicked $("#presenceChatTabs").bind('tabsselect', function(event, ui) { var nick = getUserFromTag(ui.panel.id).nick; @@ -43,6 +43,7 @@ // create roster tab $("#presenceChatRoster").tabs({ scrollable: false }); + // correct room name roomName = correctPresenceRoomName(roomName); @@ -85,12 +86,8 @@
- - - - - -
+ +
Index: lams_tool_videorecorder/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/build.xml,v diff -u -r1.3 -r1.4 --- lams_tool_videorecorder/build.xml 6 Apr 2009 17:07:32 -0000 1.3 +++ lams_tool_videorecorder/build.xml 24 Apr 2009 02:43:31 -0000 1.4 @@ -189,6 +189,8 @@ + + Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java,v diff -u -r1.3 -r1.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java 19 Feb 2009 05:39:07 -0000 1.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java 24 Apr 2009 02:43:31 -0000 1.4 @@ -431,7 +431,7 @@ videoRecorder.setAllowUseCamera(authForm.isAllowUseCamera()); videoRecorder.setAllowLearnerVideoVisibility(authForm.isAllowLearnerVideoVisibility()); videoRecorder.setAllowComments(authForm.isAllowComments()); - videoRecorder.setAllowRatings(authForm.isAllowComments()); + videoRecorder.setAllowRatings(authForm.isAllowRatings()); videoRecorder.setExportAll(authForm.isExportAll()); videoRecorder.setExportOffline(authForm.isExportOffline()); //} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/Attic/VideoRecorderAction.java,v diff -u -r1.6 -r1.7 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java 17 Apr 2009 07:06:58 -0000 1.6 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java 24 Apr 2009 02:43:31 -0000 1.7 @@ -151,6 +151,9 @@ Collections.sort(videoRecorderRecordingDTOs, comp); String xmlOutput = buildVideoRecordingsXML(videoRecorderRecordingDTOs, userId); + + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, xmlOutput); return null; } @@ -241,7 +244,7 @@ // save videoRecorderService.saveOrUpdateVideoRecorderRecording(videoRecording); - + writeAJAXResponse(response, OK_MSG); }catch(Exception e){ @@ -334,6 +337,8 @@ Set commentDTOs = VideoRecorderCommentDTO.getVideoRecorderCommentDTOs(recording.getComments()); // return a response with all comments for current recording + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, buildVideoCommentsXML(commentDTOs)); }catch(Exception e){ writeAJAXResponse(response, ERROR_MSG + e.getMessage()); @@ -398,6 +403,8 @@ // refresh recording recording = videoRecorderService.getRecordingById(recordingId); + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, buildRatingResultXML(recording.getRating(), ratingFloat)); }catch(Exception e){ writeAJAXResponse(response, ERROR_MSG + e.getMessage()); @@ -411,6 +418,8 @@ HttpServletResponse response) throws IOException, ServletException { // get service try{ + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); IVideoRecorderService videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServlet().getServletContext()); writeAJAXResponse(response, videoRecorderService.getLanguageXML()); }catch(Exception e){ @@ -446,6 +455,8 @@ // get service try{ IVideoRecorderService videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServlet().getServletContext()); + response.setContentType("text/xml"); + response.setCharacterEncoding("UTF-8"); writeAJAXResponse(response, videoRecorderService.getLanguageXMLForFCK()); }catch(Exception e){ writeAJAXResponse(response, ""); @@ -488,7 +499,11 @@ xmlOutput += "" + videoRecorderRecordingDTO.getUpdateDate().toLocaleString() + ""; xmlOutput += "" + videoRecorderRecordingDTO.getDescription() + ""; xmlOutput += "" + videoRecorderRecordingDTO.getFilename() + FLV_EXTENSION + ""; - xmlOutput += "" + VIDEORECORDER_PREVIEWIMAGES_RELATIVE_WWW + videoRecorderRecordingDTO.getFilename() + JPG_EXTENSION + ""; + if(videoRecorderRecordingDTO.getIsJustSound()){ + xmlOutput += "" + VIDEORECORDER_PREVIEWIMAGES_RELATIVE_WWW + "soundOnly.png"; + }else{ + xmlOutput += "" + VIDEORECORDER_PREVIEWIMAGES_RELATIVE_WWW + videoRecorderRecordingDTO.getFilename() + JPG_EXTENSION + ""; + } xmlOutput += "" + videoRecorderRecordingDTO.getRating() + ""; xmlOutput += "" + buildUserRating(ratings, userId) + ""; xmlOutput += "" + videoRecorderRecordingDTO.getIsJustSound() + ""; 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 -r1.7 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 -r1.6 Binary files differ Index: lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp,v diff -u -r1.6 -r1.7 --- lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp 17 Apr 2009 07:06:58 -0000 1.6 +++ lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp 24 Apr 2009 02:43:31 -0000 1.7 @@ -100,6 +100,7 @@ "id", "VideoRecorder", "quality", "high", "bgcolor", "#ffffff", + "wmode", "opaque", "name", "VideoRecorder", "allowScriptAccess","always", "type", "application/x-shockwave-flash", @@ -117,6 +118,7 @@ "id", "VideoRecorder", "quality", "high", "bgcolor", "#ffffff", + "wmode", "opaque", "name", "VideoRecorder", "allowScriptAccess","always", "type", "application/x-shockwave-flash", Index: lams_tool_videorecorder/web/previewImages/soundOnly.png =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/previewImages/soundOnly.png,v diff -u Binary files differ