Merge branch 'master' into add-more-controls-to-webcam-window

This commit is contained in:
Richard Alam 2012-10-29 18:52:56 +00:00
commit b74f778287
6 changed files with 110 additions and 16 deletions

View File

@ -7,6 +7,7 @@
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
<property name="grails" value="grails" />
<target name="download-ivy" unless="offline">
<available file="${ivy.jar.file}" property="ivy.available"/>
@ -16,7 +17,7 @@
<target name="-download-ivy" unless="ivy.available">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="http://www.apache.org/dist/ant/ivy/${ivy.install.version}/apache-ivy-${ivy.install.version}-bin.zip"
<get src="http://archive.apache.org/dist/ant/ivy/${ivy.install.version}/apache-ivy-${ivy.install.version}-bin.zip"
dest="${ivy.home}/ivy.zip" usetimestamp="true" verbose="true"/>
<unzip src="${ivy.home}/ivy.zip" dest="${ivy.jar.dir}">
<patternset>
@ -115,8 +116,12 @@
<!-- =================================
target: war
================================= -->
<target name="war" depends="-init-grails" description="--> Creates a WAR of a Grails application">
<grails script="War"/>
<exec executable="${grails}" failonerror="true">
<arg value="war"/>
</exec>
<!--grails script="War"/-->
</target>
<!-- =================================

View File

@ -21,17 +21,17 @@
# BigBlueButton integration information
#----------------------------------------------------
# This URL is where the BBB client is accessible.
bigbluebuttonURL=http://test-install.blindsidenetworks.com/bigbluebutton
bigbluebuttonURL=http://localhost/bigbluebutton
# Salt which is used by 3rd-party apps to authenticate api calls
bigbluebuttonSalt=8cd8ef52e8e101574e400365b55e11a6
bigbluebuttonSalt=bbb_secret
# LTI basic information
#----------------------------------------------------
# This URL is where the LTI plugin is accessible. It can be a different server than the BigBluebutton one
ltiEndPoint=http://test-install.blindsidenetworks.com/lti/tool.xml
ltiEndPoint=http://localhost/lti/tool.xml
# The list of consumers allowed to access this lti service.
# Format: [consumerId:sharedSecret]
ltiConsumers=demo:welcome,consumer1:secret1
ltiConsumers=bbb:bbb_secret
#----------------------------------------------------
# Inject configuration values into BigbluebuttonSrvice beans

22
bbb-lti/lti.nginx Executable file
View File

@ -0,0 +1,22 @@
# Handle request to bbb-web running within Tomcat. This is for
# the BBB-API and Presentation.
location /lti {
proxy_pass http://127.0.0.1:8080;
proxy_redirect default;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Allow 30M uploaded presentation document.
client_max_body_size 30m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
include fastcgi_params;
}

View File

