[Hw4mdl-svn] SF.net SVN: hw4mdl: [105] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
|
From: <sh...@us...> - 2006-12-07 10:41:23
|
Revision: 105
http://svn.sourceforge.net/hw4mdl/?rev=105&view=rev
Author: shazan
Date: 2006-12-07 02:41:11 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
add features :logs, new room form when no room are available.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/index.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/reports.php
trunk/moodle/mod/liveclassroom/view.php
trunk/moodle/mod/liveclassroom/welcome.php
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/js/Ajax.js
trunk/moodle/mod/liveclassroom/js/constants.js
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/js/pngfix.js
trunk/moodle/mod/liveclassroom/js/verifForm.js
trunk/moodle/mod/liveclassroom/logs.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -65,7 +65,6 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
-//session_start();
/**
@@ -101,9 +100,6 @@
"&credential_0=". $login.
"&credential_1=". $passwd;
- //add_to_log("", "liveclassroom", "", "", "auth ".time());
-
-
$cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
$cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
fputs($cook,time()); // Add the current time into the file = last authenticate time
@@ -119,7 +115,8 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- print curl_error($ch);
+ add_to_log("", "liveclassroom", "URL", "", "URL incorrect");
+ // print curl_error($ch);
return false;
}
preg_match("(\d*)", $data, $matches);
@@ -127,11 +124,12 @@
if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
+ add_to_log("", "liveclassroom", "Authentication", "", "Authentication Failed: $resp_code");
return false;
}
-
curl_close($ch);
//fclose($cook);
+ add_to_log("", "liveclassroom", "Authentication", "", "Authentication succeeded");
return $ch;
}
@@ -186,7 +184,7 @@
print curl_error($ch);
return false;
}
-
+
return $data;
}
@@ -214,18 +212,20 @@
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
- /*
- if ( $respcode == 301) {
- error( "Creation user failed, already exist");
+/*
+ if ( $respcode == 302) {
+ error( "Creation user failed, malformed exist");
return false;
- }*/
-
+ }
+ */
+
+
if ( $respcode != 100 && $respcode != 301) {
- error( "Response: Account ($userId) Creation Failed: $resp_code");
+ add_to_log("", "liveclassroom", "Create User", "", "$userId Creation Failed");
+ // error( "Response: Account ($userId) Creation Failed: $resp_code");
return false;
}
-
-
+ add_to_log("", "liveclassroom", "Create User", "", "$userId Creation succeeded");
return true;
}
@@ -275,13 +275,13 @@
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
- add_to_log("", "liveclassroom", "", "liveclassroom_api_get_session", "userid: ".$userid." nickname ". $nickname);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
- error( "Response: Cannot Create Session: $resp_code");
+ add_to_log("", "liveclassroom", "Create Session", "", "Cannot Create Session : $resp_code");
return false;
}
@@ -299,13 +299,14 @@
$authtoken= substr($currentline, 10);
//DEBUG
- //add_to_log("", "liveclassroom", "", "liveclassroom_api_get_session", "AuthToken: '$authtoken'");
+
if (empty($authtoken)) {
//error ("Token empty, data=<pre>$data</pre>");
return false;
}
-
+ add_to_log("", "liveclassroom", "", "create session", "Creating Session for $nickname");
+
return $authtoken;
}
@@ -327,9 +328,9 @@
}
}
$final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
-// echo $final_list;
+
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$final_list);
- add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "apres query".$roomname);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -338,10 +339,11 @@
return false;
}
if ( $respcode != 100) {
- error( "Response: Cannot Create Class with id:$roomid, and name: $roomname.");
+ add_to_log("", "liveclassroom", "Create Room", "", "Cannot Create Class with id:$roomid, and name: $roomname.");
return false;
}
- // add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "avan retour".time());
+
+ add_to_log("", "liveclassroom", "Create Room", "", "$roomname create with success");
return true;
}
@@ -464,6 +466,8 @@
$response = split($pattern,$line);
//$result = substr($response[1],0,-1);
+
+
return $response[1];
}
@@ -490,7 +494,7 @@
}
$tok = split("100 OK",$data);
$tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- $result = liveclassroom_parse_line($tok1[0],"class_id=");
+ $result = liveclassroom_parse_line($tok1[0],"class_id=");
//Remove le " " at the end of the line
$response = substr($result,0,-1);
@@ -514,12 +518,16 @@
liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed, target not found");
+ // error( "Target not found");
return false;
}
else if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed");
return false;
}
+
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid has been deleted with success");
return true;
}
@@ -539,13 +547,14 @@
$respcode = $matches[0];
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed, target nor found");
return false;
}
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid has been opened with success");
return true;
}
@@ -565,13 +574,15 @@
$respcode = $matches[0];
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed, target nor found");
+
return false;
}
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid has been closed with success");
return true;
}
@@ -602,10 +613,11 @@
$respcode = $matches[0];
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Modify Room", "", "$roomid modification failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Modify Room", "", "$roomid has been modified with success");
return true;
}
@@ -1344,6 +1356,7 @@
$roomid= liveclassroom_parse_line($line[$i+1],"class_id="); //class_id
$roomname= liveclassroom_parse_line($line[$i+2],"longname="); //longname
+
$roompreview= liveclassroom_parse_line($line[$i],"preview="); //preview
$element = $xmldoc->createElement('listElement');
@@ -1416,7 +1429,7 @@
$archivename = $xmldoc->createElement('nameDisplay');
$archivename->appendChild($xmldoc->createTextNode("$tabarchive_value[2]"));
$archivepreview = $xmldoc->createElement('preview');
- add_to_log("", "liveclassroom", "view all", "archive", $tabarchive_value[0]);
+
if($tabarchive_value[0]=="1") {
$archivepreview->appendChild($xmldoc->createTextNode("unavailable"));
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-07 10:41:11 UTC (rev 105)
@@ -14,6 +14,9 @@
body p, body div, body li, body li li,
body input, body textarea, body select, body option ,td textarea
{font-size:100%;}
+
+
+
.page_title
{
font-family: Verdana, Arial, Helvetica, sans-serif;
@@ -34,61 +37,89 @@
padding-left:2px;
vertical-align:middle;
}
-table.tab
-{
- width:100%;
+.limitWidth
+{
+ width:160px;
}
-table.tab td
+.alignRight
{
- vertical-align:top;
+ padding-right: 5px;
+
}
+.shiftAvailability
+{
+
+ padding-right:100px;
+}
div.tab
{
- padding-top:2%;
- padding-left:5%;
+ padding-top:2%;
+
+ padding-left:5%;
+ padding-right:5%;
display: none;
height:180px;
+
+
}
+
+.button_hide
+{
+
+ width:25px;
+ display:none;
+}
div.current_tab
{
- margin-top:2%;
- margin-left:5%;
+ padding-top:2%;
+
+ padding-left:5%;
+ padding-right:5%;
position: relative;
display: block;
height:180px;
+
+
}
td.tabSelected
-{
+{
+
background-image:url(../pictures/tab_Select.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
-}
-td.tabDisabled
-{
-background-image:url(../pictures/tab_disabled.gif);
+ }
+
+ td.tabDisabled
+{
+ color:#CACACA;
+ background-image:url(../pictures/tab.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
border-bottom:solid 1px #818181;
-}
+ }
td.tabNoSelected
-{
-background-image:url(../pictures/tab.gif);
+{
+
+ background-image:url(../pictures/tab.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
border-bottom:solid 1px #818181;
}
+
a {
text-decoration:none;
color:Black; }
+
a:hover {
text-decoration:none;
color:Black; }
+
td.action,input.action{
background-image:url(../pictures/buttons/general-empty.png);
background-repeat :no-repeat;
@@ -111,28 +142,43 @@
{
cursor:pointer
}
+
.alert
{
color:Red;
}
-a.room {
-color:#889EB3;
+
+
+
+a.room { color:#889EB3;
+
text-decoration:none;
display:block;
width:100%;
+
}
-a.room:hover {color:#889EB3;
+
+a.room:hover {color:#889EB3;
+
+
text-decoration:none;
- border: none;
- background-position: 3px 4px;
+ border: none;
+
+ background-position: 3px 4px;
+
}
+
+
.info a{
position:relative; /*this is the key*/
z-index:24;
color:#000;
text-decoration:none}
+
.info a:hover{z-index:25;text-decoration:underline;}
+
.info a span{display: none;font-size:8pt;}
+
.info a:hover span{ /*the span will display just on :hover state*/
font-size:8pt;
display:block;
@@ -140,55 +186,80 @@
top:1.5em; left:5em; width:28em;
border:1px solid #FFF99F;
background-color:#FFF99F; color:#000;
- text-align: center}
-.button_disabled a{
+ text-align: center}
+
+
+
+.button_disabled {
+
color:#666666;
font-family: Arial;
text-decoration:none;
font-size: 9px;
- height:44px;
+
}
-.button_disabled a:hover
+
+
+.button_enabled a
{
- color:#666666;
+
+ color:black;
font-family: Arial;
- text-decoration:none;
+ width:30px;
font-size: 9px;
- cursor:pointer;
+
}
-.button_enabled a
+
+.separator_space
{
- color:black;
+ width:2px;
+ }
+
+.empty_space
+{
+ width:30px;
+ }
+
+
+.button_enabled a:hover{ color:black;
+
font-family: Arial;
- text-decoration:none;
- font-size: 9px;
-}
-.button_enabled a:hover{ color:black;
- font-family: Arial;
+
font-size: 9px;
- text-decoration: underline;
- display:block;
+ font-weight:bold;
+
cursor:hand;
}
+
+
+
+
tr.selectRoom{
background-color:red;
cursor:hand;
}
.divProduct
{
- padding-top:3px;
+ padding-top:3px;
+padding-left:5px ;
}
+
+
.shortShift{
+
padding-left:5px;
}
-.room td{
+
+.room td{
+ padding-left:5px ;
font-family:Verdana;
color:Black;
font-size:10;
border-bottom:solid 1px #F3F3F3;
cursor:pointer;
}
-.room label{
+.room label{
+
font-family:Verdana;
color:Black;
font-size:10;
@@ -204,35 +275,44 @@
cursor:pointer;
cursor:hand;
}
-.archive{
+
+.archive{
+ padding-left:5px ;
font-family:Verdana;
color:#666666;
font-style:italic;
font-size:11px;
border-bottom:solid 1px #F3F3F3;
}
-.filterBar {
+.filterBar table{
+ padding-left:5px ;
background-image:url("../pictures/backgrounds/filterbar.png");
height:24px;
font-weight:bold ;
width:100%;
border-bottom:fine 1px #C7D3E1
}
+
+
+
.filter_enabled
{
font-family :Verdana;
color:#333333;
height:24px;
- font-size:12px;
+ font-size:10px;
font-weight:bold ;
}
+
.filter_selected
{ font-weight:bold ;
font-family :Verdana;
color:#ffffff;
height:24px;
- font-size:12px;
+ font-size:10px;
+
}
+
.filter_left_enabled
{
background-image:url("../pictures/items/filter-enabled-left.png");
@@ -243,57 +323,78 @@
font-family :Verdana;
color:#ffffff;
height:24px;
- font-size:12px;
+ font-size:10px;
font-weight:bold ;
}
.filter_right_enabled
{
background-image:url("../pictures/items/filter-enabled-right.png");
}
+
.contextBar table
{
+ padding-left:5px;
+ padding-right:5px;
background-image:url("../pictures/backgrounds/toolbar.png");
height:30px;
- width:100%
+ width:100%
+
}
+
.tabBackground
{
background-image:url("../pictures/backgrounds/toolbar.png");
+
}
+
.productChoice table
-{
+{
+
height:72px;
border-bottom:solid 1px #F0F0F0;
margin-left:10px;
margin-right:10px;
+
}
-.comment{
+
+
+.comment{
+
font-family:Verdana;
color:#555555;
font-style:italic;
font-size:11px;
padding-left:20px;
}
+
.subOption td {
- font-family:Verdana;
+
+ font-family:Verdana;
+
font-size:11px;
padding-left:20px;
vertical-align:top;
}
+
.roomNameForSettings
{
font-family:Verdana;
font-weight: bold;
- font-size:12px;
+ font-size:12px;
+
+
}
+
.hide
{
display:none;
}
+
.visible
{
display:block;
}
+
label.moreRoom
{
color:Navy;
@@ -301,56 +402,80 @@
padding-left:20px;
font-weight: bold;
}
+
+
#popup {
+
display:none;
font-size:8pt;
display:block;
position:absolute;
- top:50%; left:50%;
+ top:50%; left:50%;
+
color:#000;
text-align: center;
}
+
+
.expand
{
background-color:Black;
-}.headerBar table
+}
+
+
+.headerBar table
{
-padding:0px ;
+padding-left:5px ;
width:100%;
+padding-right:5px ;
+
background-image:url("../pictures/backgrounds/headerbar.png");
height:32px;
border-bottom:solid 1px Black;
+
}
.toolBar table
{
+ padding-left:5px ;
width:100%;
- padding:0px ;
+
background-image:url("../pictures/backgrounds/toolbar.png");
+
+
}
-.search
-{
- max-width:105px;
- }
+
.list
{
- height:280px;
+ height:215px;
overflow-y:scroll;
+
+
}
-.productTitle {
+.lineTitle{
+
+padding-left:10px
+}
+.productTitle{
+
background-color:#B0C1D5;
font-family:Verdana;
color:White;
font-size:12px;
height:16px;
font-weight:bold;
- cursor:default;
+ cursor:default;
+
+
}
.validationBar table
{
width:100%;
height:24px ;
padding:0px ;
- background-color:#F0F0F0;
+ background-color:#F0F0F0;
+
+
+
}
.panelSettings table
{
@@ -359,12 +484,11 @@
display:none;
width:100%
}
-.part td
+
+
+ .part td
{
+
width:100%;
border-bottom: #818181 1px solid;
- }
- .messageBar
- {
- background-color:#ffff99;
}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -88,7 +88,7 @@
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken']));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/new-createroom', 'New', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
+ $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -130,9 +130,17 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
-
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Title : ") ));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
$panelLine->appendChild($linepart);
$parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text");
@@ -141,7 +149,16 @@
}
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"input", $parameters));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
$panelLine->appendChild($linepart);
$panelContent->appendChild($panelLine);
@@ -154,11 +171,27 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
-
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Description : ") ));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
$panelLine->appendChild($linepart);
@@ -172,8 +205,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(""));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
$panelLine->appendChild($linepart);
$parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
@@ -192,12 +231,19 @@
}
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "mainLectureRoom","input", $parameters));
$panelLine->appendChild($linepart);
$parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "discussionRoom","input", $parameters));
$panelLine->appendChild($linepart);
@@ -221,10 +267,24 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ;
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
@@ -268,7 +328,7 @@
$panelSettingsM = $xmldoc->createElement('panelSettings');
// MEDIA PANEL INFO
- $panelSettingsM->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabSelected', 'tabDisabled', 'Media', "2", 'none'));
+ $panelSettingsM->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
// MEDIA CONTENT
$panelContentM = $xmldoc->createElement('panelContent');
@@ -281,7 +341,13 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "two-way-audio", "id" => "audio", "name" => "media_type", "onclick" =>"doChangeMedia(\"audio\")") ;
if($action=='update') {
if($room_info['media_type']=="two-way-audio") $parameters['checked']=true;
@@ -301,7 +367,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
if($action=='update'){
if($room_info['hms_simulcast_restricted']==1){
@@ -335,7 +407,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$parameters=array("type" => "checkbox", "value" => "1", "id" => "two_way_enabled", "name" => "hms_two_way_enabled") ;
if($action=='update'){
if($room_info['hms_two_way_enabled']==1){
@@ -361,14 +440,20 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "one-way-audio", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
if($action=='update'){
if($room_info['media_type']=="one-way-video"){
$parameters['checked']=true;
}
}
-
+
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->appendChild($linepart);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
@@ -390,7 +475,13 @@
$panelLineId->appendChild($xmldoc->createTextNode("roomId_row"));
$panelLine->appendChild($panelLineId);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
$panelLine->appendChild($linepart);
@@ -413,7 +504,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "none", "id" => "none", "name" => "media_type", "onclick" => "doChangeMedia(\"none\")") ;
if($action=='update') {
if($room_info['media_type']=="none") $parameters['checked']=true;
@@ -435,7 +532,7 @@
$panelSettings = $xmldoc->createElement('panelSettings');
// FEATURES PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabSelected', 'tabDisabled', 'Features', "3", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
@@ -448,7 +545,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_eboard", "name" => "student_wb_enabled") ;
if($action=='update'){
if($room_info['student_wb_enabled']==1) $parameters['checked']=true;
@@ -467,7 +570,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_liveapp", "name" => "student_wb_liveapp") ;
if($action=='update'){
if($room_info['student_wb_liveapp']==1) $parameters['checked']=true;
@@ -487,7 +596,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_archive", "name" => "can_archive") ;
if($action=='update'){
if($room_info['can_archive']==1) $parameters['checked']=true;
@@ -507,7 +622,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_appshare", "name" => "can_liveshare") ;
if($action=='update'){
if($room_info['can_liveshare']==1) $parameters['checked']=true;
@@ -527,7 +648,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_ppt", "name" => "can_ppt_import") ;
if($action=='update'){
if($room_info['can_ppt_import']==1) $parameters['checked']=true;
@@ -549,7 +676,7 @@
// ------------------ CHAT --------------------
// CHAT PANEL INFO
$panelSettings = $xmldoc->createElement('panelSettings');
- $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabSelected', 'tabDisabled', 'Chat', "4", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none'));
// CHAT CONTENT
$panelContent = $xmldoc->createElement('panelContent');
@@ -560,7 +687,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_chat", "name" => "chatenable") ;
if($action=='update'){
if($room_info['chatenable']==1) $parameters['checked']=true;
@@ -579,7 +712,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "1", "id" => "privateenabled", "name" => "privatechatenable") ;
if($action=='update'){
if($room_info['privatechatenable']==1)$parameters['checked']=true;
@@ -598,7 +737,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "0", "id" => "privatedisbledd", "name" => "privatechatenable") ;
if($action=='update'){
if($room_info['privatechatenable']==0) $parameters['checked']=true;
@@ -616,7 +761,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note :Students are always able to chat with presenters and/or technical help") ));
$panelLine->appendChild($linepart);
@@ -630,7 +781,7 @@
// ------------------- ACCESS ----------------------
$panelSettings = $xmldoc->createElement('panelSettings');
// ACCESS PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Access', "5", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', 'Access', "5", 'none'));
// ACCESS CONTENT
$panelContent = $xmldoc->createElement('panelContent');
@@ -641,7 +792,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "0", "id" => "acessAvailable_true", "name" => "preview") ;
if($action=='update'){
if($room_info['preview']==0) $parameters['checked']=true;
@@ -660,7 +817,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"hr", $parameters=array()) );
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"hr", $parameters=array()) );
$panelLine->appendChild($linepart);
$panelContent->appendChild($panelLine);
@@ -670,11 +834,24 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Maximum users : ") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "-1", "id" => "userlimit_false", "name" => "userlimit", "onclick" => "toggleUserlimit(\"false\")") ;
if($action=='update'){
if($room_info['userlimit']==-1) $parameters['checked']=true;
@@ -695,11 +872,25 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$parameters=array("type" => "radio", "id" => "userlimit_true", "name" => "userlimit", "onclick" => "toggleUserlimit(\"true\")") ;
if($action=='update'){
if($room_info['userlimit']!=-1) $parameters['checked']=true;
@@ -726,7 +917,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(""));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAccess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ;
if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){
$parameters['checked']=true;
@@ -750,7 +947,13 @@
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => "Room Id :") ));
$panelLine->appendChild($linepart);
@@ -782,7 +985,7 @@
$root->appendChild($windows);
$xmldoc->appendChild($root);
-// $xmldoc->save('settings.xml');
+$xmldoc->save('settings.xml');
$xmlstring = $xmldoc->saveXML(); // Xml datas into a string
Modified: trunk/moodle/mod/liveclassroom/index.php
===================================================================
--- trunk/moodle/mod/liveclassroom/index.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/index.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -67,14 +67,17 @@
print_header("$course->shortname: $strliveclassrooms", "$course->fullname", "$navigation $strliveclassrooms", "", "", true, "", navmenu($course));
/// Get all the appropriate data
-
+/*
if (! $liveclassrooms = get_all_instances_in_course("liveclassroom", $course)) {
notice("There are no liveclassrooms", "../../course/view.php?id=$course->id");
die;
}
-
+*/
$url = liveclassroom_get_url_params($course->id);
+ //You come frome "Add an ctivity" and no room are available, you must create one!
+ if( (isset($_GET['noliveclassroom'])) &&( $_GET['noliveclassroom']=="true") ) { $url .= "&addnew=true"; }
+
?>
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
<head>
Added: trunk/moodle/mod/liveclassroom/js/Ajax.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/Ajax.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,278 @@
+function getHTTPObject()
+{
+ var xmlhttp = false;
+
+ /* Compilation conditionnelle d'IE */
+ /*@cc_on
+ @if (@_jscript_version >= 5)
+ try
+ {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ }
+ catch (e)
+ {
+ try
+ {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ catch (E)
+ {
+ xmlhttp = false;
+ }
+ }
+ @else
+ xmlhttp = false;
+ @end @*/
+
+ /* on essaie de cr\xE9er l'objet si ce n'est pas d\xE9j\xE0 fait */
+ if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
+ {
+ try
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ catch (e)
+ {
+ xmlhttp = false;
+ }
+ }
+
+ if (xmlhttp)
+ {
+ /* on d\xE9finit ce qui doit se passer quand la page r\xE9pondra */
+ xmlhttp.onreadystatechange=function()
+ {
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+
+ /*alert(xmlhttp.responseText);
+ Traitement de la r\xE9ponse.
+ Ici on affiche la r\xE9ponse dans une bo\xEEte de dialogue.
+ */
+ studentView=false;
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ manageXml("");
+
+ }
+ }
+ }
+ return xmlhttp;
+}
+
+
+function gestionDisplay(isfilter)
+{
+
+
+ if(numberMainLectureRoom>5 && isfilter==false)
+ {
+
+ document.getElementById("div1").style.height=5*19+"px";
+
+
+
+ document.getElementById("div1More").style.display="block";
+ document.getElementById("div1More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div1\",\""+numberMainLectureRoom+"\")'>"+(numberMainLectureRoom-5)+" more...</label>";
+
+ }else if(numberMainLectureRoom==0){
+ document.getElementById("div1").style.display="none";
+ document.getElementById("div1Title").style.display="none";
+ document.getElementById("div1More").style.display="none";
+
+ }else{
+
+ document.getElementById("div1").style.height=numberMainLectureRoom*19+"px";
+ document.getElementById("div1More").style.display="none";
+
+ }
+
+ if(numberBreakoutRoom>5 && isfilter==false)
+ {
+ document.getElementById("div2").style.height=5*19+"px";
+ document.getElementById("div2More").style.display="block";
+ document.getElementById("div2More").innerHTML="<table><tr><td><label class='moreRoom' onclick='displayAllDiv(\"div2\",\""+numberBreakoutRoom+"\")'>"+(numberBreakoutRoom-5)+" more...</label></td></tr></table>";
+
+
+
+
+ }else if(numberBreakoutRoom==0){
+ document.getElementById("div2").style.display="none";
+ document.getElementById("div2Title").style.display="none";
+ document.getElementById("div2More").style.display="none";
+
+ }else{
+
+ document.getElementById("div2").style.height=numberBreakoutRoom*19+"px";
+ document.getElementById("div2More").style.display="none";
+ }
+
+ if(numberVoiceBoard>5 && isfilter==false)
+ {
+ document.getElementById("div3").style.height=5*19+"px";
+ document.getElementById("div3More").style.display="block";
+ document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>";
+
+
+
+
+ }else if(numberVoiceBoard==0){
+ document.getElementById("div3").style.display="none";
+ document.getElementById("div3Title").style.display="none";
+ document.getElementById("div3More").style.display="none";
+
+ }else{
+
+ document.getElementById("div3").style.height=numberVoiceBoard*19+"px";
+ document.getElementById("div3More").style.display="none";
+ }
+
+ if(numberVoicePresentation>5 && isfilter==false)
+ {
+
+ document.getElementById("div4").style.height=5*19+"px";
+ document.getElementById("div4More").style.display="block";
+ document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>";
+
+
+
+ }else if(numberVoicePresentation==0 && isfilter==false){
+ document.getElementById("div4").style.display="none";
+ document.getElementById("div4Title").style.display="none";
+ document.getElementById("div4More").style.display="none";
+
+ }
+ else{
+ document.getElementById("div4").style.height=numberVoicePresentation*19+"px";
+ document.getElementById("div4More").style.display="none";
+ }
+
+
+}
+
+
+function displayAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+
+ document.getElementById(name).style.height=number*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='RemoveAllDiv(\""+name+"\",\""+number+"\")'>Show Top 5...</label>";
+
+}
+function RemoveAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+ document.getElementById(name).style.height=5*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\""+name+"\",\""+number+"\")'>"+(number-5)+" more...</label>";
+
+}
+function createAction(action){
+if(action!="") {
+ return "\"javascript:"+action[0].getElements("name")[0].getText()+"('"+action[0].getElements("parameters")[0].getText()+"')\"";
+}
+return "";
+}
+
+
+
+
+function getURLParameters()
+{
+ var sURL = window.document.URL.toString();
+ var params="";
+ if (sURL.indexOf("?") > 0)
+ {
+ var arrParams = sURL.split("?");
+
+ var arrURLParams = arrParams[1].split("&");
+
+ var arrParamNames = new Array(arrURLParams.length);
+ var arrParamValues = new Array(arrURLParams.length);
+
+ var i = 0;
+ for (i=0;i<arrURLParams.length;i++)
+ {
+ var sParam = arrURLParams[i];
+ arrParamNames[i] = sParam[0];
+ if (sParam[1] != "")
+ params += "&"+unescape(sParam);
+
+ }
+ params=params.substring(1,params.length)
+ }
+ return params;
+}
+
+
+function DisplayFirstPage(){
+
+/* Cr\xE9ation de l'objet : */
+/*
+var m=
+if(t!=null) m=t;
+
+else m=getURLParameters();
+*/
+/* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+xmlhttp.open("POST", 'generateListRooms.php',true);
+/* Effectue la requ\xEAte : */
+xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ xmlhttp.onreadystatechange=Management;
+
+xmlhttp.send(getURLParameters())
+
+
+}
+
+
+function launchAjaxRequest(url,fonction,action,init){
+
+ showPopup()
+
+ var parameters="";
+ if(currentProduct != "" )
+ parameters="product="+currentProduct+"&"
+
+ if( currentId != "")
+ parameters+="id="+currentId+"&"
+ if(action!="")
+ parameters+="action="+action+"&";
+
+ if(init=="true")
+ currentId = ""
+ /* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+ xmlhttp.open("GET", url+'?'+parameters+'time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'',true);
+ /* Effectue la requ\xEAte : */
+ xmlhttp.onreadystatechange=eval(fonction);
+
+ xmlhttp.send(null);
+}
+
+
+function launchNew(url,fonction,action,product){
+
+ currentProduct = product;
+ launchAjaxRequest(url,fonction,action,"true");
+}
+
+
+
+
+
+function Management(){
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+ hidePopup()
+
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ objDomTree = objDom.docNode;
+
+ //session management
+ manageXml("","all");
+ }
+}
+
+
Property changes on: trunk/moodle/mod/liveclassroom/js/Ajax.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/js/constants.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/constants.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,30 @@
+// JScript File
+
+var session=new Array();
+var timeOfLoad="";
+var currentFilter='all';
+var numberOfProduct=4;
+var currentId="";
+var currentProduct="";
+var typeSelect="mainLecture"
+
+var currentDiv=0;
+var numberMainLectureRoom=0;
+var numberBreakoutRoom=0;
+var numberVoiceBoard=0;
+var numberVoicePresentation=0;
+var studentView=false;
+var numberArchive=new Array();
+// xml
+var objDom;
+var objDomTree;
+
+//Constants
+var LIVECLASSROOM="liveclassroom";
+var MAINLECTURE="mainLectureRoom";
+var DISCUSSION="discussionRoom";
+var BOARD="voiceBoard";
+var PRESENTATION="voicePresentation";
+
+//Ajax
+var xmlhttp = getHTTPObject();
\ No newline at end of file
Property changes on: trunk/moodle/mod/liveclassroom/js/constants.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,400 @@
+function changePicture(id,pictureUrl){
+ if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
+ {
+ document.getElementById(id).style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+pictureUrl+"', sizingMethod='scale')";
+ }
+ else
+ {
+ document.images[id].src=pictureUrl;
+
+ }
+
+}
+
+
+
+ function toggleUserlimit(isLimited){
+ document.forms[0].userlimittext.disabled = (isLimited==false);
+ }
+ function doChangeChat() {
+ var radio = document.forms[0].privateChatEnabled;
+ for (i=0; i<radio.length; i++) {
+ radio[i].disabled = !document.forms[0].chatEnabled.checked;
+ }
+ }
+
+ function doChangeMedia(mediatype)
+ {
+ document.forms[0].student_simulcast.disabled = (mediatype=="video" || mediatype=="none")
+ document.forms[0].two_way_enabled.disabled = (mediatype=="video" || mediatype=="none")
+ if (mediatype=="video"){document.getElementById('roomId_row').style.display="block"}else{
+ document.getElementById('roomId_row').style.display="none"}
+ }
+ function doChangeLink()
+ {
+
+ if (document.getElementById('launcher_link_row').style.display=="block"){
+ document.getElementById('launcher_link_row').style.display="none"
+ }else{
+ document.getElementById('launcher_link_row').style.display="block"
+ }
+ }
+
+
+ function toggleType(type)
+ {
+ typeSelect=type;
+ manageXml('','all');
+
+
+
+
+ }
+ function confirmDelete(delUrl, type){
+ if (confirm("Are you sure you want to delete this " + type)) {
+ if (confirm("Are you really sure you want to delete this " + type)) {
+ location.href = delUrl
+ }
+ }
+ }
+
+
+
+ var currentIdtab="1";
+ function onTab(id)
+ {
+
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_Select.gif)";
+ document.getElementById('tab'+currentIdtab).style.borderBottom="#818181 1px solid";
+ document.getElementById('tab'+currentIdtab).style.backgroundImage="url(pictures/tab.gif)";
+ document.getElementById('tab'+id).style.borderBottom="none";
+ document.getElementById('span'+currentIdtab).style.display="none";
+ document.getElementById('span'+id).style.display="block";
+ currentIdtab=id;
+ }
+
+ function onOver(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_over.gif)";
+
+ }
+ function onOut(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab.gif)";
+
+ }
+
+ function hwSubmit(action) {
+ if(action != null)
+ {
+ document.forms[0].action.value=action;
+ }
+ document.forms[0].submit();
+ }
+
+
+ function hideDiv(id,pictureId){
+ if (document.getElementById(id).style.display=="none")
+ {
+
+ document.getElementById(id).style.display="block";
+ document.getElementById(id+"More").style.display="block";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).style.display=="block")
+ {
+
+ document.getElementById(id).style.display="none";
+ document.getElementById(id+"More").style.display="none";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+ if (document.getElementById(id).className=="hide")
+ {
+ document.getElementById(id).className="visible";
+ document.getElementById(id+"More").className="visible";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).className=="visible")
+ {
+ document.getElementById(id).className="hide";
+ document.getElementById(id+"More").className="hide";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+}
+
+
+
+
+function hideArchive(type,id,pictureId,roomId)
+{
+
+ if (document.getElementById(id).style.display=="none")
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom+=numberArchive[roomId];
+ else
+ numberBreakoutRoom+=numberArchive[roomId];
+ document.getElementById(id).style.display="block";
+ document.images[pictureId].src="pictures/minus.gif";
+
+
+ }
+ else
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom-=numberArchive[roomId];
+ else
+ numberBreakoutRoom-=numberArchive[roomId];
+
+ document.getElementById(id).style.display="none";
+ document.images[pictureId].src="pictures/plus.gif";
+
+
+ }
+ gestionDisplay(false)
+}
+
+function Navigateur()
+{
+ if (navigator.appName.indexOf("Netscape") > -1)
+ {
+ return "Netscape";
+ }
+ if (navigator.appName.indexOf("Explorer") > -1)
+ {
+ return "Explorer";
+ }
+ return "Unknown";
+}
+
+
+
+
+function OneClick(id,product,type)
+
+{
+
+ if(currentId!="" && currentId!=id)
+ document.getElementById(currentId).style.backgroundColor="white";
+ if(currentId!=id)
+ {
+ document.getElementById(id).style.backgroundColor="#c3dbf7";
+ }
+ currentI...
[truncated message content] |