Permalink
Browse files

Create works

  • Loading branch information...
anatolyspektor committed Apr 19, 2012
1 parent e605136 commit 7fa3d680f7fe4b1b5624be9e14772736effd45ce
@@ -16,7 +16,7 @@
with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>.
Author: Fred Dixon <ffdixon@bigbluebutton.org>
-*/%>
+*/%>
<%@ page import="javax.xml.transform.dom.DOMSource"%>
<%@ page import="javax.xml.transform.stream.StreamResult"%>
<%@ page import="javax.xml.transform.OutputKeys"%>
View
@@ -96,15 +96,32 @@ function onCheck()
for (String courseName : meetingApplication.processCourseList()){
+
+ if(courseName.equals(session.getAttribute("meetingName"))){
+ out.println("<option selected='selected'>" + courseName + "</option>");
+ }else{
out.println("<option>" + courseName + "</option>");
+ }
}
out.println("</select></td>");
- out.println("<td>Section <input type='text' size='5' maxlength='5' name='section' /></td></tr>");
+ if(session.getAttribute("section") == null){
+ out.print("<td>Section <input type='text' size='5' maxlength='5' name='section' />");
+ }else{
+ out.print("<td>Section <input type='text' size='5' maxlength='5' name='section'");
+ out.print("value = '"+session.getAttribute("section") +"'");
+ out.print("/>");
+ }
+ out.print("</td></tr>");
+
}else{
// else user sees a textbox with name of the lecture
- out.println("<tr height='30'> <td height='50'>Name of Meeting: <span style='color:red'>*</span></td><td> <input type='text' id='meetingName' name='meetingName' size='60'/></td> </tr>");
+ out.print("<tr height='30'> <td height='50'>Name of Meeting: <span style='color:red'>*</span></td><td> <input type='text' id='meetingName' ");
+ if(session.getAttribute("meetingName") != null)
+ out.print("value = '"+session.getAttribute("meetingName")+"' ");
+ out.print("name='meetingName' size='60'/></td> </tr>");
+
}
%>
@@ -128,12 +145,24 @@ function onCheck()
</tr>
<%
+ String guestsChecked = (String) session.getAttribute("allowGuests");
+ String lectures = (String) session.getAttribute("lectures");
+
+ System.out.println("Lectures are " +lectures);
// if user is authenticated as employee allowing them two options: invite non-ldap authenticated people
// allow to record their meetings
if(position.equals("Employee")){
out.println("<tr height='60'>");
- out.println(" <td colspan='2'> Allow Guests ? <input type='checkbox' id='allowGuests' name='allowGuests'/> ");
- out.println(" Recordable ? <input type='checkbox' id='Recordable' name='Recordable'/></td> ");
+ if(session.getAttribute("allowGuests") != null && guestsChecked.equals("on")){
+ out.println(" <td colspan='2'> Allow Guests ? <input type='checkbox' id='allowGuests' name='allowGuests' checked='yes'/> ");
+ }else{
+ out.println(" <td colspan='2'> Allow Guests ? <input type='checkbox' id='allowGuests' name='allowGuests'/> ");
+ }
+ if(session.getAttribute("lectures") != null && lectures.equals("on")){
+ out.println(" Recordable ? <input type='checkbox' id='Recordable' name='Recordable' checked='yes'/></td> ");
+ }else{
+ out.println(" Recordable ? <input type='checkbox' id='Recordable' name='Recordable' /></td> ");
+ }
out.println("</tr>");
}
%>
@@ -166,7 +195,15 @@ function onCheck()
}
}
-
+ session.setAttribute("mPwd", null);
+ session.setAttribute("mPwdre", null);
+ session.setAttribute("vPwd", null);
+ session.setAttribute("vPwdre", null);
+ session.setAttribute("meetingName", null);
+ session.setAttribute("section", null);
+ session.setAttribute("allowGuests", null);
+ session.setAttribute("lectures", null);
+
%>
</td>
</tr>
@@ -13,6 +13,9 @@
String vPwd = request.getParameter( "vPwd" );
String vPwdre = request.getParameter( "vPwdre" );
String check = request.getParameter("check");
+ String guests = request.getParameter("allowGuests");
+ String lectures = request.getParameter("Recordable");
+
String meetingName = "";
@@ -56,10 +59,11 @@
session.setAttribute("vPwdre", vPwdre);
session.setAttribute("meetingName", meetingName);
session.setAttribute("section", section);
+ session.setAttribute("allowGuests", guests);
+ session.setAttribute("lectures", lectures);
-
// checking no fields to be empty
if(mPwd == null || mPwdre == null || vPwd == null || vPwdre == null || meetingName == null){
@@ -105,13 +109,15 @@
// Here goes code when everything is VALID
//we don't need session attirubtes any more so removing them:
-
+
session.setAttribute("mPwd", null);
session.setAttribute("mPwdre", null);
session.setAttribute("vPwd", null);
session.setAttribute("vPwdre", null);
session.setAttribute("meetingName", null);
session.setAttribute("section", null);
+ session.setAttribute("allowGuests", null);
+ session.setAttribute("lectures", null);
StringBuilder sb = new StringBuilder();
View
@@ -28,8 +28,11 @@
response.sendRedirect("login.jsp");
}
meetingApplication.loadAllMeetings();
+ System.out.println("Lecture size after: " +meetingApplication.getLectures().size());
ArrayList <String[]> lectureList = runningList(meetingApplication.getLectures());
ArrayList <String[]> meetingList = runningList(meetingApplication.getMeetings());
+
+ System.out.println("Is tehre any meetings? " +meetingList.size()+ " " +lectureList.size() );
%>
<table align="center" width="1000" border="0" cellpadding="0" cellspacing="30">
<tr valign="top">
@@ -161,6 +161,7 @@
ArrayList <String[]> openMeetings = new ArrayList <String[]> ();
for (int i = 0; i < meetings.size(); i ++){
String meetingID = StringUtils.removeStart(meetings.get(i)[0], String.valueOf(PROF_SYMBOL));
+ System.out.println(meetingID + ": " + isMeetingRunning(meetingID));
if (isMeetingRunning(meetingID).equals("true")){
openMeetings.add(meetings.get(i));
}
Binary file not shown.
@@ -51,6 +51,7 @@ public static Jedis dbConnect(){
}
public ArrayList <String[]> getLectures(){
+ System.out.println("Lecture size before: "+lectures.size());
return lectures;
}
@@ -70,6 +71,7 @@ public void loadAllMeetings(){
// Checks if the current key is a hash, and if it contains any meetings
if (compareResult == 0 && jedis.hexists(eachKey, "meeting1")){
// Goes through each meeting in the current hash
+ System.out.println("eachkey is: " +eachKey+" "+ jedis.hlen(eachKey));
for (int i = 1; i <= jedis.hlen(eachKey); i++){
// Extracts the meeting data string from the current meeting
String rawMeeting = jedis.hget(eachKey, "meeting"+i);
@@ -82,8 +84,9 @@ public void loadAllMeetings(){
}
}
}
+
}
-
+ System.out.println("Inside meeting java sizes are: " +lectureList.size() + " and " +meetingList.size());
// Sort the lecture and meeting lists alphabetically
Collections.sort(lectureList);
Collections.sort(meetingList);
@@ -98,6 +101,7 @@ public void loadAllMeetings(){
for (int i = 0; i < meetingList.size(); i++){
meetings.add(decompress(meetingList.get(i)));
}
+ System.out.println("In the end!: " +lectures.size() + " and " +meetings.size());
}
/*

0 comments on commit 7fa3d68

Please sign in to comment.