diff --git a/bbb-lti/grails-app/controllers/org/bigbluebutton/web/controllers/ToolController.groovy b/bbb-lti/grails-app/controllers/org/bigbluebutton/web/controllers/ToolController.groovy index d183610eb6..0adc3133b0 100644 --- a/bbb-lti/grails-app/controllers/org/bigbluebutton/web/controllers/ToolController.groovy +++ b/bbb-lti/grails-app/controllers/org/bigbluebutton/web/controllers/ToolController.groovy @@ -46,6 +46,7 @@ class ToolController { public static final String USER_ID = 'lis_person_sourcedid' public static final String USER_FIRSTNAME = 'lis_person_name_given' public static final String COURSE_ID = 'context_id' + public static final String COURSE_TITLE = 'context_title' public static final String RESOURCE_LINK_ID = 'resource_link_id' public static final String RESOURCE_LINK_TITLE = 'resource_link_title' public static final String RESOURCE_LINK_DESCRIPTION = 'resource_link_description' @@ -86,10 +87,13 @@ class ToolController { //log.debug DigestUtils.shaHex("mp"+params.get(RESOURCE_LINK_ID)) //log.debug params.get(USER_FULL_NAME) log.debug params.get(ROLES) + String welcome = "Welcome to " + params.get(RESOURCE_LINK_TITLE) //message(code: "bigbluebutton.welcome", args: [params.get(RESOURCE_LINK_TITLE), params.get(COURSE_TITLE)]) + log.debug welcome String destinationURL = bigbluebuttonService.getJoinURL(params.get(RESOURCE_LINK_TITLE), params.get(RESOURCE_LINK_ID), DigestUtils.shaHex("ap" + params.get(RESOURCE_LINK_ID)), DigestUtils.shaHex("mp"+params.get(RESOURCE_LINK_ID)), + welcome, params.get(LAUNCH_RETURN_URL), params.get(USER_FULL_NAME), params.get(ROLES)) diff --git a/bbb-lti/grails-app/services/org/bigbluebutton/web/services/BigbluebuttonService.groovy b/bbb-lti/grails-app/services/org/bigbluebutton/web/services/BigbluebuttonService.groovy index 4b1ff38563..952ed48124 100644 --- a/bbb-lti/grails-app/services/org/bigbluebutton/web/services/BigbluebuttonService.groovy +++ b/bbb-lti/grails-app/services/org/bigbluebutton/web/services/BigbluebuttonService.groovy @@ -69,8 +69,8 @@ class BigbluebuttonService { } - public String getJoinURL(String meetingName, String meetingID, String attendeePW, String moderatorPW, String logoutURL, String userFullName, String roles) { - String createURL = getCreateURL( meetingName, meetingID, attendeePW, moderatorPW, logoutURL ) + public String getJoinURL(String meetingName, String meetingID, String attendeePW, String moderatorPW, String welcome, String logoutURL, String userFullName, String roles) { + String createURL = getCreateURL( meetingName, meetingID, attendeePW, moderatorPW, welcome, logoutURL ) log.debug "signed createURL: " + createURL Map createResponse = doAPICall(createURL) log.debug "createResponse: " + createResponse @@ -90,10 +90,10 @@ class BigbluebuttonService { } - private String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW, String logoutURL ) { + private String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW, String welcome, String logoutURL ) { Integer voiceBridge = 70000 + new Random(System.currentTimeMillis()).nextInt(10000); - String url = bbbServer.getCreateURL(name, meetingID, attendeePW, moderatorPW, "", "", voiceBridge.toString(), "", logoutURL, "", "", "", "" ); + String url = bbbServer.getCreateURL(name, meetingID, attendeePW, moderatorPW, welcome, "", voiceBridge.toString(), "", logoutURL, "", "", "", "" ); return url; } diff --git a/bbb-lti/src/java/org/bigbluebutton/api/BigBlueButtonServer.java b/bbb-lti/src/java/org/bigbluebutton/api/BigBlueButtonServer.java index 0e01e6d1ad..2800c44b35 100644 --- a/bbb-lti/src/java/org/bigbluebutton/api/BigBlueButtonServer.java +++ b/bbb-lti/src/java/org/bigbluebutton/api/BigBlueButtonServer.java @@ -58,13 +58,6 @@ public class BigBlueButtonServer { this.salt = salt; } - public String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW ) { - Integer voiceBridge = 70000 + new Random(System.currentTimeMillis()).nextInt(10000); - - String url = getCreateURL(name, meetingID, attendeePW, moderatorPW, "", "", voiceBridge.toString(), "", "", "", "", "", "" ); - return url; - } - public String getCreateURL(String name, String meetingID, String attendeePW, String moderatorPW, String welcome, String dialNumber, String voiceBridge, String webVoice, String logoutURL, String maxParticipants, String record, String duration, String meta ) { String url = ""; @@ -73,7 +66,7 @@ public class BigBlueButtonServer { url += "&meetingID=" + meetingID; url += "&moderatorPW=" + moderatorPW; url += "&attendeePW=" + attendeePW; - url += "&welcome=" + welcome; + url += "&welcome=" + URLEncoder.encode(welcome, PARAMETERENCODING); url += "&logoutURL=" + URLEncoder.encode(logoutURL, PARAMETERENCODING); url += "&maxParticipants=" + maxParticipants; url += "&voiceBridge=" + voiceBridge;