From db46fbdf0c1e4576f7a1522739668a7f44830252 Mon Sep 17 00:00:00 2001
From: Jesus Federico <jesus@123it.ca>
Date: Fri, 19 Apr 2013 17:52:46 -0400
Subject: [PATCH] bbb-lti updated in preparation for the 0.81-beta1 release
 [x]Views now are localized [x]Added sp and fr translations [x]Updated icons.
 icon.ico(16x16) icon.gif(24x24) [x]Parameter custom_bbb_record is now
 custom_bbb_recording [x]Removed not required files [x]Changed behavior of
 extended mode. Users join directly if the recording is mot enabled for the
 launch.

---
 .../controllers/ToolController.groovy         |  61 ++++++++----------
 bbb-lti/grails-app/i18n/messages.properties   |  14 +++-
 .../grails-app/i18n/messages_es.properties    |  14 +++-
 .../grails-app/i18n/messages_fr.properties    |  16 ++++-
 .../services/BigbluebuttonService.groovy      |  10 +--
 bbb-lti/grails-app/services/LtiService.groovy |   2 +-
 bbb-lti/grails-app/views/layouts/internal.gsp |   2 +-
 bbb-lti/grails-app/views/layouts/main.gsp     |   2 +-
 bbb-lti/grails-app/views/tool/index.gsp       |  30 ++++-----
 bbb-lti/grails-app/views/tool/index_bbb.gsp   |  60 -----------------
 .../grails-app/views/tool/index_bootstrap.gsp |  60 -----------------
 .../java/org/bigbluebutton/lti/Parameter.java |   2 +-
 bbb-lti/web-app/images/favicon.ico            | Bin 1150 -> 0 bytes
 bbb-lti/web-app/images/icon.gif               | Bin 0 -> 1246 bytes
 bbb-lti/web-app/images/icon.ico               | Bin 0 -> 1150 bytes
 15 files changed, 88 insertions(+), 185 deletions(-)
 delete mode 100644 bbb-lti/grails-app/views/tool/index_bbb.gsp
 delete mode 100644 bbb-lti/grails-app/views/tool/index_bootstrap.gsp
 delete mode 100644 bbb-lti/web-app/images/favicon.ico
 create mode 100644 bbb-lti/web-app/images/icon.gif
 create mode 100644 bbb-lti/web-app/images/icon.ico

diff --git a/bbb-lti/grails-app/controllers/ToolController.groovy b/bbb-lti/grails-app/controllers/ToolController.groovy
index c65d81a137..0584815a20 100644
--- a/bbb-lti/grails-app/controllers/ToolController.groovy
+++ b/bbb-lti/grails-app/controllers/ToolController.groovy
@@ -44,6 +44,8 @@ class ToolController {
     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
@@ -64,6 +66,10 @@ class ToolController {
                         result = doJoinMeeting(params)
                     } else {
                         log.debug  "LTI service running in extended mode."
+                        if ( !Boolean.parseBoolean(params.get(Parameter.CUSTOM_BBB_RECORD)) ) {
+                            log.debug  "No bbb_record parameter was sent; immediately redirecting to BBB session!"
+                            result = doJoinMeeting(params)
+                        }
                     }
                     
                 } else {
@@ -93,39 +99,20 @@ class ToolController {
         } else {
             session["params"] = params
             List<Object> recordings = bigbluebuttonService.getRecordings(params)
-            render(view: "index", model: ['params': params, 'recordingList': recordings, 'ismoderator': bigbluebuttonService.isModerator(params)])
-        }
-    }
-    
-    def view = {
-        if( ltiService.consumerMap == null) ltiService.initConsumerMap()
-        log.debug CONTROLLER_NAME + "#view" + ltiService.consumerMap
-        Map<String, String> result
-        
-        def sessionParams = session["params"]
-        log.debug "params: " + params
-        log.debug "sessionParams: " + sessionParams
-
-        if( sessionParams == null ) {
-            result = new HashMap<String, String>()
-            result.put("resultMessageKey", "InvalidSession")
-            result.put("resultMessage", "Session is invalid user cannot execute this action.")
-        } else if( !"extended".equals(ltiService.mode) ){
-            result = new HashMap<String, String>()
-            result.put("resultMessageKey", "SimpleMode")
-            result.put("resultMessage", "LTI service running in simple mode.")
-        }
-        
-        if( result != null ) {
-            log.debug "Error [resultMessageKey:'" + result.get("resultMessageKey") + "', resultMessage:'" + result.get("resultMessage") + "']"
-            render(view: "error", model: ['resultMessageKey': result.get("resultMessageKey"), 'resultMessage': result.get("resultMessage")])
+            for(Map<String, Object> recording: recordings){
+                /// Calculate duration
+                long endTime = Long.parseLong((String)recording.get("endTime"))
+                endTime -= (endTime % 1000) 
+                long startTime = Long.parseLong((String)recording.get("startTime"))
+                startTime -= (startTime % 1000)
+                int duration = (endTime - startTime) / 60000
+                /// Add duration
+                recording.put("duration", duration )
+            }
             
-        } else {
-            List<Object> recordings = bigbluebuttonService.getRecordings(sessionParams)
-            render(view: "index", model: ['params': params, 'recordingList': recordings, 'ismoderator':bigbluebuttonService.isModerator(sessionParams)])
+            render(view: "index", model: ['params': params, 'recordingList': recordings, 'ismoderator': bigbluebuttonService.isModerator(params)])
         }
     }