@ -87,7 +87,13 @@ package org.bigbluebutton.modules.whiteboard
case DrawObject.DRAW_UPDATE:
case DrawObject.DRAW_END:
var gobj:DrawObject = _annotationsList.pop();
wbCanvas.removeGraphic(gobj as DisplayObject);
if (gobj.id == o.id) {
// LogUtil.debug("Removing shape [" + gobj.id + "]");
wbCanvas.removeGraphic(gobj as DisplayObject);
} else {
LogUtil.debug("Not removing shape [" + gobj.id + "] new [" + o.id + "]");
}
dobj = shapeFactory.makeDrawObject(o, whiteboardModel);
if (dobj != null) {
dobj.draw(o, shapeFactory.parentWidth, shapeFactory.parentHeight);

View File

@ -36,12 +36,22 @@ package org.bigbluebutton.modules.whiteboard.views
_shapeFactory = shapeFactory;
_wbModel = wbModel;
}
private var objCount:Number = 0;
public function onMouseDown(mouseX:Number, mouseY:Number, tool:WhiteboardTool):void
{
if (tool.graphicType == WhiteboardConstants.TYPE_SHAPE) {
_isDrawing = true;
_drawStatus = DrawObject.DRAW_START;
// Generate a shape id so we can match the mouse down and up events. Then we can
// remove the specific shape when a mouse up occurs.
_curID = _idGenerator.generateID();
// LogUtil.debug("* START count = [" + objCount + "] id=[" + _curID + "]");
_segment = new Array();
_segment.push(mouseX);
_segment.push(mouseY);
@ -62,9 +72,9 @@ package org.bigbluebutton.modules.whiteboard.views
if (_isDrawing){
// Throttle the mouse position to prevent us from overloading the server
if ( (Math.abs(mouseX - _lastMouseX) < 3) && (Math.abs(mouseY - _lastMouseY) < 3) ) {
return;
}
// if ( (Math.abs(mouseX - _lastMouseX) < 3) && (Math.abs(mouseY - _lastMouseY) < 3) ) {
// return;
// }
_lastMouseX = mouseX;
_lastMouseY = mouseY;
@ -101,7 +111,7 @@ package org.bigbluebutton.modules.whiteboard.views
if (!(Math.abs(width) <= 2 && Math.abs(height) <=2)) {
sendShapeToServer(DrawObject.DRAW_END, tool);
}
}
} else {
sendShapeToServer(DrawObject.DRAW_END, tool);
} /* (tool.toolType */
@ -110,7 +120,10 @@ package org.bigbluebutton.modules.whiteboard.views
}
private function sendShapeToServer(status:String, tool:WhiteboardTool):void {
if (_segment.length == 0) return;
if (_segment.length == 0) {
// LogUtil.debug("SEGMENT LENGTH = 0");
return;
}
var dobj:DrawAnnotation = _shapeFactory.createDrawObject(tool.toolType, _segment, tool.drawColor, tool.thickness,
tool.fillOn, tool.fillColor, tool.transparencyOn);
@ -125,18 +138,23 @@ package org.bigbluebutton.modules.whiteboard.views
switch (status) {
case DrawObject.DRAW_START:
dobj.status = DrawObject.DRAW_START;
_curID = _idGenerator.generateID();
dobj.id = _curID;
// LogUtil.debug("START count = [" + objCount + "] id=[" + _curID + "]");
_drawStatus = DrawObject.DRAW_UPDATE;
break;
case DrawObject.DRAW_UPDATE:
dobj.status = DrawObject.DRAW_UPDATE;
dobj.id = _curID;
// LogUtil.debug("UPDATE count = [" + objCount + "] id=[" + _curID + "]");
break;
case DrawObject.DRAW_END:
dobj.status = DrawObject.DRAW_END;
dobj.id = _curID;
_drawStatus = DrawObject.DRAW_START;
// LogUtil.debug("END count = [" + objCount + "] id=[" + _curID + "]");
// objCount++;
break;
}

View File

@ -44,7 +44,7 @@
# 2012-02-22 FFD Updates to development environment
# 2012-04-27 FFD Added sum of version numbers in --check
##set -x
#set -x
#set -e
PATH=$PATH:/sbin
@ -178,6 +178,7 @@ usage() {
echo " --debug Scan the log files for error messages"
echo " --watch Scan the log files for error messages every 2 seconds"
echo " --salt View the URL and salt (shared secret) for the server"
echo " --lti View the URL and secret for LTI (if installed)"
echo
echo "Administration:"
echo " --restart Restart BigBueButton"
@ -523,6 +524,26 @@ while [ $# -gt 0 ]; do
continue
fi
if [ "$1" = "--lti" -o "$1" = "-lti" ]; then
if [ -z "$SALT" ]; then
if [ -f ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties ]; then
LTI_URL=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | sed -n '/^ltiEndPoint/{s/^.*=//;p}')
CUSTOMER=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | sed -n '/^ltiConsumer/{s/^.*=//;s/:.*//p}')
SECRET=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | sed -n '/^ltiConsumer/{s/^[^:]*://;p}')
echo
echo " URL: $LTI_URL"
echo " Customer: $CUSTOMER"
echo " Secret: $SECRET"
echo
exit 0
fi
fi
shift; shift
continue
fi
usage
exit 1
done
@ -1389,6 +1410,16 @@ check_state() {
fi
fi
if [ -d ${SERVLET_DIR}/lti ]; then
if test ${SERVLET_DIR}/lti.war -nt ${SERVLET_DIR}/lti; then
echo "# Error: The updated lti.war did not deploy. To manually deploy:"
echo "#"
echo "# sudo touch ${SERVLET_DIR}/lti.war"
echo "#"
echo
fi
fi
if [ -d ${SERVLET_DIR}/demo ]; then
if test ${SERVLET_DIR}/demo.war -nt ${SERVLET_DIR}/demo; then
echo "# Error: The updated demo.war did not deploy. To manually deploy:"
@ -1421,7 +1452,7 @@ check_state() {
fi
if [ -f /var/lib/tomcat6/webapps/demo/demo1.jsp ]; then
if [ -f ${SERVLET_DIR}/demo/demo1.jsp ]; then
BBB_WEB=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | sed -n '/^bigbluebutton.web.serverURL/{s/.*\///;p}')
echo "# Warning: The API demos are installed and accessible from:"
echo "#"
@ -1433,6 +1464,18 @@ check_state() {
echo
fi
if [ -f ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties ]; then
LTI_URL=$(cat ${SERVLET_DIR}/lti/WEB-INF/classes/lti.properties | sed -n '/^ltiEndPoint/{s/^.*=//;p}')
echo "# Warning: The IMS Learning Tools Integration (LTI) is accessible from:"
echo "#"
echo "# $LTI_URL"
echo "#"
echo "# To get the access parameters for LTI, run the command"
echo "#"
echo "# bbb-conf --lti"
echo
fi
BBB_WEB=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | sed -n '/^bigbluebutton.web.serverURL/{s/.*=//;p}')
DEFAULT_PDF=$(cat ${SERVLET_DIR}/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | sed -n '/^beans.presentationService.defaultUploadedPresentation/{s/.*=//;p}')
if echo $DEFAULT_PDF | grep -q "bigbluebutton.web.serverURL"; then