hw4mdl-svn Mailing List for Wimba Moodle Integration (Page 5)
Brought to you by:
jhlinder,
trollinger
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(7) |
Jun
|
Jul
(3) |
Aug
(13) |
Sep
(20) |
Oct
(20) |
Nov
(9) |
Dec
(49) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(34) |
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(39) |
Feb
(14) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(3) |
Nov
(4) |
Dec
|
|
From: <hu...@us...> - 2007-01-04 16:32:40
|
Revision: 166
http://svn.sourceforge.net/hw4mdl/?rev=166&view=rev
Author: hugues
Date: 2007-01-04 08:32:37 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10621
- Roomid is now displayed and readonly
- also made readonly the launcher link
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateSettings.php
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 16:14:21 UTC (rev 165)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 16:32:37 UTC (rev 166)
@@ -545,7 +545,7 @@
$parameters=array("type" => "radio", "value" => "one-way-video", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
if($action=='update'){
if($room_info['media_type']=="one-way-video"){
- $parameters['checked']=true;
+ $parameters['checked']=true;
}
}
@@ -565,7 +565,7 @@
$panelLine = $xmldoc->create_element('panelLine');
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node("hide"));
+ $panelLineStyle->append_child($xmldoc->create_text_node(($room_info['media_type']=="one-way-video")?"visible":"hide"));
$panelLine->append_child($panelLineStyle);
$panelLineId = $xmldoc->create_element('id');
$panelLineId->append_child($xmldoc->create_text_node("roomId_row"));
@@ -586,7 +586,8 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => liveclassroom_get_message("Room Id: "))));
$panelLine->append_child($linepart);
- $parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field", "maxlength" => "50") ;
+ $parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field",
+ "maxlength" => "50", "readonly" => "") ;
if($action=='update'){
$parameters['value']=$roomId;
}
@@ -1168,7 +1169,7 @@
$launcher_link = $CFG->liveclassroom_servername."/launcher.cgi?room=".$roomId;
$parameters=array("type" => "text", "id" => "link",
"name" => "link", "maxlength" => "50",
- "size" => strlen($launcher_link));
+ "size" => strlen($launcher_link) , "readonly" => "");
if($action=='update'){
$parameters['value']=$launcher_link;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 16:14:25
|
Revision: 165
http://svn.sourceforge.net/hw4mdl/?rev=165&view=rev
Author: hugues
Date: 2007-01-04 08:14:21 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10620
- Fixed the room update
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2007-01-04 14:51:15 UTC (rev 164)
+++ trunk/moodle/mod/liveclassroom/api.php 2007-01-04 16:14:21 UTC (rev 165)
@@ -363,8 +363,6 @@
$final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
$enc_list = str_replace(" ", "+", $final_list);
-//DEBUG: error($enc_list);
-
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $enc_list);
preg_match("(\d*)", $data, $matches);
@@ -625,10 +623,10 @@
global $CFG;
global $COURSE;
+ $list_attributes = "";
+
while (list($key, $val) = each($table_attributes)) {
-
if(($key!='class_id')&&(isset($val))&&($val!="")){
-
$list_attributes .= "&".$key."=".$val;
}
}
@@ -637,19 +635,21 @@
$enc_list = str_replace(" ", "+", $final_list);
+//DEBUG:
+//error($enc_list);
+
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $enc_list);
preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
+ $respcode = $matches[0];
if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("errorModifyRoom100","roomId=$roomid&courseId=".$COURSE->id), "Room modification failed");
- return false;
- }
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("errorModifyRoom100","roomId=$roomid&courseId=".$COURSE->id), "Room modification failed");
+ return false;
+ }
add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("modifyRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been modified with success");
return true;
-
}
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2007-01-04 14:51:15 UTC (rev 164)
+++ trunk/moodle/mod/liveclassroom/lib.php 2007-01-04 16:14:21 UTC (rev 165)
@@ -315,6 +315,45 @@
return liveclassroom_api_get_session ($userid, $nickname);
}
+
+/**
+ * Updates the parameters of a room
+ *
+ */
+function liveclassroom_update_room ($course_id, $roomname, $instructor_led, $attributes) {
+
+ //set media_type and media_format according to the appropriate values according to the media_type attribute
+ $attributes = liveclassroom_check_media($attributes);
+
+ //print_r($list_attributes);
+ //Test if the type of room has been changed
+ if($_SESSION['led']!=$attributes['led']) { // Type changed
+ if($list_attributes['led']=='instructor'){
+ liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Instructor') ;
+ liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Student');
+ }
+ else {
+ liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Student') ;
+ liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
+ }
+ }
+ unset($attributes['led']);
+ unset($attributes['link']);
+
+ //print_r($list_attributes);
+ if(!liveclassroom_api_modify_room($_GET['id'],$attributes)) {
+ return false;
+ }
+ //Guest enabled?
+ if ($attributes['guests']==1) {
+ if (! liveclassroom_api_add_user_role ($_GET['id'], 'Guest' , 'Student')) {
+ return false;
+ }
+ }
+ return true;
+}
+
+
/*
* Create a room
* call the function create_class to create the room into the server
@@ -333,15 +372,7 @@
$studentid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX;
//set media_type and media_format according to the appropriate values according to the media_type attribute
- if ($attributes['media_type'] == "none") {
- $attributes['media_format'] = "none";
- }
- else if ($attributes['media_type'] == "one-way-video") {
- $attributes['media_format'] = "realmedia";
- }
- else if ($attributes['media_type'] == "two-way-audio") {
- $attributes['media_format'] = "hms";
- }
+ $attributes = liveclassroom_check_media($attributes);
if($instructor_led==true) { // main lecture hall
@@ -1105,5 +1136,20 @@
return $version;
}
+
+function liveclassroom_check_media($attributes) {
+ //set media_type and media_format according to the appropriate values according to the media_type attribute
+ if ($attributes['media_type'] == "none") {
+ $attributes['media_format'] = "none";
+ }
+ else if ($attributes['media_type'] == "one-way-video") {
+ $attributes['media_format'] = "realmedia";
+ }
+ else if ($attributes['media_type'] == "two-way-audio") {
+ $attributes['media_format'] = "hms";
+ }
+
+ return $attributes;
+}
?>
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2007-01-04 14:51:15 UTC (rev 164)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2007-01-04 16:14:21 UTC (rev 165)
@@ -87,7 +87,9 @@
$messageType = 'roomCreated';
}
else if($_GET['action']=='updateRoom') {
- if($list_attributes['led']=='instructor'){
+
+ $instructor_led = ($list_attributes['led']=='instructor');
+ if($instructor_led){
if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
@@ -103,31 +105,11 @@
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
-
-
- //print_r($list_attributes);
- //Test if the type of room has been changed
- if($_SESSION['led']!=$list_attributes['led']) { // Type changed
- if($list_attributes['led']=='instructor'){
- liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Instructor') ;
- liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Student');
- }
- else {
- liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Student') ;
- liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
- }
- }
- //print_r($list_attributes);
- if(!liveclassroom_api_modify_room($_GET['id'],$list_attributes)) {
+ if (!liveclassroom_update_room($courseid, $list_attributes['longname'], $instructor_led, $list_attributes)) {
notice(get_string("roommodificationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
- }
- //Guest enabled?
- if ($list_attributes['guests']==1) {
- if (! liveclassroom_api_add_user_role ($_GET['id'], 'Guest' , 'Student')) {
- return false;
- }
}
+
$messageType = 'roomUpdated';
}
else if($_GET['action']=='deleteRoom') {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 14:51:17
|
Revision: 164
http://svn.sourceforge.net/hw4mdl/?rev=164&view=rev
Author: hugues
Date: 2007-01-04 06:51:15 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10620
- Fixed the room creation parameters by forcing a couple of media parameters
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2007-01-04 11:17:35 UTC (rev 163)
+++ trunk/moodle/mod/liveclassroom/api.php 2007-01-04 14:51:15 UTC (rev 164)
@@ -66,25 +66,25 @@
/*
-* Get the prefix to use for creating rooms and users.
+* Get the prefix to use for creating rooms and users.
*
* return $prefix : a string which is the prefix to use
*/
function liveclassroom_api_get_prefix() {
- global $CFG;
+ global $CFG;
- //get the admin user name
- $aun = $CFG->liveclassroom_adminusername;
- if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix
- $prefix = $aun;
+ //get the admin user name
+ $aun = $CFG->liveclassroom_adminusername;
+ if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix
+ $prefix = $aun;
- }
- else {
- $prefix = '';
+ }
+ else {
+ $prefix = '';
- }
- return $prefix;
-
+ }
+ return $prefix;
+
}
/**
@@ -103,12 +103,12 @@
*/
function liveclassroom_api_authenticate ($servername='', $login='', $passwd='') {
global $CFG;
- global $COURSE;
-
+ global $COURSE;
+
if (empty($servername)) { // feed them with $CFG
- $servername = $CFG->liveclassroom_servername;
- $login = $CFG->liveclassroom_adminusername;
- $passwd = $CFG->liveclassroom_adminpassword;
+ $servername = $CFG->liveclassroom_servername;
+ $login = $CFG->liveclassroom_adminusername;
+ $passwd = $CFG->liveclassroom_adminpassword;
}
$url = $servername.
@@ -120,7 +120,7 @@
"&credential_1=". $passwd;
$cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
- $cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
+ $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
$ch = curl_init();
@@ -133,17 +133,17 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- add_to_log($COURSE->id, "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable","courseId=".$COURSE->id), "URL incorrect");
+ add_to_log($COURSE->id, "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable","courseId=".$COURSE->id), "URL incorrect");
// print curl_error($ch);
return false;
}
preg_match("(\d*)", $data, $matches);
$resp_code = $matches[0];
- if ( $resp_code == 204 ) {
+ if ( $resp_code == 204 ) {
add_to_log($COURSE->id, "liveclassroom", "Authentication", liveclassroom_send_logs("errorAuthentication2","respcode=$resp_code&courseId=".$COURSE->id), "Authentication Failed");
error(get_string('wrongadminpass', 'liveclassroom'));
- return false;
+ return false;
}
else if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
@@ -162,38 +162,38 @@
/**
* Send a query to the server with the given function and the given attributes
* Check if the session cookie exist and get the cookie creation date.
- * If it's less than 30 minutes, the cookie is got for the request, if not a new authenticate is done.
- * @param $const : function called
+ * If it's less than 30 minutes, the cookie is got for the request, if not a new authenticate is done.
+ * @param $const : function called
* @param $attribute : different list of attributes for the function called
* return $data : result query
*/
function liveclassroom_api_send_query($const,$attribute) {
- global $CFG;
+ global $CFG;
- $cook = $CFG->dataroot.'/tmp.txt'; //Open the temp file to check the last modification date
- $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
-
- if(file_exists($cook)) {
- $fileContent = file_get_contents($cook);
+ $cook = $CFG->dataroot.'/tmp.txt'; //Open the temp file to check the last modification date
+ $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
+
+ if(file_exists($cook)) {
+ $fileContent = file_get_contents($cook);
- }
- else {
- $lastModifTime = 0;
- }
- //1800 seconds = 30 minutes
- $modif = $fileContent+1800;
+ }
+ else {
+ $lastModifTime = 0;
+ }
+ //1800 seconds = 30 minutes
+ $modif = $fileContent+1800;
- if( (!file_exists($cookie_file_path)) || ((file_exists($cook)) && (time()>$modif)) ){
- if (!$ch = liveclassroom_api_authenticate()) {
- return false;
- }
- }
-
+ if( (!file_exists($cookie_file_path)) || ((file_exists($cook)) && (time()>$modif)) ){
+ if (!$ch = liveclassroom_api_authenticate()) {
+ return false;
+ }
+ }
+
- $url = $CFG->liveclassroom_servername.
- LIVECLASSROOM_API_ADMIN.
- $const.
- $attribute;
+ $url = $CFG->liveclassroom_servername.
+ LIVECLASSROOM_API_ADMIN.
+ $const.
+ $attribute;
$ch = curl_init();
@@ -203,15 +203,15 @@
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-
- $data = curl_exec($ch);
-
- if (curl_errno($ch)) {
- print curl_error($ch);
- return false;
- }
-
- return $data;
+
+ $data = curl_exec($ch);
+
+ if (curl_errno($ch)) {
+ print curl_error($ch);
+ return false;
+ }
+
+ return $data;
}
@@ -231,28 +231,28 @@
function liveclassroom_api_create_user ($userid, $coursename, $rolename) {
global $CFG;
global $COURSE;
-
- $final_list = "&target=$userid&first_name=$rolename&last_name=$coursename";
- $enc_list = str_replace(" ", "+", $final_list);
+
+ $final_list = "&target=$userid&first_name=$rolename&last_name=$coursename";
+ $enc_list = str_replace(" ", "+", $final_list);
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, $enc_list);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-/*
- if ( $respcode == 302) {
- error( "Creation user failed, malformed exist");
- return false;
- }
- */
-
-
- if ( $respcode != 100 && $respcode != 301) {
- add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("errorCreateUser","userId=$userid&respcode=$respcode&courseId=".$COURSE->id), "User Creation Failed");
- // error( "Response: Account ($userId) Creation Failed: $resp_code");
- return false;
- }
- add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("createUser","userId=$userid&courseId=".$COURSE->id), "User Creation succeeded");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, $enc_list);
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+/*
+ if ( $respcode == 302) {
+ error( "Creation user failed, malformed exist");
+ return false;
+ }
+ */
+
+
+ if ( $respcode != 100 && $respcode != 301) {
+ add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("errorCreateUser","userId=$userid&respcode=$respcode&courseId=".$COURSE->id), "User Creation Failed");
+ // error( "Response: Account ($userId) Creation Failed: $resp_code");
+ return false;
+ }
+ add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("createUser","userId=$userid&courseId=".$COURSE->id), "User Creation succeeded");
return true;
}
@@ -263,22 +263,22 @@
*
*/
function liveclassroom_api_create_group($groupid) {
-
+
global $CFG;
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_GROUP, "&target=$groupid");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_GROUP, "&target=$groupid");
if ( $respcode == 301) {
- error( "Response: Authentication Failed: $resp_code");
- return false;
- }
- if ( $respcode != 100 && $respcode != 301) {
- error( "Response: Cannot Create group with id:$groupid");
- return false;
- }
+ error( "Response: Authentication Failed: $resp_code");
+ return false;
+ }
+ if ( $respcode != 100 && $respcode != 301) {
+ error( "Response: Cannot Create group with id:$groupid");
+ return false;
+ }
-
- return true;
+
+ return true;
}
@@ -295,22 +295,22 @@
function liveclassroom_api_get_session ($userid, $nickname) {
global $CFG;
global $USER;
- global $COURSE;
-
-
- $final_list = "&target=$userid&nickname=$nickname";
- $enc_list = str_replace(" ", "+", $final_list);
+ global $COURSE;
+
+
+ $final_list = "&target=$userid&nickname=$nickname";
+ $enc_list = str_replace(" ", "+", $final_list);
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, $enc_list);
-
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, $enc_list);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
-
- add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("errorCreateSession","respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id), "Cannot Create Session.");
+
+ add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("errorCreateSession","respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id), "Cannot Create Session.");
return false;
}
@@ -334,8 +334,8 @@
//error ("Token empty, data=<pre>$data</pre>");
return false;
}
- add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("createSession","nickname=$nickname&courseId=".$COURSE->id), "Creating Session for $nickname");
-
+ add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("createSession","nickname=$nickname&courseId=".$COURSE->id), "Creating Session for $nickname");
+
return $authtoken;
}
@@ -347,37 +347,40 @@
*/
function liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes) {
global $CFG;
- global $COURSE;
-
- $list_attributes = '';
-
- unset($attributes['longname']);
- while (list($key, $val) = each($attributes)) {
- if(($key!='class_id')&&(isset($val))&&($val!="")){
- $list_attributes .= "&".$key."=".$val;
- }
- }
+ global $COURSE;
+
+ $list_attributes = '';
+
+ unset($attributes['longname']);
+ unset($attributes['led']);
- $final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
- $enc_list = str_replace(" ", "+", $final_list);
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $enc_list);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode == 301) {
- error( "Class $roomname already exist");
- return false;
- }
- if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("errorCreateClass","roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id), "Cannot Create Class with id : $roomid, and name : $roomname.");
- return false;
- }
+ while (list($key, $val) = each($attributes)) {
+ if(($key!='class_id')&&(isset($val))&&($val!="")){
+ $list_attributes .= "&".$key."=".$val;
+ }
+ }
- add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("createClass","roomname=$roomname&courseId=".$COURSE->id), "$roomname create with success");
- return true;
+ $final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
+ $enc_list = str_replace(" ", "+", $final_list);
+
+//DEBUG: error($enc_list);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $enc_list);
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode == 301) {
+ error( "Class $roomname already exist");
+ return false;
+ }
+ if ( $respcode != 100) {
+ add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("errorCreateClass","roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id), "Cannot Create Class with id : $roomid, and name : $roomname.");
+ return false;
+ }
+ add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("createClass","roomname=$roomname&courseId=".$COURSE->id), "$roomname create with success");
+ return true;
}
/*
@@ -390,7 +393,7 @@
function liveclassroom_api_add_user_role ($roomid, $userid, $role) {
global $CFG;
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role");
preg_match("(\d*)", $data, $matches);
@@ -414,7 +417,7 @@
function liveclassroom_api_remove_user_role ($roomid, $userid, $role) {
global $CFG;
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role");
preg_match("(\d*)", $data, $matches);
@@ -430,7 +433,7 @@
function liveclassroom_api_remove_group_role ($roomid, $groupid, $role) {
global $CFG;
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$groupid&role_id=$role");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$groupid&role_id=$role");
preg_match("(\d*)", $data, $matches);
@@ -453,30 +456,30 @@
*/
function liveclassroom_api_room_exist($roomname) {
- global $CFG;
+ global $CFG;
- $final_list = "&filter00=longname&filter00value=$roomname";
- $enc_list = str_replace(" ", "+", $final_list);
+ $final_list = "&filter00=longname&filter00value=$roomname";
+ $enc_list = str_replace(" ", "+", $final_list);
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- if(sizeof($tok1)>1){
-
- return true;
- }
- else {
- return false;
- }
+ if(sizeof($tok1)>1){
+
+ return true;
+ }
+ else {
+ return false;
+ }
}
@@ -487,43 +490,43 @@
* return a string delimited by the pattern and the end of line
*/
function liveclassroom_parse_line($line,$pattern) {
-
- $response = split($pattern,$line);
- //$result = substr($response[1],0,-1);
-
+
+ $response = split($pattern,$line);
+ //$result = substr($response[1],0,-1);
+
- return $response[1];
+ return $response[1];
}
/**
* Get the room id from a roomname
-* @param $roomname
-* return the room_id from the server
+* @param $roomname
+* return the room_id from the server
*/
function liveclassroom_api_get_roomid($roomname) {
- global $CFG;
+ global $CFG;
- $final_list = "&filter00=longname&filter00value=$roomname";
- $enc_list = str_replace(" ", "+", $final_list);
-
+ $final_list = "&filter00=longname&filter00value=$roomname";
+ $enc_list = str_replace(" ", "+", $final_list);
+
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- $result = liveclassroom_parse_line($tok1[0],"class_id=");
-
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $result = liveclassroom_parse_line($tok1[0],"class_id=");
+
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
- return $response;
+ return $response;
}
@@ -536,25 +539,25 @@
* return true if the room is deleted, false otherwise
*/
function liveclassroom_api_delete_room($roomid) {
- global $CFG;
- global $COURSE;
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
+ global $CFG;
+ global $COURSE;
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
-
- if ( $respcode == 302) {
+
+ if ( $respcode == 302) {
add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
- // error( "Target not found");
- return false;
- }
- else if ( $respcode != 100) {
+ // error( "Target not found");
+ return false;
+ }
+ else if ( $respcode != 100) {
add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
return false;
}
-
- add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("deleteRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been deleted with success");
- return true;
+
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("deleteRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been deleted with success");
+ return true;
}
/**
@@ -564,24 +567,24 @@
* return true if the room has being opened, false otherwise
*/
function liveclassroom_api_open_room($roomid) {
- global $CFG;
- global $COURSE;
-
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode == 302) {
- add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed");
- return false;
+ global $CFG;
+ global $COURSE;
+
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode == 302) {
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed");
+ return false;
}
- if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed");
- return false;
- }
- add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("openRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been opened with success");
- return true;
+ if ( $respcode != 100) {
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed");
+ return false;
+ }
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("openRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been opened with success");
+ return true;
}
/**
@@ -591,24 +594,24 @@
* return true if the room has being closed, false otherwise
*/
function liveclassroom_api_close_room($roomid) {
- global $CFG;
- global $COURSE;
-
- liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=1");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode == 302) {
- add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed");
-
- return false;
+ global $CFG;
+ global $COURSE;
+
+ liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=1");
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode == 302) {
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed");
+
+ return false;
}
- if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed");
- return false;
- }
- add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("closeRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been closed with success");
- return true;
+ if ( $respcode != 100) {
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed");
+ return false;
+ }
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("closeRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been closed with success");
+ return true;
}
@@ -620,31 +623,31 @@
*/
function liveclassroom_api_modify_room($roomid,$table_attributes) {
global $CFG;
- global $COURSE;
+ global $COURSE;
while (list($key, $val) = each($table_attributes)) {
- if(($key!='class_id')&&(isset($val))&&($val!="")){
+ if(($key!='class_id')&&(isset($val))&&($val!="")){
- $list_attributes .= "&".$key."=".$val;
- }
+ $list_attributes .= "&".$key."=".$val;
+ }
}
$final_list = "&target=$roomid".$list_attributes;
- $enc_list = str_replace(" ", "+", $final_list);
+ $enc_list = str_replace(" ", "+", $final_list);
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $enc_list);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $enc_list);
preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
+ $respcode = $matches[0];
if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("errorModifyRoom100","roomId=$roomid&courseId=".$COURSE->id), "Room modification failed");
- return false;
- }
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("errorModifyRoom100","roomId=$roomid&courseId=".$COURSE->id), "Room modification failed");
+ return false;
+ }
- add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("modifyRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been modified with success");
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("modifyRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been modified with success");
return true;
}
@@ -666,31 +669,31 @@
$enc_list = str_replace(" ", "+", $final_list);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- //print $data;
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $data;
-
- $line = explode ("\n",$data);
+
+ $line = explode ("\n",$data);
- $j=0;
-
- for($i=1;$i<sizeof($line)-3;$i=$i+4) {
- $test = strstr($line[$i+1],$roomid);
- if($test!=false) {
- $list_return[$j][0]= liveclassroom_parse_line($line[$i],"preview=");
- $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
- $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname=");
- $j++;
- }
- }
-
- return $list_return;
+ $j=0;
+
+ for($i=1;$i<sizeof($line)-3;$i=$i+4) {
+ $test = strstr($line[$i+1],$roomid);
+ if($test!=false) {
+ $list_return[$j][0]= liveclassroom_parse_line($line[$i],"preview=");
+ $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
+ $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname=");
+ $j++;
+ }
+ }
+
+ return $list_return;
}
/*
@@ -707,33 +710,33 @@
$enc_list = str_replace(" ", "+", $final_list);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- //print $data;
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $data;
-
- $line = explode ("\n",$data);
+
+ $line = explode ("\n",$data);
- $j=0;
-
- for($i=1;$i<sizeof($line)-3;$i=$i+4) {
- $test = strstr($line[$i+1],$roomid);
- if($test!=false) {
- if(liveclassroom_parse_line($line[$i],"preview=")==0) {
- $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
- $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname=");
- $j++;
- }
- }
- }
-
+ $j=0;
+
+ for($i=1;$i<sizeof($line)-3;$i=$i+4) {
+ $test = strstr($line[$i+1],$roomid);
+ if($test!=false) {
+ if(liveclassroom_parse_line($line[$i],"preview=")==0) {
+ $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
+ $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname=");
+ $j++;
+ }
+ }
+ }
+
- return $list_return;
+ return $list_return;
}
@@ -750,31 +753,31 @@
$enc_list = str_replace(" ", "+", $final_list);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- //print $data;
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $data;
-
- $line = explode ("\n",$data);
+
+ $line = explode ("\n",$data);
- $j=0;
-
- for($i=1;$i<sizeof($line)-3;$i=$i+4) {
- $id = liveclassroom_parse_line($line[$i+1],"class_id=");
- $list_return[$id][0]= liveclassroom_parse_line($line[$i],"preview=");
- $list_return[$id][1]= $id;
- $list_return[$id][2] = liveclassroom_parse_line($line[$i+2],"longname=");
- $j++;
-
- }
-
+ $j=0;
+
+ for($i=1;$i<sizeof($line)-3;$i=$i+4) {
+ $id = liveclassroom_parse_line($line[$i+1],"class_id=");
+ $list_return[$id][0]= liveclassroom_parse_line($line[$i],"preview=");
+ $list_return[$id][1]= $id;
+ $list_return[$id][2] = liveclassroom_parse_line($line[$i+2],"longname=");
+ $j++;
+
+ }
+
- return $list_return;
+ return $list_return;
}
/*
@@ -788,52 +791,52 @@
global $CFG;
$name = $course->shortname;
- $enc_name = str_replace(" ", "_", $name);
-
- $final_list = "&filter00=last_name&filter00value=$enc_name";
+ $enc_name = str_replace(" ", "_", $name);
+
+ $final_list = "&filter00=last_name&filter00value=$enc_name";
$enc_list = str_replace(" ", "+", $final_list);
-
+
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, $enc_list);
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- if(sizeof($tok1)>1){
- return true;
- }
- else {
- return false;
- }
+ if(sizeof($tok1)>1){
+ return true;
+ }
+ else {
+ return false;
+ }
}
/*
* Give the rights for a lecture room to the room given
* @param $roomid : the id of the room to modifiy the settings
-*
+*
*/
function liveclassroom_api_give_lectureroom_attributes() {
global $CFG;
- $attributes = array('media_type'=>'two-way-audio','preview' =>'0','archive'=>'0','can_archive'=>'1','hms_simulcast'=>'public','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1');
-
+ $attributes = array('media_type'=>'two-way-audio','preview' =>'0','archive'=>'0','can_archive'=>'1','hms_simulcast'=>'public','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1');
+
/*
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1");
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1");
preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
return true;
*/
return $attributes;
@@ -842,29 +845,29 @@
/*
* Give the rights for a breackout room to the room given
* @param $roomid : the id of the room to modifiy the settings
-*
+*
*/
function liveclassroom_api_give_discussionroom_attributes() {
global $CFG;
- $attributes = array('media_type'=>'two-way-audio','hms_simulcast'=>'public','archive'=>'0','preview'=>'0','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1','can_archive'=>'1','can_liveshare'=>'1','can_ppt_import'=>'1');
+ $attributes = array('media_type'=>'two-way-audio','hms_simulcast'=>'public','archive'=>'0','preview'=>'0','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1','can_archive'=>'1','can_liveshare'=>'1','can_ppt_import'=>'1');
/*
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1&can_archive=1&can_liveshare=1&can_ppt_import=1");
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1&can_archive=1&can_liveshare=1&can_ppt_import=1");
preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
-
- return true;
- */
- return $attributes;
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+
+ return true;
+ */
+ return $attributes;
}
@@ -877,24 +880,24 @@
* return a string : the role of the user
*/
function liveclassroom_api_role_user_room($roomid, $userid) {
- global $CFG;
-
+ global $CFG;
+
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_ROLE, "&attribute=role_id&filter01=user_id&filter01value=$userid&filter02=object_id&filter02value=$roomid");
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- $result = liveclassroom_parse_line($tok1[0],"role_id=");
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
- return $response;
-
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $result = liveclassroom_parse_line($tok1[0],"role_id=");
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
+ return $response;
+
}
/*
@@ -911,24 +914,24 @@
$enc_coursename = str_replace(" ", "_", $course->shortname);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$enc_coursename&filter01=first_name&filter01value=Student");
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $line = explode("\n",$data);
-
-// $tok = split("100 OK",$data);
- // $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-// $result = liveclassroom_parse_line($tok1[0],"user_id=");
- $result = liveclassroom_parse_line($line[1],"user_id=");
- //Remove le " " at the end of the line
- //$response = substr($result,0,-1);
-
- return $result;
+ $line = explode("\n",$data);
+
+// $tok = split("100 OK",$data);
+ // $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+// $result = liveclassroom_parse_line($tok1[0],"user_id=");
+ $result = liveclassroom_parse_line($line[1],"user_id=");
+ //Remove le " " at the end of the line
+ //$response = substr($result,0,-1);
+
+ return $result;
}
@@ -945,22 +948,22 @@
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter00=class_id&filter00value=$roomid&filter01=preview&filter01value=0");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- if(sizeof($tok1)>1){
- return true;
- }
- else {
- return false;
- }
+ if(sizeof($tok1)>1){
+ return true;
+ }
+ else {
+ return false;
+ }
}
/* Check if the room is an archive
@@ -972,122 +975,122 @@
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=archive&filter01=class_id&filter01value=$roomid");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-
- $test = strstr($tok1[0],"archive=");
-
- //$tok2 = split("class_id=",$tok1[0]);
- $result = liveclassroom_parse_line($test,"archive=");
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
-
- if($response==1) {
- return true;
- }
- else return false;
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+
+ $test = strstr($tok1[0],"archive=");
+
+ //$tok2 = split("class_id=",$tok1[0]);
+ $result = liveclassroom_parse_line($test,"archive=");
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
+
+ if($response==1) {
+ return true;
+ }
+ else return false;
}
/*
-* Give the name of the room given
-* @param $roomid : the id of the room
-* return a String :name of the room
+* Give the name of the room given
+* @param $roomid : the id of the room
+* return a String :name of the room
*/
function liveclassroom_api_get_room_name($roomid){
global $CFG;
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=longname&filter00=class_id&filter00value=$roomid");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-
- $test = strstr($tok1[0],"longname=");
-
- //$tok2 = split("class_id=",$tok1[0]);
- $result = liveclassroom_parse_line($test,"longname=");
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
-
- return $response;
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+
+ $test = strstr($tok1[0],"longname=");
+
+ //$tok2 = split("class_id=",$tok1[0]);
+ $result = liveclassroom_parse_line($test,"longname=");
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
+
+ return $response;
}
/*
-* Give the media type of the room given
-* @param $roomid : the id of the room
-* return a String :media type of the room
+* Give the media type of the room given
+* @param $roomid : the id of the room
+* return a String :media type of the room
*/
function liveclassroom_api_get_media_type($roomid){
global $CFG;
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=media_type&filter00=class_id&filter00value=$roomid");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- //print $url;
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-
- $test = strstr($tok1[0],"media_type=");
-
- //$tok2 = split("class_id=",$tok1[0]);
- $result = liveclassroom_parse_line($test,"media_type=");
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
-
- return $response;
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $url;
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+
+ $test = strstr($tok1[0],"media_type=");
+
+ //$tok2 = split("class_id=",$tok1[0]);
+ $result = liveclassroom_parse_line($test,"media_type=");
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
+
+ return $response;
}
-
+
/*
-* Get the number of user limit of the room given
-* @param $roomid : the id of the room
-* return a int : number of user limit
+* Get the number of user limit of the room given
+* @param $roomid : the id of the room
+* return a int : number of user limit
*/
function liveclassroom_api_room_get_user_limit($roomid){
global $CFG;
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=userlimit&filter00=class_id&filter00value=$roomid");
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- //print $url;
- $tok = split("100 OK",$data);
- $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-
- $test = strstr($tok1[0],"userlimit=");
-
- //$tok2 = split("class_id=",$tok1[0]);
- $result = liveclassroom_parse_line($test,"userlimit=");
- //Remove le " " at the end of the line
- $response = substr($result,0,-1);
- return $response;
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $url;
+ $tok = split("100 OK",$data);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+
+ $test = strstr($tok1[0],"userlimit=");
+
+ //$tok2 = split("class_id=",$tok1[0]);
+ $result = liveclassroom_parse_line($test,"userlimit=");
+ //Remove le " " at the end of the line
+ $response = substr($result,0,-1);
+ return $response;
}
@@ -1096,7 +1099,7 @@
* Give the information about a room given
* @param $roomid : the id of the room
* return an array with the key as the name of the attribute
-* and the value as the value of the attribute
+* and the value as the value of the attribute
*/
function liveclassroom_api_get_infos_room($roomid) {
global $CFG;
@@ -1105,19 +1108,19 @@
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
-
+
if ( $respcode != 100) {
return false;
}
$tok = split("100 OK",$data);
$line = explode("\n",$tok[1]);
- foreach ($line as $line_value) {
- $result = explode("=",$line_value);
- $room_table[$result[0]]=$result[1];
- }
+ foreach ($line as $line_value) {
+ $result = explode("=",$line_value);
+ $room_table[$result[0]]=$result[1];
+ }
- return $room_table;
+ return $room_table;
}
@@ -1130,28 +1133,28 @@
function liveclassroom_api_get_teacher_user_id ($courseid){
global $CFG;
- $course = get_record("course", "id", $courseid);
+ $course = get_record("course", "id", $courseid);
$enc_coursename = str_replace(" ", "_", $course->shortname);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$enc_coursename&filter01=first_name&filter01value=Teacher");
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- $line = explode("\n",$data);
-
-// $tok = split("100 OK",$data);
- // $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
-// $result = liveclassroom_parse_line($tok1[0],"user_id=");
- $result = liveclassroom_parse_line($line[1],"user_id=");
- //Remove le " " at the end of the line
- //$response = substr($result,0,-1);
-
- return $result;
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ $line = explode("\n",$data);
+
+// $tok = split("100 OK",$data);
+ // $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+// $result = liveclassroom_parse_line($tok1[0],"user_id=");
+ $result = liveclassroom_parse_line($line[1],"user_id=");
+ //Remove le " " at the end of the line
+ //$response = substr($result,0,-1);
+
+ return $result;
}
@@ -1166,15 +1169,15 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP;
-
- $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&add_user=$user");
+
+ $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&add_user=$user");
- if ( $respcode != 100 && $respcode != 301) {
- error( "Can't add user from group");
- return false;
- }
-
- return true;
+ if ( $respcode != 100 && $respcode != 301) {
+ error( "Can't add user from group");
+ return false;
+ }
+
+ return true;
}*/
@@ -1188,145 +1191,145 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP;
-
- $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&delete_user=$user");
+
+ $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&delete_user=$user");
- if ( $respcode != 100 && $respcode != 301) {
- error( "Can't remove user from group");
- return false;
- }
-
- return true;
+ if ( $respcode != 100 && $respcode != 301) {
+ error( "Can't remove user from group");
+ return false;
+ }
+
+ return true;
}*/
function liveclassroom_api_get_room_list($userid,$course) {
- global $CFG;
-
- $final_list = "&attribute=class_id&attribute=longname&filter00=archive&filter00value=0&AccessUser=$userid";
- $enc_list = str_replace(" ", "+", $final_list);
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
+ global $CFG;
+
+ $final_list = "&attribute=class_id&attribute=longname&filter00=archive&filter00value=0&AccessUser=$userid";
+ $enc_list = str_replace(" ", "+", $final_list);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
- $line = explode("\n",$data);
- $rooms=array();
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ $line = explode("\n",$data);
+ $rooms=array();
- for($i=1;$i<sizeof($line)-2;$i=$i+3){
- $room[0] = liveclassroom_parse_line($line[$i],"class_id="); //class_id
- $room[1]= liveclassroom_parse_line($line[$i+1],"longname="); //longname
- array_push($rooms,$room);
- }
- return $rooms;
+ for($i=1;$i<sizeof($line)-2;$i=$i+3){
+ $room[0] = liveclassroom_parse_line($line[$i],"class_id="); //class_id
+ $room[1]= liveclassroom_parse_line($line[$i+1],"longname="); //longname
+ array_push($rooms,$room);
+ }
+ return $rooms;
}
function inputRightPlace($array, $value){
-
- $return = array();
- foreach($array as $room){
- if(strcmp($room[0],$value[0])<0) array_push($return,$room);
- else array_push($return,$value);
- }
- return $return;
+
+ $return = array();
+ foreach($array as $room){
+ if(strcmp($room[0],$value[0])<0) array_push($return,$room);
+ else array_push($return,$value);
+ }
+ return $return;
}
/*
-* List all the rooms and their archives associed + the orphaned archives list
+* List all the rooms and their archives associed + the orphaned archives list
*
* @param $userid : the user id of the current user
* @param $course : the current course
*
* Return a table composed of 3 parts:
-* - a table who list all the lecture rooms and their archives associed
-* - a table who list all the breakout rooms and their archives associed
-* - a table who list all the orphaned archives
+* - a table who list all the lecture rooms and their archives associed
+* - a table who list all the breakout rooms and their archives associed
+* - a table who list all the orphaned archives
**/
function liveclassroom_api_get_roomandarchive_list($userid,$course) {
-
- global $CFG;
-
- $final_list = "&attribute=class_id&attribute=preview&attribute=longname&attribute=archive&AccessUser=$userid";
- $enc_list = str_replace(" ", "+", $final_list);
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
+
+ global $CFG;
+
+ $final_list = "&attribute=class_id&attribute=preview&attribute=longname&attribute=archive&AccessUser=$userid";
+ $enc_list = str_replace(" ", "+", $final_list);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
- $studentuserid = liveclassroom_api_get_student_user_id($course->id);
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+ $studentuserid = liveclassroom_api_get_student_user_id($course->id);
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $line = explode("\n",$data);
+ $line = explode("\n",$data);
- $tabarchive = array();
- $orphanedarchives = array();
- $rooms=array(); //lecture rooms table
- $rooms1=array();//breakout rooms table
-
- for($i=1;$i<sizeof($line)-4;$i=$i+5){
+ $tabarchive = array();
+ $orphanedarchives = array();
+ $rooms=array(); //lecture rooms table
+ $rooms1=array();//breakout rooms table
+
+ for($i=1;$i<sizeof($line)-4;$i=$i+5){
- if((liveclassroom_parse_line($line[$i+3],"archive=")!=1)){ // it is a room
+ if((liveclassroom_parse_line($line[$i+3],"archive=")!=1)){ // it is a room
- $room[0] = liveclassroom_parse_line($line[$i+1],"class_id="); //class_id
- $room[1]= liveclassroom_parse_line($line[$i+2],"longname="); //longname
- $room[2]= liveclassroom_parse_line($line[$i],"preview="); //preview
- $room[3]= array();
-
- if(liveclassroom_api_role_user_room($room[0], $studentuserid)=='Student') { //lecture room
+ $room[0] = liveclassroom_parse_line($line[$i+1],"class_id="); //class_id
+ $room[1]= liveclassroom_parse_line($line[$i+2],"longname="); //longname
+ $room[2]= liveclassroom_parse_line($line[$i],"preview="); //preview
+ $room[3]= array();
+
+ if(liveclassroom_api_role_user_room($room[0], $studentuserid)=='Student') { //lecture room
- $rooms[$room[0]]=$room;
- }
- else { //Breakout room
-
- $rooms1[$room[0]]=$room;
- }
+ $rooms[$room[0]]=$room;
+ }
+ else { //Breakout room
+
+ $rooms1[$room[0]]=$room;
+ }
- }
- else { // it is an archive
-
- $archiveid=liveclassroom_parse_line($line[$i+1],"class_id=");// larchive id
- $roomid = substr($archiveid,0,strlen($archiveid)-18);//room id
-
- $archive=array();
- $archive[0]=$archiveid;
- $archive[1]=liveclassroom_parse_line($line[$i+2],"longname="); //longname
- $archive[2]=liveclassroom_parse_line($line[$i],"preview=");
- $archive[3]=$roomid; //preview
- array_push($tabarchive,$archive);
-
- }
- }
- foreach($tabarchive as $value) {
- if (array_key_exists($value[3],$rooms)) { //lecture room table
- array_push($rooms[$value[3]][3],$value);
- }
- else if (array_key_exists($value[3],$rooms1)) { //breakout room table
- array_push($rooms1[$value[3]][3],$value);
- }
- else { //orphaned archive
- array_push($orphanedarchives,$value);
- }
- }
-
- $table_result[0]=$rooms;
- $table_result[1]=$rooms1;
- $table_result[2]=$orphanedarchives;
+ }
+ else { // it is an archive
+
+ $archiveid=liveclassroom_parse_line($line[$i+1],"class_id=");// larchive id
+ $roomid = substr($archiveid,0,strlen($archiveid)-18);//room id
+
+ $archive=array();
+ $archive[0]=$archiveid;
+ $archive[1]=liveclassroom_parse_line($line[$i+2],"longname="); //longname
+ $archive[2]=liveclassroom_parse_line($line[$i],"preview=");
+ $archive[3]=$roomid; //preview
+ array_push($tabarchive,$archive);
+
+ }
+ }
+ foreach($tabarchive as $value) {
+ if (array_key_exists($value[3],$rooms)) { //lecture room table
+ array_push($rooms[$value[3]][3],$value);
+ }
+ else if (array_key_exists($value[3],$rooms1)) { //breakout room table
+ array_push($rooms1[$value[3]][3],$value);
+ }
+ else { //orphaned archive
+ array_push($orphanedarchives,$value);
+ }
+ }
+
+ $table_result[0]=$rooms;
+ $table_result[1]=$rooms1;
+ $table_result[2]=$orphanedarchives;
- return $table_result;
+ return $table_result;
}
/*
-* List all the rooms and their archives associed + the orphaned archives list
+* List all the rooms and their archives associed + the orphaned archives list
*
* @param $xmldoc : the DOM document to add the list
* @param $userid : the user id of the current user
@@ -1337,132 +1340,132 @@
**/
function liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher) {
- global $CFG;
+ global $CFG;
-
- $final_list = "&attribute=class_id&attribute=preview&attribute=longname&filter01=archive&filter01value=0&AccessUser=$userid";
- $enc_list = str_replace(" ", "+", $final_list);
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
-
- $studentuserid = liveclassroom_api_get_student_user_id($courseid);
-
- preg_match("(\d*)", $data, $matches);
- $respcode = $matches[0];
-
- if ( $respcode != 100) {
- return false;
- }
+
+ $final_list = "&attribute=class_id&attribute=preview&attribute=longname&filter01=archive&filter01value=0&AccessUser=$userid";
+ $enc_list = str_replace(" ", "+", $final_list);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
+
+ $studentuserid = liveclassroom_api_get_student_user_id($courseid);
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
- $listElements = $xmldoc->create_element('listElements');
- //$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent');
+ $listElements = $xmldoc->create_element('listElements');
+ //$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent');
- $line = explode("\n",$data);
-
- $tabarchive = array();
- $orphanedArchives = liveclassroom_api_get_archive_list($userid);
-
- add_to_log($COURSE->id, "liveclassroom", "archive", "action", sizeof($orphanedArchives));
- $nbrClosedArchive = 0;
-
- for($i=1;$i<sizeof($line)-3;$i=$i+4){
+ $line = explode("\n",$data);
+
+ $tabarchive = array();
+ $orphanedArchives = liveclassroom_api_get_archive_list($userid);
+
+ add_to_log($COURSE->id, "liveclassroom", "archive", "action", sizeof($orphanedArchives));
+ $nbrClosedArchive = 0;
+
+ for($i=1;$i<sizeof($line)-3;$i=$i+4){
- $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
+ $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->create_element('listElement');
+ $element = $xmldoc->create_element('listElement');
-
- $roomParameters = $xmldoc->create_element('listElementParameters');
-
- if ($isteacher=="1")
+
+ $roomParameters = $xmldoc->create_element('listElementParameters');
+
+ if ($isteacher=="1")
{
$tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid);
add_to_log($COURSE->id, "liveclassroom", "archiveteacher", "action", sizeof($tabarchive));
- foreach ($tabarchive as $tabarchive_value) {
- unset($orphanedArchives[$tabarchive_value[1]]) ;
- }
+ foreach ($tabarchive as $tabarchive_value) {
+ unset($orphanedArchives[$tabarchive_value[1]]) ;
+ }
}
else //just the open archive
{
$tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid);
add_to_log($COURSE->id, "liveclassroom", "archivestudent", "action", sizeof($tabarchive));
$tabarchiveall = $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid);
- foreach ($tabarchiveall as $tabarchiveall_value) {
- unset($orphanedArchives[$tabarchiveall_value[1]]) ;
- }
+ foreach ($tabarchiveall as $tabarchiveall_value) {
+ unset($orphanedArchives[$tabarchiveall_value[1]]) ;
+ }
}
-
- if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
- $type = $xmldoc->create_element('typeOfElement');
- $type->append_child($xmldoc->create_text_node("MainLecture"));
- $positionValue = 1;
- }
- else{
- $type = $xmldoc->create_element('typeOfElement');
- $type->append_child($xmldoc->create_text_node("Discussion"));
- $positionValue = 2;
- }
-
-
- $position = $xmldoc->create_element('position');
- $position->append_child($xmldoc->create_text_node("$positionValue"));
- $id = $xmldoc->create_element('id');
- $id->append_child($xmldoc->create_text_node("$roomid"));
- $longname = $xmldoc->create_element('nameDisplay');
- $longname->append_child($xmldoc->create_text_node("$roomname"));
- $preview = $xmldoc->create_element('preview');
- if ($roompreview=="1")
+
+ if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
+ $type = $xmldoc->create_element('typeOfElement');
+ $type->append_child($xmldoc->create_text_node("MainLecture"));
+ $positionValue = 1;
+ }
+ else{
+ $type = $xmldoc->create_element('typeOfElement');
+ $type->append_child($xmldoc->create_text_node("Discussion"));
+ $positionValue = 2;
+ }
+
+
+ $position = $xmldoc->create_element('position');
+ $position->append_child($xmldoc->create_text_node("$positionValue"));
+ $id = $xmldoc->create_element('id');
+ $id->append_child($xmldoc->create_text_node("$roomid"));
+ $longname = $xmldoc->create_element('nameDisplay');
+ $longname->append_child($xmldoc->create_text_node("$roomname"));
+ $preview = $xmldoc->create_element('preview');
+ if ($roompreview=="1")
{
- $preview->append_child($xmldoc->create_text_node("unavailable"));
+ $preview->append_child($xmldoc->create_text_node("unavailable"));
}
else
{
$preview->append_child($xmldoc->create_text_node("available"));
}
-
-
- $roomParameters->append_child($type);
- $roomParameters->append_child($position);
- $roomParameters->append_child($id);
- $roomParameters->append_child($longname);
- $roomParameters->append_child($preview);
- $element->append_child($roomParameters);
-
- // $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid);
-
- if(sizeof($tabarchive)>0){ //archives
-
- $nbrClosedArchive = 0;
-
- $archives = $xmldoc->create_element('archives');
-
- foreach ($tabarchive as $tabarchive_value) {
- $archive = $xmldoc->create_element('archive');
-
- $archiveid = $xmldoc->create_element('id');
- $archiveid->append_child($xmldoc->create_text_node("$tabarchive_value[1]"));
- $archivename = $xmldoc->create_element('nameDisplay');
- $archivename->append_child($xmldoc->create_text_node("$tabarchive_value[2]"));
- $archivepreview = $xmldoc->create_element('preview');
-
-
- if($tabarchive_value[0]=="1") {
- $archivepreview->append_child($xmldoc->create_text_node("unavailable"));
- $nbrClosedArchive++;
- }
- else {
- $archivepreview->append_child($xmldoc->create_text_node("available"));
- }
- $archive->append_child($archiveid);
- $arc...
[truncated message content] |
|
From: <hu...@us...> - 2007-01-04 11:17:37
|
Revision: 163
http://svn.sourceforge.net/hw4mdl/?rev=163&view=rev
Author: hugues
Date: 2007-01-04 03:17:35 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10616
- Fixed the enabling/disableing of radio butons
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/js/hwCommons.js
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 10:45:30 UTC (rev 162)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 11:17:35 UTC (rev 163)
@@ -811,21 +811,21 @@
// ------------------ CHAT --------------------
// CHAT PANEL INFO
$panelSettings = $xmldoc->create_element('panelSettings');
- $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Chat'), "4", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Chat'), "4", 'none'));
// CHAT CONTENT
$panelContent = $xmldoc->create_element('panelContent');
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
+ $plid = $xmldoc->create_element('id');
$plid->append_child($xmldoc->create_text_node(""));
$panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLineStyle->append_child($xmldoc->create_text_node("visible"));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
+ $style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
$colspan = $xmldoc->create_element('colspan');
@@ -834,11 +834,15 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_chat", "name" => "chatenable") ;
+ $parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_chat", "name" => "chatEnabled", "onclick" => "doChangeChat()") ;
if($action=='update'){
- if($room_info['chatenable']==1) $parameters['checked']=true;
+ if($room_info['chatenable']==1) {
+ $parameters['checked']=true;
+ }
}
- else $parameters['checked']=true;
+ else {
+ $parameters['checked']=true;
+ }
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use text chat")) ));
@@ -848,7 +852,7 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
+ $plid = $xmldoc->create_element('id');
$plid->append_child($xmldoc->create_text_node(""));
$panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
@@ -864,11 +868,19 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "1", "id" => "privateenabled", "name" => "privatechatenable") ;
+ $parameters=array("type" => "radio", "value" => "1", "id" => "privatechatenabled",
+ "name" => "privateChatEnabled") ;
if($action=='update'){
- if($room_info['privatechatenable']==1)$parameters['checked']=true;
+ if($room_info['privatechatenable']==1) {
+ $parameters['checked']=true;
+ }
}
- else $parameters['checked']=true;
+ else {
+ $parameters['checked']=true;
+ }
+ if ($room_info['chatenable'] == 0 ) {
+ $parameters['disabled'] = true;
+ }
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public and Private text chat")) ));
@@ -894,10 +906,15 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "0", "id" => "privatedisbledd", "name" => "privatechatenable") ;
+ $parameters=array("type" => "radio", "value" => "0", "id" => "privatedisbledd", "name" => "privateChatEnabled") ;
if($action=='update'){
- if($room_info['privatechatenable']==0) $parameters['checked']=true;
+ if($room_info['privatechatenable']==0) {
+ $parameters['checked']=true;
+ }
}
+ if ($room_info['chatenable'] == 0 ) {
+ $parameters['disabled'] = true;
+ }
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public text chat only")) ));
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2007-01-04 10:45:30 UTC (rev 162)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2007-01-04 11:17:35 UTC (rev 163)
@@ -16,8 +16,10 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 10:45:33
|
Revision: 162
http://svn.sourceforge.net/hw4mdl/?rev=162&view=rev
Author: hugues
Date: 2007-01-04 02:45:30 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10613
reverting the changes of rev 159
Revision Links:
--------------
http://svn.sourceforge.net/hw4mdl/?rev=159&view=rev
Modified Paths:
--------------
trunk/moodle/lang/en/liveclassroom.php
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/lang/fr/liveclassroom.php
trunk/moodle/lang/fr_utf8/liveclassroom.php
Modified: trunk/moodle/lang/en/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
+++ trunk/moodle/lang/en/liveclassroom.php 2007-01-04 10:45:30 UTC (rev 162)
@@ -116,7 +116,7 @@
$string['Third-party Conference Call'] = "Third-party Conference Call";
$string['Features'] = "Features";
$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
-$string['Enable Students to use AppShare'] = "Enable Students to use Screen Grab";
+$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
$string['Enable Archiving'] = "Enable Archiving";
$string['Enable Appshare'] = "Enable Appshare";
$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 10:45:30 UTC (rev 162)
@@ -116,7 +116,7 @@
$string['Third-party Conference Call'] = "Third-party Conference Call";
$string['Features'] = "Features";
$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
-$string['Enable Students to use AppShare'] = "Enable Students to use Screen Grab";
+$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
$string['Enable Archiving'] = "Enable Archiving";
$string['Enable Appshare'] = "Enable Appshare";
$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
Modified: trunk/moodle/lang/fr/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
+++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 10:45:30 UTC (rev 162)
@@ -118,7 +118,7 @@
$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
$string['Features'] = "Fonctions";
$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
-$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran.";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de partage d'écran.";
$string['Enable Archiving'] = "Autoriser l'Archivage";
$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
+++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 10:45:30 UTC (rev 162)
@@ -118,7 +118,7 @@
$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
$string['Features'] = "Fonctions";
$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
-$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran.";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de partage d'écran.";
$string['Enable Archiving'] = "Autoriser l'Archivage";
$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 10:22:55
|
Revision: 161
http://svn.sourceforge.net/hw4mdl/?rev=161&view=rev
Author: hugues
Date: 2007-01-04 02:22:50 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10615
- Displays a launcher link
Modified Paths:
--------------
trunk/moodle/lang/en/liveclassroom.php
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/lang/fr/liveclassroom.php
trunk/moodle/lang/fr_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/generateSettings.php
Modified: trunk/moodle/lang/en/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
+++ trunk/moodle/lang/en/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
@@ -132,6 +132,7 @@
$string['Limited: '] = "Limited: ";
$string['Enable guest access'] = "Enable guest access";
$string['Room Id: '] = "Room Id: ";
+$string['launcherLink'] = "Launcher link: ";
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
@@ -132,6 +132,7 @@
$string['Limited: '] = "Limited: ";
$string['Enable guest access'] = "Enable guest access";
$string['Room Id: '] = "Room Id: ";
+$string['launcherLink'] = "Launcher link: ";
Modified: trunk/moodle/lang/fr/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
+++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
@@ -134,6 +134,7 @@
$string['Limited: '] = "Limite : ";
$string['Enable guest access'] = "Autoriser l'accès Invité";
$string['Room Id: '] = "Room Id : ";
+$string['launcherLink'] = "Lien de lancement : ";
Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
+++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161)
@@ -134,6 +134,7 @@
$string['Limited: '] = "Limite : ";
$string['Enable guest access'] = "Autoriser l'accès Invité";
$string['Room Id: '] = "Room Id : ";
+$string['launcherLink'] = "Lien de lancement : ";
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 09:55:29 UTC (rev 160)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 10:22:50 UTC (rev 161)
@@ -1144,16 +1144,18 @@
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label",
- $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id: ")) ));
+ $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("launcherLink")) ));
$panelLine->append_child($linepart);
-
- $parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ;
+
+ $launcher_link = $CFG->liveclassroom_servername."/launcher.cgi?room=".$roomId;
+ $parameters=array("type" => "text", "id" => "link",
+ "name" => "link", "maxlength" => "50",
+ "size" => strlen($launcher_link));
if($action=='update'){
- $parameters['value']=$roomId;
+ $parameters['value']=$launcher_link;
}
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
-
$panelContent->append_child($panelLine);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 09:58:31
|
Revision: 160
http://svn.sourceforge.net/hw4mdl/?rev=160&view=rev
Author: hugues
Date: 2007-01-04 01:55:29 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10615
- Updated the display of the Room ID: labrel and ield when guest access os enabled
- Updated a typo in french
Modified Paths:
--------------
trunk/moodle/lang/fr/liveclassroom.php
trunk/moodle/lang/fr_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/generateSettings.php
Modified: trunk/moodle/lang/fr/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
+++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
@@ -133,7 +133,7 @@
$string['Unlimited'] = "Illimité";
$string['Limited: '] = "Limite : ";
$string['Enable guest access'] = "Autoriser l'accès Invité";
-$string['Room Id: '] = "Room Id&bnsp;: ";
+$string['Room Id: '] = "Room Id : ";
Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
+++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160)
@@ -133,7 +133,7 @@
$string['Unlimited'] = "Illimité";
$string['Limited: '] = "Limite : ";
$string['Enable guest access'] = "Autoriser l'accès Invité";
-$string['Room Id: '] = "Room Id&bnsp;: ";
+$string['Room Id: '] = "Room Id : ";
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 07:58:56 UTC (rev 159)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 09:55:29 UTC (rev 160)
@@ -1111,6 +1111,7 @@
$linepart->append_child($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAcess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ;
if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){
+ $guest_access_enabled = true;
$parameters['checked']=true;
}
@@ -1122,12 +1123,11 @@
$panelContent->append_child($panelLine);
- // SIXTH LINE - HIDE
+ // SIXTH LINE - Hide when guest access disabled
$panelLine = $xmldoc->create_element('panelLine');
-
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node("hide"));
+ $panelLineStyle->append_child($xmldoc->create_text_node($guest_access_enabled?"visible":"hide"));
$panelLine->append_child($panelLineStyle);
$panelLineId = $xmldoc->create_element('id');
$panelLineId->append_child($xmldoc->create_text_node("launcher_link_row"));
@@ -1135,7 +1135,7 @@
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(" "));
+ $style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
$colspan = $xmldoc->create_element('colspan');
$colspan->append_child($xmldoc->create_text_node("2"));
@@ -1143,7 +1143,8 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id:")) ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label",
+ $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id: ")) ));
$panelLine->append_child($linepart);
$parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ;
@@ -1178,7 +1179,7 @@
$xmldoc->append_child($root);
- $xmldoc->dump_file("choice.xml", false, true);
+ $xmldoc->dump_file("/Users/hugues/Sites/moodledata/choice.xml", false, true);
$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
$finalstring = str_replace("\n", '', $xmlstring);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-04 07:58:59
|
Revision: 159
http://svn.sourceforge.net/hw4mdl/?rev=159&view=rev
Author: hugues
Date: 2007-01-03 23:58:56 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10613
- Updated the language in french and english
Modified Paths:
--------------
trunk/moodle/lang/en/liveclassroom.php
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/lang/fr/liveclassroom.php
trunk/moodle/lang/fr_utf8/liveclassroom.php
Modified: trunk/moodle/lang/en/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en/liveclassroom.php 2007-01-03 17:07:00 UTC (rev 158)
+++ trunk/moodle/lang/en/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
@@ -116,7 +116,7 @@
$string['Third-party Conference Call'] = "Third-party Conference Call";
$string['Features'] = "Features";
$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
-$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
+$string['Enable Students to use AppShare'] = "Enable Students to use Screen Grab";
$string['Enable Archiving'] = "Enable Archiving";
$string['Enable Appshare'] = "Enable Appshare";
$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-03 17:07:00 UTC (rev 158)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
@@ -116,7 +116,7 @@
$string['Third-party Conference Call'] = "Third-party Conference Call";
$string['Features'] = "Features";
$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
-$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
+$string['Enable Students to use AppShare'] = "Enable Students to use Screen Grab";
$string['Enable Archiving'] = "Enable Archiving";
$string['Enable Appshare'] = "Enable Appshare";
$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
Modified: trunk/moodle/lang/fr/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr/liveclassroom.php 2007-01-03 17:07:00 UTC (rev 158)
+++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
@@ -118,7 +118,7 @@
$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
$string['Features'] = "Fonctions";
$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
-$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser le partage d'Applications <i>AppShare</i>";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran.";
$string['Enable Archiving'] = "Autoriser l'Archivage";
$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-03 17:07:00 UTC (rev 158)
+++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159)
@@ -118,7 +118,7 @@
$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
$string['Features'] = "Fonctions";
$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
-$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser le partage d'Applications <i>AppShare</i>";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran.";
$string['Enable Archiving'] = "Autoriser l'Archivage";
$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-03 17:07:04
|
Revision: 158
http://svn.sourceforge.net/hw4mdl/?rev=158&view=rev
Author: hugues
Date: 2007-01-03 09:07:00 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=9983
- Inserts the revision number in the package name
Modified Paths:
--------------
trunk/moodle/bin/package.sh
Modified: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh 2007-01-03 16:54:33 UTC (rev 157)
+++ trunk/moodle/bin/package.sh 2007-01-03 17:07:00 UTC (rev 158)
@@ -2,8 +2,13 @@
DEBUG=1
-VERSION=0.9-SNAPSHOT
+SVN_URL_BASE=https://svn.sourceforge.net/svnroot/hw4mdl
+SVN_URL_TRUNK=${SVN_URL_BASE}/trunk
+SVN_URL_TAG=${SVN_URL_BASE}/tags/${SVN_TAG_PARAM}
+
+VERSION=0.9-SNAPSHOT_rev`svn info ${SVN_URL_BASE} | awk '/Revision/ { print $2;}'`
+
TARGET=liveclassroom
#TARGET=liveclassroom, voicetool, pronto
@@ -14,9 +19,6 @@
SVN_PASS_PARAM=
SVN_TAG_PARAM=${TARGET}_${VERSION}
-SVN_URL_BASE=https://svn.sourceforge.net/svnroot/hw4mdl
-SVN_URL_TRUNK=${SVN_URL_BASE}/trunk
-SVN_URL_TAG=${SVN_URL_BASE}/tags/${SVN_TAG_PARAM}
if [ -n "$DEBUG" ]; then
echo "Using SVN_TRUNK"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-03 16:54:37
|
Revision: 157
http://svn.sourceforge.net/hw4mdl/?rev=157&view=rev
Author: hugues
Date: 2007-01-03 08:54:33 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
Updated the french l12n files
Modified Paths:
--------------
trunk/moodle/lang/fr/liveclassroom.php
Added Paths:
-----------
trunk/moodle/lang/en/
trunk/moodle/lang/en/liveclassroom.php
trunk/moodle/lang/fr_utf8/
trunk/moodle/lang/fr_utf8/liveclassroom.php
Added: trunk/moodle/lang/en/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en/liveclassroom.php (rev 0)
+++ trunk/moodle/lang/en/liveclassroom.php 2007-01-03 16:54:33 UTC (rev 157)
@@ -0,0 +1,145 @@
+<?PHP
+/******************************************************************************
+ * *
+ * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+ * *
+ * COPYRIGHT: *
+ * This software is the property of Horizon Wimba. *
+ * You can redistribute it and/or modify it under the terms of *
+ * the GNU General Public License as published by the *
+ * Free Software Foundation. *
+ * *
+ * WARRANTIES: *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with the Horizon Wimba Moodle Integration; *
+ * if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
+ * *
+ * Author: Hugues Pisapia *
+ * *
+ * Date: 15th April 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id: liveclassroom.php 155 2007-01-03 10:48:50Z hugues $ */
+// Configuration
+$string['modulename'] = 'Live Classroom';
+$string['modulenameplural'] = 'Live Classrooms';
+$string['serverconfiguration'] = 'Live Classroom Server Configuration';
+$string['explainserverconfiguration'] = 'This is the Live Classroom Server Configuration.';
+$string['servername'] = 'Live Classroom Server Name';
+$string['configservername'] = 'Enter the server name in the form http://AAA.BBB.CCC.DDD';
+$string['adminusername'] = 'Admin User Name';
+$string['configadminusername'] = 'Enter the admin username';
+$string['adminpassword'] = 'Admin Password';
+$string['configadminpassword'] = 'Enter the admin password';
+$string['settinguniqueid'] = 'Unique Prefix ID';
+$string['configsettinguniqueid'] = 'A unique prefix id so that multiple moodle instances can share one Live Classroom Server without collision.';
+$string['lcversion'] = 'Live Classroom Version';
+$string['integrationversion'] = 'Integration Version';
+$string['emptyAdminUsername'] = 'Admin user name is empty';
+$string['emptyAdminPassword'] = 'Admin user password is empty';
+
+$string['wrongconfigurationURLunavailable'] = 'Wrong server configuration, URL unavailable, please see the logs to fix the error';
+$string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error';
+$string['wrongAdminPassword'] = 'Wrong password';
+$string['wrongadminpass'] = 'Invalid Authentication, please check your admin name or password';
+$string['trailingSlash'] = 'The Live Classroom Server Name ends with a trailing \'/\'. Please remove it and submit the configuration again.';
+
+//Add activity form
+$string['name'] = 'Name';
+$string['liveclassroomtype'] = 'Room associated';
+$string['topicformat'] = 'Topic for this activity';
+$string['weeksformat'] = 'Week for this activity';
+$string['requiredfields'] = 'Required Fields';
+$string['topicdisplay'] = 'Topic';
+$string['firstsection'] = 'Section 0';
+
+$string['linksfor'] = 'Access Live Classrooms for ';
+$string['accessroomsteacher'] = 'Access To Live Classroom and Archives - Clik here if the popup didn\'t start';
+$string['accessroomsstudent'] = 'Access To Live Classroom - Clik here if the popup didn\'t start';
+$string['managerooms'] = 'Manage Rooms and Archives (Instructors)';
+$string['labelcreateroom'] = 'New Room Name: ';
+$string['buttoncreateroom'] = 'Create Room';
+$string['roomcreated'] = 'Room was successfully created';
+
+
+
+$string['wizard.text.1'] = 'Note: The first time that you enter the Live Classroom you will need to run the';
+$string['wizard.text.2'] = 'setup wizard';
+$string['wizard.text.3'] = 'in order to make sure your computer is ready.';
+
+$string['runwizard'] = 'Run Wizard';
+
+$string['wizard.text2.1'] = 'Run the';
+$string['wizard.text2.2'] = 'setup wizard';
+$string['wizard.text2.3'] = 'to make sure that your computer is ready to use the Live Classroom';
+
+
+$string['lcpopupshouldappear'] = 'The Live Classroom should now appear.<br/> if it does not, please click <a href=\"javascript:startActivity ();\">this link</a> to open it. ';
+
+
+$string['roomCreated'] = "Your room has been successfully created.";
+$string['roomUpdated'] = "Your room has been successfully updated.";
+$string['roomDeleted'] = "Your room has been successfully deleted.";
+$string['archiveDeleted'] = "Your archive has been successfully deleted.";
+$string['notfind'] = "Invalid Live Classroom parameters. Please contact your administrator for more information.";
+$string['room'] = "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
+$string['connection'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
+$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
+$string['signature'] = "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
+$string['board'] = "Invalid Voice Board parameters. Please contact your administrator for more information. ";
+
+$string['Settings'] = "Settings";
+$string['Live Classroom'] = "Live Classroom";
+$string['Room Info'] = "Room Info";
+$string['Title: '] = "Title: ";
+$string['Description: '] = "Description: ";
+$string['Type : '] = "Type: ";
+$string['Lecture room'] = "Lecture Room";
+$string['Instructors lead the presentation'] = "Instructors lead the presentation";
+$string['Discussion room'] = "Discussion Room";
+$string['Students and Instructors have the same rigths'] = "Students and Instructors have the same rigths";
+$string['Media'] = "Media";
+$string['Audio'] = "Audio";
+$string['Enable Students to use the phone'] = "Enable Students to use the phone";
+$string['Note: Instructors can always use the phone'] = "Note: Instructors can always use the phone";
+$string['Enable Student\'s microphones at presentation start'] = "Enable Student's microphones at presentation start";
+$string['One-way Video'] = "One-way Video";
+$string['Presenter uses RealProducer'] = "Presenter uses RealProducer";
+$string['Room Id: '] = "Room Id: ";
+$string['Third-party Conference Call'] = "Third-party Conference Call";
+$string['Features'] = "Features";
+$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
+$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
+$string['Enable Archiving'] = "Enable Archiving";
+$string['Enable Appshare'] = "Enable Appshare";
+$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
+$string['Chat'] = "Chat";
+$string['Enable Students to use text chat'] = "Enable Students to use text chat";
+$string['Enable Public and Private text chat'] = "Enable Public and Private text chat";
+$string['Enable Public text chat only'] = "Enable Public text chat only";
+$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Students are always able to chat with presenters and/or technical help";
+$string['Access'] = "Access";
+$string['Available'] = "Available";
+$string['Maximum users: '] = "Maximum users: ";
+$string['Unlimited'] = "Unlimited";
+$string['Limited: '] = "Limited: ";
+$string['Enable guest access'] = "Enable guest access";
+$string['Room Id: '] = "Room Id: ";
+
+
+
+
+//First Time Use - not use yet
+$string['firstRoom'] = 'Main classroom';
+$string['secondRoom'] = 'Group 1';
+$string['thirdRoom'] = 'Group 2';
+$string['fourthRoom'] = 'Group 3';
+
+?>
Modified: trunk/moodle/lang/fr/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr/liveclassroom.php 2007-01-03 11:48:43 UTC (rev 156)
+++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-03 16:54:33 UTC (rev 157)
@@ -28,21 +28,41 @@
/* $Id$ */
+//------
+// Configuration
$string['modulename'] = 'Live Classroom';
$string['modulenameplural'] = 'Live Classrooms';
$string['serverconfiguration'] = 'Configuration du Serveur Live Classroom';
$string['explainserverconfiguration'] = 'Voici la configuration du serveur Live Classroom.';
$string['servername'] = 'Nom du Serveur';
-$string['configservername'] = 'Entrez le nom du serveur sous la forme http://AAA.BBB.CCC.DDD/';
-$string['adminusername'] = 'Nom d\'Utilisateur Admin';
-$string['configadminusername'] = 'Entrew le nom d\'utilisateur de l\'administrateur';
-$string['adminpassword'] = 'Mot de Passe';
-$string['configadminpassword'] = 'Entrez le mot de pass de l\'administrateur';
+$string['configservername'] = 'Entrez le nom du serveur sous la forme http://AAA.BBB.CCC.DDD';
+$string['adminusername'] = 'Nom d\'Utilisateur Administrateur';
+$string['configadminusername'] = 'Entrez le nom d\'utilisateur de l\'administrateur';
+$string['adminpassword'] = 'Mot de Passe Administrateur';
+$string['configadminpassword'] = 'Entrez le mot de passe de l\'administrateur';
$string['settinguniqueid'] = 'Unique Prefix ID';
$string['configsettinguniqueid'] = 'Un prefix unique destiné à permettre plusieurs instance de Moodle de partager un Serveur Live Classroom sans problème.';
+$string['lcversion'] = 'Version du Serveur Live Classroom';
+$string['integrationversion'] = 'Version du module d\'Integration';
+$string['emptyAdminUsername'] = 'Nom d\'Utilisateur Administrateur vide';
+$string['emptyAdminPassword'] = 'Mot de Passe Administrateur vide';
-$string['alert.submit'] = 'Etes-vous sûr que ces paramètres sont corrects ?';
+$string['wrongconfigurationURLunavailable'] = 'Configuration incorrecte, l\'URL n\'est pas disponible. Plus d\'information est disponible dans les journaux d\'erreurs';
+$string['wrongconfigurationURLincorrect'] = 'Configuration incorrecte, l\'URL est incorrecte. Plus d\'information est disponible dans les journaux d\'erreurs';
+$string['wrongAdminPassword'] = 'Mot de Passe incorrect';
+$string['wrongadminpass'] = 'Authentification invalide. Merci de vérifier vos identifiants.';
+$string['trailingSlash'] = 'Le Nom du Serveur se termine par le caractère \'/\'. Veuillez le supprimer et soumettre le formulaire à nouveau.';
+//Add activity form
+$string['name'] = 'Nom';
+$string['liveclassroomtype'] = 'Live Classroom Associée';
+$string['topicformat'] = 'Sujet de l\activité';
+$string['weeksformat'] = 'Semaine de l\'activité';
+$string['requiredfields'] = 'Champs nécessaires';
+$string['topicdisplay'] = 'Sujet';
+$string['firstsection'] = 'Section 0';
+
+
$string['linksfor'] = 'Acces Live Classrooms pour ';
$string['accessrooms'] = 'Acces aux Live Classrooms at aux Archives';
$string['managerooms'] = 'Gestion des Salles et des Archives (Instructeurs)';
@@ -61,4 +81,67 @@
$string['wizard.text2.2'] = 'l\'Assistant de Configuration';
$string['wizard.text2.3'] = 'pour être certain que votre ordinateur est prêt à utiliser les Live Classrooms';
+
+
+$string['lcpopupshouldappear'] = 'La Live Classroom devrait maintenant apparaître.<br/> Dans le cas contraire, cliquez sur <a href=\"javascript:startActivity ();\">ce lien</a> pour l\'ouvrir.';
+
+
+$string['roomCreated'] = "Votre Live Classroom a été crée avec succès.";
+$string['roomUpdated'] = "Votre Live Classroom a été mise à jour avec succès.";
+$string['roomDeleted'] = "Votre Live Classroom a été supprimée jour avec succès.";
+$string['archiveDeleted'] = "Votre Archive a été supprimée jour avec succès.";
+
+$string['notfind'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['room'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['connection'] = "Moodle ne peut se connecter au serveur de Live Classroom. Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
+$string['signature'] = "Connexion invalide à Live Classroom. Merci de contacter votre administrateur pour plus d'information.";
+
+$string['Settings'] = "Paramètres";
+$string['Live Classroom'] = "Live Classroom";
+$string['Room Info'] = "Informations";
+$string['Title: '] = "Titre : ";
+$string['Description: '] = "Description : ";
+$string['Type : '] = "Type : ";
+$string['Lecture room'] = "Salle de Cours";
+$string['Instructors lead the presentation'] = "Les Instructeurs dirigent la présentation";
+$string['Discussion room'] = "Salle de Discussion";
+$string['Students and Instructors have the same rigths'] = "Étudiants et Instructeurs ont les mêmes droits.";
+$string['Media'] = "Média";
+$string['Audio'] = "Audio";
+$string['Enable Students to use the phone'] = "Permettre aux étudiants d'utiliser le téléphone";
+$string['Note: Instructors can always use the phone'] = "Note: Les Instructeurs peuvent toujours utiliser le téléphone";
+$string['Enable Student\'s microphones at presentation start'] = "Permettre aux étudiants d'utiliser le microphone au démarrage de la présentation.";
+$string['One-way Video'] = "Vidéo mono-point";
+$string['Presenter uses RealProducer'] = "Les Presenter utilisent RealProducer";
+$string['Room Id: '] = "Room Id : ";
+$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
+$string['Features'] = "Fonctions";
+$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser le partage d'Applications <i>AppShare</i>";
+$string['Enable Archiving'] = "Autoriser l'Archivage";
+$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
+$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
+$string['Chat'] = "Chat";
+$string['Enable Students to use text chat'] = "Autoriser les étudiants à utiliser le chat textuel";
+$string['Enable Public and Private text chat'] = "Autoriser le chat Public et Privé";
+$string['Enable Public text chat only'] = "Autoriser le chat Public seulement";
+$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Les étudiants sont toujours capables de faire du chat avec les <i>Presenter</i> et/ou le support technique.";
+$string['Access'] = "Accès";
+$string['Available'] = "Disponible";
+$string['Maximum users: '] = "Nombre d'utilisateurs maximum: ";
+$string['Unlimited'] = "Illimité";
+$string['Limited: '] = "Limite : ";
+$string['Enable guest access'] = "Autoriser l'accès Invité";
+$string['Room Id: '] = "Room Id&bnsp;: ";
+
+
+
+
+//First Time Use - not use yet
+$string['firstRoom'] = 'Main classroom';
+$string['secondRoom'] = 'Group 1';
+$string['thirdRoom'] = 'Group 2';
+$string['fourthRoom'] = 'Group 3';
+
?>
Added: trunk/moodle/lang/fr_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/fr_utf8/liveclassroom.php (rev 0)
+++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-03 16:54:33 UTC (rev 157)
@@ -0,0 +1,147 @@
+<?PHP
+/******************************************************************************
+ * *
+ * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+ * *
+ * COPYRIGHT: *
+ * This software is the property of Horizon Wimba. *
+ * You can redistribute it and/or modify it under the terms of *
+ * the GNU General Public License as published by the *
+ * Free Software Foundation. *
+ * *
+ * WARRANTIES: *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with the Horizon Wimba Moodle Integration; *
+ * if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
+ * *
+ * Author: Hugues Pisapia *
+ * *
+ * Date: 15th April 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id: liveclassroom.php 17 2006-05-25 21:50:08Z mgimpel $ */
+
+//------
+// Configuration
+$string['modulename'] = 'Live Classroom';
+$string['modulenameplural'] = 'Live Classrooms';
+$string['serverconfiguration'] = 'Configuration du Serveur Live Classroom';
+$string['explainserverconfiguration'] = 'Voici la configuration du serveur Live Classroom.';
+$string['servername'] = 'Nom du Serveur';
+$string['configservername'] = 'Entrez le nom du serveur sous la forme http://AAA.BBB.CCC.DDD';
+$string['adminusername'] = 'Nom d\'Utilisateur Administrateur';
+$string['configadminusername'] = 'Entrez le nom d\'utilisateur de l\'administrateur';
+$string['adminpassword'] = 'Mot de Passe Administrateur';
+$string['configadminpassword'] = 'Entrez le mot de passe de l\'administrateur';
+$string['settinguniqueid'] = 'Unique Prefix ID';
+$string['configsettinguniqueid'] = 'Un prefix unique destiné à permettre plusieurs instance de Moodle de partager un Serveur Live Classroom sans problème.';
+$string['lcversion'] = 'Version du Serveur Live Classroom';
+$string['integrationversion'] = 'Version du module d\'Integration';
+$string['emptyAdminUsername'] = 'Nom d\'Utilisateur Administrateur vide';
+$string['emptyAdminPassword'] = 'Mot de Passe Administrateur vide';
+
+$string['wrongconfigurationURLunavailable'] = 'Configuration incorrecte, l\'URL n\'est pas disponible. Plus d\'information est disponible dans les journaux d\'erreurs';
+$string['wrongconfigurationURLincorrect'] = 'Configuration incorrecte, l\'URL est incorrecte. Plus d\'information est disponible dans les journaux d\'erreurs';
+$string['wrongAdminPassword'] = 'Mot de Passe incorrect';
+$string['wrongadminpass'] = 'Authentification invalide. Merci de vérifier vos identifiants.';
+$string['trailingSlash'] = 'Le Nom du Serveur se termine par le caractère \'/\'. Veuillez le supprimer et soumettre le formulaire à nouveau.';
+
+//Add activity form
+$string['name'] = 'Nom';
+$string['liveclassroomtype'] = 'Live Classroom Associée';
+$string['topicformat'] = 'Sujet de l\activité';
+$string['weeksformat'] = 'Semaine de l\'activité';
+$string['requiredfields'] = 'Champs nécessaires';
+$string['topicdisplay'] = 'Sujet';
+$string['firstsection'] = 'Section 0';
+
+
+$string['linksfor'] = 'Acces Live Classrooms pour ';
+$string['accessrooms'] = 'Acces aux Live Classrooms at aux Archives';
+$string['managerooms'] = 'Gestion des Salles et des Archives (Instructeurs)';
+$string['labelcreateroom'] = 'Nom de la Nouvelle Salle: ';
+$string['buttoncreateroom'] = 'Créer la Salle';
+$string['roomcreated'] = 'La Salle a été créée avec succes.';
+
+
+$string['wizard.text.1'] = 'Note: La première fois que vous entrerez sur le serveur de Live Classroom vous devrez lancer';
+$string['wizard.text.2'] = 'l\'Assistant de Configuration';
+$string['wizard.text.3'] = 'pour être certain que votre ordinateur est prêt.';
+
+$string['runwizard'] = 'Lancer l\'Assistant';
+
+$string['wizard.text2.1'] = 'Lancer';
+$string['wizard.text2.2'] = 'l\'Assistant de Configuration';
+$string['wizard.text2.3'] = 'pour être certain que votre ordinateur est prêt à utiliser les Live Classrooms';
+
+
+
+$string['lcpopupshouldappear'] = 'La Live Classroom devrait maintenant apparaître.<br/> Dans le cas contraire, cliquez sur <a href=\"javascript:startActivity ();\">ce lien</a> pour l\'ouvrir.';
+
+
+$string['roomCreated'] = "Votre Live Classroom a été crée avec succès.";
+$string['roomUpdated'] = "Votre Live Classroom a été mise à jour avec succès.";
+$string['roomDeleted'] = "Votre Live Classroom a été supprimée jour avec succès.";
+$string['archiveDeleted'] = "Votre Archive a été supprimée jour avec succès.";
+
+$string['notfind'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['room'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['connection'] = "Moodle ne peut se connecter au serveur de Live Classroom. Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information.";
+$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
+$string['signature'] = "Connexion invalide à Live Classroom. Merci de contacter votre administrateur pour plus d'information.";
+
+$string['Settings'] = "Paramètres";
+$string['Live Classroom'] = "Live Classroom";
+$string['Room Info'] = "Informations";
+$string['Title: '] = "Titre : ";
+$string['Description: '] = "Description : ";
+$string['Type : '] = "Type : ";
+$string['Lecture room'] = "Salle de Cours";
+$string['Instructors lead the presentation'] = "Les Instructeurs dirigent la présentation";
+$string['Discussion room'] = "Salle de Discussion";
+$string['Students and Instructors have the same rigths'] = "Étudiants et Instructeurs ont les mêmes droits.";
+$string['Media'] = "Média";
+$string['Audio'] = "Audio";
+$string['Enable Students to use the phone'] = "Permettre aux étudiants d'utiliser le téléphone";
+$string['Note: Instructors can always use the phone'] = "Note: Les Instructeurs peuvent toujours utiliser le téléphone";
+$string['Enable Student\'s microphones at presentation start'] = "Permettre aux étudiants d'utiliser le microphone au démarrage de la présentation.";
+$string['One-way Video'] = "Vidéo mono-point";
+$string['Presenter uses RealProducer'] = "Les Presenter utilisent RealProducer";
+$string['Room Id: '] = "Room Id : ";
+$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif";
+$string['Features'] = "Fonctions";
+$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>";
+$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser le partage d'Applications <i>AppShare</i>";
+$string['Enable Archiving'] = "Autoriser l'Archivage";
+$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>";
+$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée";
+$string['Chat'] = "Chat";
+$string['Enable Students to use text chat'] = "Autoriser les étudiants à utiliser le chat textuel";
+$string['Enable Public and Private text chat'] = "Autoriser le chat Public et Privé";
+$string['Enable Public text chat only'] = "Autoriser le chat Public seulement";
+$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Les étudiants sont toujours capables de faire du chat avec les <i>Presenter</i> et/ou le support technique.";
+$string['Access'] = "Accès";
+$string['Available'] = "Disponible";
+$string['Maximum users: '] = "Nombre d'utilisateurs maximum: ";
+$string['Unlimited'] = "Illimité";
+$string['Limited: '] = "Limite : ";
+$string['Enable guest access'] = "Autoriser l'accès Invité";
+$string['Room Id: '] = "Room Id&bnsp;: ";
+
+
+
+
+//First Time Use - not use yet
+$string['firstRoom'] = 'Main classroom';
+$string['secondRoom'] = 'Group 1';
+$string['thirdRoom'] = 'Group 2';
+$string['fourthRoom'] = 'Group 3';
+
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-03 11:48:45
|
Revision: 156
http://svn.sourceforge.net/hw4mdl/?rev=156&view=rev
Author: hugues
Date: 2007-01-03 03:48:43 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10578
I updated the style for the td containing the "subitem" icon directly in the
HTML code to have it correctly aligned.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/js/manageXml.js
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-01-03 10:48:50 UTC (rev 155)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-01-03 11:48:43 UTC (rev 156)
@@ -294,7 +294,7 @@
}
.archive td{
- padding-left:2px ;
+ padding-left:5px ;
font-family:Verdana;
color:#666666;
font-style:italic;
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2007-01-03 10:48:50 UTC (rev 155)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2007-01-03 11:48:43 UTC (rev 156)
@@ -739,7 +739,7 @@
display += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','"+LC_PRODUCT+"')\" Ondblclick=\"javascript:startHorizon('"+archive[i].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='archive'>"
display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
- display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.png\" border=\"0\" /></td>";
+ display += "<td style=\"padding-left:7px;\" width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.png\" border=\"0\" /></td>";
display += "<td width='300px'><label onmousemove='javascript:ShowToolTip(event,\""+archive[i].getElements("nameDisplay")[0].getText()+"\",\""+archive[i].getElements("preview")[0].getText()+"\")' onmouseout='javascript:HideToolTip()'>"+archive[i].getElements("nameDisplay")[0].getText()+"</label></td>";
display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".png\"/></td>";
display += "</tr>";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-03 10:48:52
|
Revision: 155
http://svn.sourceforge.net/hw4mdl/?rev=155&view=rev
Author: hugues
Date: 2007-01-03 02:48:50 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10557
- Updated the configuration to only accept URLs without trailing slashes.
If a user enters a trailing slash, the module will reject it with an error
message and return the user to the configuration page.
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/lib.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-02 15:45:44 UTC (rev 154)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-03 10:48:50 UTC (rev 155)
@@ -49,6 +49,7 @@
$string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error';
$string['wrongAdminPassword'] = 'Wrong password';
$string['wrongadminpass'] = 'Invalid Authentication, please check your admin name or password';
+$string['trailingSlash'] = 'The Live Classroom Server Name ends with a trailing \'/\'. Please remove it and submit the configuration again.';
//Add activity form
$string['name'] = 'Name';
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2007-01-02 15:45:44 UTC (rev 154)
+++ trunk/moodle/mod/liveclassroom/lib.php 2007-01-03 10:48:50 UTC (rev 155)
@@ -53,7 +53,8 @@
global $CFG;
if(empty($config->servername)){
- add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
+ add_to_log("", "liveclassroom", "URL",
+ liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'));
}
else if(empty($config->adminusername)){
@@ -62,7 +63,12 @@
else if(empty($config->adminpassword)){
error(get_string('emptyAdminPassword', 'liveclassroom'));
}
-
+
+ $length = strlen($config->servername);
+ if ($config->servername{$length-1} == '/') {
+ error(get_String('trailingSlash', 'liveclassroom'), $_SERVER["HTTP_REFERER"]);
+ }
+
liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword);
//TODO: check the user is really an admin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2007-01-02 15:45:49
|
Revision: 154
http://svn.sourceforge.net/hw4mdl/?rev=154&view=rev
Author: hugues
Date: 2007-01-02 07:45:44 -0800 (Tue, 02 Jan 2007)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10533
- Updated the way we send the id of the room to delete and foxed a room deletion bug as well :(
- fixed the archive deletion mesage
- re-indented another file
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 16:03:27 UTC (rev 153)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-02 15:45:44 UTC (rev 154)
@@ -86,6 +86,7 @@
$string['roomCreated'] = "Your room has been successfully created.";
$string['roomUpdated'] = "Your room has been successfully updated.";
$string['roomDeleted'] = "Your room has been successfully deleted.";
+$string['archiveDeleted'] = "Your archive has been successfully deleted.";
$string['notfind'] = "Invalid Live Classroom parameters. Please contact your administrator for more information.";
$string['room'] = "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
$string['connection'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-29 16:03:27 UTC (rev 153)
+++ trunk/moodle/mod/liveclassroom/api.php 2007-01-02 15:45:44 UTC (rev 154)
@@ -539,17 +539,19 @@
global $CFG;
global $COURSE;
- liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
-
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
if ( $respcode == 302) {
- add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
- // error( "Target not found");
- return false;
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
+ // error( "Target not found");
+ return false;
}
else if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
- return false;
- }
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed");
+ return false;
+ }
add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("deleteRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been deleted with success");
return true;
@@ -566,7 +568,7 @@
global $COURSE;
- liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 16:03:27 UTC (rev 153)
+++ trunk/moodle/mod/liveclassroom/lib.php 2007-01-02 15:45:44 UTC (rev 154)
@@ -50,27 +50,27 @@
* @return nothing, but returns an error if the configuration is wrong
*/
function liveclassroom_process_options ($config) {
- global $CFG;
-
- if(empty($config->servername)){
- add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
- error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'));
- }
- else if(empty($config->adminusername)){
- error(get_string('emptyAdminUsername', 'liveclassroom'));
- }
- else if(empty($config->adminpassword)){
- error(get_string('emptyAdminPassword', 'liveclassroom'));
- }
-
- liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword);
+ global $CFG;
+
+ if(empty($config->servername)){
+ add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
+ error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'));
+ }
+ else if(empty($config->adminusername)){
+ error(get_string('emptyAdminUsername', 'liveclassroom'));
+ }
+ else if(empty($config->adminpassword)){
+ error(get_string('emptyAdminPassword', 'liveclassroom'));
+ }
+
+ liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword);
- //TODO: check the user is really an admin
- return;
+ //TODO: check the user is really an admin
+ return;
}
/*
-* Create a new instance of liveclassroom
+* Create a new instance of liveclassroom
* @param $liveclassroom : object liveclassroom
*/
function liveclassroom_add_instance($liveclassroom) {
@@ -86,11 +86,11 @@
if($result = insert_record("liveclassroom", $liveclassroom)) {
add_to_log($liveclassroom->course, "liveclassroom", "Add activity",
- liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added");
+ liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added");
}
else {
add_to_log($liveclassroom->course, "liveclassroom", "Add activity",
- liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added");
+ liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added");
$result=false;
}
return $result;
@@ -108,43 +108,43 @@
// Need to update the section
-
- //get the course_module instance linked to the liveclassroom instance
- if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) {
- error("Course Module ID was incorrect");
- }
- $old_section = $cm->section;
- //Find the right section in the course_section
- $section = get_record("course_sections", "id", $cm->section);
-
- //delete in the course section
- if (! delete_mod_from_section($cm->id, "$cm->section")) {
- // add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section");
- $result = false;
- //notify("Could not delete the $mod->modulename from that section");
- }
- //update the course module section
- if (! $sectionid = add_mod_to_section($liveclassroom) ) {
+
+ //get the course_module instance linked to the liveclassroom instance
+ if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) {
+ error("Course Module ID was incorrect");
+ }
+ $old_section = $cm->section;
+ //Find the right section in the course_section
+ $section = get_record("course_sections", "id", $cm->section);
+
+ //delete in the course section
+ if (! delete_mod_from_section($cm->id, "$cm->section")) {
+ // add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section");
+ $result = false;
+ //notify("Could not delete the $mod->modulename from that section");
+ }
+ //update the course module section
+ if (! $sectionid = add_mod_to_section($liveclassroom) ) {
error("Could not add the new course module to that section");
}
- //update the course modules
+ //update the course modules
if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) {
error("Could not update the course module with the correct section");
}
- add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success");
return update_record("liveclassroom", $liveclassroom);
/*
if(update_record("liveclassroom", $liveclassroom)){
- add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname");
- return true;
- }
-
+ add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname");
+ return true;
+ }
+
else {
- add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." associated to the room $roomname, has not been updated");
- return false;
- }*/
+ add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." associated to the room $roomname, has not been updated");
+ return false;
+ }*/
}
@@ -152,7 +152,7 @@
/// Given an ID of an instance of this module,
/// this function will permanently delete the instance
/// and any data that depends on it.
-
+
if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) {
return false;
}
@@ -162,11 +162,11 @@
# Delete any dependent records here #
if (! delete_records("liveclassroom", "id", $liveclassroom->id)) {
- add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed");
- $result = false;
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed");
+ $result = false;
}
- add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success");
-
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success");
+
return $result;
}
@@ -255,11 +255,11 @@
$enc_coursename = str_replace(" ", "_", $course->shortname);
$userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX;
-
+
if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Teacher')) {
//error("Cannot Create Teacher profile");
- return false;
+ return false;
}
$userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX;
@@ -267,7 +267,7 @@
if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Student')) {
//error("Cannot Create Student profile");
- return false;
+ return false;
}
return true;
}
@@ -281,16 +281,16 @@
*/
function liveclassroom_create_rooms ($course) {
- //teacher is the lead of the presentation
+ //teacher is the lead of the presentation
- liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes());
-
- //teachers and students have the same rights
- liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes());
- liveclassroom_create_room($course->id, "Group 2", false, liveclassroom_api_give_discussionroom_attributes());
- liveclassroom_create_room($course->id, "Group 3", false, liveclassroom_api_give_discussionroom_attributes());
-
- return true;
+ liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes());
+
+ //teachers and students have the same rights
+ liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes());
+ liveclassroom_create_room($course->id, "Group 2", false, liveclassroom_api_give_discussionroom_attributes());
+ liveclassroom_create_room($course->id, "Group 3", false, liveclassroom_api_give_discussionroom_attributes());
+
+ return true;
}
@@ -326,53 +326,53 @@
$teacherid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX;
$studentid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX;
-
- if($bool==true) { // main lecture hall
-
- if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) {
- //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname");
- return false;
- }
- if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) {
-
- //error('liveclassroom_create_room: Cannot add classadminright to Teachers');
- return false;
- }
- if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Student')) {
- //error('liveclassroom_create_room: Cannot add Participant right to students');
- return false;
- }
- if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) {
- //error('liveclassroom_create_room: Cannot remove Participant right to Guest');
- return false;
- }
- }
- else if($bool==false){ // discussion room
- if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) {
- //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname");
- return false;
- }
- if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) {
-
- //error('liveclassroom_create_room: Cannot add classadminright to Teachers');
- return false;
- }
- if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Instructor')) {
- //error('liveclassroom_create_room: Cannot add Participant right to students');
- return false;
- }
- if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) {
- //error('liveclassroom_create_room: Cannot remove Participant right to Guest');
- return false;
- }
- }
- //Guest enabled?
- if ((isset($attributes['guests'])) && ($attributes['guests']==1)) {
- if (! liveclassroom_api_add_user_role ($roomid, 'Guest' , 'Student')) {
- return false;
- }
- }
-
+
+ if($bool==true) { // main lecture hall
+
+ if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) {
+ //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname");
+ return false;
+ }
+ if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) {
+
+ //error('liveclassroom_create_room: Cannot add classadminright to Teachers');
+ return false;
+ }
+ if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Student')) {
+ //error('liveclassroom_create_room: Cannot add Participant right to students');
+ return false;
+ }
+ if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) {
+ //error('liveclassroom_create_room: Cannot remove Participant right to Guest');
+ return false;
+ }
+ }
+ else if($bool==false){ // discussion room
+ if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) {
+ //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname");
+ return false;
+ }
+ if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) {
+
+ //error('liveclassroom_create_room: Cannot add classadminright to Teachers');
+ return false;
+ }
+ if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Instructor')) {
+ //error('liveclassroom_create_room: Cannot add Participant right to students');
+ return false;
+ }
+ if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) {
+ //error('liveclassroom_create_room: Cannot remove Participant right to Guest');
+ return false;
+ }
+ }
+ //Guest enabled?
+ if ((isset($attributes['guests'])) && ($attributes['guests']==1)) {
+ if (! liveclassroom_api_add_user_role ($roomid, 'Guest' , 'Student')) {
+ return false;
+ }
+ }
+
return true;
}
@@ -384,7 +384,7 @@
* @return array the activity ids of classrooms links available for this course
*/
function liveclassroom_ids($courseid) {
- return array ();
+ return array ();
}
/**
@@ -393,7 +393,7 @@
* @return string the number of classrooms available for this course
*/
function liveclassroom_count_rooms($courseid) {
- return '0';
+ return '0';
}
@@ -403,7 +403,7 @@
* @return string the number of archives available for this course
*/
function liveclassroom_count_archives($courseid) {
- return '0';
+ return '0';
}
@@ -413,15 +413,15 @@
* Return a string : the shortname of the course
*/
function liveclassroom_get_course_shortname($courseid) {
-
- if(!($course = get_record('course','id',$courseid))) {
- //error( "Response get room name: query to database failed");
- return false;
- }
+
+ if(!($course = get_record('course','id',$courseid))) {
+ //error( "Response get room name: query to database failed");
+ return false;
+ }
- // $name = $course->shortname;
- return $course->shortname;
-
+ // $name = $course->shortname;
+ return $course->shortname;
+
}
/*
@@ -431,20 +431,20 @@
* Return a table with the activities name
*/
function liveclassroom_get_activities_list_per_room($course,$roomname) {
-
- if(!($activity_list = get_records('liveclassroom','course',$course->id))) {
- error( "Response get_activities_list : query to database failed");
- }
+
+ if(!($activity_list = get_records('liveclassroom','course',$course->id))) {
+ error( "Response get_activities_list : query to database failed");
+ }
- $i=0;
- foreach($activity_list as $liveclassroom) {
- if($liveclassroom->type==$roomname) {
- $list_return[$i] = $liveclassroom->name;
- $i++;
- }
- }
+ $i=0;
+ foreach($activity_list as $liveclassroom) {
+ if($liveclassroom->type==$roomname) {
+ $list_return[$i] = $liveclassroom->name;
+ $i++;
+ }
+ }
- return $list_return;
+ return $list_return;
}
/* To know if the room given is a lecture room
@@ -452,16 +452,16 @@
* return a boolean : true if the room is lecture room, false if not.
*/
function liveclassroom_is_lecturehall($roomid,$courseid) {
-
- $studentuserid = liveclassroom_api_get_student_user_id($courseid);
+
+ $studentuserid = liveclassroom_api_get_student_user_id($courseid);
- if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') {
- return true;
- }
- else{
- return false ;
- }
-
+ if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') {
+ return true;
+ }
+ else{
+ return false ;
+ }
+
}
/* To know if the room given is a discussion room
@@ -469,67 +469,67 @@
* return a boolean : true if the room is breakout room, false if not.
*/
function liveclassroom_is_breakout($roomid, $courseid) {
-
- $studentuserid = liveclassroom_api_get_student_user_id($courseid);
+
+ $studentuserid = liveclassroom_api_get_student_user_id($courseid);
- if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Instructor') {
- return true;
- }
- else{
- return false;
- }
+ if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Instructor') {
+ return true;
+ }
+ else{
+ return false;
+ }
}
/*
* Delete all the activities on Moodle database for a room given
* @praram $roomid : the id of the room associated to the activities
-* return a boolean true if all is well done
+* return a boolean true if all is well done
*/
function liveclassroom_delete_all_instance_of_room($roomid) {
/// Given an ID of an instance of this module,
/// this function will permanently delete the instance
/// and any data that depends on it.
-
- $result = true;
+
+ $result = true;
if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) {
$roomname = liveclassroom_api_get_room_name($liveclassroom->type);
- # Delete any dependent records here #
- foreach($liveclassrooms as $liveclassroom){
-
- //get the course_module instance linked to the liveclassroom instance
- if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) {
- error("Course Module ID was incorrect");
- }
- if (! delete_course_module($cm->id)) {
- add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)");
- $result = false;
- //Delete a course module and any associated data at the course level (events)
- // notify("Could not delete the $cm->id (coursemodule)");
- }
- if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) {
- add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database");
- $result = false;
- }
- //delete in the course section too
- if (! delete_mod_from_section($cm->id, "$cm->section")) {
- add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section");
- $result = false;
- //notify("Could not delete the $mod->modulename from that section");
- }
-
- }
- }
-
- add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success");
-
+ # Delete any dependent records here #
+ foreach($liveclassrooms as $liveclassroom){
+
+ //get the course_module instance linked to the liveclassroom instance
+ if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) {
+ error("Course Module ID was incorrect");
+ }
+ if (! delete_course_module($cm->id)) {
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)");
+ $result = false;
+ //Delete a course module and any associated data at the course level (events)
+ // notify("Could not delete the $cm->id (coursemodule)");
+ }
+ if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) {
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database");
+ $result = false;
+ }
+ //delete in the course section too
+ if (! delete_mod_from_section($cm->id, "$cm->section")) {
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section");
+ $result = false;
+ //notify("Could not delete the $mod->modulename from that section");
+ }
+
+ }
+ }
+
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success");
+
return $result;
}
/*
-* Create a linePart element - represent a <td>
+* Create a linePart element - represent a <td>
*
* @param $xmldoc : the DOM document
* @param $p_type : type of the element
@@ -538,67 +538,67 @@
* Return a DOM document element
**/
function liveclassroom_create_linepart_element($xmldoc, $p_displayContext, $p_type, $p_parameters) {
-
- $element = $xmldoc->create_element('lineElement');
-
- $displayContext = $xmldoc->create_element('displayContext');
- $displayContext->append_child($xmldoc->create_text_node($p_displayContext));
- $element->append_child($displayContext);
- $type = $xmldoc->create_element('type');
- $type->append_child($xmldoc->create_text_node($p_type));
- $element->append_child($type);
- $parameters = $xmldoc->create_element('parameters');
-
- foreach ($p_parameters as $key => $valuetab) {
-
- $parameter = $xmldoc->create_element('parameter');
- $name = $xmldoc->create_element('name');
- $name->append_child($xmldoc->create_text_node("$key"));
- $value = $xmldoc->create_element('value');
- $value->append_child($xmldoc->create_text_node("$valuetab"));
- $parameter->append_child($name);
- $parameter->append_child($value);
-
- $parameters->append_child($parameter);
-
- }
+
+ $element = $xmldoc->create_element('lineElement');
+
+ $displayContext = $xmldoc->create_element('displayContext');
+ $displayContext->append_child($xmldoc->create_text_node($p_displayContext));
+ $element->append_child($displayContext);
+ $type = $xmldoc->create_element('type');
+ $type->append_child($xmldoc->create_text_node($p_type));
+ $element->append_child($type);
+ $parameters = $xmldoc->create_element('parameters');
+
+ foreach ($p_parameters as $key => $valuetab) {
+
+ $parameter = $xmldoc->create_element('parameter');
+ $name = $xmldoc->create_element('name');
+ $name->append_child($xmldoc->create_text_node("$key"));
+ $value = $xmldoc->create_element('value');
+ $value->append_child($xmldoc->create_text_node("$valuetab"));
+ $parameter->append_child($name);
+ $parameter->append_child($value);
+
+ $parameters->append_child($parameter);
+
+ }
-
- $element->append_child($parameters);
-
- return $element;
+
+ $element->append_child($parameters);
+
+ return $element;
}
/*
-* Create a header bar element
+* Create a header bar element
*
* @param $xmldoc : the DOM document
*
* Return a DOM document element which represent the header bar
**/
function liveclassroom_create_headerbar($xmldoc){
- $headerbar = $xmldoc->create_element('windowsElement');
-
- $hbtype = $xmldoc->create_element('type');
- $hbtype->append_child($xmldoc->create_text_node("headerBar"));
- $headerbar->append_child($hbtype);
- $hbelementParameters = $xmldoc->create_element("windowsElementParameters");
- $headerbarinformations = $xmldoc->create_element("headerBarInformations");
- $hbstyle = $xmldoc->create_element("style");
- $hbstyle->append_child($xmldoc->create_text_node("headerBar"));
- $headerbarinformations->append_child($hbstyle);
- $hbpictureUrl = $xmldoc->create_element("pictureUrl");
- $hbpictureUrl->append_child($xmldoc->create_text_node("pictures/items/headerbar-logo.png"));
- $headerbarinformations->append_child($hbpictureUrl);
- $hbelementParameters->append_child($headerbarinformations);
-
- $headerbar->append_child($hbelementParameters);
-
- return $headerbar;
+ $headerbar = $xmldoc->create_element('windowsElement');
+
+ $hbtype = $xmldoc->create_element('type');
+ $hbtype->append_child($xmldoc->create_text_node("headerBar"));
+ $headerbar->append_child($hbtype);
+ $hbelementParameters = $xmldoc->create_element("windowsElementParameters");
+ $headerbarinformations = $xmldoc->create_element("headerBarInformations");
+ $hbstyle = $xmldoc->create_element("style");
+ $hbstyle->append_child($xmldoc->create_text_node("headerBar"));
+ $headerbarinformations->append_child($hbstyle);
+ $hbpictureUrl = $xmldoc->create_element("pictureUrl");
+ $hbpictureUrl->append_child($xmldoc->create_text_node("pictures/items/headerbar-logo.png"));
+ $headerbarinformations->append_child($hbpictureUrl);
+ $hbelementParameters->append_child($headerbarinformations);
+
+ $headerbar->append_child($hbelementParameters);
+
+ return $headerbar;
}
/*
-* Create a validation comment element
+* Create a validation comment element
*
* @param $xmldoc : the DOM document
* @param $parameters : array of parameters to add to the element
@@ -606,28 +606,28 @@
* Return a DOM document element which represent the validation comment
**/
function liveclassroom_create_validation_comment($xmldoc, $parameters){
- $validationelement = $xmldoc->create_element("validationElement");
- $vtype = $xmldoc->create_element("type");
- $vtype->append_child($xmldoc->create_text_node("validationComment"));
- $validationelement->append_child($vtype);
-
- $vparameters = $xmldoc->create_element("parameters");
-
- foreach ($parameters as $key => $valuetab) {
-
- $name = $xmldoc->create_element("$key");
- $name->append_child($xmldoc->create_text_node("$valuetab"));
- $vparameters->append_child($name);
-
- }
-
- $validationelement->append_child($vparameters);
-
- return $validationelement;
+ $validationelement = $xmldoc->create_element("validationElement");
+ $vtype = $xmldoc->create_element("type");
+ $vtype->append_child($xmldoc->create_text_node("validationComment"));
+ $validationelement->append_child($vtype);
+
+ $vparameters = $xmldoc->create_element("parameters");
+
+ foreach ($parameters as $key => $valuetab) {
+
+ $name = $xmldoc->create_element("$key");
+ $name->append_child($xmldoc->create_text_node("$valuetab"));
+ $vparameters->append_child($name);
+
+ }
+
+ $validationelement->append_child($vparameters);
+
+ return $validationelement;
}
/*
-* Create a validation button element
+* Create a validation button element
*
* @param $xmldoc : the DOM document
* @param $parameters : array of parameters to add to the element
@@ -637,48 +637,48 @@
**/
function liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters){
- $validationelement = $xmldoc->create_element("validationElement");
- $vtype = $xmldoc->create_element("type");
- $vtype->append_child($xmldoc->create_text_node("validationButton"));
- $validationelement->append_child($vtype);
-
- $vparameters = $xmldoc->create_element("parameters");
-
- $vstyle = $xmldoc->create_element("style");
- $vstyle->append_child($xmldoc->create_text_node($parameters['style']));
- $vparameters->append_child($vstyle);
+ $validationelement = $xmldoc->create_element("validationElement");
+ $vtype = $xmldoc->create_element("type");
+ $vtype->append_child($xmldoc->create_text_node("validationButton"));
+ $validationelement->append_child($vtype);
+
+ $vparameters = $xmldoc->create_element("parameters");
+
+ $vstyle = $xmldoc->create_element("style");
+ $vstyle->append_child($xmldoc->create_text_node($parameters['style']));
+ $vparameters->append_child($vstyle);
- $vaction = $xmldoc->create_element("action");
- $vactionName = $xmldoc->create_element("name");
- $vactionName->append_child($xmldoc->create_text_node($parameters['action'] ));
- $vaction->append_child($vactionName);
-
-
-
- $vactionParameters = $xmldoc->create_element("parameters");
-
- foreach ($actionParameters as $parameter) {
-
- $actionParameter = $xmldoc->create_element("parameter");
- $actionParameter->append_child($xmldoc->create_text_node("$parameter"));
+ $vaction = $xmldoc->create_element("action");
+ $vactionName = $xmldoc->create_element("name");
+ $vactionName->append_child($xmldoc->create_text_node($parameters['action'] ));
+ $vaction->append_child($vactionName);
+
+
+
+ $vactionParameters = $xmldoc->create_element("parameters");
+
+ foreach ($actionParameters as $parameter) {
+
+ $actionParameter = $xmldoc->create_element("parameter");
+ $actionParameter->append_child($xmldoc->create_text_node("$parameter"));
- $vactionParameters->append_child($actionParameter);
-
- }
- $vaction->append_child($vactionParameters);
-
- $vparameters->append_child($vaction);
-
- $vactionValue = $xmldoc->create_element("value");
- $vactionValue->append_child($xmldoc->create_text_node($parameters['value']));
- $vparameters->append_child($vactionValue);
-
- $validationelement->append_child($vparameters);
- return $validationelement;
+ $vactionParameters->append_child($actionParameter);
+
+ }
+ $vaction->append_child($vactionParameters);
+
+ $vparameters->append_child($vaction);
+
+ $vactionValue = $xmldoc->create_element("value");
+ $vactionValue->append_child($xmldoc->create_text_node($parameters['value']));
+ $vparameters->append_child($vactionValue);
+
+ $validationelement->append_child($vparameters);
+ return $validationelement;
}
/*
-* Create a validation button bar element
+* Create a validation button bar element
*
* @param $xmldoc : the DOM document
* Uses liveclassroom_create_validation_comment and liveclassroom_create_validation_button
@@ -686,48 +686,48 @@
**/
function liveclassroom_create_validationbar($xmldoc,$roomId){
- $headerbar = $xmldoc->create_element('windowsElement');
-
- $hbtype = $xmldoc->create_element('type');
- $hbtype->append_child($xmldoc->create_text_node("validationBar"));
- $headerbar->append_child($hbtype);
- $hbelementParameters = $xmldoc->create_element("windowsElementParameters");
-
- $validationelements = $xmldoc->create_element("validationElements");
- $parameters = array("style" => "alert", "value" => "*");
- $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters));
-
- $parameters = array("style" => "", "value" => "Required Fields");
- $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters));
-
- $parameters = array("style" => "", "name" => "", "action" => "launchAjaxRequest", "value" => "Cancel");
- $actionParameters = array("generateListRooms.php", "Management", "_", "false");
- $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters));
-
- if($_GET['action']=='update'){
- $submit = "updateRoom";
- $submitName = "Save all";
- }
- else
- {
- $submit = "createRoom";
- $submitName = "Create";
- }
-
- $parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName");
-
- $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId");
- $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters));
-
-
- $hbelementParameters->append_child($validationelements);
- $headerbar->append_child($hbelementParameters);
-
- return $headerbar;
+ $headerbar = $xmldoc->create_element('windowsElement');
+
+ $hbtype = $xmldoc->create_element('type');
+ $hbtype->append_child($xmldoc->create_text_node("validationBar"));
+ $headerbar->append_child($hbtype);
+ $hbelementParameters = $xmldoc->create_element("windowsElementParameters");
+
+ $validationelements = $xmldoc->create_element("validationElements");
+ $parameters = array("style" => "alert", "value" => "*");
+ $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters));
+
+ $parameters = array("style" => "", "value" => "Required Fields");
+ $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters));
+
+ $parameters = array("style" => "", "name" => "", "action" => "launchAjaxRequest", "value" => "Cancel");
+ $actionParameters = array("generateListRooms.php", "Management", "_", "false");
+ $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters));
+
+ if($_GET['action']=='update'){
+ $submit = "updateRoom";
+ $submitName = "Save all";
+ }
+ else
+ {
+ $submit = "createRoom";
+ $submitName = "Create";
+ }
+
+ $parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName");
+
+ $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId");
+ $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters));
+
+
+ $hbelementParameters->append_child($validationelements);
+ $headerbar->append_child($hbelementParameters);
+
+ return $headerbar;
}
/*
-* Create a menu element
+* Create a menu element
*
* @param $xmldoc : the DOM document
* @params $p_... : parameters of the menu element
@@ -736,57 +736,57 @@
**/
function liveclassroom_create_menu_element($xmldoc,$p_availibility, $p_type, $p_typeOfUser, $p_typeOfProduct, $p_pictureUrl, $p_value, $p_lcTypeAction, $p_lcNameAction){
- $menuElement = $xmldoc->create_element('menuElement');
-
- $type = $xmldoc->create_element('type');
- $type->append_child($xmldoc->create_text_node("$p_type"));
- $menuElement->append_child($type);
-
- $typeOfProduct = $xmldoc->create_element('typeOfProduct');
- $typeOfProduct->append_child($xmldoc->create_text_node("$p_typeOfProduct"));
- $menuElement->append_child($typeOfProduct);
-
- $availibility = $xmldoc->create_element('availibility');
- $availibility->append_child($xmldoc->create_text_node("$p_availibility"));
- $menuElement->append_child($availibility);
-
- $typeOfUser = $xmldoc->create_element('typeOfUser');
- $typeOfUser->append_child($xmldoc->create_text_node("$p_typeOfUser"));
- $menuElement->append_child($typeOfUser);
-
- $pictureUrl = $xmldoc->create_element('pictureUrl');
- $pictureUrl->append_child($xmldoc->create_text_node("$p_pictureUrl"));
- $menuElement->append_child($pictureUrl);
-
- $value = $xmldoc->create_element('value');
- $value->append_child($xmldoc->create_text_node("$p_value"));
- $menuElement->append_child($value);
-
- $lcAction = $xmldoc->create_element('action');
- $lcActionName = $xmldoc->create_element('name');
- $lcActionName->append_child($xmldoc->create_text_node("$p_lcTypeAction"));
+ $menuElement = $xmldoc->create_element('menuElement');
+
+ $type = $xmldoc->create_element('type');
+ $type->append_child($xmldoc->create_text_node("$p_type"));
+ $menuElement->append_child($type);
+
+ $typeOfProduct = $xmldoc->create_element('typeOfProduct');
+ $typeOfProduct->append_child($xmldoc->create_text_node("$p_typeOfProduct"));
+ $menuElement->append_child($typeOfProduct);
+
+ $availibility = $xmldoc->create_element('availibility');
+ $availibility->append_child($xmldoc->create_text_node("$p_availibility"));
+ $menuElement->append_child($availibility);
+
+ $typeOfUser = $xmldoc->create_element('typeOfUser');
+ $typeOfUser->append_child($xmldoc->create_text_node("$p_typeOfUser"));
+ $menuElement->append_child($typeOfUser);
+
+ $pictureUrl = $xmldoc->create_element('pictureUrl');
+ $pictureUrl->append_child($xmldoc->create_text_node("$p_pictureUrl"));
+ $menuElement->append_child($pictureUrl);
+
+ $value = $xmldoc->create_element('value');
+ $value->append_child($xmldoc->create_text_node("$p_value"));
+ $menuElement->append_child($value);
+
+ $lcAction = $xmldoc->create_element('action');
+ $lcActionName = $xmldoc->create_element('name');
+ $lcActionName->append_child($xmldoc->create_text_node("$p_lcTypeAction"));
- $lcAction->append_child($lcActionName);
- $lcActionParameters = $xmldoc->create_element('parameters');
-
- $lcActionParameter = $xmldoc->create_element('parameter');
- $lcActionParameter->append_child($xmldoc->create_text_node("$p_lcNameAction"));
- $lcActionParameters->append_child($lcActionParameter);
-
- $lcAction->append_child($lcActionParameters);
+ $lcAction->append_child($lcActionName);
+ $lcActionParameters = $xmldoc->create_element('parameters');
+
+ $lcActionParameter = $xmldoc->create_element('parameter');
+ $lcActionParameter->append_child($xmldoc->create_text_node("$p_lcNameAction"));
+ $lcActionParameters->append_child($lcActionParameter);
+
+ $lcAction->append_child($lcActionParameters);
- $lcAction->append_child($lcActionParameters);
+ $lcAction->append_child($lcActionParameters);
-
- $menuElement->append_child($lcAction);
+
+ $menuElement->append_child($lcAction);
- $xmldoc->append_child($menuElement);
+ $xmldoc->append_child($menuElement);
- return $menuElement;
+ return $menuElement;
}
/*
-* Create a product information element
+* Create a product information element
*
* @param $xmldoc : the DOM document
* @param $position : type of the element
@@ -798,25 +798,25 @@
**/
function liveclassroom_create_product_information($xmldoc,$position,$name,$style,$value) {
- $productInfo = $xmldoc->create_element('productInformations');
-
- $productPosition = $xmldoc->create_element('position');
- $productPosition->append_child($xmldoc->create_text_node("$position"));
- $productInfo->append_child($productPosition);
-
- $productName = $xmldoc->create_element('name');
- $productName->append_child($xmldoc->create_text_node("$name"));
- $productInfo->append_child($productName);
-
- $productStyle = $xmldoc->create_element('style');
- $productStyle->append_child($xmldoc->create_text_node("$style"));
- $productInfo->append_child($productStyle);
-
- $productValue = $xmldoc->create_element('value');
- $productValue->append_child($xmldoc->create_text_node("$value"));
- $productInfo->append_child($productValue);
-
- return $productInfo;
+ $productInfo = $xmldoc->create_element('productInformations');
+
+ $productPosition = $xmldoc->create_element('position');
+ $productPosition->append_child($xmldoc->create_text_node("$position"));
+ $productInfo->append_child($productPosition);
+
+ $productName = $xmldoc->create_element('name');
+ $productName->append_child($xmldoc->create_text_node("$name"));
+ $productInfo->append_child($productName);
+
+ $productStyle = $xmldoc->create_element('style');
+ $productStyle->append_child($xmldoc->create_text_node("$style"));
+ $productInfo->append_child($productStyle);
+
+ $productValue = $xmldoc->create_element('value');
+ $productValue->append_child($xmldoc->create_text_node("$value"));
+ $productInfo->append_child($productValue);
+
+ return $productInfo;
}
@@ -830,109 +830,109 @@
*/
function create_panel_info($xmldoc, $p_context, $p_styleEnabled, $p_styleDisabled, $p_name, $pos, $p_display) {
- $panelInformation = $xmldoc->create_element('panelInformations');
-
- $display = $xmldoc->create_element('display');
- $display->append_child($xmldoc->create_text_node("$p_display"));
- $panelInformation->append_child($display);
-
- $styleEnabled = $xmldoc->create_element('styleEnabled');
- $styleEnabled->append_child($xmldoc->create_text_node("$p_styleEnabled"));
- $panelInformation->append_child($styleEnabled);
-
- $styleDisabled = $xmldoc->create_element('styleDisabled');
- $styleDisabled->append_child($xmldoc->create_text_node("$p_styleDisabled"));
- $panelInformation->append_child($styleDisabled);
-
- $name = $xmldoc->create_element('name');
- $name->append_child($xmldoc->create_text_node("$p_name"));
- $panelInformation->append_child($name);
-
- $position = $xmldoc->create_element('position');
- $position->append_child($xmldoc->create_text_node($pos));
- $panelInformation->append_child($position);
-
- $contextDisplay = $xmldoc->create_element('contextDisplay');
- $contextDisplay->append_child($xmldoc->create_text_node("$p_context"));
- $panelInformation->append_child($contextDisplay);
-
- return $panelInformation;
+ $panelInformation = $xmldoc->create_element('panelInformations');
+
+ $display = $xmldoc->create_element('display');
+ $display->append_child($xmldoc->create_text_node("$p_display"));
+ $panelInformation->append_child($display);
+
+ $styleEnabled = $xmldoc->create_element('styleEnabled');
+ $styleEnabled->append_child($xmldoc->create_text_node("$p_styleEnabled"));
+ $panelInformation->append_child($styleEnabled);
+
+ $styleDisabled = $xmldoc->create_element('styleDisabled');
+ $styleDisabled->append_child($xmldoc->create_text_node("$p_styleDisabled"));
+ $panelInformation->append_child($styleDisabled);
+
+ $name = $xmldoc->create_element('name');
+ $name->append_child($xmldoc->create_text_node("$p_name"));
+ $panelInformation->append_child($name);
+
+ $position = $xmldoc->create_element('position');
+ $position->append_child($xmldoc->create_text_node($pos));
+ $panelInformation->append_child($position);
+
+ $contextDisplay = $xmldoc->create_element('contextDisplay');
+ $contextDisplay->append_child($xmldoc->create_text_node("$p_context"));
+ $panelInformation->append_child($contextDisplay);
+
+ return $panelInformation;
}
/**
-* This function is to check the parameters are good on the frame and there is no hack !
+* This function is to check the parameters are good on the frame and there is no hack !
* @param $request : array with the url parameters (usually $_POST or $_GET)
* return a string with all the parameters if the signature is ok, false if not (HACKING)
*/
function liveclassroom_init_session($request){
-
- if(time() <= ($request['time']+1800)) {
-
- $enc_params = array();
- //array of keys
- $url_parameters = $request;
- foreach ($request as $key => $url_p) {
- if(strstr($key,"enc_")) {
- $enc_params[substr($key, 4)]=$url_p;
- }
- }
+
+ if(time() <= ($request['time']+1800)) {
+
+ $enc_params = array();
+ //array of keys
+ $url_parameters = $request;
+ foreach ($request as $key => $url_p) {
+ if(strstr($key,"enc_")) {
+ $enc_params[substr($key, 4)]=$url_p;
+ }
+ }
- foreach ($enc_params as $key => $value) {
- $signature .= $value;
- $url_params .= "enc_".$key."=".$value."&" ;
- }
-
- if(strcmp(md5($signature), $request['signature'])!=0) {
- add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize.");
- error("Signature is not recognize.");
- return false;
-
- }
+ foreach ($enc_params as $key => $value) {
+ $signature .= $value;
+ $url_params .= "enc_".$key."=".$value."&" ;
+ }
+
+ if(strcmp(md5($signature), $request['signature'])!=0) {
+ add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize.");
+ error("Signature is not recognize.");
+ return false;
+
+ }
- return true;
- }
- else {
- add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity.");
- error("The session has timed out due to inactivity. Please reload the page to reconnect.");
- return false;
-
- }
+ return true;
+ }
+ else {
+ add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity.");
+ error("The session has timed out due to inactivity. Please reload the page to reconnect.");
+ return false;
+
+ }
}
/*
* Give the parameters with the signature md5 to give to the frame
-* @param $courseid : the id of the current course
+* @param $courseid : the id of the current course
* return a string with all the parameters to give to the url
*/
function liveclassroom_get_url_params($courseid) {
- global $USER;
- global $CFG;
-
- //For moodle 1.7
-// if(strstr($CFG->release,"1.6")) // 1.6.* version
+ global $USER;
+ global $CFG;
+
+ //For moodle 1.7
+// if(strstr($CFG->release,"1.6")) // 1.6.* version
- if(isstudent($courseid)) { //Student
- $role='Student';
- }
- else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher
- $role='Instructor';
- }
-
- if(strstr($CFG->release,"1.7")) { // 1.7.* version
- if (iscreator()) { // Course Creator
- $role='Instructor';
- }
- else if (!isteacheredit($courseid)) { // Non-editing Teacher
- $role='Student';
- }
- }
-
- $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role);
- $url_params = "enc_course_id=".$courseid."&enc_email=".$USER->email."&enc_firstname=".$USER->firstname."&enc_lastname=".$USER->lastname."&enc_role=".$role."&signature=".$signature;
+ if(isstudent($courseid)) { //Student
+ $role='Student';
+ }
+ else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher
+ $role='Instructor';
+ }
+
+ if(strstr($CFG->release,"1.7")) { // 1.7.* version
+ if (iscreator()) { // Course Creator
+ $role='Instructor';
+ }
+ else if (!isteacheredit($courseid)) { // Non-editing Teacher
+ $role='Student';
+ }
+ }
+
+ $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role);
+ $url_params = "enc_course_id=".$courseid."&enc_email=".$USER->email."&enc_firstname=".$USER->firstname."&enc_lastname=".$USER->lastname."&enc_role=".$role."&signature=".$signature;
- return $url_params;
+ return $url_params;
}
@@ -944,48 +944,48 @@
function liveclassroom_get_session_params($xmldoc, $sessionParams) {
// General Information
- global $CFG;
-
- $information = $xmldoc->create_element("information");
+ global $CFG;
+
+ $information = $xmldoc->create_element("information");
$firstName = $xmldoc->create_element("firstName");
$firstName->append_child($xmldoc->create_text_node($sessionParams['enc_firstname']));
$lastName = $xmldoc->create_element("lastName");
$lastName->append_child($xmldoc->create_text_node($sessionParams['enc_lastname']));
$role = $xmldoc->create_element("role");
- $role->append_child($xmldoc->create_text_node($sessionParams['enc_role']));
+ $role->append_child($xmldoc->create_text_node($sessionParams['enc_role']));
$email = $xmldoc->create_element("email");
$email->append_child($xmldoc->create_text_node($sessionParams['enc_email']));
$timeOfLoad = $xmldoc->create_element("timeOfLoad");
$timeOfLoad->append_child($xmldoc->create_text_node($sessionParams['time']));
$courseId = $xmldoc->create_element("courseId");
- $courseId->append_child($xmldoc->create_text_node($sessionParams['enc_course_id']));
- if ($sessionParams['authToken'] != null) {
- $authToken = $xmldoc->create_element("authToken");
- $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken']));
- }
- $lcServerUrl = $xmldoc->create_element("lcServerUrl");
- $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername));
- $vtServerUrl = $xmldoc->create_element("vtServerUrl");
- $vtServerUrl->append_child($xmldoc->create_text_node(""));
+ $courseId->append_child($xmldoc->create_text_node($sessionParams['enc_course_id']));
+ if ($sessionParams['authToken'] != null) {
+ $authToken = $xmldoc->create_element("authToken");
+ $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken']));
+ }
+ $lcServerUrl = $xmldoc->create_element("lcServerUrl");
+ $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername));
+ $vtServerUrl = $xmldoc->create_element("vtServerUrl");
+ $vtServerUrl->append_child($xmldoc->create_text_node(""));
$signature = $xmldoc->create_element("signature");
$signature->append_child($xmldoc->create_text_node($sessionParams['signature']));
-
+
$information->append_child($firstName);
$information->append_child($lastName);
- $information->append_child($role);
- $information->append_child($email);
- $information->append_child($timeOfLoad);
+ $information->append_child($role);
+ $information->append_child($email);
+ $information->append_child($timeOfLoad);
$information->append_child($courseId);
$information->append_child($authToken);
$information->append_child($lcServerUrl);
$information->append_child($vtServerUrl);
- $information->append_child($signature);
+ $information->append_child($signature);
return $information;
-
- // END of General Information
-
+
+ // END of General Information
+
}
/* Create a message element
@@ -996,36 +996,36 @@
*/
function liveclassroom_create_message($xmldoc, $value) {
- $message = $xmldoc->create_element('windowsElement');
-
- $messagetype = $xmldoc->create_element('type');
- $messagetype->append_child($xmldoc->create_text_node("message"));
- $message->append_child($messagetype);
-
- $messageElementParameters = $xmldoc->create_element("windowsElementParameters");
-
- $m = $xmldoc->create_element("message");
-
- $mtype = $xmldoc->create_element("type");
- $mtype->append_child($xmldoc->create_text_node("message"));
- $m->append_child($mtype);
-
- $mvalue = $xmldoc->create_element("value");
- $mvalue->append_child($xmldoc->create_text_node($value));
- $m->append_child($mvalue);
-
- $messageElementParameters->append_child($m);
-
- $message->append_child($messageElementParameters);
-
- return $message;
+ $message = $xmldoc->create_element('windowsElement');
+
+ $messagetype = $xmldoc->create_element('type');
+ $messagetype->append_child($xmldoc->create_text_node("message"));
+ $message->append_child($messagetype);
+
+ $messageElementParameters = $xmldoc->create_element("windowsElementParameters");
+
+ $m = $xmldoc->create_element("message");
+
+ $mtype = $xmldoc->create_element("type");
+ $mtype->append_child($xmldoc->create_text_node("message"));
+ $m->append_child($mtype);
+
+ $mvalue = $xmldoc->create_element("value");
+ $mvalue->append_child($xmldoc->create_text_node($value));
+ $m->append_child($mvalue);
+
+ $messageElementParameters->append_child($m);
+
+ $message->append_child($messageElementParameters);
+
+ return $message;
}
/*
-* Get the message with a type
+* Get the message with a type
* @param $type : a string with the type of the message
-* return a string with the message to display
+* return a string with the message to display
*/
function liveclassroom_get_message($type) {
@@ -1045,14 +1045,14 @@
*/
function liveclassroom_send_logs($type,$parameters) {
- global $LIVECLASSROOM_LOGS;
+ global $LIVECLASSROOM_LOGS;
-
- $link = $LIVECLASSROOM_LOGS."?type=$type";
- $link .= "&$parameters";
- $link .= "&time=".time();
-
- return $link;
+
+ $link = $LIVECLASSROOM_LOGS."?type=$type";
+ $link .= "&$parameters";
+ $link .= "&time=".time();
+
+ return $link;
}
@@ -1086,7 +1086,7 @@
if (empty($version)) {
return "emptyversion";
}
-
+
return $version;
}
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-29 16:03:27 UTC (rev 153)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2007-01-02 15:45:44 UTC (rev 154)
@@ -129,23 +129,33 @@
$messageType = 'roomUpdated';
}
else if($_GET['action']=='deleteRoom') {
+
+ $is_archive = liveclassroom_api_room_is_archive($_GET['id']);
+
//delete the activities linked to this room
if (! liveclassroom_delete_all_instance_of_room($_GET['id'])) {
- notify("Could not delete the instances of the room");
+ notify("Could not delete the activities for the room: " + $_GET['id']);
}
//delete the room on the server
- liveclassroom_api_delete_room($_GET['id']);
-
- $messageType = 'roomDeleted';
+ if (! liveclassroom_api_delete_room($_GET['id'])) {
+ error("Unable to delete room with Id: ".$_GET['id']);
+ }
+
+ if ($is_archive) {
+ $messageType = 'archiveDeleted';
+ }
+ else {
+ $messageType = 'roomDeleted';
+ }
}
if (!$usersession = liveclassroom_create_session ($course, isteacher($courseid, $USER->id))) {
error ("Cannot create session");
}
-
- $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time'];
- if(isset($messageType)) $urlParams .= '&messageType='.$messageType;
+
+ $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time'];
+ if(isset($messageType)) $urlParams .= '&messageType='.$messageType;
header('Location: welcome.php?id='.$courseid.'&'.$urlParams);
}
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-29 16:03:27 UTC (rev 153)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2007-01-02 15:45:44 UTC (rev 154)
@@ -106,7 +106,7 @@
function doDelete(){
if(currentId!=""){
- var complete_url='manageRoomAction.php'+'?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"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
+ var complete_url='manageRoomAction.php'+'?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"]+'&id='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
location.href = complete_url
//var w = window.open(complete_url, '_top');
// w.focus();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-29 16:03:28
|
Revision: 153
http://svn.sourceforge.net/hw4mdl/?rev=153&view=rev
Author: shazan
Date: 2006-12-29 08:03:27 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
latest version for Voice Tools, integrate a part of the integration, form and list
Modified Paths:
--------------
trunk/moodle/mod/voicetool/config.html
trunk/moodle/mod/voicetool/css/StyleSheet.css
trunk/moodle/mod/voicetool/db/mysql.sql
trunk/moodle/mod/voicetool/displayChoicePage.php
trunk/moodle/mod/voicetool/generateListPanel.php
trunk/moodle/mod/voicetool/index.php
trunk/moodle/mod/voicetool/lib.php
trunk/moodle/mod/voicetool/mod.html
trunk/moodle/mod/voicetool/view.php
trunk/moodle/mod/voicetool/welcome.php
Added Paths:
-----------
trunk/moodle/mod/voicetool/api.php
trunk/moodle/mod/voicetool/db/postgres7.php
trunk/moodle/mod/voicetool/db/postgres7.sql
trunk/moodle/mod/voicetool/getXmlNewPanel.php
trunk/moodle/mod/voicetool/js/Ajax.js
trunk/moodle/mod/voicetool/js/constants.js
trunk/moodle/mod/voicetool/js/hwCommons.js
trunk/moodle/mod/voicetool/js/manageXml.js
trunk/moodle/mod/voicetool/js/pngfix.js
trunk/moodle/mod/voicetool/js/verifForm.js
trunk/moodle/mod/voicetool/pictures/items/more-link.png
Added: trunk/moodle/mod/voicetool/api.php
===================================================================
--- trunk/moodle/mod/voicetool/api.php (rev 0)
+++ trunk/moodle/mod/voicetool/api.php 2006-12-29 16:03:27 UTC (rev 153)
@@ -0,0 +1,544 @@
+<?PHP
+/******************************************************************************
+ * *
+ * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+ * *
+ * COPYRIGHT: *
+ * This software is the property of Horizon Wimba. *
+ * You can redistribute it and/or modify it under the terms of *
+ * the GNU General Public License as published by the *
+ * Free Software Foundation. *
+ * *
+ * WARRANTIES: *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with the Horizon Wimba Moodle Integration; *
+ * if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
+ * *
+ * Author: Hugues Pisapia *
+ * *
+ * Date: 15th April 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id$ */
+error_reporting(E_ALL);
+//WebService Client.
+require_once($CFG->libdir.'/soap/nusoap.php');
+//require_once($CFG->dirroot.'/lib/soap/nusoap.php');
+//require_once("$CFG->dirroot./lib/soap/nusoap.php");
+//require_once("lib.php");
+
+/// Library of functions and constants for the voicetool API
+
+$VT_API_VBOARD = 'board';
+$VT_API_VMAIL = 'vmail';
+$VT_API_VDIRECT = 'voicedirect';
+$VT_API_VRECORDER = 'recorder';
+
+$VT_API_QUALITY_BASIC = 'spx_8_q3';
+$VT_API_QUALITY_STANDARD = 'spx_16_q4';
+$VT_API_QUALITY_GOOD = 'spx_16_q6';
+$VT_API_QUALITY_SUPERIOR = 'spx_32_q8'; //ou q10 ??
+
+$VT_API_SERVICES = '/services/Broker?wsdl';
+$VT_API_CREATE_RESOURCE = 'createResource';
+$VT_API_MODIFY_RESOURCE = 'modifyResource';
+$VT_API_DELETE_RESOURCE = 'deleteResource';
+$VT_API_GET_RESOURCE = 'getResource';
+$VT_API_GET_RESOURCES = 'getResources';
+$VT_API_RESOURCE_EXISTS = 'resourceExists';
+$VT_API_CREATE_SESSION = 'createSession';
+$VT_API_ALLOWEDDOCBASE = 'isDocumentBaseAllowed';
+$VT_API_MESSAGE_EXISTS = 'messageExists';
+//-------
+$VT_API_STORE_AUDIO = 'storeAudio';
+
+$VT_API_GET_AUDIO = 'getAudio';
+
+$VT_API_AUDIO_EXISTS = 'audioExists';
+
+
+/**
+ * Send an SDK request to the VT server to create the resource.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_CREATE_RESOURCE
+ * @param $resource_data - the resource to create
+ * @return - the object returned by the call, or false if something goes wrong
+ */
+function voicetools_api_create_resource ($resource_data) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_CREATE_RESOURCE;
+
+ // print_r($resource_data);
+
+ // Set the WebService URL
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ // Set the parameters to send to the WebService
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $resource_data);
+
+ //print_r($resource);
+
+ // Call the WebService and store its result in $result.
+ $result = $soapclient->call($VT_API_CREATE_RESOURCE, $resource);
+
+ // echo "create resource".'<br>';
+ //print_r ($result);
+
+ /*
+ if (!voicetool_api_check_result ($result)) {
+
+ return false;
+ }
+ */
+ //return false;
+ return $result;
+}
+
+/**
+ * Send an SDK request to the VT server to create the resource.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_MODIFY_RESOURCE
+ * @param $resource_data - the resource to create
+ * @return - the object returned by the call, or false if something goes wrong
+ */
+function voicetools_api_modify_resource ($resource_data) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_MODIFY_RESOURCE;
+
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $resource_data);
+ //print_r($resource);
+
+ $result = $soapclient->call($VT_API_MODIFY_RESOURCE, $resource);
+
+
+ //print_r ($result);
+
+ /*
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+ */
+ return $result;
+}
+// To CHECK !!!
+function voicetools_api_message_exists ($rid, $mid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_MESSAGE_EXISTS;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid,
+ $mid);
+ //print_r($resource);
+
+ $result = $soapclient->call($VT_API_MESSAGE_EXISTS, $resource);
+
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+
+
+ $res=false;
+ foreach ($result['values'] as $item) {
+ if ($item['name'] == 'exists') {
+ $res = $item['value'];
+ }
+ }
+
+ return $res;
+ //return $result;
+}
+
+/**
+ * Send an SDK request to the VT server to delete a resource.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_DELETE_RESOURCE
+ * @param $rid - the rid of the resource to delete
+ * @return - the object returned by the call, or false if something goes wrong
+ */
+function voicetools_api_delete_resource ($rid) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_DELETE_RESOURCE;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid);
+
+ $result = $soapclient->call($VT_API_DELETE_RESOURCE, $resource);
+
+ /*
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+ */
+ return $result;
+}
+
+/**
+ * Send an SDK request to the VT server to test if the resource exist.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_RESOURCE_EXISTS
+ * @param $rid - the rid of the resource to find
+ * @return - a boolean. true if the resource exist, false elsewhere.
+ */
+function voicetools_api_resource_exists ($rid) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_RESOURCE_EXISTS;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid);
+
+ $result = $soapclient->call($VT_API_RESOURCE_EXISTS, $resource);
+ /*
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+ */
+ $res=false;
+ foreach ($result['values'] as $item) {
+ if ($item['name'] == 'exists') {
+ $res = $item['value'];
+ }
+ }
+
+ return $res;
+}
+
+/**
+ * Send an SDK request to the VT server to get the resource.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_GET_RESOURCE
+ * @param $rid - the rid of the resource to get
+ * @return - the object returned by the call, or false if something goes wrong.
+ */
+function voicetools_api_get_resource($rid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_GET_RESOURCE;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid);
+
+ $result = $soapclient->call($VT_API_GET_RESOURCE, $resource);
+
+ /*
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+ */
+ //pair set
+ return $result;
+}
+
+
+/**
+ * Send an SDK request to the VT server to get the resources.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_GET_RESOURCES
+ * @param $ridtable - a table with the rid of the resources to get
+ * @return - an array of the objects returned by the call, or false if something goes wrong.
+ */
+function voicetools_api_get_resources($ridtable) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_GET_RESOURCES;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $ridtable);
+
+ $result = $soapclient->call($VT_API_GET_RESOURCES, $resource);
+
+ /*
+ if (!voicetool_api_check_result ($result)) {
+ return false;
+ }
+ */
+ //pair set
+ return $result;
+}
+
+
+
+/**
+ * Create the session for a voice direct applet.
+ * @uses CFG
+ * @uses VT_API_SERVICES
+ * @uses VT_API_CREATE_SESSION
+ * @param - the voicetool information
+ * @return - the mid to insert into the html
+ */
+function voicetools_api_create_session ($voicetool) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_CREATE_SESSION;
+
+
+ $sessiondata = voicetools_create_session_data($voicetool);
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $sessiondata['user'],
+ $sessiondata['resource'],
+ $sessiondata['message'],
+ $sessiondata['rights']);
+
+ //print_r($resource);
+
+ $result = $soapclient->call($VT_API_CREATE_SESSION, $resource);
+
+ echo "create session".'<br>';
+ print_r ($result);
+
+ if (!voicetools_api_check_result ($result)) {
+
+ return false;
+ }
+
+ foreach ($result['values'] as $item) {
+
+ $values[$item['name']] = $item['value'];
+
+ }
+
+
+ return $values['nid'];
+}
+
+/**
+ * Checks that the documentabase is allowed on the VT server
+ * @param string $server the url of the VT server
+ * @param string $login the API login to use
+ * @param string $password the API password to use
+ * @param string the url that need to be checked
+ * @return string the string 'ok' if the url given is authorized to display voice tools,
+ * or an error message otherwise
+ */
+function voicetools_api_check_documentbase($server, $login, $password, $url) {
+ global $VT_API_SERVICES,
+ $VT_API_ALLOWEDDOCBASE;
+
+
+ $soapclient = new soap_client($server.$VT_API_SERVICES,true);
+
+ $resource = array ($login,
+ $password,
+ $url);
+
+ $result = $soapclient->call($VT_API_ALLOWEDDOCBASE, $resource);
+
+// print_r($result);
+
+ if (!voicetools_api_check_result ($result)) {
+ add_to_log("", "voice tool", "", "", "result ".$result);
+ return voicetools_api_get_error_message ($result);
+ }
+
+ foreach ($result['values'] as $item) {
+ if ($item['name'] == 'is_allowed') {
+ return 'is_allowed.'.$item['value'];
+ }
+ }
+
+ error('Return Value not Found');
+}
+
+function voicetools_api_audio_exists ($rid, $mid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_AUDIO_EXISTS;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid,
+ $mid);
+ //print_r($resource);
+
+ $result = $soapclient->call($VT_API_AUDIO_EXISTS, $resource);
+
+ if (!voicetools_api_check_result ($result)) {
+ return false;
+ }
+
+
+ $res=false;
+ foreach ($result['values'] as $item) {
+ if ($item['name'] == 'exists') {
+ $res = $item['value'];
+ }
+ }
+
+ return $res;
+ //return $result;
+}
+
+function voicetools_api_store_audio($rid, $mid, $audio, $filename) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_STORE_AUDIO;
+
+ $soapclient = new soap_client($CFG->voicetools_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetools_adminusername,
+ $CFG->voicetools_adminpassword,
+ $rid,
+ $mid,
+ $audio,
+ $filename);
+
+ $result = $soapclient->call($VT_API_STORE_AUDIO, $resource);
+}
+
+////////// Helper Function, kind of private
+
+/**
+ * Return true if the result does not contain an error code, or false wise.
+ * @param $result - a pairset resulting from an API call to $soapclient->call()
+ * @return true f $result does not contain an error code, false otherwise.
+ */
+function voicetools_api_check_result ($result) {
+
+
+ if (empty($result)){
+ //error ("Empty result after call to $VT_API_SERVICES");
+ error_log( "voicetool_api_check_result: Empty result after call to $VT_API_SERVICES");
+ add_to_log("", "voice tool", "", "", "voicetool_api_check_result: Empty result after call to ".$VT_API_SERVICES);
+ return false;
+ }
+
+ //$resultcode = voicetool_api_get_status_code($result);
+ if (voicetools_api_get_status_code($result) != 'ok') {
+ add_to_log("", "voice tool", "", "", "voicetool_api_check_result: not ok");
+ error_log( "voicetool_api_check_result: ".voicetools_api_get_error_message($result));
+ return false;
+ }
+
+ return true;
+}
+
+
+/**
+ * Return the status code as a string
+ * @param array $result - the result from a soap call
+ * @return string - the status code returned if any, or the empty string if none is found
+ */
+function voicetools_api_get_status_code ($result) {
+
+ foreach ($result['values'] as $values) {
+ if ($values['name'] == 'status_code') {
+ return $values['value'];
+ }
+ }
+ return '';
+}
+
+/**
+ * Return the error message as a string
+ * @param array $result - the result from a soap call
+ * @return string - the error message returned if any, or the empty string if none is found
+ */
+function voicetools_api_get_error_message ($result) {
+ foreach ($result['values'] as $values) {
+ if ($values['name'] == 'error_message') {
+ return $values['value'];
+ }
+ }
+ return '';
+}
+
+function voicetools_api_get_options($resourceid) {
+
+ $result = voicetools_api_get_resource($resourceid) ;
+
+ foreach ($result['groups'] as $values) {
+ if ($values['name'] == 'options'){
+ return $values['pairSet'];
+ }
+ }
+
+
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+class PairSet {
+ var $data = array ('values' => array (), 'groups' => array ());
+
+
+ /**
+ * Add a new NameValuePair in this PairSet
+ * @param aname - the name of the new NameValuePair
+ * @param avalue - the value of the new NameValuePair
+ */
+ function addNameValuePair ($aname, $avalue) {
+ array_push ($this->data['values'], array('name' => $aname, 'value' => $avalue));
+ }
+
+ /**
+ * Add a PairSet to this PairSet
+ * @param - the name of the new PairSet
+ * @param - the PairSet to add
+ */
+ function addPairSet ($aname, $aPairSet) {
+ array_push ($this->data['groups'],
+ array('name' => $aname, 'pairSet' => $aPairSet->getData()));
+ }
+
+ /**
+ * @return - an associative array containing this PairSet ready for the web service call
+ */
+ function getData () {
+ return $this->data;
+ }
+}
+
+?>
Property changes on: trunk/moodle/mod/voicetool/api.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Modified: trunk/moodle/mod/voicetool/config.html
===================================================================
--- trunk/moodle/mod/voicetool/config.html 2006-12-29 13:51:23 UTC (rev 152)
+++ trunk/moodle/mod/voicetool/config.html 2006-12-29 16:03:27 UTC (rev 153)
@@ -1,57 +1,55 @@
-<?php
-require_once ("$CFG->dirroot/lib/datalib.php");
-
-
-if (!$courses = get_records ('course', '', '', 'shortname ASC', 'id, shortname, fullname')) {
- error('Cannot retreive Course list');
-}
-
-
-
-?>
-
-
<form method="post" action="module.php" name="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
-<input type="hidden" name="module" value="voicetool">
+<input type="hidden" name="module" value="voicetools">
<table cellpadding="9" cellspacing="0" >
<tr>
<td colspan="3" align="center">
- <div><b><?php print_string('serverconfiguration', 'voicetool')?></b></div>
- <div style="font-size: 0.8em;">(<?php print_string('explainserverconfiguration', 'voicetool')?>)</div>
+ <div><b><?php print_string('serverconfiguration', 'voicetools')?></b></div>
+ <div style="font-size: 0.8em;">(<?php print_string('explainserverconfiguration', 'voicetools')?>)</div>
</td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string('servername', 'voicetool')?>:</td>
+ <td align="right"><?php print_string('servername', 'voicetools')?> :</td>
<td>
- <input name="servername" type="text" size="30" value="<?php p($CFG->voicetool_servername) ?>" />
+ <input name="servername" type="text" size="30" value="<?php p($CFG->voicetools_servername) ?>" />
</td>
<td>
- <?php print_string('configservername', 'voicetool') ?>
+ <?php print_string('configservername', 'voicetools') ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string('adminusername', 'voicetool')?>:</td>
+ <td align="right"><?php print_string('adminusername', 'voicetools')?> :</td>
<td>
- <input name="adminusername" type="text" size="20" value="<?php p($CFG->voicetool_adminusername) ?>" />
+ <input name="adminusername" type="text" size="30" value="<?php p($CFG->voicetools_adminusername) ?>" />
</td>
<td>
- <?php print_string('configadminusername', 'voicetool') ?>
+ <?php print_string('configadminusername', 'voicetools') ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string('adminpassword', 'voicetool')?>:</td>
+ <td align="right"><?php print_string('adminpassword', 'voicetools')?> :</td>
<td>
- <input name="adminpassword" type="text" size="20" value="<?php p($CFG->voicetool_adminpassword) ?>" />
+ <input name="adminpassword" type="text" size="30" value="<?php p($CFG->voicetools_adminpassword) ?>" />
</td>
<td>
- <?php print_string('configadminpassword', 'voicetool') ?>
+ <?php print_string('configadminpassword', 'voicetools') ?>
</td>
</tr>
+
<tr>
+<td><br /></td>
+</tr>
+<tr valign="top">
+ <td align="right"><?php print_string('integrationversion', 'voicetools')?> :</td>
+ <td>
+ <?php print_string("integrationversionnumber", "voicetools") ?>
+ </td>
+</tr>
+
+<tr>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string('savechanges') ?>" /></td>
</tr>
Modified: trunk/moodle/mod/voicetool/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/voicetool/css/StyleSheet.css 2006-12-29 13:51:23 UTC (rev 152)
+++ trunk/moodle/mod/voicetool/css/StyleSheet.css 2006-12-29 16:03:27 UTC (rev 153)
@@ -14,6 +14,8 @@
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 +36,106 @@
padding-left:2px;
vertical-align:middle;
}
-table.tab
-{
- width:100%;
+.limitWidth
+{
+ width:160px;
}
-table.tab td
+.alignRight
{
- vertical-align:top;
+
+
}
+.shiftAvailability
+{
+
+ padding-right:50px;
+}
div.tab
{
- padding-top:2%;
- padding-left:5%;
+ padding-top:2%;
+
+ padding-left:5%;
+ padding-right:5%;
display: none;
height:180px;
+
+
}
+.titlePodcaster
+ {
+ color:#305060;
+ font-size:14pt;
+ padding-left:10px;
+ font-family:Century Gothic, Verdana, Helvetica, Arial;
+ font-weight:bold;
+ font-style:italic;
+ vertical-align:top;
+
+
+ }
+
+
+ .podcaster
+ {
+ padding-left:15px;
+ }
+.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 +158,44 @@
{
cursor:pointer
}
+
.alert
{
color:Red;
}
-a.room {
-color:#889EB3;
+
+
+
+a.room { color:#889EB3;
+
text-decoration:none;
display:block;
width:100%;
+cursor:help;
+
}
-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;
+ cursor:help;
}
+
+
.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,60 +203,91 @@
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:50px;
+}
+
+
+.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;
+
cursor:hand;
}
+
+
+
+
tr.selectRoom{
background-color:red;
cursor:hand;
+ text-decoration:none;
}
.divProduct
{
- padding-top:3px;
+ padding-top:3px;
+padding-left:2px ;
+
}
+.separateProduct
+{
+ border-top:solid 1px #C7D3E1
+}
+
.shortShift{
+
padding-left:5px;
}
-.room td{
+
+.room td{
+ padding-left:0px ;
font-family:Verdana;
color:Black;
font-size:10;
- border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+
+ cursor:default;
+ text-decoration:none;
}
-.room label{
+
+.room label{
+
font-family:Verdana;
color:Black;
font-size:10;
- border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+
+ cursor:default;
+ text-decoration:none;
}
tr.overRoom{
font-family:Verdana;
@@ -201,99 +295,212 @@
font-size:11px;
border-bottom:solid 1px #F3F3F3;
background-color:#f0f3f5;
- cursor:pointer;
- cursor:hand;
+
+ cursor:default;
}
-.archive{
+
+.archive td{
+ padding-left:2px ;
font-family:Verdana;
color:#666666;
font-style:italic;
font-size:11px;
+
+}
+
+.room td{
+ padding-left:5px ;
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
border-bottom:solid 1px #F3F3F3;
+ cursor:default;
}
-.filterBar {
+
+.archive label{
+
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:default;
+}
+.room label{
+
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:default;
+}
+
+
+
+.filterBar table{
+
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;
+ text-align:center;
+ font-size:10px;
font-weight:bold ;
}
+
.filter_selected
{ font-weight:bold ;
font-family :Verdana;
color:#ffffff;
+ text-align:center;
height:24px;
- font-size:12px;
+ font-size:10px;
+
}
+
.filter_left_enabled
{
background-image:url("../pictures/items/filter-enabled-left.png");
+ background-repeat:no-repeat;
}
.filter_middle_enabled
{
background-image:url("../pictures/items/filter-enabled-middle.png");
font-family :Verdana;
color:#ffffff;
+ text-align:center;
height:24px;
- font-size:12px;
+ font-size:10px;
font-weight:bold ;
}
.filter_right_enabled
{
background-image:url("../pictures/items/filter-enabled-right.png");
+ background-repeat:no-repeat;
}
+.filter_right_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-right.png");
+ background-repeat:no-repeat;
+}
+.noFilter
+{
+ background-image:none;
+ font-family :Verdana;
+ color:#333333;
+ text-align:center;
+ height:24px;
+ font-size:10px;
+ font-weight:bold ;
+}
+.filter_middle_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-middle.png");
+ font-family :Verdana;
+ color:#333333;
+ text-align:center;
+ height:24px;
+ font-size:10px;
+ font-weight:bold ;
+
+}
+.filter_left_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-left.png");
+ background-repeat:no-repeat;
+}
+.filterSpace
+{
+ padding-left:10px;
+}
+
.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;
}
+.hideAndShift
+
+{
+ display:none;
+ padding-left:20px;
+}
.visible
{
display:block;
}
+
+.visibleAndShift
+{
+ display:block;
+ padding-left:20px;
+}
+
+
+
label.moreRoom
{
color:Navy;
@@ -301,56 +508,83 @@
padding-left:20px;
font-weight: bold;
}
+
+
#popup {
+
display:none;
font-size:8pt;
display:block;
position:absolute;
- top:50%; left:50%;
+ top:45%; left:45%;
+
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");
+ border-bottom:solid 1px #999999;
+
}
-.search
-{
- max-width:105px;
- }
+
.list
{
- height:280px;
- overflow-y:scroll;
+ height:285px;
+ overflow-y:scroll;
+ overflow-x: hidden;
+ width:100%;
+
}
-.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;
+ border-top:solid 1px #999999
+
+
}
.panelSettings table
{
@@ -359,12 +593,54 @@
display:none;
width:100%
}
-.part td
+
+
+ .part td
{
+
width:100%;
border-bottom: #818181 1px solid;
}
- .messageBar
+
+ .tooltip
{
- background-color:#ffff99;
- }
\ No newline at end of file
+ width:200px;
+ display:none;
+ position:absolute;
+ z-index:1;
+ background-color:#ffffd0;
+ padding:2px;
+ margin:2px;
+ left:0px;
+ top:0px;
+ font-family:Verdana;
+ font-size:8pt;
+ cursor:default;
+ }
+
+ #error_frame {
+ background-color : #FFD0D0;
+ padding : 0;
+ margin : 0;
+ border-style : solid;
+ border-color: red;
+ border-width : 1px;
+ text-align : left;
+ vertical-align : middle;
+ }
+
+ #error_title {
+ font-family : Verdana,Arial,Helvetica;
+ font-size : 12px;
+ font-weight : bold;
+ color : black;
+ padding : 0;
+ margin : 0;
+ text-align : left;
+ vertical-align : top;
+ }
+
+ .message{
+
+ background-color:#ffff99;
+ }
\ No newline at end of file
Modified: trunk/moodle/mod/voicetool/db/mysql.sql
===================================================================
--- trunk/moodle/mod/voicetool/db/mysql.sql 2006-12-29 13:51:23 UTC (rev 152)
+++ trunk/moodle/mod/voicetool/db/mysql.sql 2006-12-29 16:03:27 UTC (rev 153)
@@ -34,25 +34,22 @@
# that may be used, especially new entries in the table log_display
-CREATE TABLE `prefix_voicetool` (
+CREATE TABLE `prefix_voicetools` (
`id` int(10) unsigned NOT NULL auto_increment,
`rid` varchar(160) NOT NULL default '',
`course` int(10) unsigned NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
- `timemodified` int(10) unsigned NOT NULL default '0',
- `type` varchar(15) NOT NULL default '',
+ `type` varchar(160) NOT NULL default '',
+ `section` int(10) unsigned NOT NULL default '0',
+ `timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
-) COMMENT='Defines Voice Tool';
-# --------------------------------------------------------
+) COMMENT='Defines Voice Tools';
-CREATE TABLE `prefix_voicedirect`(
- `rid` varchar(160) NOT NULL default '',
- `description` varchar(255) NOT NULL default '',
- `email` varchar(255) NOT NULL default '',
- `type` varchar(10) NOT NULL,
- `quality` varchar(20) NOT NULL default 'basicquality',
- `archive` varchar(20) NOT NULL default '',
-
- PRIMARY KEY (`rid`)
-) COMMENT='Defines Voice Direct';
-# --------------------------------------------------------
+
+CREATE TABLE `prefix_tools` (
+ `rid` varchar(160) NOT NULL default '',
+ `name` varchar(255) NOT NULL default '',
+ `course` int(10) unsigned NOT NULL default '0',
+ `type` varchar(160) NOT NULL default '',
+ PRIMARY KEY (`rid`)
+) COMMENT='Defines Voice Tools on the server';
\ No newline at end of file
Added: trunk/moodle/mod/voicetool/db/postgres7.php
===================================================================
--- trunk/moodle/mod/voicetool/db/postgres7.php (rev 0)
+++ trunk/moodle/mod/voicetool/db/postgres7.php 2006-12-29 16:03:27 UTC (rev 153)
@@ -0,0 +1,46 @@
+<?PHP
+/******************************************************************************
+ * *
+ * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+ * *
+ * COPYRIGHT: *
+ * This software is the property of Horizon Wimba. *
+ * You can redistribute it and/or modify it under the terms of *
+ * the GNU General Public License as published by the *
+ * Free Software Foundation. *
+ * *
+ * WARRANTIES: *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with the Horizon Wimba Moodle Integration; *
+ * if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
+ * *
+ * Author: Hugues Pisapia *
+ * *
+ * Date: 15th April 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id$ */
+
+function voicetools_upgrade($oldversion) {
+/// This function does anything necessary to upgrade
+/// older versions to match current functionality
+
+ global $CFG;
+
+ if ($oldversion < 2006041500) {
+
+ # Do something ...
+
+ }
+
+ return true;
+}
+
+?>
Property changes on: trunk/moodle/mod/voicetool/db/postgres7.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/voicetool/db/postgres7.sql
===================================================================
--- trunk/moodle/mod/voicetool/db/postgres7.sql (rev 0)
+++ trunk/moodle/mod/voicetool/db/postgres7.sql 2006-12-29 16:03:27 UTC (rev 153)
@@ -0,0 +1,54 @@
+#******************************************************************************
+#* *
+#* Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+#* *
+#* COPYRIGHT: *
+#* This software is the property of Horizon Wimba. *
+#* You can redistribute it and/or modify it under the terms of *
+#* the GNU General Public License as published by the *
+#* Free Software Foundation. *
+#* *
+#* WARRANTIES: *
+#* This software is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with the Horizon Wimba Moodle Integration; *
+#* if not, write to the Free Software Foundation, Inc., *
+#* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
+#* *
+#* Author: Hugues Pisapia *
+#* *
+#* Date: 15th April 2006 *
+#* *
+#******************************************************************************
+
+# $Id$
+
+# This file contains a complete database schema for all the
+# tables used by this module, written in SQL
+
+# It may also contain INSERT statements for particular data
+# that may be used, especially new entries in the table log_display
+
+# --------------------------------------------------------
+
+#
+# Table structure for table `liveclassroom`
+#
+
+CREATE TABLE prefix_voicetools (
+ id SERIAL,
+ rid varchar(160) NOT NULL default '',
+ course integer NOT NULL default '0',
+ name varchar(255) NOT NULL default '',
+ type varchar(15) NOT NULL default '',
+ section integer NOT NULL default '0',
+ timemodified integer NOT NULL default '0',
+ PRIMARY KEY (id)
+);
+
+CREATE INDEX prefix_voicetools_course_idx ON prefix_voicetools (course);
+
Property changes on: trunk/moodle/mod/voicetool/db/postgres7.sql
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Modified: trunk/moodle/mod/voicetool/displayChoicePage.php
===================================================================
--- trunk/moodle/mod/voicetool/displayChoicePage.php 2006-12-29 13:51:23 UTC (rev 152)
+++ trunk/moodle/mod/voicetool/displayChoicePage.php 2006-12-29 16:03:27 UTC (rev 153)
@@ -28,8 +28,8 @@
******************************************************************************/
/* $Id$ */
+error_reporting(E_ALL);
-
require_once("../../config.php");
require_once("lib.php");
// require_once("api.php");
@@ -45,7 +45,7 @@
//print_r($params);
$courseid = $params['enc_course_id'];
- add_to_log("", "voicetool", "view", "test", $courseid);
+ //add_to_log("", "voicetool", "view", "test", $courseid);
// echo $courseid;
/*
@@ -65,110 +65,113 @@
error("ExpiredSessionException");
}
*/
-
- $xmldoc = new DomDocument();
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
+
+ $xmldoc = domxml_new_doc("1.0");
- $root = $xmldoc->createElement('root');
+ $root = $xmldoc->create_element('root');
- $root->appendChild(voicetool_get_session_params($xmldoc,$params));
+ //$root->append_child(voicetools_get_session_params($xmldoc,$params));
- $windows = $xmldoc->createElement('windows');
+ $windows = $xmldoc->create_element('windows');
//HEADER BAR
- $windows->appendChild(voicetool_create_headerbar($xmldoc));
+ $windows->append_child(voicetools_create_headerbar($xmldoc));
// NEW BOARD
- $productChoice = $xmldoc->createElement('windowsElement');
- $productChoicetype = $xmldoc->createElement('type');
- $productChoicetype->appendChild($xmldoc->createTextNode("productChoice"));
- $productChoice->appendChild($productChoicetype);
+ $productChoice = $xmldoc->create_element('windowsElement');
+ $productChoicetype = $xmldoc->create_element('type');
+ $productChoicetype->append_child($xmldoc->create_text_node("productChoice"));
+ $productChoice->append_child($productChoicetype);
- $productChoiceElementParameters = $xmldoc->createElement("windowsElementParameters");
+ $productChoiceElementParameters = $xmldoc->create_element("windowsElementParameters");
- $productInfo = $xmldoc->createElement('productInformations');
+ $productInfo = $xmldoc->create_element('productInformations');
- $action = $xmldoc->createElement('action');
+ $action = $xmldoc->create_element('action');
- $actionName = $xmldoc->createElement('name');
- $actionName->appendChild($xmldoc->createTextNode("gaga.php"));
- $action->appendChild($actionName);
+ $actionName = $xmldoc->create_element('name');
+ $actionName->append_child($xmldoc->create_text_node("launchNew(\"getXmlNewPanel.php\",\"Management\",\"createRoom\",\"VoiceBoard\")"));
+ $action->append_child($actionName);
- $productParameters = $xmldoc->createElement('parameters');
- $productParameter = $xmldoc->createElement('parameter');
- $productParameter->appendChild($xmldoc->createTextNode("test=2"));
- $productParameters->appendChild($productParameter);
- $action->appendChild($productParameters);
+ $productParameters = $xmldoc->create_element('parameters');
+ $productParameter = $xmldoc->create_element('parameter');
+ $productParameter->append_child($xmldoc->create_text_node("test=2"));
+ $productParameters->append_child($productParameter);
+ $action->append_child($productParameters);
- $productInfo->appendChild($action);
+ $productInfo->append_child($action);
- $pictureUrl = $xmldoc->createElement('pictureUrl');
- $pictureUrl->appendChild($xmldoc->createTextNode("pictures/buttons/new-createvoiceboard.png"));
- $productInfo->appendChild($pictureUrl);
+ $pictureUrl = $xmldoc->create_element('pictureUrl');
+ $pictureUrl->append_child($xmldoc->create_text_node("pictures/buttons/new-createvoiceboard.png"));
+ $productInfo->append_child($pictureUrl);
- $value = $xmldoc->createElement('value');
- $value->appendChild($xmldoc->createTextNode("New Board"));
- $productInfo->appendChild($value);
+ $value = $xmldoc->create_element('value');
+ $value->append_child($xmldoc->create_text_node("New Board"));
+ $productInfo->append_child($value);
- $description = $xmldoc->createElement('description');
- $description->appendChild($xmldoc->createTextNode(get_string('newVoiceBoard', 'voicetool')));
- $productInfo->appendChild($description);
+ $description = $xmldoc->create_element('description');
+ $description->append_child($xmldoc->create_text_node(get_string('VoiceBoardDescription', 'voicetools')));
+ $productInfo->append_child($description);
- $productChoiceElementParameters->appendChild($productInfo);
+ $productChoiceElementParameters->append_child($productInfo);
- $productChoice->appendChild($productChoiceElementParameters);
+ $productChoice->append_child($productChoiceElementParameters);
- $windows->appendChild($productChoice);
+ $windows->append_child($productChoice);
// NEW PRESENTATION
- $productPresentation = $xmldoc->createElement('windowsElement');
- $productPresentationtype = $xmldoc->createElement('type');
- $productPresentationtype->appendChild($xmldoc->createTextNode("productChoice"));
- $productPresentation->appendChild($productPresentationtype);
+ $productPresentation = $xmldoc->create_element('windowsElement');
+ $productPresentationtype = $xmldoc->create_element('type');
+ $productPresentationtype->append_child($xmldoc->create_text_node("productChoice"));
+ $productPresentation->append_child($productPresentationtype);
- $productPresentationElementParameters = $xmldoc->createElement("windowsElementParameters");
+ $productPresentationElementParameters = $xmldoc->create_element("windowsElementParameters");
- $productPresentationInfo = $xmldoc->createElement('productInformations');
+ $productPresentationInfo = $xmldoc->create_element('productInformations');
- $productPresentationaction = $xmldoc->createElement('action');
+ $productPresentationaction = $xmldoc->create_element('action');
- $productPresentationactionName = $xmldoc->createElement('name');
- $productPresentationactionName->appendChild($xmldoc->createTextNode("gaga.php"));
- $productPresentationaction->appendChild($productPresentationactionName);
+ $productPresentationactionName = $xmldoc->create_element('name');
+ $productPresentationactionName->append_child($xmldoc->create_text_node("launchNew(\"getXmlNewPanel.php\",\"Management\",\"createRoom\",\"VoicePresentation\")"));
+ $productPresentationaction->append_child($productPresentationactionName);
- $productPresentationproductParameters = $xmldoc->createElement('parameters');
- $productPresentationproductParameter = $xmldoc->createElement('parameter');
- $productPresentationproductParameter->appendChild($xmldoc->createTextNode("test=2"));
- $productPresentationproductParameters->appendChild($productPresentationproductParameter);
- $productPresentationaction->appendChild($productPresentationproductParameters);
+ $productPresentationproductParameters = $xmldoc->create_element('parameters');
+ $productPresentationproductParameter = $xmldoc->create_element('parameter');
+ $productPresentationproductParameter->append_child($xmldoc->create_text_node("test=2"));
+ $productPresentationproductParameters->append_child($productPresentationproductParameter);
+ $productPresentationaction->append_child($productPresentationproductParameters);
- $productPresentationInfo->appendChild($productPresentationaction);
+ $productPresentationInfo->append_child($productPresentationaction);
- $productPresentationpictureUrl = $xmldoc->createElement('pictureUrl');
- $productPresentationpictureUrl->appendChild($xmldoc->createTextNode("pictures/buttons/new-createvoicepresentation.png"));
- $productPresentationInfo->appendChild($productPresentationpictureUrl);
+ $productPresentationpictureUrl = $xmldoc->create_element('pictureUrl');
+ $productPresentationpictureUrl->append_child($xmldoc->create_text_node("pictures/buttons/new-createvoicepresentation.png"));
+ $productPresentationInfo->append_child($productPresentationpictureUrl);
- $productPresentationvalue = $xmldoc->createElement('value');
- $productPresentationvalue->appendChild($xmldoc->createTextNode("New Presentation"));
- $productPresentationInfo->appendChild($productPresentationvalue);
+ $productPresentationvalue = $xmldoc->create_element('value');
+ $productPresentationvalue->append_child($xmldoc->create_text_node("New Presentation"));
+ $productPresentationInfo->append_child($productPresentationvalue);
- $productPresentationdescription = $xmldoc->createElement('description');
- $productPresentationdescription->appendChild($xmldoc->createTextNode(get_string('newVoicePresentation', 'voicetool')));
- $productPresentationInfo->appendChild($productPresentationdescription);
+ $productPresentationdescription = $xmldoc->create_element('description');
+ $productPresentationdescription->append_child($xmldoc->create_text_node(get_string('VoicePresentationDescription', 'voicetools')));
+ $productPresentationInfo->append_child($productPresentationdescription);
- $productPresentationElementParameters->appendChild($productPresentationInfo);
+ $productPresentationElementParameters->append_child($productPresentationInfo);
- $productPresentation->appendChild($productPresentationElementParameters);
+ $productPresentation->append_child($productPresentationElementParameters);
//---------
- $windows->appendChild($productPresentation);
+ $windows->append_child($productPresentation);
- $root->appendChild($windows);
+ $root->append_child($windows);
- $xmldoc->appendChild($root);
- $xmldoc->save('choice.xml');
+ $xmldoc->append_child($root);
+ $xmldoc->dump_file('choice.xml');
- $xmlstring = $xmldoc->saveXML(); // Xml datas into a string
+ $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
$finalstring = str_replace("\n", '', $xmlstring);
echo $xmlstring;
Modified: trunk/moodle/mod/voicetool/generateListPanel.php
===================================================================
--- trunk/moodle/mod/voicetool/generateListPanel.php 2006-12-29 13:51:23 UTC (rev 152)
+++ trunk/moodle/mod/voicetool/generateListPanel.php 2006-12-29 16:03:27 UTC (rev 153)
@@ -66,88 +66,93 @@
error("ExpiredSessionException");
}
*/
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
+
- $xmldoc = new DomDocument();
+ $xmldoc = domxml_new_doc("1.0");
- $root = $xmldoc->createElement('root');
+ $root = $xmldoc->create_element('root');
- $root->appendChild(voicetool_get_session_params($xmldoc,$params));
+ //$root->append_child(voicetools_get_session_params($xmldoc,$params));
- $windows = $xmldoc->createElement('windows');
+ $windows = $xmldoc->create_element('windows');
//HEADER BAR
- $windows->appendChild(voicetool_create_headerbar($xmldoc));
+ $windows->append_child(voicetools_create_headerbar($xmldoc));
-
+
//TOOL BAR
- $toolbar = $xmldoc->createElement('windowsElement');
- $tbtype = $xmldoc->createElement('type');
- $tbtype->appendChild($xmldoc->createTextNode("toolBar"));
- $toolbar->appendChild($tbtype);
+ $toolbar = $xmldoc->create_element('windowsElement');
+ $tbtype = $xmldoc->create_element('type');
+ $tbtype->append_child($xmldoc->create_text_node("toolBar"));
+ $toolbar->append_child($tbtype);
- $tbelementParameters = $xmldoc->createElement("windowsElementParameters");
+ $tbelementParameters = $xmldoc->create_element("windowsElementParameters");
- $menubar = $xmldoc->createElement('menuElements');
+ $menubar = $xmldoc->create_element('menuElements');
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', ''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchAjaxRequest('displayChoicePage.php','Management','new','true')", ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=voicetool')",''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchAjaxRequest('displayChoicePage.php','Management','new','true')", ''));
//separator
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php','Management','update','false')", ''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', ''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->appendChild(voicetool_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "",""));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
+
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('getXmlNewPanel.php','Management','update','false')", ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
+ $menubar->append_child(voicetools_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "",""));
- $tbelementParameters->appendChild($menubar);
- $toolbar->appendChild($tbelementParameters);
+ $tbelementParameters->append_child($menubar);
+ $toolbar->append_child($tbelementParameters);
- $windows->appendChild($toolbar);
- /*
+ $windows->append_child($toolbar);
+
// MESSAGE BAR
if (isset($params['messageType'])) {
- $windows->appendChild(liveclassroom_create_message($xmldoc, 'info', liveclassroom_get_message($params['messageType'])));
+ $windows->append_child(voicetools_create_message($xmldoc, 'info', voicetools_get_message($params['messageType'])));
}
- */
+
// LIST
-
- $list = $xmldoc->createElement('windowsElement');
- $typeWindowsElement = $xmldoc->createElement('type');
- $typeWindowsElement->appendChild($xmldoc->createTextNode("list"));
- $list->appendChild($typeWindowsElement);
- $elementParameters = $xmldoc->createElement('windowsElementParameters');
+ $list = $xmldoc->create_element('windowsElement');
+ $typeWindowsElement = $xmldoc->create_element('type');
+ $typeWindowsElement->append_child($xmldoc->create_text_node("list"));
+ $list->append_child($typeWindowsElement);
+
+ $elementParameters = $xmldoc->create_element('windowsElementParameters');
- $products = $xmldoc->createElement('products');
+ $products = $xmldoc->create_element('products');
// LIST PRODUCTS
- $listProducts = $xmldoc->createElement('listProducts');
+ $listProducts = $xmldoc->create_element('listProducts');
- $listProducts->appendChild(voicetool_create_product_information($xmldoc,'1','','productType','Voice Boards'));
- $listProducts->appendChild(voicetool_create_product_information($xmldoc,'2','','productType','Voice Presentations'));
+ $listProducts->append_child(voicetools_create_product_information($xmldoc,'3','toggleimgboard','productType','Voice Boards'));
+ $listProducts->append_child(voicetools_create_product_information($xmldoc,'4','toggleimgpresentation','productType','Voice Presentations'));
+
+ $products->append_child($listProducts);
- $products->appendChild($listProducts);
-
// PRODUCTS CONTENT
- $productContent = $xmldoc->createElement('productsContent');
- $productContent->appendChild(voicetool_xml_list_voice_board($xmldoc,$courseid));
+
+ $products->append_child(voicetools_xml_list_voice_tools($xmldoc,$courseid));
+
+ $elementParameters->append_child($products);
- $products->appendChild($productContent);
+ $list->append_child($elementParameters);
- $elementParameters->appendChild($products);
+ $windows->append_child($list);
- $list->appendChild($elementParameters);
- $windows->appendChild($list);
+ $root->append_child($windows);
- $root->appendChild($windows);
+ $xmldoc->append_child($root);
+// $xmldoc->dump_file('test.xml', false, true);
+ $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
- $xmldoc->appendChild($root);
- $xmldoc->save('list.xml');
- $xmlstring = $xmldoc->saveXML(); // Xml datas into a string
-
$finalstring = str_replace("\n", '', $xmlstring);
echo $xmlstring;
Added: trunk/moodle/mod/voicetool/getXmlNewPanel.php
===================================================================
--- trunk/moodle/mod/voicetool/getXmlNewPanel.php (rev 0)
+++ trunk/moodle/mod/voicetool/getXmlNewPanel.php 2006-12-29 16:03:27 UTC (rev 153)
@@ -0,0 +1,1017 @@
+<?PHP
+
+/******************************************************************************
+ * *
+ * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. *
+ * *
+ * COPYRIGHT: *
+ * This software is the property of Horizon Wimba. *
+ * You can redistribute it and/or modify it under the terms of *
+ * the GNU General Public License as published by the *
+ * Free Software Foundation. *
+ * *
+ * WARRANTIES: *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
[truncated message content] |
|
From: <sh...@us...> - 2006-12-29 13:51:36
|
Revision: 152
http://svn.sourceforge.net/hw4mdl/?rev=152&view=rev
Author: shazan
Date: 2006-12-29 05:51:23 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
Display the list of rooms depending of the roles for 1.7
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateListRooms.php
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-29 13:33:44 UTC (rev 151)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-29 13:51:23 UTC (rev 152)
@@ -55,12 +55,21 @@
$userid = liveclassroom_api_get_teacher_user_id($courseid);
-if(isteacher($courseid, $USER->id) ) {
- $isteacher = 1;
+if(isstudent($courseid)) { //Student
+ $isteacher = 0;
}
-else if (isstudent($courseid) ) {
- $isteacher = 0;
+else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher
+ $isteacher = 1;
}
+
+if(strstr($CFG->release,"1.7")) { // 1.7.* version
+ if (iscreator()) { // Course Creator
+ $isteacher = 1;
+ }
+ else if (!isteacheredit($courseid)) { // Non-editing Teacher
+ $isteacher = 0;
+ }
+}
if (!liveclassroom_init_session($params)) {
error("ExpiredSessionException");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-29 13:33:47
|
Revision: 151
http://svn.sourceforge.net/hw4mdl/?rev=151&view=rev
Author: hugues
Date: 2006-12-29 05:33:44 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10561
- Internationalized the settings page
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/generateSettings.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 13:30:12 UTC (rev 150)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 13:33:44 UTC (rev 151)
@@ -93,7 +93,47 @@
$string['signature'] = "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
$string['board'] = "Invalid Voice Board parameters. Please contact your administrator for more information. ";
+$string['Settings'] = "Settings";
+$string['Live Classroom'] = "Live Classroom";
+$string['Room Info'] = "Room Info";
+$string['Title: '] = "Title: ";
+$string['Description: '] = "Description: ";
+$string['Type : '] = "Type: ";
+$string['Lecture room'] = "Lecture Room";
+$string['Instructors lead the presentation'] = "Instructors lead the presentation";
+$string['Discussion room'] = "Discussion Room";
+$string['Students and Instructors have the same rigths'] = "Students and Instructors have the same rigths";
+$string['Media'] = "Media";
+$string['Audio'] = "Audio";
+$string['Enable Students to use the phone'] = "Enable Students to use the phone";
+$string['Note: Instructors can always use the phone'] = "Note: Instructors can always use the phone";
+$string['Enable Student\'s microphones at presentation start'] = "Enable Student's microphones at presentation start";
+$string['One-way Video'] = "One-way Video";
+$string['Presenter uses RealProducer'] = "Presenter uses RealProducer";
+$string['Room Id: '] = "Room Id: ";
+$string['Third-party Conference Call'] = "Third-party Conference Call";
+$string['Features'] = "Features";
+$string['Enable Students to use eBoard'] = "Enable Students to use eBoard";
+$string['Enable Students to use AppShare'] = "Enable Students to use AppShare";
+$string['Enable Archiving'] = "Enable Archiving";
+$string['Enable Appshare'] = "Enable Appshare";
+$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import";
+$string['Chat'] = "Chat";
+$string['Enable Students to use text chat'] = "Enable Students to use text chat";
+$string['Enable Public and Private text chat'] = "Enable Public and Private text chat";
+$string['Enable Public text chat only'] = "Enable Public text chat only";
+$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Students are always able to chat with presenters and/or technical help";
+$string['Access'] = "Access";
+$string['Available'] = "Available";
+$string['Maximum users: '] = "Maximum users: ";
+$string['Unlimited'] = "Unlimited";
+$string['Limited: '] = "Limited: ";
+$string['Enable guest access'] = "Enable guest access";
+$string['Room Id: '] = "Room Id: ";
+
+
+
//First Time Use - not use yet
$string['firstRoom'] = 'Main classroom';
$string['secondRoom'] = 'Group 1';
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 13:30:12 UTC (rev 150)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 13:33:44 UTC (rev 151)
@@ -32,25 +32,25 @@
// require_once($CFG->dirroot.'/config.php');
require_once("../../config.php");
require_once("lib.php");
- require_once("api.php");
- // Variables needed
- global $CFG;
+ require_once("api.php");
+ // Variables needed
+ global $CFG;
- if (version_compare(PHP_VERSION,'5','>=')) {
- require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
- }
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
- $courseid = $_GET['enc_course_id'];
- $signature = $_GET['signature'];
- $action = $_GET['action'];
+ $courseid = $_GET['enc_course_id'];
+ $signature = $_GET['signature'];
+ $action = $_GET['action'];
- $MAINLECTURE = 'MainLecture';
- $DISCUSSIONROOM = 'Discussion';
- $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom';
+ $MAINLECTURE = 'MainLecture';
+ $DISCUSSIONROOM = 'Discussion';
+ $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom';
- if (!liveclassroom_init_session($_GET)) {
- error("ExpiredSessionException");
- }
+ if (!liveclassroom_init_session($_GET)) {
+ error("ExpiredSessionException");
+ }
if($action == 'update') {
$roomId = $_GET['id'];
@@ -80,7 +80,6 @@
$windows->append_child(liveclassroom_create_headerbar($xmldoc));
-
// CONTEXT BAR
$contextbar = $xmldoc->create_element('windowsElement');
@@ -96,10 +95,10 @@
else $cbname->append_child($xmldoc->create_text_node("New room"));
$contextbarinformations->append_child($cbname);
$cbcontext = $xmldoc->create_element("context");
- $cbcontext->append_child($xmldoc->create_text_node("Settings"));
+ $cbcontext->append_child($xmldoc->create_text_node(liveclassroom_get_message("Settings")));
$contextbarinformations->append_child($cbcontext);
$cbproduct = $xmldoc->create_element("product");
- $cbproduct->append_child($xmldoc->create_text_node("Live Classroom"));
+ $cbproduct->append_child($xmldoc->create_text_node(liveclassroom_get_message("Live Classroom")));
$contextbarinformations->append_child($cbproduct);
$cbelementParameters->append_child($contextbarinformations);
@@ -125,7 +124,7 @@
$panelSettings = $xmldoc->create_element('panelSettings');
// ROOM INFO PANEL INFO
- $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block"));
+ $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', liveclassroom_get_message('Room Info'), "1", "block"));
// ROOM INFO CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -154,8 +153,10 @@
$align->append_child($xmldoc->create_text_node("right"));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label",
+ $parameters=array("class" => "alert", "value" => "*") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label",
+ $parameters=array("value" => liveclassroom_get_message("Title: ")) ));
$panelLine->append_child($linepart);
$parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text");
@@ -207,7 +208,8 @@
$align->append_child($xmldoc->create_text_node("right"));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label",
+ $parameters=array("value" => liveclassroom_get_message("Description: "))));
$panelLine->append_child($linepart);
$linepart = $xmldoc->create_element('panelLinePart');
@@ -223,7 +225,10 @@
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea",
+ $parameters=array("cols" => "40", "id" => "description",
+ "value" => $room_info['description'],
+ "name" => "description", "rows" => "4") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -251,26 +256,28 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node("right"));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label",
+ $parameters=array("value" => liveclassroom_get_message("Type : "))));
+ $panelLine->append_child($linepart);
- $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
- if(($action=="update") && ($isLectureRoom==true))
- {
- $_SESSION['led']='instructor';
- $parameters['checked']=true;
- }
- else if($action=="new")
- {
- $parameters['checked']=true;
- }
- else
- {
- $parameters['checked']=true;
- }
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor",
+ "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
+ if(($action=="update") && ($isLectureRoom==true))
+ {
+ $_SESSION['led']='instructor';
+ $parameters['checked']=true;
+ }
+ else if($action=="new")
+ {
+ $parameters['checked']=true;
+ }
+ else
+ {
+ $parameters['checked']=true;
+ }
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
@@ -281,40 +288,41 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters));
- $panelLine->append_child($linepart);
-
- $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters));
+ $panelLine->append_child($linepart);
+
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor",
+ "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label",
+ $parameters=array("for" => "led_instructor", "valign" => "top", "value" => liveclassroom_get_message("Lecture room") ) ));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Instructors lead the presentation" ) ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Instructors lead the presentation"))));
+ $panelLine->append_child($linepart);
+ $panelContent->append_child($panelLine);
- $panelContent->append_child($panelLine);
+ // FOURTH LINE
+ $panelLine = $xmldoc->create_element('panelLine');
- // FOURTH LINE
- $panelLine = $xmldoc->create_element('panelLine');
-
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
@@ -326,11 +334,11 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
+ $panelLine->append_child($linepart);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
@@ -342,40 +350,38 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters));
+ $panelLine->append_child($linepart);
-
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
- if(($action=="update") && ($isLectureRoom==false))
- {
- $_SESSION['led']='student';
- $parameters['checked']=true;
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
+ if(($action=="update") && ($isLectureRoom==false))
+ {
+ $_SESSION['led']='student';
+ $parameters['checked']=true;
+ }
+ else
+ {
+ $parameters['checked']=true;
+ }
- }
- else
- {
- $parameters['checked']=true;
- }
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => liveclassroom_get_message("Discussion room"))));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Students and Instructors have the same rigths" ) ));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Students and Instructors have the same rigths"))));
+ $panelLine->append_child($linepart);
- $panelContent->append_child($panelLine);
- }
+ $panelContent->append_child($panelLine);
+}
- $panelSettings->append_child($panelContent);
+$panelSettings->append_child($panelContent);
$panelsSettings->append_child($panelSettings);
@@ -385,7 +391,7 @@
$panelSettingsM = $xmldoc->create_element('panelSettings');
// MEDIA PANEL INFO
- $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
+ $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Media'), "2", 'none'));
// MEDIA CONTENT
$panelContentM = $xmldoc->create_element('panelContent');
@@ -421,7 +427,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters));
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Audio") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Audio")) ));
$panelLine->append_child($linepart);
$panelContentM->append_child($panelLine);
@@ -463,13 +469,13 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use the phone") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use the phone")) ));
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note: Instructors can always use the phone") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Note: Instructors can always use the phone")) ));
$panelLine->append_child($linepart);
$panelContentM->append_child($panelLine);
@@ -511,7 +517,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Student's microphones at presentation start") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Student's microphones at presentation start")) ));
$panelLine->append_child($linepart);
$panelContentM->append_child($panelLine);
@@ -545,11 +551,11 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("One-way Video")) ));
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Presenter uses RealProducer") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Presenter uses RealProducer"))));
$panelLine->append_child($linepart);
$panelContentM->append_child($panelLine);
@@ -577,7 +583,7 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => liveclassroom_get_message("Room Id: "))));
$panelLine->append_child($linepart);
$parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field", "maxlength" => "50") ;
@@ -621,7 +627,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Third-party Conference Call") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Third-party Conference Call"))));
$panelLine->append_child($linepart);
$panelContentM->append_child($panelLine);
@@ -635,7 +641,7 @@
$panelSettings = $xmldoc->create_element('panelSettings');
// FEATURES PANEL INFO
- $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Features'), "3", 'none'));
// FEATURES CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -667,7 +673,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use eBoard") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use eBoard")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -699,7 +705,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => "Enable Students to use AppShare") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use AppShare"))));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -730,7 +736,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Archiving") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable Archiving"))));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -761,7 +767,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Appshare") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable Appshare"))));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -792,7 +798,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable On-The-Fly PPT Import")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -805,7 +811,7 @@
// ------------------ CHAT --------------------
// CHAT PANEL INFO
$panelSettings = $xmldoc->create_element('panelSettings');
- $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Chat'), "4", 'none'));
// CHAT CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -835,7 +841,7 @@
else $parameters['checked']=true;
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use text chat") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use text chat")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -865,7 +871,7 @@
else $parameters['checked']=true;
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Public and Private text chat") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public and Private text chat")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -894,7 +900,7 @@
}
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Public text chat only") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public text chat only")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -917,7 +923,7 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(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") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Note: Students are always able to chat with presenters and/or technical help"))));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -930,7 +936,7 @@
// ------------------- ACCESS ----------------------
$panelSettings = $xmldoc->create_element('panelSettings');
// ACCESS PANEL INFO
- $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', 'Access', "5", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Access'), "5", 'none'));
// ACCESS CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -960,7 +966,7 @@
else $parameters['checked']=true;
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "acessAvailable_true", "value" => "Available") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "acessAvailable_true", "value" => liveclassroom_get_message("Available")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -1006,7 +1012,7 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Maximum users : ") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Maximum users: "))));
$panelLine->append_child($linepart);
$linepart = $xmldoc->create_element('panelLinePart');
@@ -1026,7 +1032,7 @@
else $parameters['checked']=true;
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_false", "value" => "Unlimited") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_false", "value" => liveclassroom_get_message("Unlimited"))));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -1071,7 +1077,7 @@
}
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_true", "value" => "Limited: ") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_true", "value" => liveclassroom_get_message("Limited: "))));
$panelLine->append_child($linepart);
$parameters=array("type" => "text", "id" => "userlimittext", "name" => "userlimit", "style" => "input", "disabled" => "disabled") ;
@@ -1111,7 +1117,7 @@
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable guest access") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable guest access")) ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -1137,7 +1143,7 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => "Room Id:") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id:")) ));
$panelLine->append_child($linepart);
$parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-29 13:30:23
|
Revision: 150
http://svn.sourceforge.net/hw4mdl/?rev=150&view=rev
Author: shazan
Date: 2006-12-29 05:30:12 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
fix bug 10532: object course was not stored after the action
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-29 12:06:29 UTC (rev 149)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-29 13:30:12 UTC (rev 150)
@@ -35,7 +35,7 @@
$courseid = $_GET['enc_course_id'];
require_login($courseid, false);
-
+$course = get_record("course", "id", $courseid);
if (isguest()) {
error("Guests are not allowed to create rooms", $_SERVER["HTTP_REFERER"]);
}
@@ -140,13 +140,14 @@
$messageType = 'roomDeleted';
}
- if (!$usersession = liveclassroom_create_session ($COURSE, isteacher($courseid, $USER->id))) {
- error ("Cannot create session");
+ if (!$usersession = liveclassroom_create_session ($course, isteacher($courseid, $USER->id))) {
+ error ("Cannot create session");
}
-
- $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time'];
- if(isset($messageType)) $urlParams .= '&messageType='.$messageType;
+
+ $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time'];
+ if(isset($messageType)) $urlParams .= '&messageType='.$messageType;
header('Location: welcome.php?id='.$courseid.'&'.$urlParams);
}
+
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-29 12:06:30
|
Revision: 149
http://svn.sourceforge.net/hw4mdl/?rev=149&view=rev
Author: shazan
Date: 2006-12-29 04:06:29 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
add features of js files and fix bug 10533. Dialog while deleting Archive/room
Modified Paths:
--------------
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/verifForm.js
Removed Paths:
-------------
trunk/moodle/mod/liveclassroom/js/verif.js
Modified: trunk/moodle/mod/liveclassroom/js/constants.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-29 11:05:36 UTC (rev 148)
+++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-29 12:06:29 UTC (rev 149)
@@ -16,11 +16,12 @@
var currentId="";
var currentProduct="";
var currentTool="all";
+ var currentIdtab="1";
var typeSelect=LC_MAINLECTURE;
var longname="";
var description="";
var currentNid="";
-
+var message=false;
var currentDiv=0;
var numberMainLectureRoom=0;
var numberDiscussionRoom=0;
@@ -28,6 +29,7 @@
var numberVoicePresentation=0;
var studentView=false;
var numberArchive=new Array();
+var isFilter=false;
// xml
var objDom;
var objDomTree;
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-29 11:05:36 UTC (rev 148)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-29 12:06:29 UTC (rev 149)
@@ -59,10 +59,16 @@
}
- function confirmDelete(delUrl, type){
- if (confirm("Are you really sure you want to delete this " + type + " ?" )) {
- location.href = delUrl
- }
+ function confirmDelete(){
+ var type=""
+ if(currentProduct==LC_PRODUCT && (typeSelect==LC_MAINLECTURE || typeSelect==LC_DISCUSSION) ) type="room"
+ else type="archive"
+ /* else if(currentProduct==VT_PRODUCT && typeSelect==VB_PRODUCT)
+ type="voice board"
+ else if(currentProduct==VT_PRODUCT && typeSelect==VP_PRODUCT)
+ type="voice presentation" */
+ return confirm("Are you sure you want to delete this " + type)
+
}
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-29 11:05:36 UTC (rev 148)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-29 12:06:29 UTC (rev 149)
@@ -149,8 +149,11 @@
document.getElementById(divToReload).innerHTML = display;
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
+ if(navigator.appName.indexOf("Explorer") > -1 && parseFloat(navigator.appVersion)<5.5)
+ {
+
correctPNG();
+ }
if(divToReload=="all" || divToReload=="list"){
@@ -317,7 +320,7 @@
if(product=="all" || currentTool=="all"){
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure you want to delete this room ?');\""
+ actionDelete="onclick=\"javascript:return confirmDelete();\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
@@ -384,14 +387,14 @@
{
var display="";
- if(Navigateur()=="Safari"){
- display+="<td align='right' width=115px>"
- display+="<table border=0 class='search' cellspacing=0 cellpadding=0 >"
+ if(navigator.userAgent.indexOf("Safari") != -1 ){
+ display+="<td align='right' width=120px>"
+ display+="<table border=0 class='search' cellspacing=0 cellpadding=0 style=border:none >"
display+="<tr>"
display+="<td align='right' >"
- display+="<input name='search' id='search' type='search' style='border:0; width: 110px;' "
- display+="onkeyup='javascript:manageXml(search.value,\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />"
+ display+="<input name='search' id='search' type='search' style='border:0; width: 105px;' "
+ display+="onkeyup='javascript:manageXml(search.value,\"list\",false);' onClick='javascript:initSearch(search.value);' value='"+search+"' />"
display+="</td>"
display+="</tr>"
display+="</table>"
@@ -405,7 +408,7 @@
display+="</td>"
display+="<td align='right' height=26px style='background-image: url(pictures/items/headerbar-searchfield-middle.png); '>"
display+="<input name='search' id='search' type='search' style='border:0; width: 50px;' "
- display+="onkeyup='javascript:manageXml(search.value,\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />"
+ display+="onkeyup='javascript:manageXml(search.value,\"list\",false);' onClick='javascript:initSearch(search.value);' value='"+search+"' />"
display+="</td>"
display+="<td align=left width=26px style='background-image: url(pictures/items/headerbar-searchfield-right.png); background-repeat:no-repeat;'>"
display+="<div id='croix' style='display:none'> "
@@ -420,7 +423,6 @@
return display;
}
-
function displayToolBarSeparator()
{
var display="";
Deleted: trunk/moodle/mod/liveclassroom/js/verif.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/verif.js 2006-12-29 11:05:36 UTC (rev 148)
+++ trunk/moodle/mod/liveclassroom/js/verif.js 2006-12-29 12:06:29 UTC (rev 149)
@@ -1,57 +0,0 @@
-// JScript File
-
- function verifyFormUpdate() {
- var theForm = window.document.entry_info_form;
- var validated = false;
- var errorMessage = "";
- var roomIdPattern = /^[a-z|A-Z|0-9|_]{1,32}$/;
- var longnamePattern = /^[a-z|A-Z|0-9|_| |\'|!|?|(|)|:|\-|\/|]{1,50}$/;
- if (!longnamePattern.test(theForm.longname.value)){
- errorMessage += "Please fill in a Title that is 1-50 alphanumeric or space characters or - / : ' ? ! ( )\n";
- }
- if (theForm.longname.length > 50) {
- errorMessage += "The Title you have entered is too long. This field should not exceed 50 characters.\n";
- }
- if (errorMessage.length > 0) {
- alert(errorMessage);
- } else {
-
- theForm.submit();
- }
- }
-
- function verifyForm() {
-
- var theForm = window.document.entry_info_form;
- var validated = false;
- var errorMessage = "";
- var roomIdPattern = /^[a-z|A-Z|0-9|_]{1,32}$/;
- var userlimitPattern = /^[0-9]+[0-9]*$/;
- var longnamePattern = /^[a-z|A-Z|0-9|_| |\'|!|?|(|)|]{1,50}$/;
- if (!longnamePattern.test(theForm.longname.value)){
- errorMessage += "Please fill in a Title that is 1-50 alphanumeric or space characters or ' ? ! ( ) \n";
- }
- if (theForm.longname.length > 50) {
- errorMessage += "The Title you have entered is too long. This field should not exceed 50 characters.\n";
- }
- var radio = theForm.userlimit;
-
- for (i=0; i<radio.length; i++) {
- if(radio[i].checked && radio[i].value == "true"){
- if (theForm.userlimitValue.value == null || theForm.userlimitValue == "") {
- errorMessage += "Please fill in the user limit value\n";
- }
- if (!userlimitPattern.test(theForm.userlimitValue.value)) {
- errorMessage += "User Limit should be an integer\n";
- } else if (parseInt(theForm.userlimitValue.value) > 100) {
- errorMessage += "User Limit should be less than 100\n";
- }
- }
- }
-
- if (errorMessage.length > 0) {
- alert(errorMessage);
- } else {
- theForm.submit();
- }
- }
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/js/verifForm.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-29 11:05:36 UTC (rev 148)
+++ trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-29 12:06:29 UTC (rev 149)
@@ -1,4 +1,4 @@
- function verifyFormLiveClassRoomUpdate(url) {
+ function verifyFormLiveClassRoomUpdate(url) {
var theForm = window.document.myform;
theForm.action=url;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-29 11:05:41
|
Revision: 148
http://svn.sourceforge.net/hw4mdl/?rev=148&view=rev
Author: hugues
Date: 2006-12-29 03:05:36 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10561
- Fixing some more code formatting
- Fixed message displays
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-29 10:25:41 UTC (rev 147)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-29 11:05:36 UTC (rev 148)
@@ -21,7 +21,7 @@
* if not, write to the Free Software Foundation, Inc., *
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
* *
- * Author: Hazan Samy *
+ * Author: Hazan Samy *
* *
* Date: October 2006 *
* *
@@ -32,122 +32,121 @@
/// This page is to generate the list of rooms and archives
- require_once("../../config.php");
- require_once("lib.php");
- require_once("api.php");
+require_once("../../config.php");
+require_once("lib.php");
+require_once("api.php");
- // Variables needed
- global $CFG;
+// Variables needed
+global $CFG;
- if (version_compare(PHP_VERSION,'5','>=')) {
- require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
- }
-
- if(empty($_POST)){
- $params = $_GET;
- }
- else $params = $_POST;
+if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+}
- $courseid = $params['enc_course_id'];
+if(empty($_POST)){
+ $params = $_GET;
+}
+else {
+ $params = $_POST;
+}
- $userid = liveclassroom_api_get_teacher_user_id($courseid);
-
- if(isteacher($courseid, $USER->id) ) {
- $isteacher = 1;
- }
- else if (isstudent($courseid) ) {
- $isteacher = 0;
- }
-
- if (!liveclassroom_init_session($params)) {
- error("ExpiredSessionException");
- }
+$courseid = $params['enc_course_id'];
+$userid = liveclassroom_api_get_teacher_user_id($courseid);
+
+if(isteacher($courseid, $USER->id) ) {
+ $isteacher = 1;
+}
+else if (isstudent($courseid) ) {
+ $isteacher = 0;
+}
+
+if (!liveclassroom_init_session($params)) {
+ error("ExpiredSessionException");
+}
- $xmldoc = domxml_new_doc("1.0");
-
- $root = $xmldoc->create_element('root');
-
- $root->append_child(liveclassroom_get_session_params($xmldoc,$params));
-
- $windows = $xmldoc->create_element('windows');
- //HEADER BAR
- $windows->append_child(liveclassroom_create_headerbar($xmldoc));
+$xmldoc = domxml_new_doc("1.0");
+
+$root = $xmldoc->create_element('root');
+
+$root->append_child(liveclassroom_get_session_params($xmldoc,$params));
+
+$windows = $xmldoc->create_element('windows');
+//HEADER BAR
+$windows->append_child(liveclassroom_create_headerbar($xmldoc));
- //TOOL BAR
- $toolbar = $xmldoc->create_element('windowsElement');
- $tbtype = $xmldoc->create_element('type');
- $tbtype->append_child($xmldoc->create_text_node("toolBar"));
- $toolbar->append_child($tbtype);
-
- $tbelementParameters = $xmldoc->create_element("windowsElementParameters");
-
- $menubar = $xmldoc->create_element('menuElements');
-
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken']));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchNew('generateSettings.php','Management','new','LiveClassroom','MainLecture')", ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php','Management','update','false')", ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "",""));
- $tbelementParameters->append_child($menubar);
- $toolbar->append_child($tbelementParameters);
-
- $windows->append_child($toolbar);
+//TOOL BAR
+$toolbar = $xmldoc->create_element('windowsElement');
+$tbtype = $xmldoc->create_element('type');
+$tbtype->append_child($xmldoc->create_text_node("toolBar"));
+$toolbar->append_child($tbtype);
+
+$tbelementParameters = $xmldoc->create_element("windowsElementParameters");
+
+$menubar = $xmldoc->create_element('menuElements');
+
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken']));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchNew('generateSettings.php','Management','new','LiveClassroom','MainLecture')", ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php','Management','update','false')", ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
+$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "",""));
- // MESSAGE BAR
- if (isset($params['messageType'])) {
- $windows->append_child(liveclassroom_create_message($xmldoc, liveclassroom_get_message($params['messageType'])));
- }
- // LIST
+$tbelementParameters->append_child($menubar);
+$toolbar->append_child($tbelementParameters);
+
+$windows->append_child($toolbar);
- $list = $xmldoc->create_element('windowsElement');
- $typeWindowsElement = $xmldoc->create_element('type');
- $typeWindowsElement->append_child($xmldoc->create_text_node("list"));
- $list->append_child($typeWindowsElement);
-
- $elementParameters = $xmldoc->create_element('windowsElementParameters');
-
- $products = $xmldoc->create_element('products');
-
- // LIST PRODUCTS
-
- $listProducts = $xmldoc->create_element('listProducts');
-
- $listProducts->append_child(liveclassroom_create_product_information($xmldoc,'1','toggleimgmain','productType','Lecture rooms'));
- $listProducts->append_child(liveclassroom_create_product_information($xmldoc,'2','toggleimgbreakout','productType','Discussion rooms'));
-
- $products->append_child($listProducts);
-
- // PRODUCTS CONTENT
+// MESSAGE BAR
+if (isset($params['messageType'])) {
+ $windows->append_child(liveclassroom_create_message($xmldoc, liveclassroom_get_message($params['messageType'])));
+}
-
- $products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
-
- $elementParameters->append_child($products);
-
- $list->append_child($elementParameters);
-
- $windows->append_child($list);
+// LIST
+$list = $xmldoc->create_element('windowsElement');
+$typeWindowsElement = $xmldoc->create_element('type');
+$typeWindowsElement->append_child($xmldoc->create_text_node("list"));
+$list->append_child($typeWindowsElement);
+
+$elementParameters = $xmldoc->create_element('windowsElementParameters');
+
+$products = $xmldoc->create_element('products');
+
+// LIST PRODUCTS
+
+$listProducts = $xmldoc->create_element('listProducts');
+
+$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'1','toggleimgmain','productType','Lecture rooms'));
+$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'2','toggleimgbreakout','productType','Discussion rooms'));
+
+$products->append_child($listProducts);
+
+// PRODUCTS CONTENT
- $root->append_child($windows);
-
- $xmldoc->append_child($root);
+
+$products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
+
+$elementParameters->append_child($products);
+
+$list->append_child($elementParameters);
+
+$windows->append_child($list);
- $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
-
- $finalstring = str_replace("\n", '', $xmlstring);
-
- add_to_log("", "liveclassroom", "test id", "test", $xmlstring);
-
- echo $xmlstring;
-
+$root->append_child($windows);
+
+$xmldoc->append_child($root);
+
+$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
+
+$finalstring = str_replace("\n", '', $xmlstring);
+
+echo $xmlstring;
?>
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 10:25:41 UTC (rev 147)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 11:05:36 UTC (rev 148)
@@ -21,1162 +21,1162 @@
* if not, write to the Free Software Foundation, Inc., *
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
* *
- * Author: Hazan Samy *
+ * Author: Hazan Samy *
* *
- * Date: October 2006 *
+ * Date: October 2006 *
* *
******************************************************************************/
/* $Id$ */
/// This page is to generate the settings of a room or archive
- // require_once($CFG->dirroot.'/config.php');
- require_once("../../config.php");
- require_once("lib.php");
+ // require_once($CFG->dirroot.'/config.php');
+ require_once("../../config.php");
+ require_once("lib.php");
require_once("api.php");
// Variables needed
global $CFG;
- if (version_compare(PHP_VERSION,'5','>=')) {
- require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
- }
-
- $courseid = $_GET['enc_course_id'];
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
+
+ $courseid = $_GET['enc_course_id'];
$signature = $_GET['signature'];
$action = $_GET['action'];
$MAINLECTURE = 'MainLecture';
$DISCUSSIONROOM = 'Discussion';
- $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom';
-
- if (!liveclassroom_init_session($_GET)) {
- error("ExpiredSessionException");
- }
-
- if($action == 'update') {
- $roomId = $_GET['id'];
- $room_info = liveclassroom_api_get_infos_room($roomId);
- if(liveclassroom_is_lecturehall($roomId,$courseid)) {
- $isLectureRoom = true;
- }
- else {
- $isLectureRoom = false;
- }
- session_start(); // session to store the previous types of the room
+ $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom';
+
+ if (!liveclassroom_init_session($_GET)) {
+ error("ExpiredSessionException");
+ }
+
+ if($action == 'update') {
+ $roomId = $_GET['id'];
+ $room_info = liveclassroom_api_get_infos_room($roomId);
+ if(liveclassroom_is_lecturehall($roomId,$courseid)) {
+ $isLectureRoom = true;
+ }
+ else {
+ $isLectureRoom = false;
+ }
+ session_start(); // session to store the previous types of the room
}
else {
- $room_info = array();
+ $room_info = array();
}
- $contextDisplay='all';
-
- $xmldoc = domxml_new_doc("1.0");
-
- $root = $xmldoc->create_element('root');
-
- $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET));
-
- $windows = $xmldoc->create_element('windows');
+ $contextDisplay='all';
+
+ $xmldoc = domxml_new_doc("1.0");
+
+ $root = $xmldoc->create_element('root');
+
+ $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET));
+
+ $windows = $xmldoc->create_element('windows');
- //HEADER BAR
- $windows->append_child(liveclassroom_create_headerbar($xmldoc));
+ //HEADER BAR
+ $windows->append_child(liveclassroom_create_headerbar($xmldoc));
- // CONTEXT BAR
-
- $contextbar = $xmldoc->create_element('windowsElement');
- $cbtype = $xmldoc->create_element('type');
- $cbtype->append_child($xmldoc->create_text_node("contextBar"));
- $contextbar->append_child($cbtype);
- $cbelementParameters = $xmldoc->create_element("windowsElementParameters");
- $contextbarinformations = $xmldoc->create_element("contextBarInformations");
- $cbname = $xmldoc->create_element("name");
- if($action=="update") {
- $cbname->append_child($xmldoc->create_text_node($room_info['longname']));
- }
- else $cbname->append_child($xmldoc->create_text_node("New room"));
- $contextbarinformations->append_child($cbname);
- $cbcontext = $xmldoc->create_element("context");
- $cbcontext->append_child($xmldoc->create_text_node("Settings"));
- $contextbarinformations->append_child($cbcontext);
- $cbproduct = $xmldoc->create_element("product");
- $cbproduct->append_child($xmldoc->create_text_node("Live Classroom"));
- $contextbarinformations->append_child($cbproduct);
-
- $cbelementParameters->append_child($contextbarinformations);
-
- $contextbar->append_child($cbelementParameters);
-
- $windows->append_child($contextbar);
-
-
- // SETTINGS
-
- $settings = $xmldoc->create_element('windowsElement');
- $settingstype = $xmldoc->create_element('type');
- $settingstype->append_child($xmldoc->create_text_node("settings"));
- $settings->append_child($settingstype);
-
- $settingsElementParameters = $xmldoc->create_element("windowsElementParameters");
-
-
- $panelsSettings = $xmldoc->create_element('panelsSettings');
-
- // -------------- ROOM INFO -------------------
- $panelSettings = $xmldoc->create_element('panelSettings');
- // ROOM INFO PANEL INFO
+ // CONTEXT BAR
+
+ $contextbar = $xmldoc->create_element('windowsElement');
+ $cbtype = $xmldoc->create_element('type');
+ $cbtype->append_child($xmldoc->create_text_node("contextBar"));
+ $contextbar->append_child($cbtype);
+ $cbelementParameters = $xmldoc->create_element("windowsElementParameters");
+ $contextbarinformations = $xmldoc->create_element("contextBarInformations");
+ $cbname = $xmldoc->create_element("name");
+ if($action=="update") {
+ $cbname->append_child($xmldoc->create_text_node($room_info['longname']));
+ }
+ else $cbname->append_child($xmldoc->create_text_node("New room"));
+ $contextbarinformations->append_child($cbname);
+ $cbcontext = $xmldoc->create_element("context");
+ $cbcontext->append_child($xmldoc->create_text_node("Settings"));
+ $contextbarinformations->append_child($cbcontext);
+ $cbproduct = $xmldoc->create_element("product");
+ $cbproduct->append_child($xmldoc->create_text_node("Live Classroom"));
+ $contextbarinformations->append_child($cbproduct);
+
+ $cbelementParameters->append_child($contextbarinformations);
+
+ $contextbar->append_child($cbelementParameters);
+
+ $windows->append_child($contextbar);
+
+
+ // SETTINGS
+
+ $settings = $xmldoc->create_element('windowsElement');
+ $settingstype = $xmldoc->create_element('type');
+ $settingstype->append_child($xmldoc->create_text_node("settings"));
+ $settings->append_child($settingstype);
+
+ $settingsElementParameters = $xmldoc->create_element("windowsElementParameters");
+
+
+ $panelsSettings = $xmldoc->create_element('panelsSettings');
+
+ // -------------- ROOM INFO -------------------
+ $panelSettings = $xmldoc->create_element('panelSettings');
+ // ROOM INFO PANEL INFO
- $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block"));
- // ROOM INFO CONTENT
- $panelContent = $xmldoc->create_element('panelContent');
-
- // FIRST LINE
- $panelLine = $xmldoc->create_element('panelLine');
-
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
-
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
+ $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block"));
+ // ROOM INFO CONTENT
+ $panelContent = $xmldoc->create_element('panelContent');
+
+ // FIRST LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
-
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node("right"));
- $linepart->append_child($align);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
- $panelLine->append_child($linepart);
-
- $parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text");
- if($action=="update"){
- $parameters['value'] = $room_info['longname'];
- }
-
- $linepart = $xmldoc->create_element('panelLinePart');
-
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node("right"));
+ $linepart->append_child($align);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
+ $panelLine->append_child($linepart);
+
+ $parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text");
+ if($action=="update"){
+ $parameters['value'] = $room_info['longname'];
+ }
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
- $panelLine->append_child($linepart);
-
- $panelContent->append_child($panelLine);
-
- // SECOND LINE
- $panelLine = $xmldoc->create_element('panelLine');
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
+ $panelLine->append_child($linepart);
+
+ $panelContent->append_child($panelLine);
+
+ // SECOND LINE
+ $panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
-
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
-
- $linepart = $xmldoc->create_element('panelLinePart');
-
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node("right"));
- $linepart->append_child($align);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
- $panelLine->append_child($linepart);
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node("right"));
+ $linepart->append_child($align);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
+ $panelLine->append_child($linepart);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
- $panelLine->append_child($linepart);
-
- $panelContent->append_child($panelLine);
-
-
- if(($room_info['archive']!=1) || ($roomId == "")) {
- // THIRD LINE
- $panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
+ $panelLine->append_child($linepart);
+
+ $panelContent->append_child($panelLine);
+
+
+ if(($room_info['archive']!=1) || ($roomId == "")) {
+ // THIRD LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($panelLineStyle);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node("right"));
- $linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
- $panelLine->append_child($linepart);
-
- $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
- if(($action=="update") && ($isLectureRoom==true))
- {
- $_SESSION['led']='instructor';
- $parameters['checked']=true;
- }
- else if($action=="new")
- {
- $parameters['checked']=true;
- }
- else
- {
- $parameters['checked']=true;
- }
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters));
- $panelLine->append_child($linepart);
-
- $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node("right"));
+ $linepart->append_child($align);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
+ $panelLine->append_child($linepart);
+
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
+ if(($action=="update") && ($isLectureRoom==true))
+ {
+ $_SESSION['led']='instructor';
+ $parameters['checked']=true;
+ }
+ else if($action=="new")
+ {
+ $parameters['checked']=true;
+ }
+ else
+ {
+ $parameters['checked']=true;
+ }
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters));
+ $panelLine->append_child($linepart);
+
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters));
+ $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) ));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Instructors lead the presentation" ) ));
- $panelLine->append_child($linepart);
-
-
- $panelContent->append_child($panelLine);
-
- // FOURTH LINE
- $panelLine = $xmldoc->create_element('panelLine');
-
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
-
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) ));
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Instructors lead the presentation" ) ));
+ $panelLine->append_child($linepart);
+
+
+ $panelContent->append_child($panelLine);
+
+ // FOURTH LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
- $panelLine->append_child($linepart);
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
-
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
+ $panelLine->append_child($linepart);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
+
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters));
+ $panelLine->append_child($linepart);
-
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
- if(($action=="update") && ($isLectureRoom==false))
- {
- $_SESSION['led']='student';
- $parameters['checked']=true;
+
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
+ if(($action=="update") && ($isLectureRoom==false))
+ {
+ $_SESSION['led']='student';
+ $parameters['checked']=true;
- }
- else
- {
- $parameters['checked']=true;
- }
+ }
+ else
+ {
+ $parameters['checked']=true;
+ }
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters));
- $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Students and Instructors have the same rigths" ) ));
- $panelLine->append_child($linepart);
-
- $panelContent->append_child($panelLine);
- }
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Students and Instructors have the same rigths" ) ));
+ $panelLine->append_child($linepart);
+
+ $panelContent->append_child($panelLine);
+ }
- $panelSettings->append_child($panelContent);
-
- $panelsSettings->append_child($panelSettings);
-
+ $panelSettings->append_child($panelContent);
+
+ $panelsSettings->append_child($panelSettings);
+
-
- // ----------------- MEDIA ------------------
-
- $panelSettingsM = $xmldoc->create_element('panelSettings');
- // MEDIA PANEL INFO
- $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
-
- // MEDIA CONTENT
- $panelContentM = $xmldoc->create_element('panelContent');
-
- // FIRST LINE
- $panelLine = $xmldoc->create_element('panelLine');
-
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
-
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
-
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($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;
- }
- else $parameters['checked']=true;
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters));
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Audio") ));
- $panelLine->append_child($linepart);
-
- $panelContentM->append_child($panelLine);
-
- // SECOND LINE
- $panelLine = $xmldoc->create_element('panelLine');
-
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
-
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
- $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+
+ // ----------------- MEDIA ------------------
+
+ $panelSettingsM = $xmldoc->create_element('panelSettings');
+ // MEDIA PANEL INFO
+ $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
+
+ // MEDIA CONTENT
+ $panelContentM = $xmldoc->create_element('panelContent');
+
+ // FIRST LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
+
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($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;
+ }
+ else $parameters['checked']=true;
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters));
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Audio") ));
+ $panelLine->append_child($linepart);
+
+ $panelContentM->append_child($panelLine);
+
+ // SECOND LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
+ $panelLine->append_child($panelLineStyle);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $parameters=array("type" => "checkbox", "value" => "0", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
- if($action=='update'){
- if($room_info['hms_simulcast_restricted']==0){
- $parameters['checked']=true;
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $parameters=array("type" => "checkbox", "value" => "0", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
+ if($action=='update'){
+ if($room_info['hms_simulcast_restricted']==0){
+ $parameters['checked']=true;
}
else if($room_info['media_type']=="two-way-video"){
- $parameters['checked']=false;
- }
- //else $parameters['checked']=true;
+ $parameters['checked']=false;
+ }
+ //else $parameters['checked']=true;
}
else $parameters['checked']=true;
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students to use the phone") ));
- $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use the phone") ));
+ $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note : Instructors can always use the phone") ));
- $panelLine->append_child($linepart);
-
- $panelContentM->append_child($panelLine);
-
- // THIRD LINE
-
- $panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
- $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note: Instructors can always use the phone") ));
+ $panelLine->append_child($linepart);
+
+ $panelContentM->append_child($panelLine);
+
+ // THIRD LINE
+
+ $panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
+ $panelLine->append_child($panelLineStyle);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($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){
- $parameters['checked']=true;
- }
- else if($room_info['media_type']=="two-way-video"){
- $parameters['checked']=false;
- }
-
- //$parameters['checked']=true;
- }
- else $parameters['checked']=true;
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters) );
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students microphones at presentation start") ));
- $panelLine->append_child($linepart);
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($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){
+ $parameters['checked']=true;
+ }
+ else if($room_info['media_type']=="two-way-video"){
+ $parameters['checked']=false;
+ }
+
+ //$parameters['checked']=true;
+ }
+ else $parameters['checked']=true;
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters) );
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Student's microphones at presentation start") ));
+ $panelLine->append_child($linepart);
- $panelContentM->append_child($panelLine);
-
- //FOURTh LINE
- $panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $panelContentM->append_child($panelLine);
+
+ //FOURTh LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "one-way-video", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
- if($action=='update'){
- if($room_info['media_type']=="one-way-video"){
- $parameters['checked']=true;
- }
- }
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Presenter uses RealProducer") ));
- $panelLine->append_child($linepart);
-
- $panelContentM->append_child($panelLine);
-
- // HIDE LINE
-
- $panelLine = $xmldoc->create_element('panelLine');
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $parameters=array("type" => "radio", "value" => "one-way-video", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
+ if($action=='update'){
+ if($room_info['media_type']=="one-way-video"){
+ $parameters['checked']=true;
+ }
+ }
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Presenter uses RealProducer") ));
+ $panelLine->append_child($linepart);
+
+ $panelContentM->append_child($panelLine);
+
+ // HIDE LINE
+
+ $panelLine = $xmldoc->create_element('panelLine');
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node("hide"));
- $panelLine->append_child($panelLineStyle);
- $panelLineId = $xmldoc->create_element('id');
- $panelLineId->append_child($xmldoc->create_text_node("roomId_row"));
- $panelLine->append_child($panelLineId);
-
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node("hide"));
+ $panelLine->append_child($panelLineStyle);
+ $panelLineId = $xmldoc->create_element('id');
+ $panelLineId->append_child($xmldoc->create_text_node("roomId_row"));
+ $panelLine->append_child($panelLineId);
+
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($align);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
- $panelLine->append_child($linepart);
-
- $parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field", "maxlength" => "50") ;
- if($action=='update'){
- $parameters['value']=$roomId;
- }
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->append_child($linepart);
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
+ $panelLine->append_child($linepart);
+
+ $parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field", "maxlength" => "50") ;
+ if($action=='update'){
+ $parameters['value']=$roomId;
+ }
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
-
- $panelContentM->append_child($panelLine);
-
-
-
- //FIFTH LINE
- $panelLine = $xmldoc->create_element('panelLine');
- $plid = $xmldoc->create_element('id');
- $plid->append_child($xmldoc->create_text_node(""));
- $panelLine->append_child($plid);
- $panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
- $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($style);
+
+ $panelContentM->append_child($panelLine);
+
+
+
+ //FIFTH LINE
+ $panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
-
- $colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
- $linepart->append_child($colspan);
-
- $align = $xmldoc->create_element('align');
- $align->append_child($xmldoc->create_text_node(""));
- $linepart->append_child($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;
- }
-
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Third-party Conference Call") ));
- $panelLine->append_child($linepart);
-
- $panelContentM->append_child($panelLine);
+
+ $colspan = $xmldoc->create_element('colspan');
+ $colspan->append_child($xmldoc->create_text_node("0"));
+ $linepart->append_child($colspan);
+
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($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;
+ }
+
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Third-party Conference Call") ));
+ $panelLine->append_child($linepart);
+
+ $panelContentM->append_child($panelLine);
- $panelSettingsM->append_child($panelContentM);
- $panelsSetti...
[truncated message content] |
|
From: <hu...@us...> - 2006-12-29 10:25:44
|
Revision: 147
http://svn.sourceforge.net/hw4mdl/?rev=147&view=rev
Author: hugues
Date: 2006-12-29 02:25:41 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10561
- Fixing some issues with define()
- started to display i18n'd mesages in xml (does not work yet)
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/lang/en_utf8/voicetool.php
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/lib.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 09:49:02 UTC (rev 146)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 10:25:41 UTC (rev 147)
@@ -83,6 +83,17 @@
$string['lcpopupshouldappear'] = 'The Live Classroom should now appear.<br/> if it does not, please click <a href=\"javascript:startActivity ();\">this link</a> to open it. ';
+$string['roomCreated'] = "Your room has been successfully created.";
+$string['roomUpdated'] = "Your room has been successfully updated.";
+$string['roomDeleted'] = "Your room has been successfully deleted.";
+$string['notfind'] = "Invalid Live Classroom parameters. Please contact your administrator for more information.";
+$string['room'] = "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
+$string['connection'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
+$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
+$string['signature'] = "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
+$string['board'] = "Invalid Voice Board parameters. Please contact your administrator for more information. ";
+
+
//First Time Use - not use yet
$string['firstRoom'] = 'Main classroom';
$string['secondRoom'] = 'Group 1';
Modified: trunk/moodle/lang/en_utf8/voicetool.php
===================================================================
--- trunk/moodle/lang/en_utf8/voicetool.php 2006-12-29 09:49:02 UTC (rev 146)
+++ trunk/moodle/lang/en_utf8/voicetool.php 2006-12-29 10:25:41 UTC (rev 147)
@@ -52,6 +52,11 @@
$string['goodquality'] = 'Good Quality (FM Radio quality) - 20.8 kbit/s - Broadband usage';
$string['audioquality'] = 'Audio Quality';
+$string['connection_vt'] = "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. ";
+$string['bdvt'] = "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. ";
+$string['sessionvt'] = "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. ";
+$string['signaturevt'] = "Invalid connection to Voice Board. Please contact your administrator for more information. ";
+
// Voice Direct tags
$string['voicedirect'] = 'Voice Direct';
$string['voicedirects'] = 'Voice Directs';
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-29 09:49:02 UTC (rev 146)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-29 10:25:41 UTC (rev 147)
@@ -43,7 +43,7 @@
require_once('lib.php');
-$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
+define("LIVECLASSROOM_MOODLE_PREFIX", liveclassroom_api_get_prefix());
define("LIVECLASSROOM_API_ADMIN","/admin/api/api.pl?");
define("LIVECLASSROOM_API_FUNCTION_NOOP","function=NOOP");
@@ -129,7 +129,6 @@
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
- // curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
@@ -231,7 +230,6 @@
*/
function liveclassroom_api_create_user ($userid, $coursename, $rolename) {
global $CFG;
- global $LIVECLASSROOM_MOODLE_PREFIX;
global $COURSE;
$final_list = "&target=$userid&first_name=$rolename&last_name=$coursename";
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 09:49:02 UTC (rev 146)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 10:25:41 UTC (rev 147)
@@ -38,12 +38,12 @@
define (LIVECLASSROOM_MODULE_VERSION, "0.9");
//Suffixes used when creting the profiles account on the LC server
-define (LIVECLASSROOM_TEACHER_SUFFIX, "_T"); //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX
-define (LIVECLASSROOM_STUDENT_SUFFIX, "_S"); //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX
+define (LIVECLASSROOM_TEACHER_SUFFIX, "_T"); //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + LIVECLASSROOM_TEACHER_SUFFIX
+define (LIVECLASSROOM_STUDENT_SUFFIX, "_S"); //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + LIVECLASSROOM_STUDENT_SUFFIX
-
$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
+
/**
* Validate the data in passed in the configuration page
* @param $config - the information from the form mod.html
@@ -61,13 +61,11 @@
}
else if(empty($config->adminpassword)){
error(get_string('emptyAdminPassword', 'liveclassroom'));
- }
+ }
+
liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword);
-// error(get_string('wrongconfigurationURLincorrect', 'liveclassroom'));
-
//TODO: check the user is really an admin
-
return;
}
@@ -253,13 +251,10 @@
function liveclassroom_create_profiles ($course) {
global $CFG;
- global $LIVECLASSROOM_TEACHER_SUFFIX;
- global $LIVECLASSROOM_STUDENT_SUFFIX;
- global $LIVECLASSROOM_MOODLE_PREFIX;
$enc_coursename = str_replace(" ", "_", $course->shortname);
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX;
+ $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX;
if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Teacher')) {
@@ -267,7 +262,7 @@
return false;
}
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX;
+ $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX;
if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Student')) {
//error("Cannot Create Student profile");
@@ -301,14 +296,11 @@
function liveclassroom_create_session ($course, $isteacher) {
global $CFG, $USER;
- global $LIVECLASSROOM_TEACHER_SUFFIX;
- global $LIVECLASSROOM_STUDENT_SUFFIX;
- global $LIVECLASSROOM_MOODLE_PREFIX;
- $enc_coursename = str_replace(" ", "_", $course->shortname);
+ $enc_coursename = str_replace(" ", "_", $course->shortname);
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.
- ($isteacher?$LIVECLASSROOM_TEACHER_SUFFIX:$LIVECLASSROOM_STUDENT_SUFFIX);
+ $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.
+ ($isteacher?LIVECLASSROOM_TEACHER_SUFFIX:LIVECLASSROOM_STUDENT_SUFFIX);
$nickname = fullname($USER);
@@ -325,18 +317,14 @@
*/
function liveclassroom_create_room ($courseid, $roomname, $bool, $attributes) {
global $CFG;
- global $LIVECLASSROOM_TEACHER_SUFFIX,
- $LIVECLASSROOM_STUDENT_SUFFIX;
-
- global $LIVECLASSROOM_MOODLE_PREFIX;
-
+
$course_name = liveclassroom_get_course_shortname($courseid);
$enc_coursename = str_replace(" ", "_", $course_name);
- $roomid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.'_'.rand();
+ $roomid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.'_'.rand();
- $teacherid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX;
- $studentid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX;
+ $teacherid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX;
+ $studentid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX;
if($bool==true) { // main lecture hall
@@ -553,8 +541,6 @@
$element = $xmldoc->create_element('lineElement');
-
-
$displayContext = $xmldoc->create_element('displayContext');
$displayContext->append_child($xmldoc->create_text_node($p_displayContext));
$element->append_child($displayContext);
@@ -1042,52 +1028,14 @@
* return a string with the message to display
*/
function liveclassroom_get_message($type) {
-
- switch ($type) {
- case "roomCreated":
- return "Your room has been successfully created.";
- case "roomUpdated":
- return "Your room has been successfully updated.";
-
- case "roomDeleted":
- return "Your room has been successfully deleted.";
-
- case "notfind":
- return "Invalid Live Classroom parameters. Please contact your administrator for more information.";
-
- case "room":
- return "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
-
- case "connection":
- return "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
-
- case "bd":
- return "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
-
+ switch ($type) {
case "session":
//createMessage("exception","the session has timed out due to inactivity. Please reload the page to reconnect. ");
- case "signature":
- return "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
-
- case "board":
- return "Invalid Voice Board parameters. Please contact your administrator for more information. ";
-
- case "connection_vt":
- return "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. ";
-
- case "bdvt":
- return "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. ";
-
- case "sessionvt":
- return "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. ";
-
- case "signaturevt":
- return "Invalid connection to Voice Board. Please contact your administrator for more information. ";
-
}
- return "Default Message";
+
+ return get_string ($type, 'liveclassrom');
}
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-29 09:49:06
|
Revision: 146
http://svn.sourceforge.net/hw4mdl/?rev=146&view=rev
Author: shazan
Date: 2006-12-29 01:49:02 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
fix bug 10514: we have removed the padding for IE.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-29 09:31:00 UTC (rev 145)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-29 09:49:02 UTC (rev 146)
@@ -52,10 +52,7 @@
}
div.tab
{
- padding-top:2%;
-
- padding-left:5%;
- padding-right:5%;
+
display: none;
height:180px;
@@ -87,10 +84,7 @@
}
div.current_tab
{
- padding-top:2%;
-
- padding-left:5%;
- padding-right:5%;
+
position: relative;
display: block;
height:180px;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-29 09:31:07
|
Revision: 145
http://svn.sourceforge.net/hw4mdl/?rev=145&view=rev
Author: hugues
Date: 2006-12-29 01:31:00 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10560
- Updated the version of the integration: it comes from a constant defined in lib.php
- The version of the LC server comes from the server now
- Updated the way we return String messages, they will come from the anguage file in the future
- Some other re-indentation
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/config.html
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-29 09:31:00 UTC (rev 145)
@@ -41,7 +41,6 @@
* @package liveclassroom
*/
-//require_once('System.php');
require_once('lib.php');
$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
@@ -61,12 +60,11 @@
define("LIVECLASSROOM_API_FUNCTION_LIST_ROLE","function=listRole");
define("LIVECLASSROOM_API_FUNCTION_CREATE_GROUP","function=createGroup");
define("LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP","function=modifyGroup");
+define("LIVECLASSROOM_API_FUNCTION_STATUS","function=statusServer");
define("LIVECLASSROOM_API_RECORD_SEPERATOR","=END RECORD");
-
-
/*
* Get the prefix to use for creating rooms and users.
*
Modified: trunk/moodle/mod/liveclassroom/config.html
===================================================================
--- trunk/moodle/mod/liveclassroom/config.html 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/config.html 2006-12-29 09:31:00 UTC (rev 145)
@@ -44,13 +44,13 @@
<tr valign="top">
<td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td>
<td>
- <?php print_string("lcversionnumber", "liveclassroom") ?>
+ <?php echo liveclassroom_get_version(); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('integrationversion', 'liveclassroom')?> :</td>
<td>
- <?php print_string("integrationversionnumber", "liveclassroom") ?>
+ <?php echo LIVECLASSROOM_MODULE_VERSION ?>
</td>
</tr>
<tr>
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-29 09:31:00 UTC (rev 145)
@@ -32,7 +32,7 @@
/// This page is to generate the list of rooms and archives
- require_once("../../config.php");
+ require_once("../../config.php");
require_once("lib.php");
require_once("api.php");
@@ -145,6 +145,9 @@
$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
$finalstring = str_replace("\n", '', $xmlstring);
+
+ add_to_log("", "liveclassroom", "test id", "test", $xmlstring);
+
echo $xmlstring;
?>
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 09:31:00 UTC (rev 145)
@@ -33,10 +33,16 @@
require_once($CFG->libdir.'/datalib.php');
require_once("api.php");
require_once($CFG->dirroot.'/course/lib.php');
+
+
+define (LIVECLASSROOM_MODULE_VERSION, "0.9");
+
//Suffixes used when creting the profiles account on the LC server
-$LIVECLASSROOM_TEACHER_SUFFIX = "_T"; //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX
-$LIVECLASSROOM_STUDENT_SUFFIX = "_S"; //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX
+define (LIVECLASSROOM_TEACHER_SUFFIX, "_T"); //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX
+define (LIVECLASSROOM_STUDENT_SUFFIX, "_S"); //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX
+
+
$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
/**
* Validate the data in passed in the configuration page
@@ -75,22 +81,21 @@
/// will create a new instance and return the id number
/// of the new instance.
- $liveclassroom->timemodified = time();
+ $liveclassroom->timemodified = time();
- # May have to add extra stuff in here #
- $roomname = liveclassroom_api_get_room_name($liveclassroom->type);
+ # May have to add extra stuff in here #
+ $roomname = liveclassroom_api_get_room_name($liveclassroom->type);
- if($result = insert_record("liveclassroom", $liveclassroom)) {
- add_to_log($liveclassroom->course, "liveclassroom", "Add activity", liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added");
-
- }
- else
- {
- add_to_log($liveclassroom->course, "liveclassroom", "Add activity", liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added");
-
- $result=false;
- }
- return $result;
+ if($result = insert_record("liveclassroom", $liveclassroom)) {
+ add_to_log($liveclassroom->course, "liveclassroom", "Add activity",
+ liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added");
+ }
+ else {
+ add_to_log($liveclassroom->course, "liveclassroom", "Add activity",
+ liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added");
+ $result=false;
+ }
+ return $result;
}
@@ -273,6 +278,7 @@
}
+
/**
* Create the different kind of room on this course
* call the function create_room for each type of room available for the course given
@@ -1037,52 +1043,51 @@
*/
function liveclassroom_get_message($type) {
- switch ($type)
- {
- case "roomCreated":
- $return = "Your room has been successfully created.";
- break;
- case "roomUpdated":
- $return = "Your room has been successfully updated.";
- break;
- case "roomDeleted":
- $return = "Your room has been successfully deleted.";
- break;
- case "notfind":
- $return = "Invalid Live Classroom parameters. Please contact your administrator for more information.";
- break;
- case "room":
- $return = "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
- break;
- case "connection":
- $return = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
- break;
- case "bd":
- $return = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
- break;
- case "session":
- //createMessage("exception","the session has timed out due to inactivity. Please reload the page to reconnect. ");
- break;
- case "signature":
- $return = "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
- break;
- case "board":
- $return = "Invalid Voice Board parameters. Please contact your administrator for more information. ";
- break;
- case "connection_vt":
- $return = "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. ";
- break;
- case "bdvt":
- $return = "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. ";
- break;
- case "sessionvt":
- $return = "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. ";
- break;
- case "signaturevt":
- $return = "Invalid connection to Voice Board. Please contact your administrator for more information. ";
- break;
- }
- return $return;
+ switch ($type) {
+ case "roomCreated":
+ return "Your room has been successfully created.";
+
+ case "roomUpdated":
+ return "Your room has been successfully updated.";
+
+ case "roomDeleted":
+ return "Your room has been successfully deleted.";
+
+ case "notfind":
+ return "Invalid Live Classroom parameters. Please contact your administrator for more information.";
+
+ case "room":
+ return "Invalid Live Classroom parameters. Please contact your administrator for more information. ";
+
+ case "connection":
+ return "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. ";
+
+ case "bd":
+ return "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. ";
+
+ case "session":
+ //createMessage("exception","the session has timed out due to inactivity. Please reload the page to reconnect. ");
+
+ case "signature":
+ return "Invalid connection to Live Classroom. Please contact your administrator for more information. ";
+
+ case "board":
+ return "Invalid Voice Board parameters. Please contact your administrator for more information. ";
+
+ case "connection_vt":
+ return "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. ";
+
+ case "bdvt":
+ return "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. ";
+
+ case "sessionvt":
+ return "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. ";
+
+ case "signaturevt":
+ return "Invalid connection to Voice Board. Please contact your administrator for more information. ";
+
+ }
+ return "Default Message";
}
/*
@@ -1103,4 +1108,40 @@
return $link;
}
+
+
+/**
+ * Returns the version of the server.
+ *
+ */
+function liveclassroom_get_version () {
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_STATUS, "");
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+
+ $currentline = strtok($data,"\n");
+ while (!empty($currentline) && !preg_match("/horizon_version=/", $currentline, $matches)) {
+ $currentline = strtok("\n");
+ }
+
+ if (empty($currentline)) {
+ return "noversion";
+ }
+
+ $version= substr($currentline, 16);
+
+ //DEBUG
+ if (empty($version)) {
+ return "emptyversion";
+ }
+
+ return $version;
+}
+
+
?>
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-29 09:31:00 UTC (rev 145)
@@ -41,14 +41,14 @@
error("Guests are not allowed to create rooms", $_SERVER["HTTP_REFERER"]);
}
- if (isstudent($courseid)) {
+ if (isstudent($courseid)) {
error("Students are not allowed to create rooms", $_SERVER["HTTP_REFERER"]);
}
if (!liveclassroom_init_session($_GET)) {
- error("ExpiredSessionException");
- }
+ error("ExpiredSessionException");
+ }
- $url = liveclassroom_get_url_params($courseid);
+ $url = liveclassroom_get_url_params($courseid);
session_start(); // to get the previous type of the room
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-28 15:54:55 UTC (rev 144)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-29 09:31:00 UTC (rev 145)
@@ -77,111 +77,87 @@
?>
<html>
-<head>
-<title>Live ClassRooms</title>
-<link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" />
-<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
-
-
- <script language="javascript" src="js/Ajax.js"></script>
+ <head>
+ <title>Live ClassRooms</title>
+ <link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" />
+ <script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
+ <script language="javascript" src="js/Ajax.js"></script>
<script language="javascript" src="js/xmldom.js"></script>
<script language="javascript" src="js/verifForm.js"></script>
- <script language="javascript" src="js/constants.js"></script>
+ <script language="javascript" src="js/constants.js"></script>
<script language="javascript" src="js/pngfix.js"></script>
<script language="javascript" src="js/manageXml.js"></script>
- <script language="javascript" src="js/hwCommons.js"></script>
+ <script language="javascript" src="js/hwCommons.js"></script>
-<script type="text/javascript">
-
-
-
-
+ <script type="text/javascript">
function doOpenAddActivity(url,param){
+ if(currentId!="") {
- if(currentId!="") {
-
- if( (typeSelect=="MainLecture") || (typeSelect == "Discussion") ) {
-
- var complete_url=url+'?roomId='+currentId+'&id=<?php p($id) ?>§ion=0&sesskey=<?php echo sesskey(); ?>&'+param;
- window.open(complete_url,"_top");
-
+ if( (typeSelect=="MainLecture") || (typeSelect == "Discussion") ) {
+ var complete_url=url+'?roomId='+currentId+'&id=<?php p($id) ?>§ion=0&sesskey=<?php echo sesskey(); ?>&'+param;
+ window.open(complete_url,"_top");
}
- }
-
+ }
}
-function doOpenReport()
-{
- if(currentId!="")
- {
- var complete_url='reports.php'+'?roomId='+currentId+'&hza='+session['authToken'];
- var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
- w.focus();
- }
+function doOpenReport() {
+ if(currentId!="") {
+ var complete_url='reports.php'+'?roomId='+currentId+'&hza='+session['authToken'];
+ var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+ w.focus();
+ }
}
-function doDelete()
-{
- if(currentId!="")
- {
- var complete_url='manageRoomAction.php'+'?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"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
- location.href = complete_url
- //var w = window.open(complete_url, '_top');
- // w.focus();
-
- }
+function doDelete(){
+ if(currentId!=""){
+ var complete_url='manageRoomAction.php'+'?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"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
+ location.href = complete_url
+ //var w = window.open(complete_url, '_top');
+ // w.focus();
+ }
}
function displaySpace(){
- var display="";
- display+= "<td width='130'></td>";
- return display;
+ var display="";
+ display+= "<td width='130'></td>";
+ return display;
}
function ChoicePage(){
-
- <?php
- if(isset($_GET['addnew']))
+ <?php
+ if(isset($_GET['addnew']))
{
?>
- showPopup()
+ showPopup()
+ currentProduct = "LiveClassroom";
+ typeSelect="MainLecture";
-
- currentProduct = "LiveClassroom";
- typeSelect="MainLecture";
-
- var parameters="";
- parameters="product=liveclassroom&";
- parameters+="action=new&";
- parameters+=getURLParameters();
- currentId = "";
- /* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
- xmlhttp.open("GET", 'generateSettings.php?'+parameters+'',true);
- /* Effectue la requ\xEAte : */
- xmlhttp.onreadystatechange=eval(Management);
+ var parameters="";
+ parameters="product=liveclassroom&";
+ parameters+="action=new&";
+ parameters+=getURLParameters();
+ currentId = "";
+ /* Preparing an asynchronous GET request: */
+ xmlhttp.open("GET", 'generateSettings.php?'+parameters+'',true);
+ /* run the request : */
+ xmlhttp.onreadystatechange=eval(Management);
- xmlhttp.send(null);
-
+ xmlhttp.send(null);
<?php
- }
- else
- {
+ }
+ else {
?>
-
- DisplayFirstPage("generateListRooms.php");
+ DisplayFirstPage("generateListRooms.php");
<?php
- }
- ?>
-
+ }
+ ?>
}
-
-
</script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 15:54:57
|
Revision: 144
http://svn.sourceforge.net/hw4mdl/?rev=144&view=rev
Author: shazan
Date: 2006-12-28 07:54:55 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10514 : pictures have a correct png function for IE
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-28 15:17:09 UTC (rev 143)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-28 15:54:55 UTC (rev 144)
@@ -87,8 +87,8 @@
<script language="javascript" src="js/xmldom.js"></script>
<script language="javascript" src="js/verifForm.js"></script>
<script language="javascript" src="js/constants.js"></script>
+<script language="javascript" src="js/pngfix.js"></script>
-
<script language="javascript" src="js/manageXml.js"></script>
<script language="javascript" src="js/hwCommons.js"></script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 15:17:10
|
Revision: 143
http://svn.sourceforge.net/hw4mdl/?rev=143&view=rev
Author: shazan
Date: 2006-12-28 07:17:09 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
to store session with the COURSE
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 15:00:51 UTC (rev 142)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 15:17:09 UTC (rev 143)
@@ -51,9 +51,8 @@
$url = liveclassroom_get_url_params($courseid);
session_start(); // to get the previous type of the room
+
- add_to_log($COURSE->id, "liveclassroom", "Modify Room", "gaga", $_GET['id']);
-
if(!empty($_POST)) {
while (list($key, $val) = each($_POST)) {
$list_attributes[$key] = $val;
@@ -150,8 +149,8 @@
$messageType = 'roomDeleted';
}
-
- if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
+
+ if (!$usersession = liveclassroom_create_session ($COURSE, isteacher($courseid, $USER->id))) {
error ("Cannot create session");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 15:00:52
|
Revision: 142
http://svn.sourceforge.net/hw4mdl/?rev=142&view=rev
Author: shazan
Date: 2006-12-28 07:00:51 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10538 :now, the archives are visible for students if they are available.
the array with all the archives is now indexed by the id of the archive.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 14:45:06 UTC (rev 141)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-28 15:00:51 UTC (rev 142)
@@ -691,8 +691,7 @@
$j++;
}
}
-
-
+
return $list_return;
}
@@ -705,8 +704,8 @@
*/
function liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid) {
global $CFG;
-
- $final_list = "&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&filter02=preview&filter02value=1&AccessUser=$userid";
+
+ $final_list = "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&AccessUser=$userid";
$enc_list = str_replace(" ", "+", $final_list);
$data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
@@ -724,18 +723,20 @@
$j=0;
- for($i=1;$i<sizeof($line)-2;$i=$i+3) {
+ for($i=1;$i<sizeof($line)-3;$i=$i+4) {
$test = strstr($line[$i+1],$roomid);
if($test!=false) {
- // $list_return[$j][0]= liveclassroom_parse_line($line[$i],"preview=");
- $list_return[$j][1]= liveclassroom_parse_line($line[$i],"class_id=");
- $list_return[$j][2] = liveclassroom_parse_line($line[$i+1],"longname=");
- $j++;
+ if(liveclassroom_parse_line($line[$i],"preview=")==0) {
+ $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
+ $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname=");
+ $j++;
+ }
}
}
return $list_return;
+
}
/*
@@ -766,12 +767,12 @@
$j=0;
for($i=1;$i<sizeof($line)-3;$i=$i+4) {
+ $id = liveclassroom_parse_line($line[$i+1],"class_id=");
+ $list_return[$id][0]= liveclassroom_parse_line($line[$i],"preview=");
+ $list_return[$id][1]= $id;
+ $list_return[$id][2] = liveclassroom_parse_line($line[$i+2],"longname=");
+ $j++;
- $list_return[$line[$i+1]][0]= liveclassroom_parse_line($line[$i],"preview=");
- $list_return[$line[$i+1]][1]= liveclassroom_parse_line($line[$i+1],"class_id=");
- $list_return[$line[$i+1]][2] = liveclassroom_parse_line($line[$i+2],"longname=");
- $j++;
-
}
@@ -1362,6 +1363,8 @@
$tabarchive = array();
$orphanedArchives = liveclassroom_api_get_archive_list($userid);
+
+ add_to_log($COURSE->id, "liveclassroom", "archive", "action", sizeof($orphanedArchives));
$nbrClosedArchive = 0;
for($i=1;$i<sizeof($line)-3;$i=$i+4){
@@ -1379,12 +1382,19 @@
if ($isteacher=="1")
{
$tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid);
+ add_to_log($COURSE->id, "liveclassroom", "archiveteacher", "action", sizeof($tabarchive));
+ foreach ($tabarchive as $tabarchive_value) {
+ unset($orphanedArchives[$tabarchive_value[1]]) ;
+ }
}
else //just the open archive
{
$tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid);
- add_to_log("", "liveclassroom", "test id", "test", $userid);
- add_to_log("", "liveclassroom", "test archive", "test", sizeof($tabarchive));
+ add_to_log($COURSE->id, "liveclassroom", "archivestudent", "action", sizeof($tabarchive));
+ $tabarchiveall = $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid);
+ foreach ($tabarchiveall as $tabarchiveall_value) {
+ unset($orphanedArchives[$tabarchiveall_value[1]]) ;
+ }
}
if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
@@ -1433,7 +1443,6 @@
foreach ($tabarchive as $tabarchive_value) {
$archive = $xmldoc->create_element('archive');
- // $xmlOrphanedArchiveForStudent = $xmldoc->CreateElement("orphanedArchiveForStudent");
$archiveid = $xmldoc->create_element('id');
$archiveid->append_child($xmldoc->create_text_node("$tabarchive_value[1]"));
@@ -1453,7 +1462,7 @@
$archive->append_child($archivename);
$archive->append_child($archivepreview);
$archives->append_child($archive);
- unset($orphanedArchives[$tabarchive_value[1]]) ;
+
/*
if ( ($roompreview==1) && ($tabarchive_value[0]==0))
{
@@ -1477,7 +1486,8 @@
*/
}
$roomParameters->append_child($archives);
-
+
+
}
$closedArchive = $xmldoc->create_element("closedArchive");
@@ -1497,7 +1507,7 @@
$listElements->append_child($element);
}
-
+ add_to_log($COURSE->id, "liveclassroom", "orphaned", "action", sizeof($orphanedArchives));
foreach ($orphanedArchives as $orphanedArchive)
{
$xmlOrphanedArchive = $xmldoc->create_element("listElement");
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 14:45:06 UTC (rev 141)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 15:00:51 UTC (rev 142)
@@ -60,26 +60,30 @@
}
-
}
if(isteacher($courseid)) {
if($_GET['action']=='createRoom') {
if($list_attributes['led']=='instructor'){
- $bool = true;
+ $bool = true;
+ if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
}
- else $bool = false;
+ else {
+ $bool = false;
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+
+ }
//Available
- if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
- if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
- if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
- if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
- if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
- if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
- if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
+
+
if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
@@ -87,17 +91,21 @@
$messageType = 'roomCreated';
}
else if($_GET['action']=='updateRoom') {
+ if($list_attributes['led']=='instructor'){
+ if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
+ }
+ else {
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+
+ }
//Available
-
- if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
- if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
- if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
- if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
- if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
- if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
- if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|