bbb-lti v0.1: Welcome message is generated using the resource title

Signed-off-by: jfederico <jesus@123it.ca>
This commit is contained in:
jfederico 2012-10-15 14:50:21 -04:00
parent e131f0e7ea
commit 1546404a36
3 changed files with 9 additions and 12 deletions

View File

@ -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))

View File

@ -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<String, Object> 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;
}

View File

@ -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;