diff --git a/.gitignore b/.gitignore
index 185fe61bd3..a5b8b2e15c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,6 @@ record-and-playback/playback-web/playback-web-0.1.war
record-and-playback/.project
push_to_git.py
*/.gradle
-.gitignore
bbb-lti/.classpath
bbb-lti/.project
bbb-lti/bin
diff --git a/bbb-api-demo/build.gradle b/bbb-api-demo/build.gradle
index 116007ae51..979557f29d 100755
--- a/bbb-api-demo/build.gradle
+++ b/bbb-api-demo/build.gradle
@@ -1,17 +1,18 @@
-//usePlugin 'war'
-usePlugin 'war'
+apply plugin: 'war'
+
version = '0.8'
repositories {
mavenCentral()
}
-task resolveDeps(dependsOn: configurations.default.buildArtifacts, type: Copy) {
+task resolveDeps(type: Copy) {
into('lib')
from configurations.default
- from configurations.default.allArtifacts*.file
+ from configurations.default.allArtifacts.file
}
+
war {
baseName = 'demo'
version = ''
diff --git a/bbb-lti/application.properties b/bbb-lti/application.properties
index 2c7d2d179c..e5656fae00 100644
--- a/bbb-lti/application.properties
+++ b/bbb-lti/application.properties
@@ -1,7 +1,5 @@
-#utf-8
-#Wed Oct 10 08:34:02 PDT 2012
-app.version=0.1.1
-app.servlet.version=2.4
-app.grails.version=1.1.1
-plugins.hibernate=1.1.1
+#Grails Metadata file
+#Thu Mar 20 10:48:08 PDT 2014
+app.grails.version=2.3.6
app.name=lti
+app.version=0.1.2
diff --git a/bbb-lti/grails-app/conf/ApplicationResources.groovy b/bbb-lti/grails-app/conf/ApplicationResources.groovy
new file mode 100644
index 0000000000..6fe55b24a7
--- /dev/null
+++ b/bbb-lti/grails-app/conf/ApplicationResources.groovy
@@ -0,0 +1,23 @@
+/*
+ BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+
+ Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+
+ This program is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation; either version 3.0 of the License, or (at your option) any later
+ version.
+
+ BigBlueButton 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along
+ with BigBlueButton; if not, see .
+*/
+
+modules = {
+ application {
+ resource url:'js/application.js'
+ }
+}
\ No newline at end of file
diff --git a/bbb-lti/grails-app/conf/BootStrap.groovy b/bbb-lti/grails-app/conf/BootStrap.groovy
index 5868a9c3f1..f2ad868ffc 100644
--- a/bbb-lti/grails-app/conf/BootStrap.groovy
+++ b/bbb-lti/grails-app/conf/BootStrap.groovy
@@ -15,13 +15,10 @@
You should have received a copy of the GNU Lesser General Public License along
with BigBlueButton; if not, see .
*/
-
class BootStrap {
- def init = { servletContext ->
- log.debug "Bootstrapping bbb-lti"
- }
-
- def destroy = {
- }
-}
\ No newline at end of file
+ def init = { servletContext ->
+ }
+ def destroy = {
+ }
+}
diff --git a/bbb-lti/grails-app/conf/BuildConfig.groovy b/bbb-lti/grails-app/conf/BuildConfig.groovy
new file mode 100644
index 0000000000..cff8ee4071
--- /dev/null
+++ b/bbb-lti/grails-app/conf/BuildConfig.groovy
@@ -0,0 +1,73 @@
+/*
+ BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+
+ Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+
+ This program is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation; either version 3.0 of the License, or (at your option) any later
+ version.
+
+ BigBlueButton 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along
+ with BigBlueButton; if not, see .
+*/
+
+grails.servlet.version = "3.0"
+grails.project.class.dir = "target/classes"
+grails.project.test.class.dir = "target/test-classes"
+grails.project.test.reports.dir = "target/test-reports"
+grails.project.work.dir = "target/work"
+grails.project.target.level = 1.6
+grails.project.source.level = 1.6
+//grails.project.war.file = "target/${appName}-${appVersion}.war"
+
+grails.project.fork = [
+ test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
+ run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
+ war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
+ console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
+]
+
+grails.project.dependency.resolver = "maven" // or ivy
+grails.project.dependency.resolution = {
+ inherits("global") {
+ }
+ log "error"
+ checksums true
+ legacyResolve false
+
+ repositories {
+ inherits true
+
+ grailsPlugins()
+ grailsHome()
+ mavenLocal()
+ grailsCentral()
+ mavenCentral()
+
+ mavenRepo "http://snapshots.repository.codehaus.org"
+ mavenRepo "http://repository.codehaus.org"
+ mavenRepo "http://download.java.net/maven/2/"
+ mavenRepo "http://repository.jboss.com/maven2/"
+ //mavenRepo "https://raw.github.com/blindsidenetworks/oauth/mvn-repo/"
+ }
+
+ dependencies {
+ //runtime "commons-net:commons-net:3.0.1"
+ //runtime "net.oauth:oauth:1.0.1"
+ }
+
+ plugins {
+ // plugins for the build system only
+ build ":tomcat:7.0.50.1"
+
+ runtime ":database-migration:1.3.8"
+ runtime ":jquery:1.11.0"
+ runtime ":resources:1.2.1"
+ runtime ':twitter-bootstrap:3.1.1'
+ }
+}
diff --git a/bbb-lti/grails-app/conf/Config.groovy b/bbb-lti/grails-app/conf/Config.groovy
index 9e38b52d67..b276a78363 100644
--- a/bbb-lti/grails-app/conf/Config.groovy
+++ b/bbb-lti/grails-app/conf/Config.groovy
@@ -1,93 +1,139 @@
-/*
- BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
-
- Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
-
- This program is free software; you can redistribute it and/or modify it under the
- terms of the GNU Lesser General Public License as published by the Free Software
- Foundation; either version 3.0 of the License, or (at your option) any later
- version.
-
- BigBlueButton 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 Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License along
- with BigBlueButton; if not, see .
-*/
-
-// locations to search for config files that get merged into the main config
-// config files can either be Java properties files or ConfigSlurper scripts
-
-// grails.config.locations = [ "classpath:${appName}-config.properties",
-// "classpath:${appName}-config.groovy",
-// "file:${userHome}/.grails/${appName}-config.properties",
-// "file:${userHome}/.grails/${appName}-config.groovy"]
-
-grails.config.locations = [ "classpath:lti.properties"]
-
-// if(System.properties["${appName}.config.location"]) {
-// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
-// }
-grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
-grails.mime.use.accept.header = false
-grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
- xml: ['text/xml', 'application/xml'],
- text: 'text/plain',
- js: 'text/javascript',
- rss: 'application/rss+xml',
- atom: 'application/atom+xml',
- css: 'text/css',
- csv: 'text/csv',
- all: '*/*',
- json: ['application/json','text/json'],
- form: 'application/x-www-form-urlencoded',
- multipartForm: 'multipart/form-data'
- ]
-// The default codec used to encode data with ${}
-grails.views.default.codec="none" // none, html, base64
-grails.views.gsp.encoding="UTF-8"
-grails.converters.encoding="UTF-8"
-
-// enabled native2ascii conversion of i18n properties files
-grails.enable.native2ascii = true
-
-// set per-environment serverURL stem for creating absolute links
-environments {
- production {
- grails.serverURL = "http://localhost:8080/${appName}"
- }
- development {
- grails.serverURL = "http://localhost:8080/${appName}"
- }
- test {
- grails.serverURL = "http://localhost:8080/${appName}"
- }
-
-}
-
-// log4j configuration
-log4j = {
- appenders {
- rollingFile name:"logfile", maxFileSize:1000000, file:"/var/log/bigbluebutton/bbb-lti.log", layout:pattern(conversionPattern: '%d{[dd.MM.yy HH:mm:ss.SSS]} %-5p %c %x - %m%n')
- console name:'console', layout:pattern(conversionPattern: '%d{[dd.MM.yy HH:mm:ss.SSS]} %-5p %c %x - %m%n')
- 'null' name:'stacktrace'
- }
- debug logfile:"grails.app"
-
- error 'org.codehaus.groovy.grails.web.servlet', // controllers
- 'org.codehaus.groovy.grails.web.pages', // GSP
- 'org.codehaus.groovy.grails.web.sitemesh', // layouts
- 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
- 'org.codehaus.groovy.grails.web.mapping', // URL mapping
- 'org.codehaus.groovy.grails.commons', // core / classloading
- 'org.codehaus.groovy.grails.plugins', // plugins
- 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
- 'org.springframework',
- 'org.hibernate'
-
- warn 'org.mortbay.log'
-}
-
-
-
\ No newline at end of file
+/*
+ BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+
+ Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+
+ This program is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation; either version 3.0 of the License, or (at your option) any later
+ version.
+
+ BigBlueButton 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along
+ with BigBlueButton; if not, see .
+*/
+
+// locations to search for config files that get merged into the main config;
+// config files can be ConfigSlurper scripts, Java properties files, or classes
+// in the classpath in ConfigSlurper format
+
+grails.config.locations = [ "classpath:lti.properties"]
+// grails.config.locations = [ "classpath:${appName}-config.properties",
+// "classpath:${appName}-config.groovy",
+// "file:${userHome}/.grails/${appName}-config.properties",
+// "file:${userHome}/.grails/${appName}-config.groovy"]
+
+// if (System.properties["${appName}.config.location"]) {
+// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
+// }
+
+grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
+
+grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
+grails.mime.use.accept.header = false
+// The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
+grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
+grails.mime.types = [ // the first one is the default format
+ all: '*/*', // 'all' maps to '*' or the first available format in withFormat
+ atom: 'application/atom+xml',
+ css: 'text/css',
+ csv: 'text/csv',
+ form: 'application/x-www-form-urlencoded',
+ html: ['text/html','application/xhtml+xml'],
+ js: 'text/javascript',
+ json: ['application/json', 'text/json'],
+ multipartForm: 'multipart/form-data',
+ rss: 'application/rss+xml',
+ text: 'text/plain',
+ hal: ['application/hal+json','application/hal+xml'],
+ xml: ['text/xml', 'application/xml']
+]
+
+// URL Mapping Cache Max Size, defaults to 5000
+//grails.urlmapping.cache.maxsize = 1000
+
+// What URL patterns should be processed by the resources plugin
+grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
+grails.resources.adhoc.excludes = ['/WEB-INF/**']
+
+// Legacy setting for codec used to encode data with ${}
+grails.views.default.codec = "html"
+
+// The default scope for controllers. May be prototype, session or singleton.
+// If unspecified, controllers are prototype scoped.
+grails.controllers.defaultScope = 'singleton'
+
+// GSP settings
+grails {
+ views {
+ gsp {
+ encoding = 'UTF-8'
+ htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
+ codecs {
+ expression = 'html' // escapes values inside ${}
+ scriptlet = 'html' // escapes output from scriptlets in GSPs
+ taglib = 'none' // escapes output from taglibs
+ staticparts = 'none' // escapes output from static template parts
+ }
+ }
+ // escapes all not-encoded output at final stage of outputting
+ // filteringCodecForContentType.'text/html' = 'html'
+ }
+}
+
+
+grails.converters.encoding = "UTF-8"
+// scaffolding templates configuration
+grails.scaffolding.templates.domainSuffix = 'Instance'
+
+// Set to false to use the new Grails 1.2 JSONBuilder in the render method
+grails.json.legacy.builder = false
+// enabled native2ascii conversion of i18n properties files
+grails.enable.native2ascii = true
+// packages to include in Spring bean scanning
+grails.spring.bean.packages = []
+// whether to disable processing of multi part requests
+grails.web.disable.multipart=false
+
+// request parameters to mask when logging exceptions
+grails.exceptionresolver.params.exclude = ['password']
+
+// configure auto-caching of queries by default (if false you can cache individual queries with 'cache: true')
+grails.hibernate.cache.queries = false
+
+environments {
+ development {
+ grails.logging.jul.usebridge = true
+ }
+ production {
+ grails.logging.jul.usebridge = false
+ }
+}
+
+// log4j configuration
+log4j = {
+ appenders {
+ rollingFile name:"logfile", maxFileSize:1000000, file:"/var/log/bigbluebutton/bbb-lti.log", layout:pattern(conversionPattern: '%d{[dd.MM.yy HH:mm:ss.SSS]} %-5p %c %x - %m%n')
+ console name:'console', layout:pattern(conversionPattern: '%d{[dd.MM.yy HH:mm:ss.SSS]} %-5p %c %x - %m%n')
+ 'null' name:'stacktrace'
+ }
+ debug logfile:"grails.app"
+
+ error 'org.codehaus.groovy.grails.web.servlet', // controllers
+ 'org.codehaus.groovy.grails.web.pages', // GSP
+ 'org.codehaus.groovy.grails.web.sitemesh', // layouts
+ 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
+ 'org.codehaus.groovy.grails.web.mapping', // URL mapping
+ 'org.codehaus.groovy.grails.commons', // core / classloading
+ 'org.codehaus.groovy.grails.plugins', // plugins
+ 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
+ 'org.springframework',
+ 'org.hibernate',
+ 'net.sf.ehcache.hibernate'
+
+ warn 'org.mortbay.log'
+
+}
diff --git a/bbb-lti/grails-app/conf/DataSource.groovy b/bbb-lti/grails-app/conf/DataSource.groovy
index f8aa019016..f961ac941f 100644
--- a/bbb-lti/grails-app/conf/DataSource.groovy
+++ b/bbb-lti/grails-app/conf/DataSource.groovy
@@ -17,34 +17,102 @@
*/
dataSource {
- pooled = true
- driverClassName = "org.hsqldb.jdbcDriver"
- username = "sa"
- password = ""
+ pooled = true
+ jmxExport = true
+ driverClassName = "org.h2.Driver"
+ username = "sa"
+ password = ""
}
hibernate {
- cache.use_second_level_cache=true
- cache.use_query_cache=true
- cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
+ cache.use_second_level_cache = true
+ cache.use_query_cache = false
+ cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
+// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
}
+
// environment specific settings
environments {
- development {
- dataSource {
- dbCreate = "create-drop" // one of 'create', 'create-drop','update'
- url = "jdbc:hsqldb:mem:devDB"
- }
- }
- test {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:mem:testDb"
- }
- }
- production {
- dataSource {
- dbCreate = "update"
- url = "jdbc:hsqldb:mem:prodDb"
- }
- }
-}
\ No newline at end of file
+ development {
+ dataSource {
+ dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
+ url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
+ }
+ }
+ test {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
+ }
+ }
+ production {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
+ properties {
+ // Documentation for Tomcat JDBC Pool
+ // http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Common_Attributes
+ // https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/PoolConfiguration.html
+ jmxEnabled = true
+ initialSize = 5
+ maxActive = 50
+ minIdle = 5
+ maxIdle = 25
+ maxWait = 10000
+ maxAge = 10 * 60000
+ timeBetweenEvictionRunsMillis = 5000
+ minEvictableIdleTimeMillis = 60000
+ validationQuery = "SELECT 1"
+ validationQueryTimeout = 3
+ validationInterval = 15000
+ testOnBorrow = true
+ testWhileIdle = true
+ testOnReturn = false
+ ignoreExceptionOnPreLoad = true
+ // http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#JDBC_interceptors
+ jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
+ defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED // safe default
+ // controls for leaked connections
+ abandonWhenPercentageFull = 100 // settings are active only when pool is full
+ removeAbandonedTimeout = 120000
+ removeAbandoned = true
+ // use JMX console to change this setting at runtime
+ logAbandoned = false // causes stacktrace recording overhead, use only for debugging
+ /*
+ // JDBC driver properties
+ // Mysql as example
+ dbProperties {
+ // Mysql specific driver properties
+ // http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html
+ // let Tomcat JDBC Pool handle reconnecting
+ autoReconnect=false
+ // truncation behaviour
+ jdbcCompliantTruncation=false
+ // mysql 0-date conversion
+ zeroDateTimeBehavior='convertToNull'
+ // Tomcat JDBC Pool's StatementCache is used instead, so disable mysql driver's cache
+ cachePrepStmts=false
+ cacheCallableStmts=false
+ // Tomcat JDBC Pool's StatementFinalizer keeps track
+ dontTrackOpenResources=true
+ // performance optimization: reduce number of SQLExceptions thrown in mysql driver code
+ holdResultsOpenOverStatementClose=true
+ // enable MySQL query cache - using server prep stmts will disable query caching
+ useServerPrepStmts=false
+ // metadata caching
+ cacheServerConfiguration=true
+ cacheResultSetMetadata=true
+ metadataCacheSize=100
+ // timeouts for TCP/IP
+ connectTimeout=15000
+ socketTimeout=120000
+ // timer tuning (disable)
+ maintainTimeStats=false
+ enableQueryTimeouts=false
+ // misc tuning
+ noDatetimeStringSync=true
+ }
+ */
+ }
+ }
+ }
+}
diff --git a/bbb-lti/grails-app/conf/UrlMappings.groovy b/bbb-lti/grails-app/conf/UrlMappings.groovy
index b83f5cc8fb..1eb88de377 100644
--- a/bbb-lti/grails-app/conf/UrlMappings.groovy
+++ b/bbb-lti/grails-app/conf/UrlMappings.groovy
@@ -17,13 +17,15 @@
*/
class UrlMappings {
- static mappings = {
- "/$controller/$action?/$id?"{
- constraints {
- // apply constraints here
- }
- }
- "/"(view:"/index")
- "500"(view:'/error')
+
+ static mappings = {
+ "/$controller/$action?/$id"{
+ constraints {
+ // apply constraints here
+ }
+ }
+
+ "/"(view:"/index")
+ "500"(view:'/error')
}
}
diff --git a/bbb-lti/grails-app/conf/lti.properties b/bbb-lti/grails-app/conf/lti.properties
index 4e8c2ddc28..1580d2f149 100644
--- a/bbb-lti/grails-app/conf/lti.properties
+++ b/bbb-lti/grails-app/conf/lti.properties
@@ -31,7 +31,8 @@ bigbluebuttonSalt=bbb_salt
ltiEndPoint=http://localhost/lti/tool
# The list of consumers allowed to access this lti service.
# Format: {consumerId1:sharedSecret1}
-ltiConsumers=bbb:lti_secret
+##ltiConsumers=bbb:bbb_salt
+ltiConsumers=bbb:welcome
# The mode used to interact with BigBlueButton
# Format: [|extended]
ltiMode=extended
diff --git a/bbb-lti/grails-app/conf/spring/resources.groovy b/bbb-lti/grails-app/conf/spring/resources.groovy
index a35b046ecb..fa950068bb 100644
--- a/bbb-lti/grails-app/conf/spring/resources.groovy
+++ b/bbb-lti/grails-app/conf/spring/resources.groovy
@@ -1,21 +1,3 @@
-/*
- BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
-
- Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
-
- This program is free software; you can redistribute it and/or modify it under the
- terms of the GNU Lesser General Public License as published by the Free Software
- Foundation; either version 3.0 of the License, or (at your option) any later
- version.
-
- BigBlueButton 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 Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License along
- with BigBlueButton; if not, see .
-*/
-
+// Place your Spring DSL code here
beans = {
-
-}
\ No newline at end of file
+}
diff --git a/bbb-lti/grails-app/controllers/ToolController.groovy b/bbb-lti/grails-app/controllers/ToolController.groovy
index e3ade24275..bf03b7a6a6 100644
--- a/bbb-lti/grails-app/controllers/ToolController.groovy
+++ b/bbb-lti/grails-app/controllers/ToolController.groovy
@@ -41,19 +41,20 @@ class ToolController {
LtiService ltiService
BigbluebuttonService bigbluebuttonService
- def index = {
+ def index = {
if( ltiService.consumerMap == null) ltiService.initConsumerMap()
log.debug CONTROLLER_NAME + "#index"
setLocalization(params)
params.put(REQUEST_METHOD, request.getMethod().toUpperCase())
- log.debug "params: " + params
+ ltiService.logParameters(params)
if( request.post ){
Map result = new HashMap()
ArrayList missingParams = new ArrayList()
log.debug "Checking for required parameters"
+
if (hasAllRequiredParams(params, missingParams)) {
def sanitizedParams = sanitizePrametersForBaseString(params)
def consumer = ltiService.getConsumer(params.get(Parameter.CONSUMER_ID))
@@ -74,6 +75,7 @@ class ToolController {
}
} else {
+ log.debug "The message has NOT a valid signature."
result.put("resultMessageKey", "InvalidSignature")
result.put("resultMessage", "Invalid signature (" + params.get(Parameter.OAUTH_SIGNATURE) + ").")
}
@@ -91,12 +93,11 @@ class ToolController {
result.put("resultMessageKey", "MissingRequiredParameter")
result.put("resultMessage", "Missing parameters [$missingStr]")
}
-
-
- if( result != null && result.containsKey("resultMessageKey") ) {
+
+ if( result.containsKey("resultMessageKey") ) {
log.debug "Error [resultMessageKey:'" + result.get("resultMessageKey") + "', resultMessage:'" + result.get("resultMessage") + "']"
render(view: "error", model: ['resultMessageKey': result.get("resultMessageKey"), 'resultMessage': result.get("resultMessage")])
-
+
} else {
session["params"] = params
List