-
     
     def join = {
         if( ltiService.consumerMap == null) ltiService.initConsumerMap()
@@ -218,10 +205,9 @@ class ToolController {
         }
 
     }
-
-    private Object doJoinMeeting(params) {
-        Map<String, String> result = new HashMap<String, String>()
-                    
+    
+    private void setLocalization(params){
+        
         String locale = params.get(Parameter.LAUNCH_LOCALE)
         locale = (locale == null || locale.equals("")?"en":locale)
         log.debug "Locale code =" + locale
@@ -233,6 +219,13 @@ class ToolController {
             session['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE'] = new Locale(localeCodes[0])
                     
         log.debug "Locale has been set to " + locale
+
+    }
+
+    private Object doJoinMeeting(params) {
+        Map<String, String> result = new HashMap<String, String>()
+                    
+        setLocalization(params)
         String welcome = message(code: "bigbluebutton.welcome", args: ["\"{0}\"", "\"{1}\""])
         log.debug "Localized default welcome message: [" + welcome + "]"
 
diff --git a/bbb-lti/grails-app/i18n/messages.properties b/bbb-lti/grails-app/i18n/messages.properties
index f2fb83b65e..61279d9055 100644
--- a/bbb-lti/grails-app/i18n/messages.properties
+++ b/bbb-lti/grails-app/i18n/messages.properties
@@ -17,4 +17,16 @@
 #
 
 bigbluebutton.welcome=<br>Welcome to <b>{0}</b>!<br><br>To understand how BigBlueButton works see our <a href=\"event:http://www.bigbluebutton.org/content/videos\"><u>tutorial videos</u></a>.<br><br>To join the audio bridge click the headset icon (upper-left hand corner). <b>Please use a headset to avoid causing noise for others.</b>
-bigbluebutton.join=Join Meeting
\ No newline at end of file
+
+tool.view.title=BigBlueButton LTI Interface
+tool.view.join=Join Meeting
+tool.view.recording=Recording
+tool.view.activity=Activity
+tool.view.description=Description
+tool.view.date=Date
+tool.view.duration=Duration
+tool.view.actions=Actions
+tool.view.publishRecording=Publish
+tool.view.unpublishRecording=Unpublish
+tool.view.deleteRecording=Delete
+tool.view.deleteRecordingConfirmation=Are you sure to permanently delete this recording?
\ No newline at end of file
diff --git a/bbb-lti/grails-app/i18n/messages_es.properties b/bbb-lti/grails-app/i18n/messages_es.properties
index 45642f6b64..f59fb33c1d 100644
--- a/bbb-lti/grails-app/i18n/messages_es.properties
+++ b/bbb-lti/grails-app/i18n/messages_es.properties
@@ -17,4 +17,16 @@
 #
 
 bigbluebutton.welcome=<br>Bienvenido a <b>{0}</b>!<br><br>Para entender como funciona BigBlueButton consulte estos <a href=\"event:http://www.bigbluebutton.org/content/videos\"><u>videos tutoriales</u></a>.<br><br>Para activar el audio haga click en el icono de auricular (equina superior izquierda). <b>Por favor utilice auricular para evitar causar ruido.</b>
-bigbluebutton.join=Ingresar a la sesión
\ No newline at end of file
+
+tool.view.title=Interface LTI para BigBlueButton
+tool.view.join=Ingresar a la sesi&#243;n
+tool.view.recording=Grabaci&#243;n
+tool.view.activity=Actividad
+tool.view.description=Descripci&#243;n
+tool.view.date=Fecha
+tool.view.duration=Duraci&#243;n
+tool.view.actions=Acciones
+tool.view.publishRecording=Mostrar
+tool.view.unpublishRecording=Esconder
+tool.view.deleteRecording=Borrar
+tool.view.deleteRecordingConfirmation=Esta seguro de borrar permanentemente esta grabaci&#243;n?
\ No newline at end of file
diff --git a/bbb-lti/grails-app/i18n/messages_fr.properties b/bbb-lti/grails-app/i18n/messages_fr.properties
index 78a0d45c09..2f19c7b05c 100644
--- a/bbb-lti/grails-app/i18n/messages_fr.properties
+++ b/bbb-lti/grails-app/i18n/messages_fr.properties
@@ -16,5 +16,17 @@
 # with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
 #
 
-bigbluebutton.welcome=<br>Bienvenue au <b>{0}</b>!<br><br>Pour comprendre comment fonctionne BigBlueButton, consultez les <a href=\"event:http://www.bigbluebutton.org/content/videos\"><u>didacticiels vidéo</u></a>.<br><br>Pour activer l'audio cliquez sur l'icône du casque à écouteurs (coin supérieur gauche). <b>S'il vous plaît utiliser le casque pour éviter de causer du bruit.</b>
-bigbluebutton.join=Saisie de la réunion
\ No newline at end of file
+bigbluebutton.welcome=<br>Bienvenue au <b>{0}</b>!<br><br>Pour comprendre comment fonctionne BigBlueButton, consultez les <a href=\"event:http://www.bigbluebutton.org/content/videos\"><u>didacticiels vid&#233;o</u></a>.<br><br>Pour activer l'audio cliquez sur l'ic&#244;ne du casque &#224; &#233;couteurs (coin sup&#233;rieur gauche). <b>S'il vous plaît utiliser le casque pour &#233;viter de causer du bruit.</b>
+
+tool.view.title=LTI Interface pour BigBlueButton
+tool.view.join=Saisie de la r&#233;union
+tool.view.recording=Enregistrement
+tool.view.activity=Activit&#233;
+tool.view.description=Description
+tool.view.date=Date
+tool.view.duration=Dur&#233;e
+tool.view.actions=Actions
+tool.view.publishRecording=Publier
+tool.view.unpublishRecording=D&#233;publier
+tool.view.deleteRecording=Supprimer
+tool.view.deleteRecordingConfirmation=Veillez &#224; supprimer d&#233;finitivement cet enregistrement?
\ No newline at end of file
diff --git a/bbb-lti/grails-app/services/BigbluebuttonService.groovy b/bbb-lti/grails-app/services/BigbluebuttonService.groovy
index 7a8776d672..f8c1b9f364 100644
--- a/bbb-lti/grails-app/services/BigbluebuttonService.groovy
+++ b/bbb-lti/grails-app/services/BigbluebuttonService.groovy
@@ -88,7 +88,7 @@ class BigbluebuttonService {
         String userID = getValidatedUserId(params.get(Parameter.USER_ID))
         
         Integer voiceBridge = 0
-        Boolean record = false
+        String record = false
         Integer duration = 0
         if( "extended".equals(mode) ){
             voiceBridge = getValidatedBBBVoiceBridge(params.get(Parameter.CUSTOM_BBB_VOICEBRIDGE))
@@ -191,10 +191,10 @@ class BigbluebuttonService {
         return isModerator
     }
     
-    private String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW, String welcome, Integer voiceBridge, String logoutURL, Boolean record, Integer duration, String meta ) {
+    private String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW, String welcome, Integer voiceBridge, String logoutURL, String record, Integer duration, String meta ) {
         voiceBridge = ( voiceBridge == null || voiceBridge == 0 )? 70000 + new Random(System.currentTimeMillis()).nextInt(10000): voiceBridge;
 
-        String url = bbbProxy.getCreateURL(name, meetingID, attendeePW, moderatorPW, welcome, "", voiceBridge.toString(), "", logoutURL, "", record.toString(), duration.toString(), meta );
+        String url = bbbProxy.getCreateURL(name, meetingID, attendeePW, moderatorPW, welcome, "", voiceBridge.toString(), "", logoutURL, "", record, duration.toString(), meta );
         return url;
     }
     
@@ -242,8 +242,8 @@ class BigbluebuttonService {
         return (voiceBridge != null )? voiceBridge.toInteger(): 0
     }
     
-    private Boolean getValidatedBBBRecord(String record){
-        return (record != null && record == "true")? true: false
+    private String getValidatedBBBRecord(String record){
+        return Boolean.valueOf(record).toString();
     }
     
     private Integer getValidatedBBBDuration(String duration){
diff --git a/bbb-lti/grails-app/services/LtiService.groovy b/bbb-lti/grails-app/services/LtiService.groovy
index 9999219a4b..68738ca983 100644
--- a/bbb-lti/grails-app/services/LtiService.groovy
+++ b/bbb-lti/grails-app/services/LtiService.groovy
@@ -26,7 +26,7 @@ class LtiService {
 
     boolean transactional = false
     
-    def endPoint = "http://192.168.0.153/lti/tool.xml"
+    def endPoint = "http://localhost/lti/tool.xml"
     def consumers = "demo:welcome"
     def mode = "simple"
     Map<String, String> consumerMap
diff --git a/bbb-lti/grails-app/views/layouts/internal.gsp b/bbb-lti/grails-app/views/layouts/internal.gsp
index 0e426aa54f..8c70b3621b 100644
--- a/bbb-lti/grails-app/views/layouts/internal.gsp
+++ b/bbb-lti/grails-app/views/layouts/internal.gsp
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <title><g:layoutTitle default="BigBlueButton LTI Interface" /></title>
+        <title><g:layoutTitle default="<g:message code="tool.view.title" />" /></title>
         <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
         <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
         <g:layoutHead />
diff --git a/bbb-lti/grails-app/views/layouts/main.gsp b/bbb-lti/grails-app/views/layouts/main.gsp
index 01973f1a0f..0f4e7d6fc3 100644
--- a/bbb-lti/grails-app/views/layouts/main.gsp
+++ b/bbb-lti/grails-app/views/layouts/main.gsp
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <title><g:layoutTitle default="BigBlueButton LTI Interface" /></title>
+        <title><g:layoutTitle default="<g:message code="tool.view.title" />" /></title>
         <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
         <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
         <g:layoutHead />
diff --git a/bbb-lti/grails-app/views/tool/index.gsp b/bbb-lti/grails-app/views/tool/index.gsp
index 1906090317..a8892c96d1 100644
--- a/bbb-lti/grails-app/views/tool/index.gsp
+++ b/bbb-lti/grails-app/views/tool/index.gsp
@@ -1,22 +1,22 @@
 <html>
     <head>
-        <title>BigBlueButton LTI Interface</title>
+        <title><g:message code="tool.view.title" /></title>
         <link rel="stylesheet" href="${resource(dir:'css',file:'bootstrap.css')}" />
         <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
     </head>
     <body>
-        <h1 style="margin-left:20px; text-align: center;"><a title="Join" class="btn btn-primary btn-large" href="${createLink(controller:'tool',action:'join')}">Join Meeting</a></h1>
+        <h1 style="margin-left:20px; text-align: center;"><a title="<g:message code="tool.view.join" />" class="btn btn-primary btn-large" href="${createLink(controller:'tool',action:'join')}"><g:message code="tool.view.join" /></a></h1>
         <br><br>
         <table class="table table-striped table-bordered table-condensed">
             <thead>
                 <tr>
-                    <th class="header c0" style="text-align:center;" scope="col">Recording</th>
-                    <th class="header c1" style="text-align:center;" scope="col">Activity</th>
-                    <th class="header c2" style="text-align:center;" scope="col">Description</th>
-                    <th class="header c3" style="text-align:center;" scope="col">Date</th>
-                    <th class="header c4" style="text-align:center;" scope="col">Duration</th>
+                    <th class="header c0" style="text-align:center;" scope="col"><g:message code="tool.view.recording" /></th>
+                    <th class="header c1" style="text-align:center;" scope="col"><g:message code="tool.view.activity" /></th>
+                    <th class="header c2" style="text-align:center;" scope="col"><g:message code="tool.view.description" /></th>
+                    <th class="header c3" style="text-align:center;" scope="col"><g:message code="tool.view.date" /></th>
+                    <th class="header c4" style="text-align:center;" scope="col"><g:message code="tool.view.duration" /></th>
                     <g:if test="${ismoderator}">
-                    <th class="header c5 lastcol" style="text-align:left;" scope="col">Toolbar</th>
+                    <th class="header c5 lastcol" style="text-align:left;" scope="col"><g:message code="tool.view.actions" /></th>
                     </g:if>
                 </tr>
             </thead>
@@ -32,22 +32,16 @@
                     <td class="cell c1" style="text-align:center;">${r.name}</td>
                     <td class="cell c2" style="text-align:center;">${r.metadata.contextactivitydescription}</td>
                     <td class="cell c3" style="text-align:center;">${new Date( Long.valueOf(r.startTime).longValue() )}</td>
-                    <td class="cell c4" style="text-align:center;">
-                    <g:each in="${r.playback}" var="p">
-                        <g:if test="${p.type == 'slides'}">
-                            ${p.length}
-                        </g:if>
-                    </g:each>
-                    </td>
+                    <td class="cell c4" style="text-align:center;">${r.duration}</td>
                     <g:if test="${ismoderator}">
                     <td class="cell c5 lastcol" style="text-align:left;">
                       <g:if test="${r.published == 'true'}">
-                      <a title="Hide" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Hide" alt="Hide" class="smallicon" src="${resource(dir:'images',file:'hide.gif')}" /></a>
+                      <a title="<g:message code="tool.view.unPublishRecording" />" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="<g:message code="tool.view.unpublishRecording" />" alt="<g:message code="tool.view.unpublishRecording" />" class="smallicon" src="${resource(dir:'images',file:'hide.gif')}" /></a>
                       </g:if>
                       <g:else>
-                      <a title="Show" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Show" alt="Show" class="smallicon" src="${resource(dir:'images',file:'show.gif')}" /></a>
+                      <a title="<g:message code="tool.view.publishRecording" />" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="<g:message code="tool.view.publishRecording" />" alt="<g:message code="tool.view.publishRecording" />" class="smallicon" src="${resource(dir:'images',file:'show.gif')}" /></a>
                       </g:else>
-                      <a title="Delete" class="action-icon" onClick="if(confirm('Are you sure to delete this recording?')) window.location='${createLink(controller:'tool',action:'delete')}?bbb_recording_id=${r.recordID}'; return false;" href="#"><img title="Delete" alt="Delete" class="smallicon" src="${resource(dir:'images',file:'delete.gif')}" /></a>
+                      <a title="<g:message code="tool.view.deleteRecording" />" class="action-icon" onClick="if(confirm('<g:message code="tool.view.deleteRecordingConfirmation" />')) window.location='${createLink(controller:'tool',action:'delete')}?bbb_recording_id=${r.recordID}'; return false;" href="#"><img title="<g:message code="tool.view.deleteRecording" />" alt="<g:message code="tool.view.deleteRecording" />" class="smallicon" src="${resource(dir:'images',file:'delete.gif')}" /></a>
                     </td>
                     </g:if>
                 </tr>
diff --git a/bbb-lti/grails-app/views/tool/index_bbb.gsp b/bbb-lti/grails-app/views/tool/index_bbb.gsp
deleted file mode 100644
index 75a7b3a388..0000000000
--- a/bbb-lti/grails-app/views/tool/index_bbb.gsp
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-    <head>
-        <title>BigBlueButton LTI Interface</title>
-		<meta name="layout" content="internal" />
-    </head>
-    <body>
-        <h1 style="margin-left:20px; text-align: center;"><a title="Join" class="action-icon" href="${createLink(controller:'tool',action:'join')}"><img title="Join" alt="Join the meeting" src="${resource(dir:'images',file:'bbb.jpg')}" /></a></h1>
-        <p style="margin-left:20px;width:80%"></p>
-        <br>
-        <table class="generaltable">
-            <thead>
-                <tr>
-                    <th class="header c0" style="text-align:center;" scope="col">Recording</th>
-                    <th class="header c1" style="text-align:center;" scope="col">Activity</th>
-                    <th class="header c2" style="text-align:center;" scope="col">Description</th>
-                    <th class="header c3" style="text-align:center;" scope="col">Date</th>
-                    <th class="header c4" style="text-align:center;" scope="col">Duration</th>
-                    <g:if test="${ismoderator}">
-                    <th class="header c5 lastcol" style="text-align:left;" scope="col">Toolbar</th>
-                    </g:if>
-                </tr>
-            </thead>
-            <tbody>
-            <g:each in="${recordingList}" var="r">
-                <g:if test="${ismoderator || r.published == 'true'}">  
-                <tr class="r0 lastrow">
-                    <td class="cell c0" style="text-align:center;">
-                    <g:each in="${r.playback}" var="p">
-                        <a title="${p.type}" target="_new" href="${p.url}">${p.type}</a>&#32;
-                    </g:each>
-                    </td>
-                    <td class="cell c1" style="text-align:center;">${r.name}</td>
-                    <td class="cell c2" style="text-align:center;">${r.metadata.contextactivitydescription}</td>
-                    <td class="cell c3" style="text-align:center;">${new Date( Long.valueOf(r.startTime).longValue() )}</td>
-                    <td class="cell c4" style="text-align:center;">
-                    <g:each in="${r.playback}" var="p">
-                        <g:if test="${p.type == 'slides'}">
-                            ${p.length}
-                        </g:if>
-                    </g:each>
-                    </td>
-                    <g:if test="${ismoderator}">
-                    <td class="cell c5 lastcol" style="text-align:left;">
-                      <g:if test="${r.published == 'true'}">
-                      <a title="Hide" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Hide" alt="Hide" class="smallicon" src="${resource(dir:'images',file:'hide.gif')}" /></a>
-                      </g:if>
-                      <g:else>
-                      <a title="Show" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Show" alt="Show" class="smallicon" src="${resource(dir:'images',file:'show.gif')}" /></a>
-                      </g:else>
-                      <a title="Delete" class="action-icon" onClick="if(confirm('Are you sure to delete this recording?')) window.location='${createLink(controller:'tool',action:'delete')}?bbb_recording_id=${r.recordID}'; return false;" href="#"><img title="Delete" alt="Delete" class="smallicon" src="${resource(dir:'images',file:'delete.gif')}" /></a>
-                    </td>
-                    </g:if>
-                </tr>
-                </g:if>
-            </g:each>
-            </tbody>
-        </table>
-        
-    </body>
-</html>
\ No newline at end of file
diff --git a/bbb-lti/grails-app/views/tool/index_bootstrap.gsp b/bbb-lti/grails-app/views/tool/index_bootstrap.gsp
deleted file mode 100644
index 1906090317..0000000000
--- a/bbb-lti/grails-app/views/tool/index_bootstrap.gsp
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-    <head>
-        <title>BigBlueButton LTI Interface</title>
-        <link rel="stylesheet" href="${resource(dir:'css',file:'bootstrap.css')}" />
-        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
-    </head>
-    <body>
-        <h1 style="margin-left:20px; text-align: center;"><a title="Join" class="btn btn-primary btn-large" href="${createLink(controller:'tool',action:'join')}">Join Meeting</a></h1>
-        <br><br>
-        <table class="table table-striped table-bordered table-condensed">
-            <thead>
-                <tr>
-                    <th class="header c0" style="text-align:center;" scope="col">Recording</th>
-                    <th class="header c1" style="text-align:center;" scope="col">Activity</th>
-                    <th class="header c2" style="text-align:center;" scope="col">Description</th>
-                    <th class="header c3" style="text-align:center;" scope="col">Date</th>
-                    <th class="header c4" style="text-align:center;" scope="col">Duration</th>
-                    <g:if test="${ismoderator}">
-                    <th class="header c5 lastcol" style="text-align:left;" scope="col">Toolbar</th>
-                    </g:if>
-                </tr>
-            </thead>
-            <tbody>
-            <g:each in="${recordingList}" var="r">
-                <g:if test="${ismoderator || r.published == 'true'}">  
-                <tr class="r0 lastrow">
-                    <td class="cell c0" style="text-align:center;">
-                    <g:each in="${r.playback}" var="p">
-                        <a title="${p.type}" target="_new" href="${p.url}">${p.type}</a>&#32;
-                    </g:each>
-                    </td>
-                    <td class="cell c1" style="text-align:center;">${r.name}</td>
-                    <td class="cell c2" style="text-align:center;">${r.metadata.contextactivitydescription}</td>
-                    <td class="cell c3" style="text-align:center;">${new Date( Long.valueOf(r.startTime).longValue() )}</td>
-                    <td class="cell c4" style="text-align:center;">
-                    <g:each in="${r.playback}" var="p">
-                        <g:if test="${p.type == 'slides'}">
-                            ${p.length}
-                        </g:if>
-                    </g:each>
-                    </td>
-                    <g:if test="${ismoderator}">
-                    <td class="cell c5 lastcol" style="text-align:left;">
-                      <g:if test="${r.published == 'true'}">
-                      <a title="Hide" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Hide" alt="Hide" class="smallicon" src="${resource(dir:'images',file:'hide.gif')}" /></a>
-                      </g:if>
-                      <g:else>
-                      <a title="Show" class="action-icon" href="${createLink(controller:'tool',action:'publish')}?bbb_recording_published=${r.published}&bbb_recording_id=${r.recordID}"><img title="Show" alt="Show" class="smallicon" src="${resource(dir:'images',file:'show.gif')}" /></a>
-                      </g:else>
-                      <a title="Delete" class="action-icon" onClick="if(confirm('Are you sure to delete this recording?')) window.location='${createLink(controller:'tool',action:'delete')}?bbb_recording_id=${r.recordID}'; return false;" href="#"><img title="Delete" alt="Delete" class="smallicon" src="${resource(dir:'images',file:'delete.gif')}" /></a>
-                    </td>
-                    </g:if>
-                </tr>
-                </g:if>
-            </g:each>
-            </tbody>
-        </table>
-        
-    </body>
-</html>
\ No newline at end of file
diff --git a/bbb-lti/src/java/org/bigbluebutton/lti/Parameter.java b/bbb-lti/src/java/org/bigbluebutton/lti/Parameter.java
index 6dbdf62d99..8bdaaf8d25 100644
--- a/bbb-lti/src/java/org/bigbluebutton/lti/Parameter.java
+++ b/bbb-lti/src/java/org/bigbluebutton/lti/Parameter.java
@@ -49,7 +49,7 @@ public class Parameter {
     public static final String CUSTOM_USER_ID = "custom_lis_person_sourcedid";
     
     //BigBlueButton custom parameters
-    public static final String CUSTOM_BBB_RECORD = "custom_bbb_record";
+    public static final String CUSTOM_BBB_RECORD = "custom_bbb_recording";
     public static final String CUSTOM_BBB_VOICEBRIDGE = "custom_bbb_voicebridge";
     public static final String CUSTOM_BBB_DURATION = "custom_bbb_duration";
     public static final String CUSTOM_BBB_WELCOME = "custom_bbb_welcome";
diff --git a/bbb-lti/web-app/images/favicon.ico b/bbb-lti/web-app/images/favicon.ico
deleted file mode 100644
index 2a399b83be1833fa8a206a7f33d35f8bb745031e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1150
zcmZ{jZA?;87{_m`)z&9J)z-_f0;DVnsi4TMH`nZCY!%bx3uvaIpa`f8&`hgYGtJ0Q
zR74?Atd<qMXSK>&t!$cEt`B~wt+x;5YSt?MJ@+y<YwNjt&OP^>=l7iRob$g7Gliar
z2!`57CTAMM%wiZuL{39A5+0`)XNzJOhV}nhhh7uw&r5T(?ostMr7GVwrzzjHWvZUi
zSgl{D`7cTH(*wG+lgCvFD36oCwn~K3RRWaD1*lvbh3a?-nv%Et_UqI&r}EOKPF|n5
z89r^w&58{&7{z>;!~z(XM#8*|hY~RlRtXPfD;J=04Ig#e<T#a^8lv^6(y$Tl3bO*3
zV)!Ut5sk)dH9Un{v>UbXnsVSsOn_a=L&a)7j!}+)PF>5=RIjvd=VlZVXId_Vb+s5H
z{eAe?#>dBT_E0Iem;G`+T)Pv-13FE#KQFbVEKbU?`BC%GRcYtYfrk&!U0;V#V?8c6
zH{ko%ulVx$Gi-_&?p&%iN<cN#wPhs_AKV%b+gd5~#9umol;azWdSuUyfL=HUxeI6G
z?a&~8{Q3pkdO5680m|eec=o8CwdbXe)~Bm+WXE=t$i%qhsNwh)s~P#Cc`!srLMNCL
z=70W#Wt|Mg5+N*7AzUfS_nju~sNYfoS9T_<wkM#+-Nf;(A_EE*&xb>uh*m=`Mn8ST
zx3Mu4D`H_@E+7}8F-7^I%dCBUrKTD|yA=(Y>F5o1aC}$I5xjXZ!1X7Zt9~!?mqel{
zRs?fw6x<oAe$s>IzT1hLbXGx|1%06q7k(qyiCY~3T=TRb)Z|37#e_oIcabCtX7W-6
zcYgKWtR(sMqZR1y?!pbKefaJjj`x=D!(pmt-+Bcxi(y#8BaV2fh`Vc6r*!vXRs*D`
zwr9b1JU@RLBTpWq|IuS~P(5B_0h}2cRPRz^|E4%tWXm{~)f(x?$+E2Za*}6u7G&HX
zJQu)l&lU9g+_>Fv0vD<dB48;-vo;&Yk`r-YOFRy3jswN_u$m9k;ntV4dnRegbI)0g
zq0ku&&|V(;T5;V`i!)S<CqEZ0dsA4=G?M?tPR`T5H%SrDYuw#-!>fxGC8Ou;#xI?P
nSucrkQGVIvShoM2$1o$5?Kb_9<x|4`Z_LE^#5^0zGA#QCv;!ZY

diff --git a/bbb-lti/web-app/images/icon.gif b/bbb-lti/web-app/images/icon.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8a29f62e7be0ce4e15843f0db3950f14058ab90b
GIT binary patch
literal 1246
zcmZ?wbhEHblwgox_<oV$>$jilwp@Jp_}!TckM7>RTiv#G!pwuqSMJiVYPfdmMPcoF
z4a<5BvnpM)if`Y(X;{>0ST|~z*TkpJ@Q;|ZZU6mQi;h(^Zp<xPSya7d@tTX}4I9>O
zyU{*jk5}lV+P1A>@zcYT=Y_^i^9t@Ww5sl&azMkPR^6uA#iwoB{NtL&<yyvNI%XA`
zrj?q;Woh|~qtX{?m{n_<R;b&y*f^KQq|Vl`X^KyqVdvf&o3$h{YyOheXPkXHckH|F
z;N8{OwWGLxQ%2!ZSHCVzlk&KX*-3dz=Px^`XI8pm<CT`~EtRd?w(h&<7e3KBaH3Q2
zl-_9v*YCJx=G?k!^R=*)1=nvr-LdEFjT?6tt-dgE#=a>tcdgiTEjD98L+AD>bB|>e
zE-0v3?;APQCua7htw&CuyV)~&i(5c%eEKXc$M%xiwX3(@sH$JEWbLJC^G~eVdVTV|
z6V5@CoC7ClIkbBO_HIA$z%z12Quaa%$HvuLuIE;+jY^(nU|H4Fv#YsxcXQ9qg{v=i
zPB~auwPxP(v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