%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
%>
Join a Course (Password Required)
<%@ include file="bbb_api.jsp"%>
<%
//
// We're going to define some sample courses (meetings) below. This API exampe shows how you can create a login page for a course.
// The password below are not available to users as they are compiled on the server.
//
HashMap allMeetings = new HashMap();
HashMap meeting;
String welcome = "
Welcome to %%CONFNAME%%!
For help see our tutorial videos.
To join the voice bridge for this meeting:
(1) click the headset icon in the upper-left, or
(2) dial xxx-xxx-xxxx (toll free:1-xxx-xxx-xxxx) and enter conference ID: %%CONFNUM%%.
";
//
// English courses
//
meeting = new HashMap();
allMeetings.put( "ENGL-2013: Research Methods in English", meeting ); // The title that will appear in the drop-down menu
meeting.put("welcomeMsg", welcome); // The welcome mesage
meeting.put("moderatorPW", "prof123"); // The password for moderator
meeting.put("viewerPW", "student123"); // The password for viewer
meeting.put("voiceBridge", "82013"); // The extension number for the voice bridge (use if connected to phone system)
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp"); // The logout URL (use if you want to return to your pages)
meeting = new HashMap();
allMeetings.put( "ENGL-2213: Drama Production I", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "82213");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = new HashMap();
allMeetings.put( "ENGL-2023: Survey of English Literature", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "82023");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
//
// Law Courses
//
meeting = new HashMap();
allMeetings.put( "LAW-1323: Fundamentals of Advocacy ", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "81232");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = new HashMap();
allMeetings.put( "LAW-2273: Business Organizations", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "82273");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = new HashMap();
allMeetings.put( "LAW-3113: Corporate Finance", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "theprof");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "81642");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
//
// Professor's Virtaul Office Hours
//
meeting = new HashMap();
allMeetings.put( "Virtual Office Hours - Steve Stoyan", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "80001");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = new HashMap();
allMeetings.put( "Virtual Office Hours - Michael Bailetti", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "80002");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = new HashMap();
allMeetings.put( "Virtual Office Hours - Tony Weiss", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "80003");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");
meeting = null;
Iterator meetingIterator = new TreeSet(allMeetings.keySet()).iterator();
if (request.getParameterMap().isEmpty()) {
//
// Assume we want to join a course
//
%>
<%@ include file="demo_header.jsp"%>
Demo #3: Join a Course (password required)
Passwords:
- prof123 - login as professor (moderator privlidges)
- student123 - login as student (viewer privlidges)
<%
} else if (request.getParameter("action").equals("create")) {
//
// Got an action=create
//
String username = request.getParameter("username");
String meetingID = request.getParameter("meetingID");
String password = request.getParameter("password");
meeting = allMeetings.get( meetingID );
String welcomeMsg = meeting.get( "welcomeMsg" );
String logoutURL = meeting.get( "logoutURL" );
Integer voiceBridge = Integer.parseInt( meeting.get( "voiceBridge" ).trim() );
String viewerPW = meeting.get( "viewerPW" );
String moderatorPW = meeting.get( "moderatorPW" );
//
// Check if we have a valid password
//
if ( ! password.equals(viewerPW) && ! password.equals(moderatorPW) ) {
%>
Invalid Password, please try again.
<%
return;
}
//
// Looks good, let's create the meeting
//
String meeting_ID = createMeeting( meetingID, welcomeMsg, moderatorPW, viewerPW, voiceBridge, logoutURL );
//
// Check if we have an error.
//
if( meeting_ID.startsWith("Error ")) {
%>
Error: createMeeting() failed
<%=meeting_ID%>
<%
return;
}
//
// We've got a valid meeting_ID and passoword -- let's join!
//
String joinURL = getJoinMeetingURL(username, meeting_ID, password);
%>
<%
}
%>
<%@ include file="demo_footer.jsp"%>