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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/src/java/org/lamsfoundation/lams/webservice/PresenceChatLoggerAction.java 17 Apr 2009 07:08:14 -0000 1.1 @@ -0,0 +1,166 @@ +/**************************************************************** + * 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.IOException; +import java.util.Date; +import java.util.List; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.axis.MessageContext; +import org.apache.axis.transport.http.HTTPConstants; +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.integration.service.IIntegrationService; +import org.lamsfoundation.lams.presence.model.PresenceChatMessage; +import org.lamsfoundation.lams.presence.service.IPresenceChatLoggerService; +import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.HttpSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import com.thoughtworks.xstream.XStream; + +/** +* @author Paul Georges + +* ----------------XDoclet Tags-------------------- +* +* @struts:action path="/PresenceChatLogger" +* parameter="method" +* validate="false" +* +* ----------------XDoclet Tags-------------------- +*/ +public class PresenceChatLoggerAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(PresenceChatLoggerAction.class); + + public ActionForward getConversationHistory(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + try { + String roomName = WebUtil.readStrParam(request, "roomName"); + String from = WebUtil.readStrParam(request, "from"); + String to = WebUtil.readStrParam(request, "to"); + + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager + .getInstance().getServletContext()); + IPresenceChatLoggerService presenceChatLoggerService = (IPresenceChatLoggerService) ctx.getBean("presenceChatLoggerService"); + + List messages = presenceChatLoggerService.getMessagesByConversation(from, to, roomName); + + writeAJAXResponse(response, buildConversationXML(to, messages)); + + } catch (Exception e) { + logger.error(e.getMessage()); + } + + return null; + } + + public ActionForward getGroupHistory(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + try { + String roomName = WebUtil.readStrParam(request, "roomName"); + + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager + .getInstance().getServletContext()); + IPresenceChatLoggerService presenceChatLoggerService = (IPresenceChatLoggerService) ctx.getBean("presenceChatLoggerService"); + + List messages = presenceChatLoggerService.getMessagesByRoomName(roomName); + + writeAJAXResponse(response, buildGroupHistoryXML(messages)); + } catch (Exception e) { + logger.error(e.getMessage()); + } + + return null; + } + + public ActionForward saveMessage(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + try { + String roomName = WebUtil.readStrParam(request, "roomName"); + String from = WebUtil.readStrParam(request, "from"); + String to = WebUtil.readStrParam(request, "to"); + String message = WebUtil.readStrParam(request, "message"); + + if(to.compareTo("null") == 0){ + to = null; + } + + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager + .getInstance().getServletContext()); + IPresenceChatLoggerService presenceChatLoggerService = (IPresenceChatLoggerService) ctx.getBean("presenceChatLoggerService"); + + presenceChatLoggerService.createPresenceChatMessage(roomName, from, to, new Date(), message); + } catch (Exception e) { + logger.error(e.getMessage()); + } + + return null; + } + + private String buildConversationXML(String nick, List messages){ + String xmlOutput = "" + nick + ""; + + XStream xstream = new XStream(); + xstream.alias("clause", PresenceChatMessage.class); + + for(PresenceChatMessage message: messages){ + xmlOutput += xstream.toXML(message); + } + + xmlOutput += ""; + + return xmlOutput; + } + + private String buildGroupHistoryXML(List messages){ + String xmlOutput = ""; + + XStream xstream = new XStream(); + xstream.alias("clause", PresenceChatMessage.class); + + for(PresenceChatMessage message: messages){ + xmlOutput += xstream.toXML(message); + } + + xmlOutput += ""; + + return xmlOutput; + } +} Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_central/src/java/org/lamsfoundation/lams/webservice/PresenceChatLoggerServlet.java'. Fisheye: No comparison available. Pass `N' to diff? 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.3 -r1.4 Binary files differ Index: lams_central/web/images/icons/user_offline.png =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/images/icons/Attic/user_offline.png,v diff -u Binary files differ Index: lams_central/web/images/icons/user_online.png =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/images/icons/user_online.png,v diff -u Binary files differ Index: lams_central/web/includes/javascript/jquery-ui/themes/cupertino/ui.tabs.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/jquery-ui/themes/cupertino/Attic/ui.tabs.css,v diff -u -r1.1 -r1.2 --- lams_central/web/includes/javascript/jquery-ui/themes/cupertino/ui.tabs.css 1 Apr 2009 00:45:15 -0000 1.1 +++ lams_central/web/includes/javascript/jquery-ui/themes/cupertino/ui.tabs.css 17 Apr 2009 07:08:14 -0000 1.2 @@ -7,5 +7,4 @@ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: .1em; border-bottom: 0; } .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border: 0; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } -.ui-tabs .ui-tabs-wrapper { overflow: hidden } -.ui-tabs .ui-tabs-wrapped {} \ No newline at end of file +.ui-tabs .ui-tabs-wrapped { margin-left: 0px; margin-right: 0px;} \ No newline at end of file Index: lams_central/web/includes/javascript/jquery-ui/ui/ui.tabs.scrollable.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/jquery-ui/ui/Attic/ui.tabs.scrollable.js,v diff -u -r1.2 -r1.3 --- lams_central/web/includes/javascript/jquery-ui/ui/ui.tabs.scrollable.js 2 Apr 2009 01:42:04 -0000 1.2 +++ lams_central/web/includes/javascript/jquery-ui/ui/ui.tabs.scrollable.js 17 Apr 2009 07:08:14 -0000 1.3 @@ -10,10 +10,6 @@ * Depends: * ui.core.js */ - -function breakTabs(){ - var i = 0; -} (function($) { @@ -68,7 +64,6 @@ this.tabLabels = $(".ui-tabs-label"); this.imagesInTabs = $("img", this.list); this.$panels = $([]); - this.leftMostScroll = 25; } else{ this.list = this.element.is('div') ? this.element.children('ul:first, ol:first').eq(0) : this.element; @@ -81,9 +76,12 @@ this.$tabs.each(function(i, a) { var href = $(a).attr('href'); + // Fix tab IDs in IE6/7 + href = href.substring(href.indexOf("#")); + // inline tab if (fragmentId.test(href)) - self.$panels = self.$panels.add(self._sanitizeSelector(href)); + self.$panels = self.$panels.add(self._sanitizeSelector(href)); // remote tab else if (href != '#') { // prevent loading the page itself if href is just "#" @@ -117,12 +115,10 @@ if (this.element.is('div')) { this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all'); } - this.wrapper.addClass('ui-tabs-wrapper ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'); + this.wrapper.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'); this.list.addClass('ui-tabs-wrapped'); this.$lis.addClass('ui-state-default ui-corner-top'); this.$panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom'); - - //this.tabsHolder.animate( { scrollLeft: this.leftMostScroll}, this.scrollSpeed ) } else{ // attach necessary classes for styling @@ -362,45 +358,45 @@ }); if(o.scrollable){ - this.scrollableWidth = 0; + /* + var totalWidth = 0; - for(var i = 0; i < this.tabLabels.length; i++){ - this.scrollableWidth += this.tabLabels[i].innerHTML.length * o.characterWidth; - } + this.$lis.each(function(){ + totalWidth += this.offsetWidth; + }); - for(var i = 0; i < this.imagesInTabs.length; i++){ - this.scrollableWidth += this.imagesInTabs[i].width; - } + totalWidth += (this.$lis.length - 1) * 7 + 3; - this.scrollableWidth += o.margins; + this.scrollableWidth = totalWidth; + */ - $(".ui-tabs-wrapped").css("width", this.scrollableWidth + "px"); - - if(init){ - this.tabsHolder.animate( { scrollLeft: this.leftMostScroll }, this.scrollSpeed ) + if(this.$lis.length > 1){ + var lastElem = this.$lis[this.$lis.length - 1]; + var beforeLastElem = this.$lis[this.$lis.length - 2]; + + if(this.$lis[0].offsetLeft != 0){ + this.scrollableWidth = beforeLastElem.offsetLeft + beforeLastElem.offsetWidth + lastElem.offsetWidth; + }else{ + this.scrollableWidth = this.$lis[0].parentNode.parentNode.offsetLeft + beforeLastElem.offsetLeft + beforeLastElem.offsetWidth + lastElem.offsetWidth; + } } + else{ + var lastElem = this.$lis[this.$lis.length - 1]; + + if(this.$lis[0].offsetLeft != 0){ + this.scrollableWidth = lastElem.offsetLeft + lastElem.offsetWidth; + }else{ + this.scrollableWidth = this.$lis[0].parentNode.parentNode.offsetLeft + lastElem.offsetLeft + lastElem.offsetWidth; + } + + } + + $(".ui-tabs-wrapped").css("width", this.scrollableWidth + "px"); } // disable click if event is configured to something else if (o.event != 'click') this.$tabs.bind('click.tabs', function(){return false;}); }, - - _tabWidth: function(index) { - var self = this, o = this.options; - var tabWidth = 0; - if(o.scrollable){ - tabWidth += this.tabLabels[index].innerHTML.length * o.characterWidth; - - var imagesInTab = $("img", this.list[index]); - for(var i = 0; i < imagesInTab.length; i++){ - tabWidth+= imagesInTab[i].width; - } - - tabWidth += o.margins; - - return tabWidth; - } - }, scrollLeft: function() { var o = this.options; @@ -409,16 +405,24 @@ //var scrollOffset = _tabWidth(this.scrolledTab - 1); var scrollOffset = o.scrollOffset; if(this.tabsHolder[0].scrollLeft < scrollOffset){ - newScrollLeft = this.leftMostScroll; + newScrollLeft = 0; } else{ newScrollLeft = this.tabsHolder[0].scrollLeft - scrollOffset; } - this.tabsHolder.animate( { scrollLeft: newScrollLeft}, this.scrollSpeed ) + this.tabsHolder.animate( { scrollLeft: newScrollLeft}, this.scrollSpeed ); }, + scrollTo: function(position) { + if(this.$lis[0].offsetLeft != 0){ + this.tabsHolder.animate( { scrollLeft: position - this.$lis[0].offsetLeft}, this.scrollSpeed ); + }else{ + this.tabsHolder.animate( { scrollLeft: position}, this.scrollSpeed ); + } + }, + scrollRight: function() { var o = this.options; var newScrollRight; @@ -432,7 +436,7 @@ newScrollRight = this.tabsHolder[0].scrollLeft + scrollOffset; } - this.tabsHolder.animate( { scrollLeft: newScrollRight}, this.scrollSpeed ) + this.tabsHolder.animate( { scrollLeft: newScrollRight}, this.scrollSpeed ); }, destroy: function() { @@ -533,7 +537,6 @@ this._trigger('add', null, this._ui(this.$tabs[index], this.$panels[index])); }, - remove: function(index) { var o = this.options, $li = this.$lis.eq(index).remove(), $panel = this.$panels.eq(index).remove(); @@ -677,7 +680,7 @@ tabTemplate: '
  • #{label}
  • ', scrollable: false, characterWidth: 9, - margins: 5, + margins: 6, scrollSpeed: 150, scrollOffset: 100 } Index: lams_common/src/java/org/lamsfoundation/lams/presence/dao/IPresenceChatMessageDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/presence/dao/Attic/IPresenceChatMessageDAO.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/presence/dao/IPresenceChatMessageDAO.java 1 Apr 2009 00:44:11 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/presence/dao/IPresenceChatMessageDAO.java 17 Apr 2009 07:06:04 -0000 1.2 @@ -37,6 +37,6 @@ List getMessagesByRoomName(String roomName); - List getMessagesByConversation(String from, String to); + List getMessagesByConversation(String from, String to, String roomName); } Index: lams_common/src/java/org/lamsfoundation/lams/presence/dao/hibernate/PresenceChatMessageDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/presence/dao/hibernate/Attic/PresenceChatMessageDAO.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/presence/dao/hibernate/PresenceChatMessageDAO.java 1 Apr 2009 00:44:11 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/presence/dao/hibernate/PresenceChatMessageDAO.java 17 Apr 2009 07:06:04 -0000 1.2 @@ -34,14 +34,14 @@ public class PresenceChatMessageDAO extends BaseDAO implements IPresenceChatMessageDAO { - private static final String BY_MESSAGE_ID = "from " + PresenceChatMessage.class.getName() - + " where uid=? order by create_date desc"; + private static final String BY_MESSAGE_ID = "from " + PresenceChatMessage.class.getName() + " msg" + + " where msg.uid=? order by msg.dateSent desc"; - private static final String BY_CONVERSATION = "from " + PresenceChatMessage.class.getName() - + " where from_user=? and to_user=? order by create_date asc"; + private static final String BY_CONVERSATION = "from " + PresenceChatMessage.class.getName() + " msg" + + " where (msg.from=:from and msg.to=:to) or (msg.from=:to and msg.to=:from) and msg.roomName=:roomName order by msg.dateSent asc"; - private static final String BY_ROOM_NAME = "from " + NotebookEntry.class.getName() - + " where room_name=? order by create_date asc"; + private static final String BY_ROOM_NAME = "from " + PresenceChatMessage.class.getName() + " msg" + + " where msg.roomName=? and msg.to is null order by msg.dateSent asc"; public void saveOrUpdate(PresenceChatMessage presenceChatMessage) { this.getHibernateTemplate().saveOrUpdate(presenceChatMessage); @@ -57,9 +57,8 @@ else return null; } - public List getMessagesByConversation(String from, - String to) { - return (List)(getHibernateTemplate().find(BY_CONVERSATION, new Object[]{from, to})); + public List getMessagesByConversation(String from, String to, String roomName) { + return (List)(getHibernateTemplate().findByNamedParam(BY_CONVERSATION, new String[]{"from", "to", "roomName"}, new Object[]{from, to, roomName})); } public List getMessagesByRoomName(String roomName) { Index: lams_common/src/java/org/lamsfoundation/lams/presence/model/PresenceChatMessage.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/presence/model/PresenceChatMessage.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/presence/model/PresenceChatMessage.java 1 Apr 2009 00:44:11 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/presence/model/PresenceChatMessage.java 17 Apr 2009 07:06:04 -0000 1.2 @@ -47,6 +47,10 @@ private String message; + public PresenceChatMessage() { + + } + public PresenceChatMessage(Long uid, String roomName, String from, String to, Date dateSent, String message) { super(); Index: lams_common/src/java/org/lamsfoundation/lams/presence/service/IPresenceChatLoggerService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/presence/service/Attic/IPresenceChatLoggerService.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/presence/service/IPresenceChatLoggerService.java 1 Apr 2009 00:44:11 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/presence/service/IPresenceChatLoggerService.java 17 Apr 2009 07:06:04 -0000 1.2 @@ -39,8 +39,8 @@ PresenceChatMessage getMessageById(Long id); List getMessagesByRoomName(String roomName); - - List getMessagesByConversation(String from, String to); + + List getMessagesByConversation(String from, String to, String roomName); void saveOrUpdatePresenceChatMessage(PresenceChatMessage presenceChatMessage); Index: lams_common/src/java/org/lamsfoundation/lams/presence/service/PresenceChatLoggerService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/presence/service/Attic/PresenceChatLoggerService.java,v diff -u -r1.1 -r1.2 --- lams_common/src/java/org/lamsfoundation/lams/presence/service/PresenceChatLoggerService.java 1 Apr 2009 00:44:11 -0000 1.1 +++ lams_common/src/java/org/lamsfoundation/lams/presence/service/PresenceChatLoggerService.java 17 Apr 2009 07:06:04 -0000 1.2 @@ -58,8 +58,8 @@ return presenceChatMessageDAO.getMessagesByRoomName(roomName); } - public List getMessagesByConversation(String from, String to){ - return presenceChatMessageDAO.getMessagesByConversation(from, to); + public List getMessagesByConversation(String from, String to, String roomName){ + return presenceChatMessageDAO.getMessagesByConversation(from, to, roomName); } public void saveOrUpdatePresenceChatMessage(PresenceChatMessage presenceChatMessage){ Index: lams_common/src/java/org/lamsfoundation/lams/util/Base64StringToImageUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/Base64StringToImageUtil.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_common/src/java/org/lamsfoundation/lams/util/Base64StringToImageUtil.java 17 Apr 2009 07:06:04 -0000 1.1 @@ -0,0 +1,50 @@ +package org.lamsfoundation.lams.util; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; + +import javax.imageio.ImageIO; + +import org.apache.log4j.Logger; + +import sun.misc.BASE64Decoder; + +public class Base64StringToImageUtil { + private static Logger log = Logger.getLogger(Base64StringToImageUtil.class); + + public static boolean create(String dir, String filename, String ext, String data){ + try { + BASE64Decoder decoder = new BASE64Decoder(); + + byte[] byteArray = decoder.decodeBuffer(data); + + InputStream in = new ByteArrayInputStream(byteArray); + BufferedImage image = javax.imageio.ImageIO.read(in); + + ByteArrayOutputStream os = new ByteArrayOutputStream(); + + try { + // put buffer data into byte output stream + ImageIO.write(image, ext, os); + byte[] imagebytes = os.toByteArray(); + + // write bytes into file + FileOutputStream fileos = new FileOutputStream(new File(dir + filename + "." + ext)); + fileos.write(imagebytes); + fileos.close(); + + return true; + }catch (Exception e) { + log.error(e); + } + }catch (Exception e) { + log.error(e); + } + + return false; + } +} Index: lams_flash/src/central/flex/VideoRecorder/src/AddCommentPopUp.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/src/AddCommentPopUp.mxml,v diff -u -r1.3 -r1.4 --- lams_flash/src/central/flex/VideoRecorder/src/AddCommentPopUp.mxml 19 Mar 2009 06:35:45 -0000 1.3 +++ lams_flash/src/central/flex/VideoRecorder/src/AddCommentPopUp.mxml 17 Apr 2009 07:06:06 -0000 1.4 @@ -1,34 +1,68 @@ - + + + + - + - + Index: lams_flash/src/central/flex/VideoRecorder/src/GetRecordingDetailsPopUp.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/src/GetRecordingDetailsPopUp.mxml,v diff -u -r1.4 -r1.5 --- lams_flash/src/central/flex/VideoRecorder/src/GetRecordingDetailsPopUp.mxml 19 Mar 2009 06:35:45 -0000 1.4 +++ lams_flash/src/central/flex/VideoRecorder/src/GetRecordingDetailsPopUp.mxml 17 Apr 2009 07:06:06 -0000 1.5 @@ -1,24 +1,33 @@ - + + + + - - + + - + Index: lams_flash/src/central/flex/VideoRecorder/src/HTTPServices.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/src/HTTPServices.as,v diff -u -r1.3 -r1.4 Binary files differ Index: lams_flash/src/central/flex/VideoRecorder/src/VideoProfile.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/src/VideoProfile.mxml,v diff -u -r1.3 -r1.4 --- lams_flash/src/central/flex/VideoRecorder/src/VideoProfile.mxml 19 Mar 2009 06:35:45 -0000 1.3 +++ lams_flash/src/central/flex/VideoRecorder/src/VideoProfile.mxml 17 Apr 2009 07:06:06 -0000 1.4 @@ -1,7 +1,10 @@ - + - + - + Index: lams_flash/src/central/flex/VideoRecorder/src/VideoRecorder.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorder/src/VideoRecorder.mxml,v diff -u -r1.4 -r1.5 --- lams_flash/src/central/flex/VideoRecorder/src/VideoRecorder.mxml 19 Mar 2009 06:35:45 -0000 1.4 +++ lams_flash/src/central/flex/VideoRecorder/src/VideoRecorder.mxml 17 Apr 2009 07:06:06 -0000 1.5 @@ -58,6 +58,7 @@ [Bindable] private var allowRatings:Boolean; [Bindable] private var red5ServerUrl:String; [Bindable] private var serverUrl:String; + [Bindable] private var servletUrl:String; [Bindable] private var languageXML:XML; [Bindable] private var mode:String; @@ -75,10 +76,8 @@ // ui stuff private var getDetailsPopUp:GetRecordingDetailsPopUp; - private var addCommentPopUp:AddCommentPopUp; - private var previewImage:BitmapData; + private var addCommentPopUp:AddCommentPopUp; - // icon embeds [Embed(source="../../../../../../lams_central/web/images/icons/control_play.png")] [Bindable] private var playIcon:Class; [Embed(source="../../../../../../lams_central/web/images/icons/control_pause.png")] [Bindable] private var pauseIcon:Class; @@ -111,8 +110,8 @@ if(toolSessionId == 0){ contentEditable = true; userId = 1; - toolSessionId = 7; - toolContentId = 8; + toolSessionId = 1; + toolContentId = 5; allowUseVoice = true; allowUseCamera = true; allowComments = true; @@ -163,8 +162,12 @@ red5ServerUrl += red5App; // add the servlet location to the server url to complete - serverUrl += servletLocation; + servletUrl = serverUrl + servletLocation; + // add server url and servlet url to video display + videoDisplay.serverUrl = serverUrl; + videoDisplay.servletUrl = servletUrl; + // if the cam is to be used, set that up if(allowUseCamera){ cam = VideoDisplayUtil.setupCamera(); @@ -206,6 +209,13 @@ enableVideoList(true); seekSlider.enable(false); + // if content is not editable + if(!contentEditable){ + // disable view and record buttons + viewCameraButton.enabled = false; + startRecButton.enabled = false; + } + // create the connection createConnection(); } @@ -282,7 +292,7 @@ private function addListeners():void{ videoInformation.ratingButton.addEventListener(RatingEvent.SELECTION_CHANGE, addRatingClick); videoInformation.addCommentButton.addEventListener(MouseEvent.CLICK, addCommentClick); - videoList.addEventListener(MouseEvent.CLICK, deleteClick); + videoList.addEventListener("recordingDeleted", confirmDeleteClick); sortButtonGroup.addEventListener(SortEvent.EVENT_TYPE, sortRecordingsHandler); playButton.addEventListener(MouseEvent.CLICK, playClick); startRecButton.addEventListener(MouseEvent.CLICK, startRecordingClick); @@ -413,7 +423,7 @@ var rating:Number = 0; // call the http service to save a recording - saveRecordingToServer(userId, title, description, filename + ".flv", rating, toolSessionId, recordingId); + saveRecordingToServer(userId, title, description, filename, rating, toolSessionId, recordingId); } // if the given popup is of type addCommentPopUp else if(event.target == addCommentPopUp){ @@ -459,7 +469,7 @@ private function startRecordingClick(event:MouseEvent):void{ if(!videoDisplay.isPublishing){ filename = VideoDisplayUtil.createFilename(toolSessionId, userId); - videoDisplay.startPublish(filename); + videoDisplay.startPublish(filename, true); } else if(videoDisplay.isPublishing) videoDisplay.stopPublish(); @@ -486,33 +496,30 @@ } // delete recording click handler - private function deleteClick(event:MouseEvent):void{ - if(event.target.hasOwnProperty("id") && event.target.id == "deleteButton"){ - Alert.show(dictionary.getLabel("videorecorder.message.sure.delete"), dictionary.getLabel("videorecorder.confirm"), 3, this, confirmDeleteClick); - } + private function confirmDeleteClick(event:Event):void{ + deleteRecordingFromServer(VideoProfile(event.target).data.recordingId); + videoInformation.resetInformation(); + videoDisplay.reset(); } - // confirm delete click handler - private function confirmDeleteClick(event:CloseEvent):void{ - if (event.detail==Alert.YES){ - var recordingId:int = itemClicked.recordingId; - deleteRecordingFromServer(recordingId); - videoInformation.resetInformation(); - videoDisplay.reset(); - } - } - // click handler for the videoDataGrid list private function videoListClick(event:ListEvent):void { - if(videoList.enabled){ + if(videoList.enabled && !event.currentTarget.isPrototypeOf(Button)){ // reset video information videoInformation.resetInformation(); // store last item clicked itemClicked = event.itemRenderer.data; - // enable video information buttons - videoInformation.enableVideoInformationButtons(true); + // if content is editable + if(contentEditable){ + // enable video information buttons + videoInformation.enableVideoInformationButtons(true); + } + else{ + videoInformation.enableVideoInformationButtons(false); + } + // scroll the video information box back up to top videoInformation.verticalScrollPosition = 0; @@ -552,8 +559,7 @@ makeReadytItemClicked(); } else{ - itemClicked = null; - videoList.selectedItem = null; + resetVideoList(); videoInformation.resetInformation(); } } @@ -598,7 +604,7 @@ // reset play buttons enablePlaybackButtons(false); seekSlider.enable(false); - seekSlider.stopTimerLabel(); + seekSlider.resetSeekSliderPositon(); // set panel status label videoRecorderPanel.status = dictionary.getLabel("videorecorder.waiting"); @@ -721,8 +727,7 @@ videoRecorderPanel.status = dictionary.getLabel("videorecorder.waiting"); // clear item clicked - videoList.selectedItem = null; - itemClicked = null; + resetVideoList(); // enable buttons enablePlaybackButtons(true); @@ -810,7 +815,14 @@ } } } - + + // resets video list + private function resetVideoList():void{ + // clear item clicked + videoList.selectedItem = null; + itemClicked = null; + } + // getters public function getUserId():int{ return userId; @@ -839,12 +851,6 @@ public function getMode():String{ return mode; } - - /* - private function showDebug():void{ - DebugPopUp.getInstance().visible = true; - } - */ ]]> @@ -855,12 +861,12 @@ - - + + - + 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.2 -r1.3 --- lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml 19 Mar 2009 06:35:44 -0000 1.2 +++ lams_flash/src/central/flex/VideoRecorderFCKEditor/src/GetRecordingDetailsPopUp.mxml 17 Apr 2009 07:06:07 -0000 1.3 @@ -25,8 +25,8 @@ titleLabel.text = dictionary.getLabelAndConcatenate("videorecorder.title", [":"]); descriptionLabel.text = dictionary.getLabelAndConcatenate("videorecorder.description", [":"]); - titleInput.text = dictionary.getLabelAndReplace("videorecorder.enter.something.here", ["videorecorder.title"]); - descriptionInput.text = dictionary.getLabelAndReplace("videorecorder.enter.something.here", ["videorecorder.description"]); + titleInput.text = dictionary.getLabelAndReplace("videorecorder.enter.something.here", ["videorecorder.title"], true); + descriptionInput.text = dictionary.getLabelAndReplace("videorecorder.enter.something.here", ["videorecorder.description"], true); doneButton.label = dictionary.getLabel("button.save"); doneButton.toolTip = dictionary.getLabel("videorecorder.tooltip.save.recording"); } Index: lams_flash/src/central/flex/VideoRecorderFCKEditor/src/VideoRecorderFCKEditor.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flex/VideoRecorderFCKEditor/src/VideoRecorderFCKEditor.mxml,v diff -u -r1.3 -r1.4 --- lams_flash/src/central/flex/VideoRecorderFCKEditor/src/VideoRecorderFCKEditor.mxml 19 Mar 2009 06:35:44 -0000 1.3 +++ lams_flash/src/central/flex/VideoRecorderFCKEditor/src/VideoRecorderFCKEditor.mxml 17 Apr 2009 07:06:07 -0000 1.4 @@ -123,21 +123,10 @@ // add the save to lams servlet location saveToLamsServletUrl = serverUrl + saveToLamsServletLocation; - /* - Alert.show( - "filename: " + filename + - "\nred5ServerUrl: " + red5ServerUrl + - "\nserverUrl: " + serverUrl + - "\nlanguageXML: " + languageXML + - "\ntoolContentId: " + toolContentId + - "\ntoolServletUrl: " + toolServletUrl + - "\nsaveToLamsServletUrl: " + saveToLamsServletUrl + - "\nred5RecordingsUrl: " + red5RecordingsUrl + - "\nsaveToLamsDestUrl: " + saveToLamsDestUrl + - "\nlamsEarDir: " + lamsEarDir + - "\nmode: " + mode); - */ - + // add server url and servlet url to video display + videoDisplay.serverUrl = serverUrl; + videoDisplay.servletUrl = toolServletUrl; + // swtich on mode switch(mode){ case "playerModeOnline":{ @@ -406,7 +395,7 @@ var description:String = getDetailsPopUp.descriptionInput.text; // call the http service to save a recording - saveRecordingToServer(title, description, filename + ".flv", toolContentId); + saveRecordingToServer(title, description, filename, toolContentId); } if(event.target is TitleWindow){ @@ -417,12 +406,14 @@ // record button click handler private function recordClick(event:MouseEvent):void{ if(!videoDisplay.isPublishing){ - if(mode == "recorderModeFCK") + if(mode == "recorderModeFCK"){ filename = VideoDisplayUtil.createFilenameForFCK(userId); - else if(mode == "recorderModeAuthor") + videoDisplay.startPublish(filename, false); + } + else if(mode == "recorderModeAuthor"){ filename = VideoDisplayUtil.createFilenameForAuthor(toolContentId); - - videoDisplay.startPublish(filename); + videoDisplay.startPublish(filename, true); + } } else if(videoDisplay.isPublishing) videoDisplay.stopPublish(); Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/conn/ImageService.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/conn/ImageService.as,v diff -u -r1.1 -r1.2 Binary files differ Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/SeekSlider.mxml =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/SeekSlider.mxml,v diff -u -r1.2 -r1.3 --- lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/SeekSlider.mxml 19 Mar 2009 06:35:45 -0000 1.2 +++ lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/SeekSlider.mxml 17 Apr 2009 07:06:07 -0000 1.3 @@ -57,7 +57,7 @@ // if the video isn't actually playing yet if(_videoDisplay.playMode == _videoDisplay.INIT_MODE){ seekSliderBar.value = 0; - seekSliderTimerLabel.text = "0:0" + " / " + VideoDisplayUtil.secondsToString(String(_videoDisplay.duration)); + seekSliderTimerLabel.text = "0:00" + " / " + VideoDisplayUtil.secondsToString(String(_videoDisplay.duration)); /* seekSliderProgress.minimum = 0; @@ -115,7 +115,7 @@ // resets the timer public function resetTimerLabel():void{ - seekSliderTimerLabel.text = "0:0 / 0:0"; + seekSliderTimerLabel.text = "0:00 / 0:00"; } // starts the timer @@ -128,7 +128,9 @@ playTimer.stop(); } - + public function resetSeekSliderPositon():void{ + seekSliderBar.value = 0; + } ]]> 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.4 -r1.5 --- lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml 19 Mar 2009 06:35:45 -0000 1.4 +++ lams_flash/src/common/flex/org/lamsfoundation/lams/common/ui/components/VideoDisplay.mxml 17 Apr 2009 07:06:07 -0000 1.5 @@ -3,40 +3,54 @@ @@ -649,6 +681,9 @@ + + + Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/NetStreamScreenShotter.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/NetStreamScreenShotter.as,v diff -u Binary files differ Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/NetStreamScreenShotterEvent.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/Attic/NetStreamScreenShotterEvent.as,v diff -u Binary files differ Index: lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/VideoDisplayUtil.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/common/flex/org/lamsfoundation/lams/common/util/VideoDisplayUtil.as,v diff -u -r1.3 -r1.4 Binary files differ Index: lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/ImageBundler.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/ImageBundler.java,v diff -u -r1.6 -r1.7 --- lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/ImageBundler.java 10 Feb 2009 00:42:31 -0000 1.6 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/ImageBundler.java 17 Apr 2009 07:06:08 -0000 1.7 @@ -109,6 +109,9 @@ // build up a list of the misc images to copy setupMiscImages(); + + // build up a list of things to add for vr to work + setupVideoRecorderExport(); } // now copy all those files @@ -161,4 +164,28 @@ } } } + + /** + * Adds VideoRecorder stuff to be exported + */ + private void setupVideoRecorderExport() { + String vrDirectory = lamsCentralPath + File.separatorChar + "fckeditor" + File.separatorChar + "editor" + + File.separatorChar + "plugins" + File.separatorChar + "videorecorder"; + + String outputVrDirectory = outputDirectory + File.separatorChar + "fckeditor" + File.separatorChar + + "editor" + File.separatorChar + "plugins" + File.separatorChar + "videorecorder"; + + directoriesRequired.add(outputVrDirectory); + + File dir = new File(vrDirectory); + if (!dir.canRead() || !dir.isDirectory()) { + log.debug("Unable to read vr directory " + dir.getAbsolutePath()); + } else { + File[] files = dir.listFiles(); + for (File file : files) { + if(!file.isDirectory()) + filesToCopy.put(outputVrDirectory + File.separatorChar + file.getName(), file); + } + } + } } Index: lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/MainExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/MainExportServlet.java,v diff -u -r1.29 -r1.30 --- lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/MainExportServlet.java 3 Nov 2008 03:10:45 -0000 1.29 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/export/web/action/MainExportServlet.java 17 Apr 2009 07:06:08 -0000 1.30 @@ -228,11 +228,15 @@ try { // String to find String fckeditorpath = "/" + lamsOrRams + "/www/secure/" + contentFolderID; + String fckeditorrecpath = "../" + contentFolderID + "/Recordings"; String fckeditorsmiley = "/" + lamsOrRams + "/fckeditor/editor/images/smiley"; + String fckeditorvr = "/" + lamsOrRams + "/fckeditor/editor/plugins/videorecorder"; // Replacing string String newfckeditorpath = "../" + contentFolderID; + String newfckeditorrecpath = "../../../../" + contentFolderID + "/Recordings"; String newfckeditorsmiley = "../fckeditor/editor/images/smiley"; + String newfckeditorvr = "../fckeditor/editor/plugins/videorecorder"; File fin = new File(filename); //Open and input stream @@ -244,8 +248,14 @@ Pattern p = Pattern.compile(fckeditorpath); Matcher m = p.matcher(""); - Pattern p2 = Pattern.compile(fckeditorsmiley); + Pattern p2 = Pattern.compile(fckeditorrecpath); Matcher m2 = p2.matcher(""); + + Pattern p3 = Pattern.compile(fckeditorsmiley); + Matcher m3 = p3.matcher(""); + + Pattern p4 = Pattern.compile(fckeditorvr); + Matcher m4 = p4.matcher(""); String aLine = null; String output = ""; @@ -256,10 +266,18 @@ // Replace the p matching pattern with the newfckeditorpath String firstpass = m.replaceAll(newfckeditorpath); - // Replace the p2 matching patterns with the newfckeditorsmiley + // Replace the p2 matching patterns with the newfckeditorrecpath m2.reset(firstpass); - String result = m2.replaceAll(newfckeditorsmiley); + String secondpass = m2.replaceAll(newfckeditorrecpath); + // Replace the p2 matching patterns with the newfckeditorsmiley + m3.reset(secondpass); + String thirdpass = m3.replaceAll(newfckeditorsmiley); + + // Replace the p3 matching patterns with the newfckeditorvr + m4.reset(thirdpass); + String result = m4.replaceAll(newfckeditorvr); + output = output + result + "\n"; } in.close(); Index: lams_learning/web/.cvsignore =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/.cvsignore,v diff -u -r1.1 -r1.2 --- lams_learning/web/.cvsignore 13 Jan 2005 23:29:48 -0000 1.1 +++ lams_learning/web/.cvsignore 17 Apr 2009 07:06:08 -0000 1.2 @@ -1 +1,2 @@ javascript +*.swd Index: lams_learning/web/mainflash.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/Attic/mainflash.jsp,v diff -u -r1.3 -r1.4 --- lams_learning/web/mainflash.jsp 1 Apr 2009 00:44:23 -0000 1.3 +++ lams_learning/web/mainflash.jsp 17 Apr 2009 07:06:08 -0000 1.4 @@ -92,7 +92,8 @@ function resizeIframe() { var width = $(window).width() - 160; - $('#contentFrame').css({'width': width + "px"}); + var height = $(window).height(); + $('#contentFrame').css({'width': width + "px", 'height': height + "px"}); resizeChat(); @@ -155,7 +156,7 @@ <%@ include file="/includes/presenceChat.jsp" %> - Index: lams_learning/web/WEB-INF/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/Attic/lams.tld,v diff -u -r1.22 -r1.23 --- lams_learning/web/WEB-INF/lams.tld 25 Jul 2008 07:49:42 -0000 1.22 +++ lams_learning/web/WEB-INF/lams.tld 17 Apr 2009 07:06:08 -0000 1.23 @@ -13,28 +13,36 @@ - Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ - Base URL for the current web app + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL - WebAppURL - org.lamsfoundation.lams.web.tag.WebAppURLTag + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag empty - Output a random number for the learner and passon flash movies to communicate directly. - generate unique ID + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering - generateID - org.lamsfoundation.lams.web.tag.GenerateIDTag + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag empty - Output a random number for the learner and passon flash movies to communicate directly. - id + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml false true @@ -44,6 +52,26 @@ + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + Get the configuration value for the specified key Configuration value @@ -64,28 +92,17 @@ - Output the Server URL as defined in the lams.xml configuration file. - LAMS URL + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID - LAMSURL - org.lamsfoundation.lams.web.tag.LAMSURLTag + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag empty - - - - Render html tag with direction and language - Render html tag with direction and language - - - html - org.lamsfoundation.lams.web.tag.HtmlTag - JSP - - Render html tag with direction and language - xhtml + Output a random number for the learner and passon flash movies to communicate directly. + id false true @@ -95,26 +112,29 @@ - Converts text from \n or \r\n to <BR> before rendering - Converts text from \n or \r\n to <BR> before rendering + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app - out - org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag empty - - Converts text from \n or \r\n to <BR> before rendering - value - true + + - true + Converts role name into form usable as message resources key + Converts role name into form usable as message resources key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty - - Converts text from \n or \r\n to <BR> before rendering - escapeHtml - false + Converts role name into form usable as message resources key + role + true true @@ -167,17 +187,17 @@ - Converts role name into form usable as message resources key - Converts role name into form usable as message resources key + Output details from the shared session UserDTO object + user details - role - org.lamsfoundation.lams.web.tag.RoleTag + user + org.lamsfoundation.lams.web.tag.UserTag empty - Converts role name into form usable as message resources key - role + Output details from the shared session UserDTO object + property true true @@ -213,27 +233,7 @@ - - Output details from the shared session UserDTO object - user details - - - user - org.lamsfoundation.lams.web.tag.UserTag - empty - - - Output details from the shared session UserDTO object - property - true - - true - - - - - STRUTS-textarea org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag @@ -289,11 +289,6 @@ true - index - false - true - - indexed false true @@ -466,6 +461,10 @@ ImgButtonWrapper /WEB-INF/tags/ImgButtonWrapper.tag + + + TextSearch + /WEB-INF/tags/TextSearch.tag textarea Index: lams_learning/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/Attic/web.xml,v diff -u -r1.36 -r1.37 --- lams_learning/web/WEB-INF/web.xml 2 Mar 2009 02:40:48 -0000 1.36 +++ lams_learning/web/WEB-INF/web.xml 17 Apr 2009 07:06:08 -0000 1.37 @@ -1,25 +1,39 @@ - - - javax.servlet.jsp.jstl.fmt.localizationContext - org.lamsfoundation.lams.learning.ApplicationResources + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.learning.ApplicationResources + + messageSource + learningMessageSource + + + contextConfigLocation - - classpath:/org/lamsfoundation/lams/applicationContext.xml - classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml - classpath:/org/lamsfoundation/lams/toolApplicationContext.xml - classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml - classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml - - + + + locatorFactorySelector + classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml + + + parentContextKey + context.central + + org.springframework.web.context.ContextLoaderListener + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + HibernateFilter @@ -129,7 +143,11 @@ groupingExportPortfolio /groupingExportPortfolio - + + + 120 + + + + +
    + + +

    + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + \ No newline at end of file Index: lams_learning/web/includes/presence.css =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presence.css,v diff -u -r1.2 -r1.3 --- lams_learning/web/includes/presence.css 2 Apr 2009 01:42:04 -0000 1.2 +++ lams_learning/web/includes/presence.css 17 Apr 2009 07:06:08 -0000 1.3 @@ -42,6 +42,11 @@ overflow-y: scroll; } +#minMaxIcon{ + position:absolute; + top: 0px; + right:0px; +} .presenceName { width:"100%"; } @@ -78,6 +83,10 @@ } .sendArea { - style="width: 100%; + width: 100%; height: 20%; +} + +table.tabLabelTable { + width: auto; } \ No newline at end of file Index: lams_learning/web/includes/presence.js =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presence.js,v diff -u -r1.7 -r1.8 --- lams_learning/web/includes/presence.js 1 Apr 2009 00:44:36 -0000 1.7 +++ lams_learning/web/includes/presence.js 17 Apr 2009 07:06:08 -0000 1.8 @@ -11,22 +11,47 @@ var tabLabelsLocal = null; var windowHeight; var presenceShown = false; +var showStatus = false; /* ******* HTML writer functions ******* */ function createPrivateTabLabel(label, tag){ - return '
    ' + label + '
    '; + return '' + + '' + + '' + + '' + + '' + + '' + + '
    ' + label + '
    '; } function createPrivateTabContent(label, tag){ - return '

    '; + return '

    ' + + '
    ' + + '
    ' + + '' + + '' + + '' + + '' + + '' + + '
    ' + + '
    ' + + '
    '; } function createPresenceListing(nick, tag){ - return '
    ' + nick + '
    '; + return '' + + '' + + '' + + '' + + '' + + '
    ' + nick + '
    '; } function createContextMenu(tag){ - return ''; + return ''; } /* ******* Helper Functions ******* */ @@ -89,6 +114,8 @@ $("#" + tag).attr("style", "width: 95%; height: 80%;"); // add the content $("#" + tag).html(createPrivateTabContent(nick, tag)); + + $.get(lamsUrl + "PresenceChatLogger.do", {method: "getConversationHistory", roomName:CONFERENCEROOM, from:NICK, to:nick}, handleGetConversation); } function htmlEnc(str) { @@ -116,9 +143,37 @@ } function nickToMessageArea(nick){ - return nick.replace(/ /g, "_") + '_messageArea'; + return tagToMessageArea(nickToTag(nick)); } +function tagToMessageArea(tag){ + return tag + '_messageArea'; +} + +function nickToListing(nick){ + return tagToListing(nickToTag(nick)); +} + +function tagToListing(tag){ + return tag + '_listing'; +} + +function nickToListingImage(nick){ + return tagToListingImage(nickToTag(nick)); +} + +function tagToListingImage(tag){ + return tag + '_listingImage'; +} + +function nickToContentMenu(nick){ + return tagToContextMenu(nickToTag(nick)); +} + +function tagToContextMenu(tag){ + return tag + '_contextMenu'; +} + function getRosterUserByNick(nick) { for (var i = 0; i < this.users.length; i++) { if (this.users[i].nick == nick) { @@ -138,12 +193,20 @@ } function sortFunction(a, b){ - if (a.nick < b.nick){ + if(a.status < b.status){ return -1; } - if (a.nick > b.nick){ + else if(a.status > b.status){ return 1; } + else{ + if (a.nick < b.nick){ + return -1; + } + if (a.nick > b.nick){ + return 1; + } + } return 0; } @@ -165,6 +228,10 @@ return "(" + hours + ":" + minutes + ":" + seconds + ")"; } +function trimTime(time){ + return "(" + time.substring(11, 19) + ")"; +} + function createElem(name, attrs, style, innerHTML) { var e = document.createElement(name); if (attrs) { @@ -217,7 +284,7 @@ return !blocked; } -function addContextMenu(div, contextMenu){ +function connectUserContextMenu(div, contextMenu){ var myDiv = $("#" + div); myDiv.contextMenu({ menu: contextMenu @@ -265,17 +332,15 @@ else if(document.getElementById(tag) == null){ // add a tab addTab(nick, tag); - // select the added tab - $("#presenceChatTabs").tabs('select' , tag); } // if the clicked user's tab is open else{ // make the sender's tab label unbold $('#' + tag + '_tabLabel').html(nick); - - // select the tab - $("#presenceChatTabs").tabs('select' , tag); } + + // select the added tab + $("#presenceChatTabs").tabs('select' , tag); } function handleCloseTabClick(label){ @@ -290,10 +355,12 @@ function handlePresenceClick() { if(presenceShown){ $("#presenceChat").animate({top: windowHeight + "px"}, 1000 ); + $("#minMaxIcon").attr("src", "../images/icons/bullet_arrow_top.png") presenceShown = false; } else{ $("#presenceChat").animate({top: windowHeight - 270 + "px"}, 1000 ); + $("#minMaxIcon").attr("src", "../images/icons/bullet_arrow_bottom.png"); presenceShown = true; } } @@ -325,69 +392,89 @@ function UpdateRosterDisplay() { // sort users by name this.users.sort(sortFunction); + + // reset the count var availableCount = 0; - // get number available users (sorry) - for (var i = 0; i < this.users.length; i++) { - if (this.users[i].status != "unavailable") { - availableCount++; - } - } - - // update presenceTabLabel - var presenceTabLabelDiv = $("#presence_tabLabel"); - presenceTabLabelDiv.html("Users (" + availableCount + ")"); - - // update users in presence tab // get rosterDiv var rosterDiv = $("#presenceUserListings"); - // clear rosterDiv - rosterDiv.html(""); - + // if presence im is enabled if(presenceImEnabled == "true"){ // get rosterDiv var contextMenus = $("#presenceContextMenus"); - // clear rosterDiv - contextMenus.html(""); } // for all users for (var i = 0; i < this.users.length; i++) { - // if available - if (this.users[i].status != "unavailable") { - // get nick - var nick = this.users[i].nick; - // get tag - var tag = this.users[i].tag; - // get blocked - var blocked = this.users[i].blocked; - - // create listing div name - var listingName = tag + "_listing"; + // get available + var available = this.users[i].status; + // get nick + var nick = this.users[i].nick; + // get tag + var tag = this.users[i].tag; + // get blocked + var blocked = this.users[i].blocked; + + // get listing name + var listingName = tagToListing(tag); + + // get the actual listing + var listing = $("#" + listingName); + + // if no listing exists + 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)); + // add the listing div rosterDiv.append(listingDiv); // if presence im is enabled if(presenceImEnabled == "true"){ // if not oneself if(nick != NICK){ - // create context menu div name - var contextMenuName = tag + "_contextMenu"; // add the context menu contextMenus.html(contextMenus.html() + createContextMenu(tag)); - // connect the context menu to the last added div - addContextMenu(listingName, contextMenuName); - // refresh the context menu - refreshContextMenu(tag, blocked); } } - } + else{ + // remove and append at the right place (from sort) + rosterDiv.append(listing.remove()); + + // refresh roster index + listing.attr("rosterindex", i); + } + + // get context menu div name + var contextMenuName = tagToContextMenu(tag); + + /* + connect the context menu to the last added div + when listings are moved events are scrapped... must reconnect them each time + */ + connectUserContextMenu(listingName, contextMenuName); + + // refresh the context menu + refreshContextMenu(tag, blocked); + + // get the listingImage + var listingImage = $("#" + tagToListingImage(tag)); + + // set the correct icon depending on status + if(available == "available"){ + availableCount++; + listingImage.attr("src", "../images/icons/user_online.png"); + }else{ + listingImage.attr("src", "../images/icons/user_offline.png"); + } } + + // update presenceTabLabel + var presenceTabLabelDiv = $("#presence_tabLabel"); + presenceTabLabelDiv.html("Users (" + availableCount + ")"); } function Roster() { @@ -409,8 +496,15 @@ document.forms[0].msg.focus(); } -function generateMessageHTML(nick, message) { - var fromElem = createElem("div", {attrClass:"presenceMessageFrom"}, null, getTime() + " " + nick); +function generateMessageHTML(nick, message, date) { + var fromElem; + + if(!date){ + fromElem = createElem("div", {attrClass:"presenceMessageFrom"}, null, getTime() + " " + nick); + }else{ + fromElem = createElem("div", {attrClass:"presenceMessageFrom"}, null, trimTime(date) + " " + nick); + } + var msgElem = createElem("div", {attrClass:"presenceMessage"}, null, message); msgElem.insertBefore(fromElem, msgElem.firstChild); return msgElem; @@ -452,19 +546,19 @@ // since the jabber server will not echo sent private messages. // TODO: need to check if this is correct behaviour if (!(NICK == toNick)) { - updateMessageDisplay(nickToMessageArea(toNick), generateMessageHTML(NICK, aForm.messageInput.value)); + updateMessageDisplay(nickToMessageArea(toNick), generateMessageHTML(NICK, aForm.messageInput.value, null)); } // log message - $.get(lamsUrl + "PresenceChatLogger", {roomName:CONFERENCEROOM, from:NICK, to:toNick, dateSent:new Date(), message:aForm.messageInput.value}, null); + $.get(lamsUrl + "PresenceChatLogger.do", {method: "saveMessage", roomName:CONFERENCEROOM, from:NICK, to:toNick, dateSent:new Date(), message:aForm.messageInput.value}, null); } // otherwise, it's a group chat message else { aMsg.setTo(CONFERENCEROOM); aMsg.setType("groupchat"); aMsg.setBody(aForm.messageInput.value); - $.get(lamsUrl + "PresenceChatLogger", {roomName:CONFERENCEROOM, from:NICK, to:null, dateSent:new Date(), message:aForm.messageInput.value}, null); + $.get(lamsUrl + "PresenceChatLogger.do", {method: "saveMessage", roomName:CONFERENCEROOM, from:NICK, to:null, dateSent:new Date(), message:aForm.messageInput.value}, null); } aMsg.setFrom(USERNAME + "@" + XMPPDOMAIN + "/" + RESOURCE); @@ -527,10 +621,11 @@ 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); + htmlMessage = generateMessageHTML(nick, message, null); // add the div to the sender's tab updateMessageDisplay(nickToMessageArea(nick), htmlMessage); @@ -546,9 +641,10 @@ if(selected != 0){ // make the group chat label label bold $('#groupchat_tabLabel').html('Group Chat'); + $("#presenceChatTabs").tabs('_tabify', false); } - htmlMessage = generateMessageHTML(nick, message); + htmlMessage = generateMessageHTML(nick, message, null); updateMessageDisplay('groupchat_messageArea', htmlMessage); } else { // somethings wrong, dont add anything @@ -601,75 +697,56 @@ if (type == "unavailable") { // set unavailable status user.status = "unavailable"; - - // if presence im is enabled (there is a chatbox) - if(presenceImEnabled == "true"){ - // get the selected tab - var selected = $("#presenceChatTabs").tabs().data('selected.tabs'); - - // if the selected tab is any other than groupchat - if(selected != 0){ - // make the group chat label bold - $('#groupchat_tabLabel').html('Group Chat'); - } - - // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML(nick, "has gone offline"); - updateMessageDisplay('groupchat_messageArea', emoteMessage); - - // if the person who got disconnected has a tab open - if(document.getElementById(nickToMessageArea(nick)) != null){ - // 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 + ''); - } - - // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML(nick, "has gone offline"); - updateMessageDisplay(nickToMessageArea(nick), emoteMessage); - } - } } } // default: means presence is available else { // set status to available user.status = "available"; + } + } + + // if presence im is enabled (there is a chatbox) + if(presenceImEnabled == "true"){ + // get the selected tab + var selected = $("#presenceChatTabs").tabs().data('selected.tabs'); + + if(showStatus){ + // if the selected tab is any other than groupchat + if(selected != 0){ + // make the group chat label bold + $('#groupchat_tabLabel').html('Group Chat'); + } - // if presence im is enabled (there is a chatbox) - if(presenceImEnabled == "true"){ - // get the selected tab - var selected = $("#presenceChatTabs").tabs().data('selected.tabs'); + // generate the emote message and display it to group chat + var emoteMessage; + if(user.status == "unavailable"){ + emoteMessage = generateEmoteHTML(nick, "has gone offline"); + } + else if(user.status == "available"){ + emoteMessage = generateEmoteHTML(nick, "has come online"); + } + updateMessageDisplay('groupchat_messageArea', emoteMessage); + } - // if the selected tab is any other than groupchat - if(selected != 0){ - // make the group chat label label bold - $('#groupchat_tabLabel').html('Group Chat'); + // if the person who got disconnected has a tab open + if(document.getElementById(nickToMessageArea(nick)) != null){ + // 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 + ''); + } + + if(showStatus){ + // generate the emote message and display it to private chat + var emoteMessage; + if(user.status == "unavailable"){ + emoteMessage = generateEmoteHTML(nick, "has gone offline"); } - - // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML(nick, "has come online"); - updateMessageDisplay('groupchat_messageArea', emoteMessage); - - // if the person who got connected has a tab open - if(document.getElementById(nickToMessageArea(nick)) != null){ - // 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 + ''); - } - - // generate the emote message and display it to group chat - var emoteMessage = generateEmoteHTML(nick, "has come online"); - updateMessageDisplay(nickToMessageArea(nick), emoteMessage); + else if(user.status == "available"){ + emoteMessage = generateEmoteHTML(nick, "has come online"); } + updateMessageDisplay(nickToMessageArea(nick), emoteMessage); } } } @@ -680,7 +757,7 @@ function handleConnected() { // if presence im is enabled (there is a chatbox) - if(presenceImEnabled == "true"){ + 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"); updateMessageDisplay('groupchat_messageArea', emoteMessage); @@ -698,11 +775,14 @@ // set up roster roster = new Roster(); + + // get group chat history + $.get(lamsUrl + "PresenceChatLogger.do", {method: "getGroupHistory", roomName:CONFERENCEROOM}, handleGetGroupHistory); } function handleDisconnected() { // if presence im is enabled (there is a chatbox) - if(presenceImEnabled == "true"){ + 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"); updateMessageDisplay('groupchat_messageArea', emoteMessage); @@ -725,7 +805,36 @@ doLogin(presenceUrl, userId, userId, userId, roomName, nickname, false); } } - + +function handleGetGroupHistory(groupHistory){ + if(groupHistory){ + $(groupHistory).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); + }); + } +} + +function handleGetConversation(conversation){ + if(conversation) { + var nick = $(conversation).find('nick').text(); + $(conversation).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); + }); + } +} + /* ******* Connection function ******* */ function doLogin(presenceServerUrl, userID, password, resource, chatroom, nickname, register) { try { Index: lams_learning/web/includes/presenceChat.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/Attic/presenceChat.jsp,v diff -u -r1.2 -r1.3 --- lams_learning/web/includes/presenceChat.jsp 2 Apr 2009 01:42:04 -0000 1.2 +++ lams_learning/web/includes/presenceChat.jsp 17 Apr 2009 07:06:08 -0000 1.3 @@ -36,6 +36,7 @@ $("#presenceChatTabs").bind('tabsselect', function(event, ui) { var nick = getUserFromTag(ui.panel.id).nick; $('#' + ui.panel.id + '_tabLabel').html(nick); + $("#presenceChatTabs").tabs('scrollTo', ui.tab.offsetLeft); });
    @@ -51,41 +52,40 @@ - <%-- html --%> + <%-- initial html / presence.js adds on html into here --%>
    + <%-- only pop the message box if im is enabled --%>
    -
    -
    - -
    - -
    - -
    +
    +
    + +
    + +

    - +
    @@ -100,14 +100,15 @@
    +
    Users
    +
    Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderCommentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderCommentDAO.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderCommentDAO.java 3 Feb 2009 02:41:05 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderCommentDAO.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -48,4 +48,6 @@ Set getCommentsByRecordingId(Long recordingId); void saveOrUpdate(VideoRecorderComment videoRecorderComment); + + Long getNbComments(Long userID, Long sessionId); } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRatingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRatingDAO.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRatingDAO.java 3 Feb 2009 02:41:05 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRatingDAO.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -46,4 +46,6 @@ Set getRatingsByToolSessionId(Long toolSessionId); void saveOrUpdate(VideoRecorderRating videoRecorderRating); + + Long getNbRatings(Long userID, Long sessionId); } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java,v diff -u -r1.2 -r1.3 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java 19 Feb 2009 05:39:09 -0000 1.2 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java 17 Apr 2009 07:06:58 -0000 1.3 @@ -47,4 +47,6 @@ List getBySessionAndUserIds(Long toolSessionId, Long userId); void saveOrUpdate(VideoRecorderRecording videoRecorderRecording); + + Long getNbRecordings(Long userID, Long sessionId); } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderCommentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderCommentDAO.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderCommentDAO.java 3 Feb 2009 02:41:05 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderCommentDAO.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -49,6 +49,9 @@ private static final String SQL_QUERY_BY_TOOL_RECORDING_ID = "from " + VideoRecorderComment.class.getName() + " as c " + "where c.recording.uid=?"; + private static final String SQL_QUERY_NB_COMMENTS_BY_USER = "select count(*) from " + VideoRecorderComment.class.getName() + " c " + + " where c.createBy.userId=? and c.videoRecorderSession.sessionId=?"; + public VideoRecorderComment getCommentById(Long recordingId) { List list = this.getHibernateTemplate().find( SQL_QUERY_FIND_BY_COMMENT_ID , @@ -76,4 +79,12 @@ this.getHibernateTemplate().saveOrUpdate(videoRecorderComment); this.getHibernateTemplate().flush(); } + + public Long getNbComments(Long userID, Long sessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_NB_COMMENTS_BY_USER, new Object[]{userID,sessionId}); + if(list != null && list.size() > 0) + return ((Number)list.get(0)).longValue(); + else + return new Long(0); + } } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRatingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRatingDAO.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRatingDAO.java 3 Feb 2009 02:41:05 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRatingDAO.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -51,6 +51,9 @@ private static final String SQL_QUERY_BY_TOOL_SESSION_ID = "from " + VideoRecorderComment.class.getName() + " as r " + "where r.videoRecorderSession.sessionId=?"; + private static final String SQL_QUERY_NB_RATINGS_BY_USER = "select count(*) from " + VideoRecorderRecording.class.getName() + " r " + + " where r.createBy.userId=? and r.videoRecorderSession.sessionId=?"; + public VideoRecorderRating getRatingById(Long ratingId) { List list = this.getHibernateTemplate().find( SQL_QUERY_FIND_BY_RATING_ID , @@ -74,4 +77,12 @@ this.getHibernateTemplate().saveOrUpdate(videoRecorderRating); this.getHibernateTemplate().flush(); } + + public Long getNbRatings(Long userID, Long sessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_NB_RATINGS_BY_USER, new Object[]{userID,sessionId}); + if(list != null && list.size() > 0) + return ((Number)list.get(0)).longValue(); + else + return new Long(0); + } } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java,v diff -u -r1.2 -r1.3 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java 19 Feb 2009 05:39:09 -0000 1.2 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java 17 Apr 2009 07:06:58 -0000 1.3 @@ -49,6 +49,9 @@ private static final String SQL_QUERY_BY_SESSION_ID_AND_USER_ID = "from " + VideoRecorderRecording.class.getName() + " as vrr " + "where vrr.videoRecorderSession.sessionId=? and vrr.createBy=?"; + private static final String SQL_QUERY_NB_RECORDINGS_BY_USER = "select count(*) from " + VideoRecorderRecording.class.getName() + " vrr " + + " where vrr.createBy.userId=? and vrr.videoRecorderSession.sessionId=?"; + public VideoRecorderRecording getRecordingById(Long recordingId) { List list = this.getHibernateTemplate().find( SQL_QUERY_FIND_BY_RECORDING_ID, @@ -76,4 +79,12 @@ this.getHibernateTemplate().saveOrUpdate(videoRecorderRecording); this.getHibernateTemplate().flush(); } + + public Long getNbRecordings(Long userID, Long sessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_NB_RECORDINGS_BY_USER, new Object[]{userID,sessionId}); + if(list != null && list.size() > 0) + return ((Number)list.get(0)).longValue(); + else + return new Long(0); + } } Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java,v diff -u -r1.3 -r1.4 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java 19 Feb 2009 05:39:08 -0000 1.3 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java 17 Apr 2009 07:06:58 -0000 1.4 @@ -287,6 +287,12 @@ void deleteCondition(VideoRecorderCondition condition); + public Long getNbRecordings(Long userID, Long sessionId); + + public Long getNbComments(Long userID, Long sessionId); + + public Long getNbRatings(Long userID, Long sessionId); + public String getLanguageXML(); public String getLanguageXMLForFCK(); Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java 18 Dec 2008 02:20:34 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -61,14 +61,23 @@ videoRecorderEntryDefinition.setDefaultConditions(new ArrayList(videoRecorder.getConditions())); // if no conditions were created in the tool instance, a default condition is added; if (videoRecorderEntryDefinition.getDefaultConditions().isEmpty()) { - VideoRecorderCondition defaultCondition = createDefaultComplexCondition(videoRecorder); - videoRecorder.getConditions().add(defaultCondition); - videoRecorderEntryDefinition.getDefaultConditions().add(defaultCondition); + VideoRecorderCondition defaultCondition = createDefaultComplexCondition(videoRecorder); + videoRecorder.getConditions().add(defaultCondition); + videoRecorderEntryDefinition.getDefaultConditions().add(defaultCondition); } videoRecorderEntryDefinition.setShowConditionNameOnly(true); definitionMap.put(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, videoRecorderEntryDefinition); } + + ToolOutputDefinition numberOfRecordingsDefinition = buildRangeDefinition(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME, new Long(0), null); + definitionMap.put(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME, numberOfRecordingsDefinition); + + ToolOutputDefinition numberOfCommentsDefinition = buildRangeDefinition(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME, new Long(0), null); + definitionMap.put(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME, numberOfCommentsDefinition); + ToolOutputDefinition numberOfRatingsDefinition = buildRangeDefinition(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME, new Long(0), null); + definitionMap.put(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME, numberOfRatingsDefinition); + return definitionMap; } @@ -115,24 +124,44 @@ } } } + + if (names == null || names.contains(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME)) { + outputs.put(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME, getNbRecordings(videoRecorderService, learnerId, toolSessionId)); + } + + if (names == null || names.contains(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME)) { + outputs.put(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME, getNbComments(videoRecorderService, learnerId, toolSessionId)); + } + + if (names == null || names.contains(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME)) { + outputs.put(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME, getNbRatings(videoRecorderService, learnerId, toolSessionId)); + } + return outputs; } - public ToolOutput getToolOutput(String name, IVideoRecorderService chatService, Long toolSessionId, Long learnerId) { + public ToolOutput getToolOutput(String name, IVideoRecorderService videoRecorderService, Long toolSessionId, Long learnerId) { + ToolOutput toolOutput = null; if (isTextSearchConditionName(name)) { // entry is loaded from DB - VideoRecorder videoRecorder = chatService.getSessionBySessionId(toolSessionId).getVideoRecorder(); + VideoRecorder videoRecorder = videoRecorderService.getSessionBySessionId(toolSessionId).getVideoRecorder(); - VideoRecorderUser user = chatService.getUserByUserIdAndSessionId(learnerId, toolSessionId); - NotebookEntry entry = chatService.getEntry(user.getEntryUID()); + VideoRecorderUser user = videoRecorderService.getUserByUserIdAndSessionId(learnerId, toolSessionId); + NotebookEntry entry = videoRecorderService.getEntry(user.getEntryUID()); String value = entry == null ? null : entry.getEntry(); - return new ToolOutput(name, getI18NText(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, true), value); - + toolOutput = new ToolOutput(name, getI18NText(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, true), value); + }else if (name != null && name.equals(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME)) { + toolOutput = getNbRecordings(videoRecorderService, learnerId, toolSessionId); + }else if (name != null && name.equals(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME)) { + toolOutput = getNbComments(videoRecorderService, learnerId, toolSessionId); + }else if (name != null && name.equals(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME)) { + toolOutput = getNbRatings(videoRecorderService, learnerId, toolSessionId); } - return null; + + return toolOutput; } @Override @@ -162,4 +191,22 @@ return new VideoRecorderCondition(null, null, 1, name, getI18NText( VideoRecorderConstants.TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY, false), "LAMS", null, null, null); } + + private ToolOutput getNbRecordings(IVideoRecorderService videoRecorderService, Long learnerId, Long toolSessionId) { + Long nb = videoRecorderService.getNbRecordings(learnerId, toolSessionId); + return new ToolOutput(VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME, getI18NText( + VideoRecorderConstants.NB_RECORDINGS_DEFINITION_NAME, true), new Long(nb)); + } + + private ToolOutput getNbComments(IVideoRecorderService videoRecorderService, Long learnerId, Long toolSessionId) { + Long nb = videoRecorderService.getNbComments(learnerId, toolSessionId); + return new ToolOutput(VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME, getI18NText( + VideoRecorderConstants.NB_COMMENTS_DEFINITION_NAME, true), new Long(nb)); + } + + private ToolOutput getNbRatings(IVideoRecorderService videoRecorderService, Long learnerId, Long toolSessionId) { + Long nb = videoRecorderService.getNbRatings(learnerId, toolSessionId); + return new ToolOutput(VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME, getI18NText( + VideoRecorderConstants.NB_RATINGS_DEFINITION_NAME, true), new Long(nb)); + } } 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.4 -r1.5 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java 17 Mar 2009 01:38:00 -0000 1.4 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java 17 Apr 2009 07:06:58 -0000 1.5 @@ -799,6 +799,18 @@ } } + public Long getNbRecordings(Long userID, Long sessionId) { + return videoRecorderRecordingDAO.getNbRecordings(userID, sessionId); + } + + public Long getNbComments(Long userID, Long sessionId) { + return videoRecorderCommentDAO.getNbComments(userID, sessionId); + } + + public Long getNbRatings(Long userID, Long sessionId) { + return videoRecorderRatingDAO.getNbRatings(userID, sessionId); + } + /** * @return String of xml with all needed language elements */ Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java,v diff -u -r1.1 -r1.2 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java 18 Dec 2008 02:20:34 -0000 1.1 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java 17 Apr 2009 07:06:58 -0000 1.2 @@ -60,4 +60,8 @@ public static final String ERROR_MSG_CONDITION = "error.condition"; public static final String ERROR_MSG_NAME_BLANK = "error.condition.name.blank"; public static final String ERROR_MSG_NAME_DUPLICATED = "error.condition.duplicated.name"; + + public static final String NB_RECORDINGS_DEFINITION_NAME = "number.recordings.definition.videoRecorder"; + public static final String NB_COMMENTS_DEFINITION_NAME = "number.comments.definition.videoRecorder"; + public static final String NB_RATINGS_DEFINITION_NAME = "number.ratings.definition.videoRecorder"; } 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.5 -r1.6 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java 2 Apr 2009 23:51:47 -0000 1.5 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java 17 Apr 2009 07:06:58 -0000 1.6 @@ -79,6 +79,7 @@ public static final String VIDEORECORDER_RECORDINGS_HTTP_FOLDER_URL = Configuration.get(ConfigurationKeys.SERVER_URL) + "tool/lavidr10/recordings/"; public static final String VIDEORECORDER_RECORDINGS_FOLDER_DEST = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + "/" + "lams-tool-lavidr10.war" + "/" + "recordings" + "/"; public static final String VIDEORECORDER_RECORDINGS_FOLDER_SRC = Configuration.get(ConfigurationKeys.RED5_RECORDINGS_URL); + public static final String FLV_EXTENSION = ".flv"; private IVideoRecorderService videoRecorderService; @@ -335,13 +336,31 @@ // get the video recording VideoRecorderRecordingDTO vr = (VideoRecorderRecordingDTO) iter.next(); - // get the stream from the external server - int success = HttpUrlConnectionUtil.writeResponseToFile(VIDEORECORDER_RECORDINGS_FOLDER_SRC, VIDEORECORDER_RECORDINGS_FOLDER_DEST, vr.getFilename(), new Cookie[0]); + // 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 success + // if we have a file if(success == 1){ // add the filename to the list - fileArray[1].add(vr.getFilename()); + fileArray[1].add(vr.getFilename() + FLV_EXTENSION); logger.debug("file copy complete"); }else{ logger.debug("file copy failed"); 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.5 -r1.6 --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java 2 Apr 2009 23:51:47 -0000 1.5 +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java 17 Apr 2009 07:06:58 -0000 1.6 @@ -24,21 +24,14 @@ /* $Id$ */ package org.lamsfoundation.lams.tool.videoRecorder.web.servlets; -import java.awt.image.BufferedImage; -import java.io.ByteArrayInputStream; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; import java.util.Collections; import java.util.Comparator; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Set; -import javax.imageio.ImageIO; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -55,29 +48,21 @@ import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; -import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderService; import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; -import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderCommentComparator; import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderRecordingComparator; import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderCommentDTO; import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRatingDTO; import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.Base64StringToImageUtil; import org.lamsfoundation.lams.util.Configuration; import org.lamsfoundation.lams.util.ConfigurationKeys; -import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; -/** -* The action servlet that provides the support for the -*
      -*
    • AJAX based Chosen Grouping screen
    • -*
    • forwards to the learner's view grouping screen for Random Grouping.
    • -*
    -* +/** * @author Paul Georges * ----------------XDoclet Tags-------------------- @@ -114,8 +99,11 @@ private static final String SAVE_TO_LAMS = "saveToLams"; private static final String SAVE_TO_LAMS_DEST = "saveToLamsDest"; - private String VIDEORECORDER_RECORDINGS_FOLDER_DEST = ""; + private static final String VIDEORECORDER_RECORDINGS_FOLDER_DEST = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + File.separator + "lams-tool-lavidr10.war" + File.separator + "previewImages" + File.separator; private static final String VIDEORECORDER_RECORDINGS_FOLDER_SRC = Configuration.get(ConfigurationKeys.RED5_RECORDINGS_URL); + private static final String VIDEORECORDER_PREVIEWIMAGES_RELATIVE_WWW = "../../previewImages/"; + private static final String FLV_EXTENSION = ".flv"; + private static final String JPG_EXTENSION = ".jpg"; private Integer getUserId(HttpServletRequest request) { HttpSession ss = SessionManager.getSession(); @@ -177,8 +165,8 @@ Long toolContentId = WebUtil.readLongParam(request, TOOL_CONTENT_ID, true); Long recordingId = WebUtil.readLongParam(request, RECORDING_ID, true); Long userId = WebUtil.readLongParam(request, USER_ID, true); - String title = WebUtil.readStrParam(request, TITLE, false); - String description = WebUtil.readStrParam(request, DESCRIPTION, false); + String title = WebUtil.readStrParam(request, TITLE, true); + String description = WebUtil.readStrParam(request, DESCRIPTION, true); String filename = WebUtil.readStrParam(request, FILENAME, true); Boolean isJustSound = WebUtil.readBooleanParam(request, IS_JUST_SOUND, false); int rating = WebUtil.readIntParam(request, RATING, false); @@ -298,7 +286,7 @@ Long recordingId = WebUtil.readLongParam(request, RECORDING_ID); Long toolSessionId = WebUtil.readLongParam(request, TOOL_SESSION_ID); Long userId = WebUtil.readLongParam(request, USER_ID); - String commentText = WebUtil.readStrParam(request, COMMENT); + String commentText = WebUtil.readStrParam(request, COMMENT, true); // get service IVideoRecorderService videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServlet().getServletContext()); @@ -432,6 +420,25 @@ return null; } + + public ActionForward saveImage(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + try{ + String dir = VIDEORECORDER_RECORDINGS_FOLDER_DEST; + String filename = WebUtil.readStrParam(request, "filename"); + String ext = WebUtil.readStrParam(request, "ext"); + String data = WebUtil.readStrParam(request, "data"); + + boolean success = Base64StringToImageUtil.create(dir, filename, ext, data); + writeAJAXResponse(response, String.valueOf(success)); + }catch(Exception e){ + writeAJAXResponse(response, ERROR_MSG + e.getMessage()); + } + + return null; + + } public ActionForward getLanguageXMLForFCK(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -480,8 +487,8 @@ xmlOutput += "" + videoRecorderRecordingDTO.getCreateDate().toLocaleString() + ""; xmlOutput += "" + videoRecorderRecordingDTO.getUpdateDate().toLocaleString() + ""; xmlOutput += "" + videoRecorderRecordingDTO.getDescription() + ""; - xmlOutput += "" + videoRecorderRecordingDTO.getFilename() + ""; - xmlOutput += "" + "..assets/images/24-heart-gold.png" + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getFilename() + FLV_EXTENSION + ""; + 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.5 -r1.6 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.4 -r1.5 Binary files differ Index: lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp,v diff -u -r1.3 -r1.4 --- lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp 19 Feb 2009 05:39:09 -0000 1.3 +++ lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp 17 Apr 2009 07:06:58 -0000 1.4 @@ -111,10 +111,10 @@ "src", "./files/VideoRecorderFCKEditor", - "FlashVars", "&mode="+'playerModeOffline'+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&filename='+'${recording.filename}'+'&languageXML='+"${languageXML}"+"", + "FlashVars", "&mode="+'playerModeOffline'+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&filename='+'${recording.filename}'+'.flv'+'&languageXML='+"${languageXML}"+"", - "FlashVars", "&mode="+'playerModeOnline'+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&filename='+'${recording.filename}'+'&languageXML='+"${languageXML}"+"", + "FlashVars", "&mode="+'playerModeOnline'+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&filename='+'${recording.filename}'+'.flv'+'&languageXML='+"${languageXML}"+"", "width", "361", 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.5 -r1.6 --- lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp 19 Mar 2009 06:35:48 -0000 1.5 +++ lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp 17 Apr 2009 07:06:58 -0000 1.6 @@ -110,7 +110,7 @@ // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( "src", "./includes/flash/VideoRecorder", - "FlashVars", "contentEditable"+${contentEditable}+'&toolSessionId='+${toolSessionId}+'&toolContentId='+${toolContentId}+'&mode='+'${mode}'+'&userId='+${userId}+'&allowUseVoice='+${videoRecorderDTO.allowUseVoice}+'&allowUseCamera='+${videoRecorderDTO.allowUseCamera}+'&allowLearnerVideoVisibility='+${videoRecorderDTO.allowLearnerVideoVisibility}+'&allowComments='+${videoRecorderDTO.allowComments}+'&allowRatings='+${videoRecorderDTO.allowRatings}+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&languageXML='+"${languageXML}"+"", + "FlashVars", "contentEditable="+${contentEditable}+'&toolSessionId='+${toolSessionId}+'&toolContentId='+${toolContentId}+'&mode='+'${mode}'+'&userId='+${userId}+'&allowUseVoice='+${videoRecorderDTO.allowUseVoice}+'&allowUseCamera='+${videoRecorderDTO.allowUseCamera}+'&allowLearnerVideoVisibility='+${videoRecorderDTO.allowLearnerVideoVisibility}+'&allowComments='+${videoRecorderDTO.allowComments}+'&allowRatings='+${videoRecorderDTO.allowRatings}+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&languageXML='+"${languageXML}"+"", "width", "100%", "height", "676", "align", "middle", 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.4 -r1.5 --- lams_tool_videorecorder/web/pages/monitoring/summary.jsp 19 Mar 2009 06:35:48 -0000 1.4 +++ lams_tool_videorecorder/web/pages/monitoring/summary.jsp 17 Apr 2009 07:06:58 -0000 1.5 @@ -210,7 +210,7 @@ // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( "src", "./includes/flash/VideoRecorder", - "FlashVars", "contentEditable"+${contentEditable}+'&toolSessionId='+${toolSessionId}+'&toolContentId='+${toolContentId}+'&mode='+'${mode}'+'&userId='+${userId}+'&allowUseVoice='+${videoRecorderDTO.allowUseVoice}+'&allowUseCamera='+${videoRecorderDTO.allowUseCamera}+'&allowLearnerVideoVisibility='+${videoRecorderDTO.allowLearnerVideoVisibility}+'&allowComments='+${videoRecorderDTO.allowComments}+'&allowRatings='+${videoRecorderDTO.allowRatings}+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&languageXML='+"${languageXML}"+"", + "FlashVars", "contentEditable="+${contentEditable}+'&toolSessionId='+${toolSessionId}+'&toolContentId='+${toolContentId}+'&mode='+'${mode}'+'&userId='+${userId}+'&allowUseVoice='+${videoRecorderDTO.allowUseVoice}+'&allowUseCamera='+${videoRecorderDTO.allowUseCamera}+'&allowLearnerVideoVisibility='+${videoRecorderDTO.allowLearnerVideoVisibility}+'&allowComments='+${videoRecorderDTO.allowComments}+'&allowRatings='+${videoRecorderDTO.allowRatings}+'&red5ServerUrl='+'${red5ServerUrl}'+'&serverUrl='+'${serverUrl}'+'&languageXML='+"${languageXML}"+"", "width", "100%", "height", "676", "align", "middle",