hw4mdl-svn Mailing List for Wimba Moodle Integration (Page 7)
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: <sh...@us...> - 2006-12-21 10:11:01
|
Revision: 116
http://svn.sourceforge.net/hw4mdl/?rev=116&view=rev
Author: shazan
Date: 2006-12-21 02:10:57 -0800 (Thu, 21 Dec 2006)
Log Message:
-----------
block rename blivecalassroom
Added Paths:
-----------
trunk/moodle/blocks/bliveclassroom/
trunk/moodle/blocks/bliveclassroom/block_bliveclassroom.php
trunk/moodle/blocks/bliveclassroom/config_global.html
Added: trunk/moodle/blocks/bliveclassroom/block_bliveclassroom.php
===================================================================
--- trunk/moodle/blocks/bliveclassroom/block_bliveclassroom.php (rev 0)
+++ trunk/moodle/blocks/bliveclassroom/block_bliveclassroom.php 2006-12-21 10:10:57 UTC (rev 116)
@@ -0,0 +1,273 @@
+<?PHP
+
+require_once($CFG->libdir.'/datalib.php');
+require_once($CFG->dirroot.'/mod/liveclassroom/api.php');
+
+?>
+
+<style>
+table.fontCurrent
+{
+ font-family:Verdana;
+ font-size:12px;
+
+}
+
+a.list:link
+{
+
+ color : #0000FF ;
+ text-decoration : underline ;
+}
+a.list:hover
+{
+ color : #0000FF ;
+ text-decoration : none ;
+}
+a.list:visited
+{
+ color : #0000FF ;
+ text-decoration : underline ;
+}
+a.list:active
+{
+ color : #0000FF ;
+ text-decoration : none ;
+}
+</style>
+
+<?php
+
+class block_bliveclassroom extends block_base {
+
+ function init() {
+ $this->title = get_string('blocktitle', 'block_bliveclassroom');
+ $this->version = 2004111200;
+ }
+
+ function applicable_formats() {
+ //return array('site' => true, 'course-view' => true, 'course-view-social' => false, 'course-view-topics' => true, 'course-view-weeks' => true);
+ return array('all' => true);
+
+
+ }
+
+ function get_content() {
+
+ global $CFG, $USER, $COURSE;
+ if ($this->content !== NULL) {
+ return $this->content;
+ }
+
+ //guest and not logged user can't have access to the liveclassroom block
+ if(isguest() || !isloggedin()){
+ die;
+ }
+
+ // Return a string in text format
+ function txt($string){
+ $result = str_replace("<br />", "" ,$string);
+ $result = str_replace("<p>", "" ,$result);
+ $result = str_replace("</p>", "" ,$result);
+ return $result;
+ }
+
+ $this->content = new stdClass;
+
+ $this->content->text = '';
+ $this->content->footer = '';
+
+ if(isset($CFG->block_bliveclassroom_globalnumber)){
+ $gnumber = 5;
+ }
+ else $gnumber = $CFG->block_bliveclassroom_globalnumber;
+
+ if(isset($CFG->block_bliveclassroom_coursenumber)){
+ $cnumber = 3;
+ }
+ else $cnumber = $CFG->block_bliveclassroom_coursenumber;
+
+
+
+ //liveclassroom module
+ if(!$lc = get_record("modules", "name", "liveclassroom")) {
+ error("module liveclassroom not exist");
+ }
+
+ if (($COURSE->format == 'site')) { // Global block : displays the 5 next Live Classroom through any course the user is enrolled in (or a teacher for)
+
+ //table with the course module id
+ $result = array();
+ //table with the activities id
+ $result1 = array();
+ $full = false;
+
+ $allcourses = get_my_courses($USER->id);
+
+ $sectionnumber = 1;
+
+ while($full!=true && $sectionnumber<=10){
+
+ foreach($allcourses as $cours) {
+ $sections[$cours->id] = get_record("course_sections", "course", "$cours->id", "section", $sectionnumber);
+
+ }
+ foreach($sections as $section){
+
+ if ($full==true) {break;}
+ else{
+ if(($section->section!=0) && ($section->sequence!=null)){
+ $lines = explode(",",$section->sequence);
+ foreach($lines as $line) {
+ // print $line;
+
+ $cm = get_record("course_modules", "id", "$line");
+ if($cm->module==$lc->id) {
+ if(sizeof($result)>=$gnumber) {
+ $full=true;
+
+ break;
+ }
+ else{
+
+ $block_instance = array();
+
+ $course = get_record("course", "id", "$cm->course");
+ $block_instance['course'] =$course->fullname;
+ $block_instance['summary'] = $section->summary;
+ $block_instance['cm_id'] = $line; //$cm id
+ $liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
+ $block_instance['lc_name'] = $liveclassroom->name;
+ $block_instance['roomId'] = $liveclassroom->type;
+ $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type);
+ array_push($result,$block_instance);
+ }
+ }
+ }
+ }
+ }
+ }
+ $sectionnumber++;
+ }
+ $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">';
+ //Display the list
+
+ foreach ($result as $block) {
+
+ $this->content->text .= '<tr><td>';
+ $this->content->text .= '<table>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'">';
+ if($block['summary'] !=null) {
+ $this->content->text .= $block['summary'].': ';
+ }
+ $this->content->text .= $block['lc_name'].'</a>';
+ $this->content->text .= '</td></tr>';
+ $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">';
+ $this->content->text .= 'Room : '.$block['roomname'];
+ $this->content->text .= '</td></tr>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= $block['course'];
+ $this->content->text .= '</tr></td>';
+
+ $this->content->text .= '</table>';
+ $this->content->text .= '</td></tr>';
+ }
+
+ $this->content->text .= '</table>';
+
+
+ }
+ else{ // Course Block display the 3 next Live Classroom
+ //table with the course module id
+ $result = array();
+ //table with the activities id
+ $result1 = array();
+ $full = false;
+ //all section in course
+ $sections = get_records_sql("SELECT *
+ FROM {$CFG->prefix}course_sections cs
+ WHERE cs.course = '$COURSE->id'
+ ORDER BY cs.section asc");
+
+ foreach($sections as $section){
+ if ($full==true) break;
+ else{
+ if(($section->section!=0) && ($section->sequence!=null)){
+ $lines = explode(",",$section->sequence);
+
+ foreach($lines as $line) {
+ //Look just the liveclasssroom instance
+ $cm = get_record("course_modules", "id", "$line");
+ if($cm->module==$lc->id) {
+ if(sizeof($result)>=$cnumber){
+ $full=true;
+ }
+ else {
+ $block_instance = array();
+
+ $block_instance['course'] =$COURSE->fullname;
+ $block_instance['summary'] = $section->summary;
+ $block_instance['cm_id'] = $line; //$cm id
+ $liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
+ $block_instance['lc_name'] = $liveclassroom->name;
+ $block_instance['roomId'] = $liveclassroom->type;
+ $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type);
+ array_push($result,$block_instance);
+ }
+ }
+ }
+ }
+ }
+ }
+ $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">';
+ //Display the list
+
+ foreach ($result as $block) {
+ $this->content->text .= '<tr><td>';
+ $this->content->text .= '<table>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >'.$block['lc_name'].'</a>';
+ $this->content->text .= '</tr></td>';
+ $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">';
+ $this->content->text .= 'Room : '.$block['roomname'];
+ $this->content->text .= '</tr></td>';
+ if($block['summary'] !=null) {
+ //$desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id);
+ $descTxt = txt($block['summary']);
+ $minidesc = substr($descTxt, 0, 20);
+
+ if (strlen($descTxt)>20) {
+ $minidesc .= "...";
+ }
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= $minidesc;
+ $this->content->text .= '</td></tr>';
+ }
+
+ $this->content->text .= '</table>';
+ $this->content->text .= '</td></tr>';
+ }
+
+ $this->content->text .= '<tr style="background-color:#F0F0F0;"><td align="center">';
+ $this->content->text .= '<img src='.$CFG->wwwroot.'/mod/liveclassroom/icon.gif> ';
+ $this->content->text .= '<a class="list" href='.$CFG->wwwroot.'/mod/liveclassroom/index.php?id='.$COURSE->id.'>All Live Classrooms...</a>';
+ $this->content->text .= '</td></tr>';
+
+ $this->content->text .= '</table>';
+ }
+
+
+ return $this->content;
+ }
+
+ function has_config() {
+ return true;
+ }
+
+
+
+}
+
+
+?>
\ No newline at end of file
Property changes on: trunk/moodle/blocks/bliveclassroom/block_bliveclassroom.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/blocks/bliveclassroom/config_global.html
===================================================================
--- trunk/moodle/blocks/bliveclassroom/config_global.html (rev 0)
+++ trunk/moodle/blocks/bliveclassroom/config_global.html 2006-12-21 10:10:57 UTC (rev 116)
@@ -0,0 +1,33 @@
+ <table cellpadding="9" cellspacing="0">
+<tr valign="top">
+ <td align="right"><?php print_string('coursenumbers', 'block_bliveclassroom') ?></td>
+ <td>
+ <input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" />
+ <input name="block_bliveclassroom_coursenumber" type="text" size="5" value="<?php
+ if(isset($CFG->block_bliveclassroom_coursenumber)) {
+ p($CFG->block_bliveclassroom_coursenumber);
+ } else {
+ p(3);
+ } ?>" />
+ </td>
+
+</tr>
+<tr>
+<tr valign="top">
+ <td align="right"><?php print_string('globalnumbers', 'block_bliveclassroom') ?></td>
+
+ <td>
+ <input name="block_bliveclassroom_globalnumber" type="text" size="5" value="<?php
+ if(isset($CFG->block_bliveclassroom_globalnumber)) {
+ p($CFG->block_bliveclassroom_globalnumber);
+ } else {
+ p(5);
+ } ?>" />
+ </td>
+
+</tr>
+
+ <td colspan="2" align="center">
+ <input type="submit" value="<?php print_string('savechanges') ?>" /></td>
+</tr>
+</table>
Property changes on: trunk/moodle/blocks/bliveclassroom/config_global.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-21 10:02:13
|
Revision: 115
http://svn.sourceforge.net/hw4mdl/?rev=115&view=rev
Author: shazan
Date: 2006-12-21 02:02:11 -0800 (Thu, 21 Dec 2006)
Log Message:
-----------
Removed Paths:
-------------
trunk/moodle/blocks/next_liveclassroom/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-20 17:05:50
|
Revision: 114
http://svn.sourceforge.net/hw4mdl/?rev=114&view=rev
Author: shazan
Date: 2006-12-20 09:05:46 -0800 (Wed, 20 Dec 2006)
Log Message:
-----------
changes the constants definition to be use with the block
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-20 16:40:43 UTC (rev 113)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-20 17:05:46 UTC (rev 114)
@@ -40,35 +40,33 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package liveclassroom
*/
-
+//error_reporting(E_ALL);
//require_once('System.php');
require_once('lib.php');
$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
-$LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?';
-$LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP';
-$LIVECLASSROOM_API_FUNCTION_CREATE_USER = 'function=createUser';
-$LIVECLASSROOM_API_FUNCTION_MODIFY_USER = 'function=modifyUser';
-$LIVECLASSROOM_API_FUNCTION_LIST_USER = 'function=listUser';
-$LIVECLASSROOM_API_FUNCTION_GET_TOKEN = 'function=getAuthToken';
-$LIVECLASSROOM_API_FUNCTION_CREATE_CLASS = 'function=createClass';
-$LIVECLASSROOM_API_FUNCTION_DELETE_ROOM = 'function=deleteClass';
-$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM = 'function=modifyClass';
-$LIVECLASSROOM_API_FUNCTION_CREATE_ROLE = 'function=createRole';
-$LIVECLASSROOM_API_FUNCTION_DELETE_ROLE = 'function=deleteRole';
-$LIVECLASSROOM_API_FUNCTION_LIST_ROLE = 'function=listRole';
-$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST = 'function=listClass';
-$LIVECLASSROOM_API_FUNCTION_CREATE_GROUP = 'function=createGroup';
-$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP = 'function=modifyGroup';
+define("LIVECLASSROOM_API_ADMIN","/admin/api/api.pl?");
+define("LIVECLASSROOM_API_FUNCTION_NOOP","function=NOOP");
+define("LIVECLASSROOM_API_FUNCTION_CREATE_USER","function=createUser");
+define("LIVECLASSROOM_API_FUNCTION_MODIFY_USER","function=modifyUser");
+define("LIVECLASSROOM_API_FUNCTION_LIST_USER","function=listUser");
+define("LIVECLASSROOM_API_FUNCTION_GET_TOKEN","function=getAuthToken");
+define("LIVECLASSROOM_API_FUNCTION_CREATE_CLASS","function=createClass");
+define("LIVECLASSROOM_API_FUNCTION_DELETE_ROOM","function=deleteClass");
+define("LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM","function=modifyClass");
+define("LIVECLASSROOM_API_FUNCTION_CREATE_ROLE","function=createRole");
+define("LIVECLASSROOM_API_FUNCTION_DELETE_ROLE","function=deleteRole");
+define("LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST","function=listClass");
+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_RECORD_SEPERATOR","=END RECORD");
-$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
-$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
-
/*
* Get the prefix to use for creating rooms and users.
*
@@ -107,9 +105,6 @@
*/
function liveclassroom_api_authenticate ($servername='', $login='', $passwd='') {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_NOOP;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
if (empty($servername)) { // feed them with $CFG
@@ -119,8 +114,8 @@
}
$url = $servername.
- $LIVECLASSROOM_API_ADMIN.
- $LIVECLASSROOM_API_FUNCTION_NOOP.
+ LIVECLASSROOM_API_ADMIN.
+ LIVECLASSROOM_API_FUNCTION_NOOP.
"&AuthType=AuthCookieHandler".
"&AuthName=Horizon".
"&credential_0=". $login.
@@ -141,7 +136,7 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- add_to_log($COURSE->id, "liveclassroom", "URL", "$LIVECLASSROOM_LOGS?type=errorUrlUnavailable&time=".time()."&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;
}
@@ -150,12 +145,12 @@
if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
- add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=errorAuthentication&time=".time()."&respcode=$resp_code&courseId=".$COURSE->id, "Authentication Failed");
+ add_to_log($COURSE->id, "liveclassroom", "Authentication", liveclassroom_send_logs("errorAuthentication","respcode=$resp_code&courseId=".$COURSE->id), "Authentication Failed");
return false;
}
curl_close($ch);
//fclose($cook);
- add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=authentication&time=".time()."&courseId=".$COURSE->id, "Authentication succeeded");
+ add_to_log($COURSE->id, "liveclassroom", "Authentication", liveclassroom_send_logs("authentication","courseId=".$COURSE->id), "Authentication succeeded");
return $ch;
}
@@ -170,7 +165,6 @@
*/
function liveclassroom_api_send_query($const,$attribute) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
$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
@@ -191,13 +185,13 @@
}
}
-// $enc_list = str_replace(" ", "+", $attribute);
-
+
$url = $CFG->liveclassroom_servername.
- $LIVECLASSROOM_API_ADMIN.
+ LIVECLASSROOM_API_ADMIN.
$const.
$attribute;
-
+
+
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -209,7 +203,7 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- print curl_error($ch);
+ print curl_error($ch);
return false;
}
@@ -232,13 +226,10 @@
*/
function liveclassroom_api_create_user ($userid, $coursename, $rolename) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_CREATE_USER;
global $LIVECLASSROOM_MOODLE_PREFIX;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_USER, "&target=$userid&first_name=$rolename&last_name=$coursename");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, "&target=$userid&first_name=$rolename&last_name=$coursename");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -251,11 +242,11 @@
if ( $respcode != 100 && $respcode != 301) {
- add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userid&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed");
+ 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_LOGS?type=createUser&time=".time()."&userId=$userid&courseId=".$COURSE->id, "User Creation succeeded");
+ add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("createUser","userId=$userid&courseId=".$COURSE->id), "User Creation succeeded");
return true;
}
@@ -268,10 +259,8 @@
function liveclassroom_api_create_group($groupid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_CREATE_GROUP;
- $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");
@@ -300,15 +289,9 @@
function liveclassroom_api_get_session ($userid, $nickname) {
global $CFG;
global $USER;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_TOKEN;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
-
-
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
preg_match("(\d*)", $data, $matches);
@@ -316,7 +299,7 @@
if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=errorCreateSession&time=".time()."&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;
}
@@ -340,7 +323,7 @@
//error ("Token empty, data=<pre>$data</pre>");
return false;
}
- add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=createSession&time=".time()."&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;
}
@@ -353,9 +336,6 @@
*/
function liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_CREATE_CLASS;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
$list_attributes = '';
@@ -370,7 +350,7 @@
$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);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -380,11 +360,11 @@
return false;
}
if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Create Room", "$LIVECLASSROOM_LOGS?type=errorCreateClass&time=".time()."&roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id, "Cannot Create Class with id : $roomid, and name : $roomname.");
+ 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_LOGS?type=createClass&time=".time()."&roomname=$roomname&courseId=".$COURSE->id, "$roomname create with success");
+ add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("createClass","roomname=$roomname&courseId=".$COURSE->id), "$roomname create with success");
return true;
}
@@ -398,12 +378,9 @@
*/
function liveclassroom_api_add_user_role ($roomid, $userid, $role) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_CREATE_ROLE;
+ $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);
$respcode = $matches[0];
@@ -425,13 +402,10 @@
*/
function liveclassroom_api_remove_user_role ($roomid, $userid, $role) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_DELETE_ROLE;
+
+ $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);
$respcode = $matches[0];
@@ -444,10 +418,8 @@
function liveclassroom_api_remove_group_role ($roomid, $groupid, $role) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_DELETE_ROLE;
- $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);
@@ -471,14 +443,11 @@
function liveclassroom_api_room_exist($roomname) {
global $CFG;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_GET_ROOM_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];
@@ -488,7 +457,7 @@
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
if(sizeof($tok1)>1){
@@ -524,14 +493,11 @@
function liveclassroom_api_get_roomid($roomname) {
global $CFG;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_GET_ROOM_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];
@@ -540,7 +506,7 @@
return false;
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
$result = liveclassroom_parse_line($tok1[0],"class_id=");
//Remove le " " at the end of the line
@@ -560,23 +526,21 @@
*/
function liveclassroom_api_delete_room($roomid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_DELETE_ROOM;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
- liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
+ liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
if ( $respcode == 302) {
- add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=errorDeleteRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed");
+ 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_LOGS?type=errorDeleteRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed");
+ 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_LOGS?type=deleteRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been deleted with success");
+ 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;
}
@@ -588,25 +552,22 @@
*/
function liveclassroom_api_open_room($roomid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
- liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
+ 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_LOGS?type=errorOpenRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed");
+ 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_LOGS?type=errorOpenRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed");
+ 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_LOGS?type=openRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been opened with success");
+ 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;
}
@@ -618,25 +579,22 @@
*/
function liveclassroom_api_close_room($roomid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
- liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=1");
+ 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_LOGS?type=errorCloseRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed");
+ 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_LOGS?type=errorCloseRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed");
+ 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_LOGS?type=closeRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been closed with success");
+ 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;
}
@@ -649,9 +607,6 @@
*/
function liveclassroom_api_modify_room($roomid,$table_attributes) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
- global $LIVECLASSROOM_LOGS;
global $COURSE;
while (list($key, $val) = each($table_attributes)) {
@@ -664,17 +619,17 @@
$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];
if ( $respcode != 100) {
- add_to_log($COURSE->id, "liveclassroom", "Modify Room", "$LIVECLASSROOM_LOGS?type=errorModifyRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "Room modification failed");
+ 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_LOGS?type=modifyRoom&time=".time()."&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;
}
@@ -691,14 +646,11 @@
*/
function liveclassroom_api_get_archive_list_for_a_room($roomid,$userid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
$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);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -736,14 +688,11 @@
*/
function liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
-
+
$final_list = "&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&filter02=preview&filter02value=1&AccessUser=$userid";
$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];
@@ -780,14 +729,11 @@
*/
function liveclassroom_api_get_archive_list($userid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
-
+
$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);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -824,13 +770,10 @@
function liveclassroom_api_user_exist($course) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_LIST_USER;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
$name = $course->shortname;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$name");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$name");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -840,7 +783,7 @@
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
if(sizeof($tok1)>1){
return true;
@@ -858,10 +801,8 @@
function liveclassroom_api_give_lectureroom_attributes() {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
-
+
$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');
/*
@@ -885,8 +826,7 @@
*/
function liveclassroom_api_give_discussionroom_attributes() {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
+
$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');
@@ -917,12 +857,9 @@
* return a string : the role of the user
*/
function liveclassroom_api_role_user_room($roomid, $userid) {
- global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- global $LIVECLASSROOM_API_FUNCTION_LIST_ROLE;
+ 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");
+ $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];
@@ -932,7 +869,7 @@
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $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);
@@ -948,14 +885,10 @@
*/
function liveclassroom_api_get_student_user_id ($courseid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- global $LIVECLASSROOM_API_FUNCTION_LIST_USER;
$course = get_record("course", "id", $courseid);
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$course->shortname&filter01=first_name&filter01value=Student");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$course->shortname&filter01=first_name&filter01value=Student");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -987,12 +920,9 @@
*/
function liveclassroom_api_room_is_preview ($roomid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter00=class_id&filter00value=$roomid&filter01=preview&filter01value=0");
+ $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];
@@ -1001,7 +931,7 @@
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
if(sizeof($tok1)>1){
return true;
@@ -1017,11 +947,8 @@
*/
function liveclassroom_api_room_is_archive ($roomid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=archive&filter01=class_id&filter01value=$roomid");
+ $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];
@@ -1031,7 +958,7 @@
}
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
$test = strstr($tok1[0],"archive=");
@@ -1049,17 +976,14 @@
/*
-* Give the nam of the room given
+* 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;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=longname&filter00=class_id&filter00value=$roomid");
+ $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];
@@ -1067,9 +991,9 @@
if ( $respcode != 100) {
return false;
}
- //print $url;
+
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
$test = strstr($tok1[0],"longname=");
@@ -1089,11 +1013,8 @@
*/
function liveclassroom_api_get_media_type($roomid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=media_type&filter00=class_id&filter00value=$roomid");
+ $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];
@@ -1103,7 +1024,7 @@
}
//print $url;
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
$test = strstr($tok1[0],"media_type=");
@@ -1125,11 +1046,8 @@
*/
function liveclassroom_api_room_get_user_limit($roomid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=userlimit&filter00=class_id&filter00value=$roomid");
+ $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];
@@ -1139,7 +1057,7 @@
}
//print $url;
$tok = split("100 OK",$data);
- $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
+ $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
$test = strstr($tok1[0],"userlimit=");
@@ -1160,11 +1078,8 @@
*/
function liveclassroom_api_get_infos_room($roomid) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter00=class_id&filter00value=$roomid&attribute=archive&attribute=can_archive&attribute=can_eboard&attribute=can_liveshare&attribute=can_ppt_import&attribute=chatenable&attribute=privatechatenable&attribute=description&attribute=hms_simulcast&attribute=hms_simulcast_restricted&attribute=hms_two_way_enabled&attribute=media_type&attribute=preview&attribute=student_wb_enabled&attribute=student_wb_liveapp&attribute=userlimit&attribute=longname");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter00=class_id&filter00value=$roomid&attribute=archive&attribute=can_archive&attribute=can_eboard&attribute=can_liveshare&attribute=can_ppt_import&attribute=chatenable&attribute=privatechatenable&attribute=description&attribute=hms_simulcast&attribute=hms_simulcast_restricted&attribute=hms_two_way_enabled&attribute=media_type&attribute=preview&attribute=student_wb_enabled&attribute=student_wb_liveapp&attribute=userlimit&attribute=longname");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1192,13 +1107,10 @@
*/
function liveclassroom_api_get_teacher_user_id ($courseid){
global $CFG;
- global $LIVECLASSROOM_API_ADMIN;
- global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- global $LIVECLASSROOM_API_FUNCTION_LIST_USER;
$course = get_record("course", "id", $courseid);
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$course->shortname&filter01=first_name&filter01value=Teacher");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$course->shortname&filter01=first_name&filter01value=Teacher");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1267,14 +1179,11 @@
function liveclassroom_api_get_room_list($userid,$course) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_RECORD_SEPERATOR,
- $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
-
+
$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);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1317,14 +1226,11 @@
function liveclassroom_api_get_roomandarchive_list($userid,$course) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_RECORD_SEPERATOR,
- $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
$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);
+ $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);
@@ -1405,20 +1311,17 @@
*
* Return a DOM document element who list all the rooms and their archives associed
**/
-function liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher) {
+function liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher) {
global $CFG;
- global $LIVECLASSROOM_API_ADMIN,
- $LIVECLASSROOM_API_RECORD_SEPERATOR,
- $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
+
$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);
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list);
$studentuserid = liveclassroom_api_get_student_user_id($courseid);
-// $teacherid = liveclassroom_api_get_teacher_user_id($course->shortname);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1426,12 +1329,7 @@
if ( $respcode != 100) {
return false;
}
-/*
- if (version_compare(PHP_VERSION,'5','>=')) {
- require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
- }
-*/
-
+
$listElements = $xmldoc->create_element('listElements');
//$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent');
@@ -1461,18 +1359,15 @@
{
$tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid);
}
-
- //add_to_log("", "liveclassroom", "", "", "size archive ".sizeof($tabarchive));
-
-
+
if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
$type = $xmldoc->create_element('typeOfElement');
- $type->append_child($xmldoc->create_text_node("Main Lecture"));
+ $type->append_child($xmldoc->create_text_node("MainLecture"));
$positionValue = 1;
}
else{
$type = $xmldoc->create_element('typeOfElement');
- $type->append_child($xmldoc->create_text_node("DiscussionRoom"));
+ $type->append_child($xmldoc->create_text_node("Discussion"));
$positionValue = 2;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-20 16:40:45
|
Revision: 113
http://svn.sourceforge.net/hw4mdl/?rev=113&view=rev
Author: shazan
Date: 2006-12-20 08:40:43 -0800 (Wed, 20 Dec 2006)
Log Message:
-----------
block displayed like the specs requirements
Modified Paths:
--------------
trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php
Modified: trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php
===================================================================
--- trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php 2006-12-18 09:24:56 UTC (rev 112)
+++ trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php 2006-12-20 16:40:43 UTC (rev 113)
@@ -1,7 +1,43 @@
<?PHP
-
+error_reporting(E_ALL);
require_once($CFG->libdir.'/datalib.php');
+require_once($CFG->dirroot.'/mod/liveclassroom/api.php');
+?>
+
+<style>
+table.fontCurrent
+{
+ font-family:Verdana;
+ font-size:12px;
+
+}
+
+a.list:link
+{
+
+ color : #0000FF ;
+ text-decoration : underline ;
+}
+a.list:hover
+{
+ color : #0000FF ;
+ text-decoration : none ;
+}
+a.list:visited
+{
+ color : #0000FF ;
+ text-decoration : underline ;
+}
+a.list:active
+{
+ color : #0000FF ;
+ text-decoration : none ;
+}
+</style>
+
+<?php
+
class block_next_liveclassroom extends block_base {
function init() {
@@ -10,8 +46,11 @@
}
function applicable_formats() {
- return array('site' => true, 'course-view' => true, 'course-view-social' => false, 'course-view-topics' => true, 'course-view-weeks' => true);
- }
+ //return array('site' => true, 'course-view' => true, 'course-view-social' => false, 'course-view-topics' => true, 'course-view-weeks' => true);
+ return array('all' => true);
+
+
+ }
function get_content() {
@@ -25,16 +64,22 @@
die;
}
+ // Return a string in text format
+ function txt($string){
+ $result = str_replace("<br />", "" ,$string);
+ $result = str_replace("<p>", "" ,$result);
+ $result = str_replace("</p>", "" ,$result);
+ return $result;
+ }
$this->content = new stdClass;
$this->content->text = '';
$this->content->footer = '';
- //$gnumber =5;
- //$cnumber= 3;
+
$gnumber = $CFG->block_next_liveclassroom_globalnumber;
$cnumber = $CFG->block_next_liveclassroom_coursenumber;
-
+
//liveclassroom module
@@ -68,13 +113,16 @@
$lines = explode(",",$section->sequence);
foreach($lines as $line) {
// print $line;
+
$cm = get_record("course_modules", "id", "$line");
if($cm->module==$lc->id) {
if(sizeof($result)>=$gnumber) {
$full=true;
+
break;
}
else{
+
$block_instance = array();
$course = get_record("course", "id", "$cm->course");
@@ -83,6 +131,8 @@
$block_instance['cm_id'] = $line; //$cm id
$liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
$block_instance['lc_name'] = $liveclassroom->name;
+ $block_instance['roomId'] = $liveclassroom->type;
+ $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type);
array_push($result,$block_instance);
}
}
@@ -92,23 +142,31 @@
}
$sectionnumber++;
}
- $this->content->text .= '<table width="100%">';
+ $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">';
//Display the list
-
+
foreach ($result as $block) {
- $this->content->text .= '<tr><td>';
- $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >';
+
+ $this->content->text .= '<tr><td>';
+ $this->content->text .= '<table>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'">';
if($block['summary'] !=null) {
$this->content->text .= $block['summary'].': ';
- }
- $this->content->text .= $block['lc_name'].'</a>';
- $this->content->text .= '</tr></td>';
- $this->content->text .= '<tr style="font-style:italic; color: #969696;"><td>';
+ }
+ $this->content->text .= $block['lc_name'].'</a>';
+ $this->content->text .= '</td></tr>';
+ $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">';
+ $this->content->text .= 'Room : '.$block['roomname'];
+ $this->content->text .= '</td></tr>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
$this->content->text .= $block['course'];
$this->content->text .= '</tr></td>';
- $this->content->text .= '<tr style="border-bottom: 1px solid #666666; "><td ></td></tr>';
-
+
+ $this->content->text .= '</table>';
+ $this->content->text .= '</td></tr>';
}
+
$this->content->text .= '</table>';
@@ -124,17 +182,18 @@
FROM {$CFG->prefix}course_sections cs
WHERE cs.course = '$COURSE->id'
ORDER BY cs.section asc");
-
+
foreach($sections as $section){
if ($full==true) break;
else{
if(($section->section!=0) && ($section->sequence!=null)){
$lines = explode(",",$section->sequence);
+
foreach($lines as $line) {
//Look just the liveclasssroom instance
$cm = get_record("course_modules", "id", "$line");
if($cm->module==$lc->id) {
- if(sizeof($result1)>=$cnumber){
+ if(sizeof($result)>=$cnumber){
$full=true;
}
else {
@@ -145,6 +204,8 @@
$block_instance['cm_id'] = $line; //$cm id
$liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
$block_instance['lc_name'] = $liveclassroom->name;
+ $block_instance['roomId'] = $liveclassroom->type;
+ $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type);
array_push($result,$block_instance);
}
}
@@ -152,21 +213,40 @@
}
}
}
- $this->content->text .= '<table width="100%">';
+ $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">';
//Display the list
+
foreach ($result as $block) {
-
- $this->content->text .= '<tr><td>';
- $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >'.$block['lc_name'].'</a>';
- $this->content->text .= '</tr> </td>';
+ $this->content->text .= '<tr><td>';
+ $this->content->text .= '<table>';
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >'.$block['lc_name'].'</a>';
+ $this->content->text .= '</tr></td>';
+ $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">';
+ $this->content->text .= 'Room : '.$block['roomname'];
+ $this->content->text .= '</tr></td>';
if($block['summary'] !=null) {
- $this->content->text .= '<tr style="font-style:italic; color: #969696;"><td>';
- $this->content->text .= $block['summary'];
- $this->content->text .= '</tr></td>';
+ //$desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id);
+ $descTxt = txt($block['summary']);
+ $minidesc = substr($descTxt, 0, 20);
+
+ if (strlen($descTxt)>20) {
+ $minidesc .= "...";
+ }
+ $this->content->text .= '<tr><td style="padding-left:5px;">';
+ $this->content->text .= $minidesc;
+ $this->content->text .= '</td></tr>';
}
- $this->content->text .= '<tr style="border-bottom: 1px solid #666666; "><td ></td></tr>';
+ $this->content->text .= '</table>';
+ $this->content->text .= '</td></tr>';
}
+
+ $this->content->text .= '<tr style="background-color:#F0F0F0;"><td align="center">';
+ $this->content->text .= '<img src='.$CFG->wwwroot.'/mod/liveclassroom/icon.gif> ';
+ $this->content->text .= '<a class="list" href='.$CFG->wwwroot.'/mod/liveclassroom/index.php?id='.$COURSE->id.'>All Live Classrooms...</a>';
+ $this->content->text .= '</td></tr>';
+
$this->content->text .= '</table>';
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-18 09:24:59
|
Revision: 112
http://svn.sourceforge.net/hw4mdl/?rev=112&view=rev
Author: shazan
Date: 2006-12-18 01:24:56 -0800 (Mon, 18 Dec 2006)
Log Message:
-----------
add cancel link if no room is available
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/mod.html
Modified: trunk/moodle/mod/liveclassroom/mod.html
===================================================================
--- trunk/moodle/mod/liveclassroom/mod.html 2006-12-15 15:22:58 UTC (rev 111)
+++ trunk/moodle/mod/liveclassroom/mod.html 2006-12-18 09:24:56 UTC (rev 112)
@@ -133,6 +133,9 @@
if (confirm("No room available. You must create a room, then add it to an activity.")) {
location.href = "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>&noliveclassroom=true";
}
+ else {
+ location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>";
+ }
<?php
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-15 15:23:00
|
Revision: 111
http://svn.sourceforge.net/hw4mdl/?rev=111&view=rev
Author: shazan
Date: 2006-12-15 07:22:58 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
add activity & configuration forms prettier
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/config.html
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/view.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -46,7 +46,7 @@
$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
-$LIVECLASSROOM_API_ADMIN = 'admin/api/api.pl?';
+$LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?';
$LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP';
$LIVECLASSROOM_API_FUNCTION_CREATE_USER = 'function=createUser';
$LIVECLASSROOM_API_FUNCTION_MODIFY_USER = 'function=modifyUser';
Modified: trunk/moodle/mod/liveclassroom/config.html
===================================================================
--- trunk/moodle/mod/liveclassroom/config.html 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/config.html 2006-12-15 15:22:58 UTC (rev 111)
@@ -12,7 +12,7 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('servername', 'liveclassroom')?>:</td>
+ <td align="right"><?php print_string('servername', 'liveclassroom')?> :</td>
<td>
<input name="servername" type="text" size="30" value="<?php p($CFG->liveclassroom_servername) ?>" />
</td>
@@ -21,25 +21,39 @@
</td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string('adminusername', 'liveclassroom')?>:</td>
+ <td align="right"><?php print_string('adminusername', 'liveclassroom')?> :</td>
<td>
- <input name="adminusername" type="text" size="20" value="<?php p($CFG->liveclassroom_adminusername) ?>" />
+ <input name="adminusername" type="text" size="30" value="<?php p($CFG->liveclassroom_adminusername) ?>" />
</td>
<td>
<?php print_string("configadminusername", "liveclassroom") ?>
</td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string('adminpassword', 'liveclassroom')?>:</td>
+ <td align="right"><?php print_string('adminpassword', 'liveclassroom')?> :</td>
<td>
- <input name="adminpassword" type="text" size="20" value="<?php p($CFG->liveclassroom_adminpassword) ?>" />
+ <input name="adminpassword" type="text" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" />
</td>
<td>
<?php print_string("configadminpassword", "liveclassroom") ?>
</td>
</tr>
-
<tr>
+<td><br /></td>
+</tr>
+<tr valign="top">
+ <td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td>
+ <td>
+ <?php print_string("lcversionnumber", "liveclassroom") ?>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right"><?php print_string('integrationversion', 'liveclassroom')?> :</td>
+ <td>
+ <?php print_string("integrationversionnumber", "liveclassroom") ?>
+ </td>
+</tr>
+<tr>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -30,10 +30,8 @@
/* $Id$ */
/// This page is to generate the list of rooms and archives
- error_reporting(E_ALL);
-
-
-
+
+
require_once("../../config.php");
require_once("lib.php");
require_once("api.php");
@@ -72,7 +70,7 @@
}
- $xmldoc = domxml_new_doc("1.0");// new DomDocument();
+ $xmldoc = domxml_new_doc("1.0");
$root = $xmldoc->create_element('root');
@@ -135,11 +133,9 @@
$products->append_child($listProducts);
// PRODUCTS CONTENT
-// $productContent = $xmldoc->create_element('productsContent');
+
$products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
-
-// $products->append_child($productContent);
$elementParameters->append_child($products);
@@ -151,7 +147,7 @@
$xmldoc->append_child($root);
- $xmlstring = $xmldoc->dump_mem(true); //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/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -38,7 +38,7 @@
// Variables needed
global $CFG;
- if (version_compare(PHP_VERSION,'5','>=')) {
+ if (version_compare(PHP_VERSION,'5','>=')) {
require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
}
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -36,13 +36,8 @@
//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
-/*
- if (version_compare(PHP_VERSION,'5','>=')) {
- require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
- }
-
-*/
+
/**
* Validate the data in passed in the configuration page
* @param $config - the information from the form mod.html
@@ -943,7 +938,8 @@
function liveclassroom_get_session_params($xmldoc, $sessionParams) {
// General Information
-
+ global $CFG;
+
$information = $xmldoc->create_element("information");
$firstName = $xmldoc->create_element("firstName");
@@ -959,9 +955,11 @@
$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']));
- }
+ $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));
$signature = $xmldoc->create_element("signature");
$signature->append_child($xmldoc->create_text_node($sessionParams['signature']));
@@ -972,6 +970,7 @@
$information->append_child($timeOfLoad);
$information->append_child($courseId);
$information->append_child($authToken);
+ $information->append_child($lcServerUrl);
$information->append_child($signature);
return $information;
Modified: trunk/moodle/mod/liveclassroom/mod.html
===================================================================
--- trunk/moodle/mod/liveclassroom/mod.html 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/mod.html 2006-12-15 15:22:58 UTC (rev 111)
@@ -57,7 +57,6 @@
}
// $section = get_record("course_sections", "id", $cmLiveclass->section );
- // $sectionId = $section->section;
$sectionId = $_GET['sr'];
$liveclassroom = get_record("liveclassroom", "id", $cmLiveclass->instance );
$action = "update";
@@ -67,40 +66,47 @@
<style>
.headerBar
{
-padding-left:5px ;
+padding-left:50px ;
width:100%;
+height:32px;
+background-image:url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/headerbar.png");
-background-image:url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/headerbar.png");
-height:32px;
border-bottom:solid 1px Black;
}
+
.fontCurrent
{
font-family:Verdana;
font-size:10px;
}
-a:link
+
+a.list:link
{
+
color : #0000FF ;
text-decoration : underline ;
}
-a:hover
+a.list:hover
{
color : #0000FF ;
- text-decoration : underline ;
+ text-decoration : none ;
}
-a:visited
+a.list:visited
{
color : #0000FF ;
text-decoration : underline ;
}
-a:active
+a.list:active
{
color : #0000FF ;
text-decoration : none ;
}
+.content
+{
+ margin:-5px;
+}
</style>
<script type="text/javascript">
@@ -134,20 +140,26 @@
}
</script>
+<div class="content">
<form name="form" method="post" action="mod.php">
<center>
+<table border="1" width="800">
+<tr><td>
+<table border="0" width="100%" cellpadding="0" cellspacing="0" margin="0">
+ <tr class="headerBar">
+ <td align="left"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"></td>
+ <td align='right'></td>
+ </tr>
+</table>
+
+<table border="0" width="100%" cellpadding="5" cellspacing="0" >
-<table width="800" cellpadding="5" cellspacing="0" margin="0">
-<tr class="headerBar">
- <td align="left"><img height="32px" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"></td>
- <td align='right'></td>
-</tr>
<tr>
- <td><br></td>
+ <td><br></td><td></td>
</tr>
<tr valign="top">
@@ -165,7 +177,7 @@
//Display the list of the weeks
?>
- <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('weeksformat', 'liveclassroom')?> :</a></font></td>
+ <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('weeksformat', 'liveclassroom')?> :</a></font></td>
<td align="left">
<SELECT name="section">
<?php
@@ -213,7 +225,7 @@
<tr valign="top">
- <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('topicformat', 'liveclassroom') ?> :</a></font></td>
+ <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>"><?php print_string('topicformat', 'liveclassroom') ?> :</a></font></td>
<td align="left">
@@ -251,7 +263,7 @@
</tr>
<tr valign="top">
- <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"><?php print_string('liveclassroomtype', 'liveclassroom')?> :</a></font></td>
+ <td align="right"><img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/more-link.png"><font class="fontCurrent"><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"><?php print_string('liveclassroomtype', 'liveclassroom')?> :</a></font></td>
<td align="left">
@@ -309,33 +321,27 @@
<td><br></td>
</tr>
-<tr >
- <td colspan=2 >
- <table width=100% cellpadding="0" style="border-top:#818181 1px solid; border-bottom:#818181 1px solid; background-color:#F0F0F0;">
- <tr>
- <td align=left width=70% >
+<tr style="border-top:1px solid; background-color:#F0F0F0;">
+ <td align=left >
<font color="red">*</font><font class="fontCurrent"><?php print_string('requiredfields', 'liveclassroom')?></font>
- </td>
- <td align=center width=15%>
+ </td>
+ <td align=right >
<img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/buttons/general-cancel.png" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>'">
<?php if(isset($action) && $action=="update") $pictureUrl="$CFG->wwwroot/mod/liveclassroom/pictures/buttons/general-saveall.png";
else $pictureUrl="$CFG->wwwroot/mod/liveclassroom/pictures/buttons/general-create.png";
?>
<input type="image" src="<?php echo $pictureUrl;?>" onclick="return validate()" >
-
- <!-- <input type="reset" value="<?php print_string("cancel") ?>" onclick="self.location.href='view.php?id=<?php p($id)?>'" >
- general-empty.png
- <input type="submit" value="<?php print_string("add") ?>" />-->
+
</td>
-
- </tr>
- </table>
- </td>
+
</tr>
+
</table>
+
+</td></tr></table>
<!-- These hidden variables are always the same -->
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
@@ -347,4 +353,6 @@
</center>
</form>
+
+</div>
<script> TestNoRoom(); </script>
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/view.php
===================================================================
--- trunk/moodle/mod/liveclassroom/view.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/view.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -62,158 +62,41 @@
}
}
- require_login($course->id);
+ require_login($course->id);
- // add_to_log($course->id, "liveclassroom", "view", "view.php?id=$cm->id", "$liveclassroom->id");
-
-
// Create the session for this user
if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
error ("Cannot create session");
}
-/// Print the page header
- if ($course->category) {
- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
- }
+ $classid = $liveclassroom->type;
- $strliveclassrooms = get_string("modulenameplural", "liveclassroom");
- $strliveclassroom = get_string("modulename", "liveclassroom");
- print_header("$course->shortname: $liveclassroom->name", "$course->fullname",
- "$navigation <A HREF=index.php?id=$course->id>$strliveclassrooms</A> -> $liveclassroom->name",
- "", "", true, update_module_button($cm->id, $course->id, $strliveclassroom),
- navmenu($course, $cm));
-
-
-/* GROUP LATER !!!!!!!!!!!!!
-
-/// Check to see if groups are being used here
- if ($groupmode = groupmode($course, $cm)) { // Groups are being used
- $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id");
- } else {
- $currentgroup = 0;
- }
-
- if ($currentgroup) {
- $groupselect = " AND groupid = '$currentgroup'";
- $groupparam = "&groupid=$currentgroup";
- } else {
- $groupselect = "";
- $groupparam = "";
- }
-
-*//*
-
-// if groups are being used, get the groupid and create the LC into moodle linked to this group.
- print mygroupid($course->id);
- if ($groupmode = groupmode($course, $cm)) {
- print $groupmode;
- $test = mygroupid($course->id);
- $liveclassroom->groupid = mygroupid($course->id);
-
- update_record("liveclassroom",$liveclassroom);
-
- }
-*/
-
/// Print the main part of the page
?>
<!--script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch-7892.js'></script-->
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
<script type="text/javascript">
- function doOpenAdmin(url) {
- var w = window.open(url, 'lc_admin_popup', 'scrollbars=yes, resizable=yes, width=800, height=500');
- w.focus();
+
+ function startActivity(){
+
+ startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>' )
+ location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php echo $course->id; ?>";
+
}
</script>
<?php
- $classid = $liveclassroom->type;
+
if ((isstudent($course->id)) or (isteacher($course->id, $USER->id))) {
?>
- <body onload="javascript:startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>' )">
- </body>
+
<?php
}
?>
- <table style="background-color: #ffffff !important; border-left : 1px solid #999; border-right : 1px solid #999; border-top : 1px solid #999;border-bottom : 1px solid #999;" width="100%" cellspacing="0" cellpadding="0" border="0" align="center" summary="layout">
- <tr style="background-color:#EEEEEE; font-weight:normal; color:black;">
- <td width="70%">
- <table cellpadding="2" border="0" align="center" width="100%" valign="top" >
- <tr style="background-color:#EEEEEE; font-weight:normal; color:black;">
- <td valign="top">
- <strong><font size="+1"><?php p(get_string('linksfor', 'liveclassroom'))?> <em><?php p($course->fullname)?></em>.</font>
- </strong>
-
- </td>
- </tr>
- <tr ><td style="border-bottom: 1px solid #999;"><span class='fnt0'></span>
- </td></tr>
-
-
-
-
-<?php
- if ( (isteacher($course->id, $USER->id))|| (isstudent($course->id)) ) {
-?>
- <tr>
- <td>
- <a href="javascript:startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>')">
-
- <?php p(get_string("accessroomsstudent", 'liveclassroom')) ?>
- </a>
- </td>
- </tr>
-
-<?php
-}
-?>
-
- <tr >
- <td>
- <em><font size="-1">
- <?php echo get_string ('wizard.text.1', 'liveclassroom') ?>
- <a href="javascript:startWizard()" target="_self" class="external"><?php echo get_string('wizard.text.2', 'liveclassroom') ?></a>
- <?php echo get_string ('wizard.text.3', 'liveclassroom') ?>
- </font></em>
- </td>
- </tr>
- </table>
- </td>
- <td align="right" width="30%" valign="top" style="border-left:1px solid #999;">
- <table cellpadding="2" valign="top" align="center" width="100%" border="0">
- <tr style="background-color:#EEEEEE; font-weight:normal; color:black;">
- <td> </td>
- <td valign="top">
- <a href="javascript:startWizard()" title="<?php echo get_string('runwizard', 'liveclassroom') ?>" >
- <img src="<?php p($CFG->liveclassroom_servername) ?>/images/wizard_logo.gif" border="0" title="<?php echo get_string('runwizard', 'liveclassroom') ?>" alt="<?php echo get_string('runwizard', 'liveclassroom') ?>"></a><br>
- <em><font size="-1">
- <?php echo get_string('wizard.text2.1', 'liveclassroom')?> <a href="javascript:startWizard()" target="_self" class="external"><?php echo get_string('wizard.text2.2', 'liveclassroom')?></a> <?php echo get_string('wizard.text2.3', 'liveclassroom')?>
- </font></em>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- </table>
-</td>
- </tr>
-
- <tr style="background-color:#EEEEEE; font-weight:normal; color:black;"><td style="border-right:1px solid #999;"> </td><td> </td></tr>
-
- </table>
-
-
-
-<?PHP
-/// Finish the page
- print_footer($course);
-
-?>
+ <script>startActivity();</script>
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-15 11:04:39 UTC (rev 110)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-15 15:22:58 UTC (rev 111)
@@ -48,24 +48,16 @@
}
require_login($course->id);
-
if (!liveclassroom_init_session($_GET)) {
error("ExpiredSessionException");
}
-
-
- //session_start();
/// Get all required strings
$strliveclassrooms = get_string("modulenameplural", "liveclassroom");
$strliveclassroom = get_string("modulename", "liveclassroom");
-/*
- if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
- error ("Cannot create session");
- }
-*/
+
/// Print the header
if ($course->category) {
@@ -161,7 +153,7 @@
<?php
if(isset($_GET['addnew']))
{
- ?> //alert("yep");
+ ?>
showPopup()
var parameters="";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-15 11:04:43
|
Revision: 110
http://svn.sourceforge.net/hw4mdl/?rev=110&view=rev
Author: shazan
Date: 2006-12-15 03:04:39 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
Module can be accessed if the "Activities" block is not displayed.
php4 and php5 are now supported with the same code
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/js/Ajax.js
trunk/moodle/mod/liveclassroom/js/constants.js
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/js/verifForm.js
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/welcome.php
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/pictures/items/more-link.png
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-15 11:04:39 UTC (rev 110)
@@ -68,6 +68,7 @@
$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
+
/*
* Get the prefix to use for creating rooms and users.
*
@@ -250,11 +251,11 @@
if ( $respcode != 100 && $respcode != 301) {
- add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userId&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed");
+ add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&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_LOGS?type=createUser&time=".time()."&userId=$userId&courseId=".$COURSE->id, "User Creation succeeded");
+ add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=createUser&time=".time()."&userId=$userid&courseId=".$COURSE->id, "User Creation succeeded");
return true;
}
@@ -357,6 +358,8 @@
global $LIVECLASSROOM_LOGS;
global $COURSE;
+ $list_attributes = '';
+
unset($attributes['longname']);
while (list($key, $val) = each($attributes)) {
if(($key!='class_id')&&(isset($val))&&($val!="")){
@@ -1423,9 +1426,12 @@
if ( $respcode != 100) {
return false;
}
+/*
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
+*/
-
-
$listElements = $xmldoc->create_element('listElements');
//$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent');
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 11:04:39 UTC (rev 110)
@@ -30,7 +30,10 @@
/* $Id$ */
/// This page is to generate the list of rooms and archives
-
+ error_reporting(E_ALL);
+
+
+
require_once("../../config.php");
require_once("lib.php");
require_once("api.php");
@@ -38,6 +41,11 @@
// Variables needed
global $CFG;
+
+ if (version_compare(PHP_VERSION,'5','>=')) {
+ require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
+ }
+
if(empty($_POST)){
$params = $_GET;
}
@@ -127,11 +135,11 @@
$products->append_child($listProducts);
// PRODUCTS CONTENT
- $productContent = $xmldoc->create_element('productsContent');
+// $productContent = $xmldoc->create_element('productsContent');
- $productContent->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
+ $products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
- $products->append_child($productContent);
+// $products->append_child($productContent);
$elementParameters->append_child($products);
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 11:04:39 UTC (rev 110)
@@ -38,6 +38,10 @@
// Variables needed
global $CFG;
+ 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'];
@@ -135,6 +139,10 @@
$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);
@@ -154,6 +162,10 @@
$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);
@@ -176,6 +188,10 @@
$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);
@@ -188,6 +204,10 @@
$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);
@@ -209,6 +229,10 @@
$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);
@@ -235,6 +259,10 @@
$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);
@@ -271,6 +299,10 @@
$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);
@@ -282,6 +314,10 @@
$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);
@@ -345,6 +381,10 @@
$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);
@@ -371,6 +411,10 @@
$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);
@@ -411,6 +455,10 @@
$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);
@@ -444,6 +492,10 @@
$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);
@@ -479,6 +531,10 @@
$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);
@@ -508,6 +564,10 @@
$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);
@@ -548,7 +608,9 @@
$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);
@@ -573,7 +635,9 @@
$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);
@@ -599,7 +663,9 @@
$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);
@@ -625,7 +691,9 @@
$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);
@@ -651,7 +719,9 @@
$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);
@@ -690,7 +760,9 @@
$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);
@@ -715,7 +787,9 @@
$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);
@@ -740,7 +814,9 @@
$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);
@@ -764,7 +840,9 @@
$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);
@@ -795,7 +873,9 @@
$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);
@@ -820,7 +900,9 @@
$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);
@@ -837,7 +919,9 @@
$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);
@@ -848,7 +932,9 @@
$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);
@@ -875,7 +961,9 @@
$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);
@@ -886,7 +974,9 @@
$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);
@@ -920,7 +1010,9 @@
$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);
@@ -950,7 +1042,9 @@
$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);
Modified: trunk/moodle/mod/liveclassroom/js/Ajax.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-15 11:04:39 UTC (rev 110)
@@ -1,66 +1,61 @@
function getHTTPObject()
{
- var xmlhttp = false;
-
- /* Compilation conditionnelle d'IE */
- /*@cc_on
- @if (@_jscript_version >= 5)
- try
- {
- xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch (e)
- {
- try
- {
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (E)
- {
- xmlhttp = false;
- }
- }
- @else
- xmlhttp = false;
- @end @*/
-
- /* on essaie de cr\xE9er l'objet si ce n'est pas d\xE9j\xE0 fait */
- if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
- {
- try
- {
- xmlhttp = new XMLHttpRequest();
- }
- catch (e)
- {
- xmlhttp = false;
- }
- }
-
- if (xmlhttp)
- {
- /* on d\xE9finit ce qui doit se passer quand la page r\xE9pondra */
- xmlhttp.onreadystatechange=function()
- {
-
- if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
- {
-
- /*alert(xmlhttp.responseText);
- Traitement de la r\xE9ponse.
- Ici on affiche la r\xE9ponse dans une bo\xEEte de dialogue.
- */
- studentView=false;
- objDom=new XMLDoc(xmlhttp.responseText, null);
- manageXml("");
-
- }
- }
- }
- return xmlhttp;
+ var xmlhttp = false;
+ /* Compilation conditionnelle d'IE */
+ /*@cc_on
+ @if (@_jscript_version >= 5)
+ try
+ {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ }
+ catch (e)
+ {
+ try
+ {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ catch (E)
+ {
+ xmlhttp = false;
+ }
+ }
+ @else
+ xmlhttp = false;
+ @end @*/
+ /* on essaie de créer l'objet si ce n'est pas déj\xC3 fait */
+ if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
+ {
+ try
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ catch (e)
+ {
+ xmlhttp = false;
+ }
+ }
+ if (xmlhttp)
+ {
+ /* on définit ce qui doit se passer quand la page répondra */
+ xmlhttp.onreadystatechange = function()
+ {
+ if (xmlhttp.readyState == 4)
+ /* 4 : état "complete" */
+ {
+ /*alert(xmlhttp.responseText);
+ Traitement de la réponse.
+ Ici on affiche la réponse dans une boîte de dialogue.
+ */
+
+ studentView = false;
+ objDom = new XMLDoc(xmlhttp.responseText, null);
+ manageXml("");
+ }
+ }
+ }
+ return xmlhttp;
}
-
function gestionDisplay(isfilter)
{
@@ -109,42 +104,42 @@
if(numberVoiceBoard>5 && isfilter==false)
{
- document.getElementById("div3").style.height=5*19+"px";
- document.getElementById("div3More").style.display="block";
- document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>";
+ // document.getElementById("div3").style.height=5*19+"px";
+ // document.getElementById("div3More").style.display="block";
+ // document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>";
}else if(numberVoiceBoard==0){
- document.getElementById("div3").style.display="none";
- document.getElementById("div3Title").style.display="none";
- document.getElementById("div3More").style.display="none";
+ // document.getElementById("div3").style.display="none";
+ // document.getElementById("div3Title").style.display="none";
+ // document.getElementById("div3More").style.display="none";
}else{
- document.getElementById("div3").style.height=numberVoiceBoard*19+"px";
- document.getElementById("div3More").style.display="none";
+ // document.getElementById("div3").style.height=numberVoiceBoard*19+"px";
+ // document.getElementById("div3More").style.display="none";
}
if(numberVoicePresentation>5 && isfilter==false)
{
- document.getElementById("div4").style.height=5*19+"px";
- document.getElementById("div4More").style.display="block";
- document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>";
+ // document.getElementById("div4").style.height=5*19+"px";
+ // document.getElementById("div4More").style.display="block";
+ // document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>";
}else if(numberVoicePresentation==0 && isfilter==false){
- document.getElementById("div4").style.display="none";
- document.getElementById("div4Title").style.display="none";
- document.getElementById("div4More").style.display="none";
+ // document.getElementById("div4").style.display="none";
+ // document.getElementById("div4Title").style.display="none";
+ // document.getElementById("div4More").style.display="none";
}
else{
- document.getElementById("div4").style.height=numberVoicePresentation*19+"px";
- document.getElementById("div4More").style.display="none";
+ // document.getElementById("div4").style.height=numberVoicePresentation*19+"px";
+ // document.getElementById("div4More").style.display="none";
}
@@ -205,21 +200,16 @@
return params;
}
-
function DisplayFirstPage(){
/* Cr\xE9ation de l'objet : */
-/*
-var m=
-if(t!=null) m=t;
-else m=getURLParameters();
-*/
+
/* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
xmlhttp.open("POST", 'generateListRooms.php',true);
/* Effectue la requ\xEAte : */
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- xmlhttp.onreadystatechange=Management;
+xmlhttp.onreadystatechange=Management;
xmlhttp.send(getURLParameters())
@@ -265,8 +255,9 @@
if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
{
+
hidePopup()
-
+
objDom=new XMLDoc(xmlhttp.responseText, null);
objDomTree = objDom.docNode;
Modified: trunk/moodle/mod/liveclassroom/js/constants.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-15 11:04:39 UTC (rev 110)
@@ -6,8 +6,12 @@
var numberOfProduct=4;
var currentId="";
var currentProduct="";
+var currentTool="all";
var typeSelect="mainLecture"
+var longname="";
+var description="";
+
var currentDiv=0;
var numberMainLectureRoom=0;
var numberBreakoutRoom=0;
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-15 11:04:39 UTC (rev 110)
@@ -27,8 +27,11 @@
{
document.forms[0].student_simulcast.disabled = (mediatype=="video" || mediatype=="none")
document.forms[0].two_way_enabled.disabled = (mediatype=="video" || mediatype=="none")
- if (mediatype=="video"){document.getElementById('roomId_row').style.display="block"}else{
- document.getElementById('roomId_row').style.display="none"}
+ if (mediatype=="video"){
+ document.getElementById('roomId_row').className="visibleAndShift"
+ }else{
+ document.getElementById('roomId_row').className="hideAndShift"
+ }
}
function doChangeLink()
{
@@ -43,9 +46,15 @@
function toggleType(type)
{
+
+ longname=document.getElementById('longname').value;
+ description=document.getElementById('description').value;
typeSelect=type;
+
manageXml('','all');
-
+ longname="";
+ description="";
+
@@ -102,7 +111,7 @@
document.getElementById(id).style.display="block";
document.getElementById(id+"More").style.display="block";
if(pictureId!="")
- document.images[pictureId].src="pictures/items/category-expanded.png";
+ changePicture(pictureId,"pictures/items/category-expanded.png");
}
else if (document.getElementById(id).style.display=="block")
@@ -111,7 +120,7 @@
document.getElementById(id).style.display="none";
document.getElementById(id+"More").style.display="none";
if(pictureId!="")
- document.images[pictureId].src="pictures/items/category-collapsed.png";
+ changePicture(pictureId,"pictures/items/category-collapsed.png");
}
if (document.getElementById(id).className=="hide")
{
@@ -119,7 +128,7 @@
document.getElementById(id+"More").className="visible";
if(pictureId!="")
- document.images[pictureId].src="pictures/items/category-expanded.png";
+ changePicture(pictureId,"pictures/items/category-expanded.png");
}
else if (document.getElementById(id).className=="visible")
@@ -128,24 +137,28 @@
document.getElementById(id+"More").className="hide";
if(pictureId!="")
- document.images[pictureId].src="pictures/items/category-collapsed.png";
+ changePicture(pictureId,"pictures/items/category-collapsed.png");
}
}
-
function hideArchive(type,id,pictureId,roomId)
{
- if (document.getElementById(id).style.display=="none")
+ if (document.getElementById(id).style.display=="none" || document.getElementById(id).className=="hide")
{
if(type=="MainLecture")
numberMainLectureRoom+=numberArchive[roomId];
else
numberBreakoutRoom+=numberArchive[roomId];
+ if (document.getElementById(id).className=="hide")
+ {
+ document.getElementById(id).className="visible";
+ }else{
document.getElementById(id).style.display="block";
- document.images[pictureId].src="pictures/minus.gif";
+ }
+ changePicture(pictureId,"pictures/items/listitem-hide.png");
}
@@ -155,9 +168,15 @@
numberMainLectureRoom-=numberArchive[roomId];
else
numberBreakoutRoom-=numberArchive[roomId];
+ if (document.getElementById(id).className=="visible")
+ {
- document.getElementById(id).style.display="none";
- document.images[pictureId].src="pictures/plus.gif";
+ document.getElementById(id).className="hide";
+
+ }else{
+ document.getElementById(id).style.display="none";
+ }
+ changePicture(pictureId,"pictures/items/listitem-show.png");
}
@@ -246,17 +265,19 @@
if(currentId!="")
{
- var complete_url=url+'?roomId='+currentId+'&'+param;
+ var complete_url=url+'?product='+currentProduct+'&id='+currentId+'&'+param;
- window.open(complete_url,"_self");
+ window.open(complete_url,"_self");
}
}
+
+
function doOpenPopup(url,param)
{
if(currentId!="")
{
- var complete_url=url+'?roomId='+currentId+'&'+param;
+ var complete_url=url+'?id='+currentId+'&'+param;
var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
w.focus();
}
@@ -298,36 +319,45 @@
currentId="";
currentProduct="";
manageXml('',"all");
+
+
}
function onFilter(id){
if(currentFilter!=id){
- document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-rollover-left.png)";
- document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-rollover-middle.png)";
- document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-rollover-right.png)";
+ document.getElementById(id+"_left").className="filter_left_rollover";
+ document.getElementById(id+"_center").className="filter_middle_rollover";
+ document.getElementById(id+"_right").className="filter_right_rollover";
}
}
function outFilter(id){
if(currentFilter==id){
- document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-enabled-left.png)";
- document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-enabled-middle.png)";
- document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-enabled-right.png)";
- }else{
- document.getElementById(id+"_left").style.backgroundImage="";
- document.getElementById(id+"_center").style.backgroundImage="";
- document.getElementById(id+"_right").style.backgroundImage="";
+ document.getElementById(id+"_left").className="filter_left_enabled";
+ document.getElementById(id+"_center").className="filter_middle_enabled";
+ document.getElementById(id+"_right").className="filter_right_enabled";
+ }else{
+ document.getElementById(id+"_left").className="noFilter";
+ document.getElementById(id+"_center").className="noFilter";
+ document.getElementById(id+"_right").className="noFilter";
}
}
-function startBoard()
+function startBoard(type)
{
if(currentId!="")
{
- openPopup('<%=Setup.getInstance().getVtServerURL()%>/board?action=display_popup&nid='+currentId)
+ var type;
+ if(typeSelect=="voiceBoard"){
+ type="board"
}
+ else if(typeSelect=="voicePresentation"){
+ type="presentation"
+ }
+ window.open(session["vtServerUrl"]+'/'+type+'?action=display_popup&nid='+currentId,"vt_popup",'scrollbars=yes,resizable=yes,width=800,height=500')
+ }
}
@@ -335,34 +365,91 @@
currentId=""
currentProduct=""
manageXml(search.value,"all");
-
+ gestionDisplay();
}
function Launch(){
-
- if(currentProduct="liveclassroom"){
+
+ if(currentProduct=="liveClassroom"){
Horizon();
- }else if(currentProduct="voiceboard"){
- startBoard();
+ }else if(currentProduct=="voiceBoard"){
+
+ startBoard(typeSelect);
}
+ currentId="";
+ currentProduct="";
+
}
+
function openContentWindows(){
if(currentId!="")
- window.open('http://test13.horizonwimba.com/admin/class/carousels.epl?class_id='+currentId+'&hzA='+session["authToken"],'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+ window.open(session["lcServerUrl"]+'/admin/class/carousels.epl?class_id='+currentId+'&hzA='+session["authToken"],'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
}
-function submitForm(url,action){
- //alert(currentId)
- document.myform.action=url+'?product='+currentProduct+'&id='+currentId+'&action='+action+'&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"];
- document.myform.submit();
- }
+function openPopup(name,url,size,title) {
+ window.open(url,name,size);
+}
+function startHorizon( channel, useplugin, user, password, nickname, paramstring )
+{
+ var windowname = "horizonWin";
+ var horizonurl = session["lcServerUrl"]+"/main/horizon_ui.pl.epl";
+
+ // set the channel ( default to lobby )
+ if ( channel != null) {
+ horizonurl += "?channel=" + channel;
+ }
+ else {
+ horizonurl += "?channel=lobby";
+ }
+
+ if ( useplugin != null ) {
+ horizonurl += "&useplugin=" + useplugin;
+ }
+
+ if ( user != null ) {
+ horizonurl += "&AuthName=Horizon&credential_0=" + user;
+ }
+ if ( password != null ) {
+ horizonurl += "&credential_1=" + password;
+ }
+
+ if ( nickname != null ) {
+ horizonurl += "&credential_2=" + nickname;
+ }
+
+ if ( paramstring != null ) {
+ horizonurl += "&" + paramstring;
+ }
+
+ // open a window with the horizon ui
+ var properties = "scrollbars=no,resizable=yes,width=700,height=500" ;
+ openPopup( windowname, horizonurl, properties, "Live Classroom");
+
+ return;
+}
+
+
+function doOpenPodcaster(url)
+{
+
+ var w = window.open(url,'pc','scrollbars=yes,resizable=yes,width=1000,height=1000');
+ w.focus();
+
+}
+function submitForm(url,action,id){
+alert(id);
+ if(currentProduct=="liveClassroom")
+ verifyFormLiveClassRoom(url+'?product='+currentProduct+'&id='+id+'&action='+action+'&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"]);
+ else
+ verifyFormVoiceBoard(url+'?product='+currentProduct+'&id='+id+'&action='+action+'&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"]);
+ }
- function execAction(lcAction,VtAction){
+ function execAction(lcAction,VtAction){
eval(lcAction);
@@ -394,7 +481,131 @@
function initSearch(search){
- alert("rrr");
- manageXml(search,"toolBar");
-
- }
\ No newline at end of file
+ currentProduct="";
+ currentId="";
+ manageXml(search,"all");
+ document.getElementById("search").focus();
+ }
+
+
+ function getPosition(e) {
+ e = e || window.event;
+ var cursor = {x:0, y:0};
+ if (e.pageX || e.pageY) {
+ cursor.x = e.pageX;
+ cursor.y = e.pageY;
+ }
+ else {
+ var de = document.documentElement;
+ var b = document.body;
+ cursor.x = e.clientX +
+ (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
+ cursor.y = e.clientY +
+ (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
+ }
+ return cursor;
+}
+var timer=0;
+var current;
+function ShowToolTip(ev,lname,availibility)
+{
+var Xdoc, Xfen, Ydoc, Yfen, htDiv, lgDiv, dX, dY;
+ var Ybulle;
+ var el=document.getElementById("Tip");
+
+ //on affiche la boite de dialogue pour evaluer ses dimensions.
+
+
+
+ //height and width of the tooltip
+ htDiv = el.offsetHeight;
+ lgDiv = el.offsetWidth;
+
+ //delta of the tooltip under the curser
+ dY=20;
+ dX=0;
+
+
+ ie = document.all;
+ var cursor = getPosition(ev);
+
+ if(ie){
+ Xfen = event.x;
+ Yfen = event.y;
+ Xdoc = cursor.x;
+ Ydoc = cursor.y;
+ //window.status = x;
+ }else{
+ Xfen = ev.pageX;
+ Yfen = ev.pageY;
+ Xdoc = cursor.x;
+ Ydoc = cursor.y;
+ }
+
+ //position of the curseur :
+/* var cursor = getPosition(ev);
+
+ Xfen = ev.clientX;
+ Xdoc = cursor.x;
+
+ Yfen = ev.clientY;
+ Ydoc = cursor.y;
+*/
+ //position de la bulle dans la page :
+ if ((Xfen + lgDiv + dX) > document.body.clientWidth)
+ el.style.left = document.body.clientWidth + document.body.scrollLeft - lgDiv+"px";
+ else
+ el.style.left = Xdoc + dX +"px";
+
+ if ((Yfen + htDiv + dY) > document.body.clientHeight)
+ {
+ Ybulle = document.body.clientHeight + document.body.scrollTop - htDiv-5;
+ if (parseInt(Ybulle)>parseInt(Ydoc))
+ {
+ el.style.top = Ybulle+"px";
+ }
+ else
+ {
+ el.style.top = Ydoc - htDiv-dY+"px";
+ }
+ }
+ else
+ {
+ el.style.top = Ydoc + dY-5+"px";
+ }
+
+ //el.style.visibility = "visible";
+ //el.style.display = "block";
+
+ //tooltip content :
+ el.innerHTML = "<strong>"+lname+"</strong><br>";
+ if(availibility=="available")
+ el.innerHTML +="Available to the students.<br>";
+ else
+ el.innerHTML +="Unavailable to the students.<br>";
+ el.innerHTML+= "Click Settings to change.";
+ if(timer==0)
+ timer=setTimeout('ShowToolTipWait()', 1000)
+ if(current !=lname){
+ clearTimeout(timer)
+ timer=setTimeout('ShowToolTipWait()', 0)
+
+ }
+ current=lname;
+
+}
+
+ function ShowToolTipWait(){
+ var el=document.getElementById("Tip");
+ if (el.style.display!="inline")
+ el.style.display="inline";
+
+ }
+function HideToolTip()
+{
+ //hide the tooltip
+
+ clearTimeout(timer)
+ timer=0;
+ document.getElementById("Tip").style.display = "none";
+}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-14 14:22:06 UTC (rev 109)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-15 11:04:39 UTC (rev 110)
@@ -3,11 +3,11 @@
function manageXml(search,divToReload){
var display="";
-
+
if(divToReload=="all"){
- display+="<form method=post name=myform>"
- display+=initDisplay();
-
+ display+="<form method=post name=myform>"
+ display+=initDisplay();
+
}
//session management
var information= objDomTree.getElements("information");
@@ -19,10 +19,11 @@
var windows = objDomTree.getElements("windows");
//get the different part of the windows
var windowsElements = windows[0].getElements("windowsElement");
+
for(var i=0;i<windowsElements.length;i++){
// display+=openPart();
var type = windowsElements[i].getElements("type")[0].getText();
-
+
switch(type){
case "headerBar":
if(divToReload=="all" ){
@@ -32,7 +33,7 @@
}else if(divToReload=="headerBar"){
display+=displayHeaderBar(windowsElements[i].getElements("windowsElementParameters"));
-
+
}
break;
case "toolBar":
@@ -45,6 +46,7 @@
display+=displayToolBar(windowsElements[i].getElements("windowsElementParameters"),search);
}
+
break;
case "filterBar":
if(divToReload=="all"){
@@ -56,6 +58,7 @@
display+=displayFilterBar(windowsElements[i].getElements("windowsElementParameters"));
}
+
break;
case "messageBar":
if(divToReload=="all"){
@@ -68,6 +71,17 @@
}
break;
+ case "error":
+ if(divToReload=="all"){
+ display+=openDiv("messageBar","messageBar")
+ display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="messageBar"){
+
+ display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
case "list":
if(divToReload=="all"){
display+=openDiv("list","list") //style='height:245px;overflow-y:scroll'"
@@ -134,15 +148,15 @@
document.getElementById(divToReload).innerHTML = display;
- if(divToReload=="all"){
- gestionDisplay(false);
- document.getElementById("search").focus();
- }
+
+ if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
+ correctPNG();
- correctPNG();
+ if(divToReload=="all" || divToReload=="list"){
+ gestionDisplay(false);
+ document.getElementById("search").focus();
+ }
-
-
}
@@ -154,24 +168,69 @@
switch(messageInformations[0].getElements("type")[0].getText()){
case "info":
- pictureUrl="";
+ pictureUrl="pictures/items/messagelabel-info.png";
break;
- case "exception":
- pictureUrl="";
+ case "error":
+
+display+="<table width='100%' height='32' border='0' align='center' cellpadding='0' cellspacing='0' background='headerbar.png'>"
+display+="<tr><td>"
+display+="<div id='headerBar' class='headerBar'>"
+display+=" <table cellpadding='0' cellspacing='0' id='TABLE1' style='padding-left:5px'>"
+display+="<tbody>"
+display+="<tr><td>"
+display+="<img src='pictures/items/headerbar-logo.png'>"
+
+ display+="</td> "
+ display+= "<td align='right' valign='middle'>"
+
+
+ display+= "<select id='view' onchange='ChangeView()'>"
+ display+= "<option value='normal'>Instructor View</option>"
+
+ display+= "<option value='student'>Student View</option>"
+
+ display+= "</select>"
+
+ display+= "</td></table></div>"
+ display+="</tr><tr><td><div id='contextBar' class='contextBar'>"
+
+ display+="<table cellspacing='0' cellpadding='0'>"
+ display+= "<tr>"
+ display+= "<td align=left><label class='roomNameForSettings'>Error</label></td>"
+ display+= "</tr>"
+ display+="</table></div>"
+ display+= "</td>"
+ display+="</tr>";
+ display+="</tr><tr><td>"
+
+ display+="<div id='error_frame' align='center'>"
+ display+="<table width='100%' border='0' cellpadding='0' height='254px'>"
+
+ display+="<tr>"
+ display+="<td width='10%'></td>"
+ display+="<td valign='middle'><img src='pictures/items/warning.png' alt='' width='60' height='60' border='0'></td>"
+ display+="<td width='20'></td>"
+ display+="<td valign='middle' >"
+ display+="<div id='error_title'>Error"
+ display+="<div id='error_body'>"
+ display+="<p>"+messageInformations[0].getElements("value")[0].getText()+"</p>"
+ display+="</div>"
+ display+="</td>"
+
+ display+="</tr>"
+
+ display+="</table>"
+ display+="</div>"
+ display+= "</td>"
+ display+="</tr>";
+ display+="</tbody>"
+ display+="</table>"
break;
}
-
- display="<table cellspacing=0 border=1 cellpadding=0 bgcolor='#ffffd0'>"
- display+= "<tr >"
- display+= "<td><img src='pictures/items/messagelabel-info.png' /></td>"
- display+= "<td> " + messageInformations[0].getElements("value")[0].getText()+"</td>";
- display+= "<td colspan=5></td>"
- display+= "</tr>"
- display+="</table>"
+
return display;
-
+}
-}
function displayHeaderBar(elementParameters){
var display="";
var headerBarInformations=elementParameters[0].getElements("headerBarInformations")
@@ -296,7 +355,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\");' 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'> "
@@ -330,15 +389,15 @@
//get the different filters
var filterElements = filterBar[0].getElements("filter");
- display +="<table cellspacing='0' cellpadding='0' width=100%>"
+ display +="<table cellspacing='0' cellpadding='0' width=100% >"
display += "<tr>"
for(var i=0;i<filterElements.length;i++){
- display += "<td>"
+ display += "<td class='filterSpace'>"
display+=displayfilter(filterElements[i].getElements("value")[0].getText(),filterElements[i].getElements("name")[0].getText(),filterElements[i].getElements("action")[0].getText(),filterElements[i].getElements("availibility")[0].getText());
display += "</td>"
- display+="<td width='15px'></td> "
+
}
display+="</tr></table>";
@@ -347,23 +406,23 @@
function displayfilter(value,name,action,availibility){
var display="";
- display+="<table border='0' align='center' cellpadding='0' cellspacing='0' heigth='24px'>";
+ display+="<table align='center' cellpadding='0' cellspacing='0' heigth='24px'>";
display+="<tr heigth='24px' class='filter'>";
if(currentFilter==name){
- display+="<td width='8px' class='filter_left_enabled' id='"+name+"_left'></td>";
- display+="<td class='filter_middle_enabled' id='"+name+"_center' class='filter_selected'>";
- display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>";
+ display+="<td class='filter_left_enabled' width=8px id='"+name+"_left'></td>";
+ display+="<td class='filter_middle_enabled' id='"+name+"_center' class='filter_selected' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\">";
+ display+=value;
display+="</td>";
- display+="<td width='8px' class='filter_right_enabled' id='"+name+"_right'></td>";
+ display+="<td class='filter_right_enabled' width=8px id='"+name+"_right'></td>";
}
else{
- display+="<td width='8px' id='"+name+"_left'></td>";
- display+="<td id='"+name+"_center' class='filter_enabled'>";
- display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>";
+ display+="<td width=8px id='"+name+"_left' ></td>";
+ display+="<td id='"+name+"_center' class='filter_enabled' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\">";
+ display+=value;
display+="</td>";
- display+="<td width='8px' id='"+name+"_right'></td>";
+ display+="<td width=8px id='"+name+"_right'></td>";
}
display+="</tr>";
display+="</table>";
@@ -414,8 +473,8 @@
start=parseInt(positionOfDiv);
}
- var productsContent = list[0].getElements("productsContent");
- var content = productsContent[0].getElements("listElements");
+
+ var content = list[0].getElements("listElements");
var listElements = content[0].getElements("listElement");
var positionDiscussionRoom=0;
var positionMainLecture=0;
@@ -479,9 +538,12 @@
}
var display="";
-
+ display+="<table border='0' align='center' cellpadding='0' cellspacing='0' width=100% >";
+
for(i=start; i< parts.length; i++)
{
+ display+="<tr><td>";
+
if(currentFilter=="all" || currentDiv== i){
if(positionMainLecture==i)
parts[i]=parts[i].toString()+orphanedMainLecture;
@@ -491,15 +553,16 @@
parts[i]+="<div id='div"+i+"More' class='hide'></div>"
display+=parts[i];
}
+ display+="</td></tr>";
}
-
+ display+="</table>";
return display;
}
function openDivProduct(name,cssStyle,value){
var display="";
- display+="<div id='div"+name+"Title'>";
+ display+="<div id='div"+name+"Title' >";
display+="<table cellpadding='0' cellspacing='0' width='100%'>";
display+="<tr class='productTitle'>";
@@ -525,7 +588,7 @@
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/space-16x16px.png\" border=\"0\" /></td>";
- display += "<td width='300px' >"+parameters[0].getElements("nameDisplay")[0].getText()+"</td>";
+ display += "<td width='300px' <label onmousemove='javascript:ShowToolTip(event,\""+parameters[0].getElements("nameDisplay")[0].getText()+"\",\""+parameters[0].getElements("preview")[0].getText()+"\")' onmouseout='javascript:HideToolTip()'>"+parameters[0].getElements("nameDisplay")[0].getText()+"</label></td>";
display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+parameters[0].getElements("preview")[0].getText()+".png\"/></td>";
display += "</tr>";
@@ -551,7 +614,7 @@
display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-"+type+"icon.png\" border=\"0\" /></td>";
display += "<td width=16px align=\"left\" Ondblclick=''></td>";
- display += "<td width='300px' >"+title+"</td>";
+ display += "<td width='300px' ><label onmousemove='javascript:ShowToolTip(event,\""+title+"\",\""+availibility+"\")' onmouseout='javascript:HideToolTip()'>"+title+"</label></td>";
display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
display += "</tr>";
@@ -577,17 +640,17 @@
return display;
}
-
function displayRoom(type,availibility,longname,roomId,archive,archives)
{
var display="";
- display += "<tr id="+roomId+" height=16px Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" class='room' >"
- display += "<td Ondblclick=\"dclick('"+roomId+"')\" width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
- display += "<td align=\"left\" Ondblclick='' width=16px><img src='"+archive+"' onclick=\"hideArchive('"+type+"','"+roomId+"hide','toggleimg"+roomId+"hide','"+roomId+"')\" id=\"toggleimg"+roomId+"hide\" border=\"0\" /></td>";
- display += "<td Ondblclick=\"dclick('"+roomId+"')\" width=300px ><label onmousemove=\"ShowToolTip(event,'"+longname+"','"+availibility+"')\" onmouseout=\"HideToolTip()\">"+longname+"</label></td>";
- display += "<td Ondblclick=\"dclick('"+roomId+"')\" class='shiftAvailability' align=right ><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
+ display += "<tr id="+roomId+" height=16px class='room'>"
+
+ display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
+ display += "<td align=\"left\" Onclick=\"javascript:hideArchive('"+type+"','"+roomId+"hide','toggleimg"+roomId+"hide','"+roomId+"')\" width=16px><img src='"+archive+"' id=\"toggleimg"+roomId+"hide\" border=\"0\" /></td>";
+ display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" width=300px ><label onmousemove='javascript:ShowToolTip(event,\""+longname+"\",\""+availibility+"\")' onmouseout='javascript:HideToolTip()'>"+longname+"</label></td>";
+ display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" class='shiftAvailability' align=right ><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
display += "</tr>";
if(archives!=null){
@@ -613,10 +676,10 @@
display += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','liveclassroom')\" 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 width='300px' class='archive' onmousemove=\"ShowToolTip(event,'"+archive[i].getElements("nameDisplay")[0].getText()+"')\" onmouseout=\"HideToolTip()\">"+archive[i].getElements("nameDisplay")[0].getText()+"</td>";
- display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".png\"/></td>";
+ display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.jpg\" border=\"0\" /></td>";
+ display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.jpg\" border=\"0\" /></td>";
+ display += "<td width='300px' class='archive' ><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()+".jpg\"/></td>";
display += "</tr>";
}else{
closeArchive++;
@@ -739,7 +802,7 @@
for(var i=0;i<line.length; i++){
- if(line[i].getElements("style")[0].getText()!="" && line[i].getElements("style")[0].getText()=="hide"){
+ if(line[i].getElements("style")[0].getText()!="" && (line[i].getElements("style")[0].getText()=="hide"|| line[i].getElements("style")[0].getText()=="hideAndShift")){
display +="<tr ><td>";
display +="<div id='"+line[i].getElements("id")[0].getText()+"' class='"+line[i].getElements("style")[0].getText()+"'><table cellspacing='0px' cellpadding='0'><tr>"
@@ -780,10 +843,11 @@
var style=new String(linePart[j].getElements("style")[0].getText());
if(style != "")
display+=" class="+style;
-
+ var colspan=new String(linePart[j].getElements("colspan")[0].getText());
+ if(colspan != "0")
+ display+=" colspan="+colspan;
var align=new String(linePart[j].getElements("align")[0].getText());
if(align != "")
- display+=" align="+align;
display+=" >"
for(var i=0;i<elements.length; i++){
var context=new String(elements[i].getElements("displayContext")[0].getText());
@@ -841,27 +905,54 @@
display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' ";
else
- value=listElement[i].getElements("value")[0].getText()
+ {
+
+ value=listElement[i].getElements("value")[0].getText()
+
+
+
+ }
}
display += ">"+ value +"</label>"
break;
case "input":
display += "<input ";
+ var change=false;
for(var i=0;i<listElement.length; i++){
-
- display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' ";
-
+
+ if(listElement[i].getElements("name")[0].getText()=="id" && listElement[i].getElements("value")[0].getText()=="longname" && longname!=""){
+
+ value=longname;
+ change=true;
+
+ }
+
+ display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' ";
}
+ if(change==true ){
+ display +="value='"+value+"' ";
+
+ }
+
display+="></input>";
break;
case "textarea":
display += "<textarea ";
for(var i=0;i<listElement.length; i++){
+ if(description!="" && listElement[i].getElements("name")[0].getText()=="id" && listElement[i].getElements("value")[0].getText()=="description")
+ change=true;
+
if(listElement[i].getElements("name")[0].getText()!="value")
display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' ";
else
+ {
+ if(change==true)
+ value=description
+ else
value=listElement[i].getElements("value")[0].getText()
+
+ }
}
display+=">"+value+"</textarea>";
break;
@@ -985,6 +1076,7 @@
return display;
}
function openDiv(id,style){
+
var display="<tr><td><div id='"+id+"' class="+style+">";
return display;
}
@@ -1014,9 +1106,14 @@
session["role"] = informations[0].getElements("role")[0].getText();
if(informations[0].getElements("authToken")!="")
session["authToken"] = informations[0].getElements("authToken")[0].getText();
- if(informations[0].getElements("vtServerUrl")!="")
+ if(informations[0].getElements("vtServerUrl")!="")
session["vtServerUrl"] = informations[0].getElements("vtServerUrl")[0].getText();
- if(informations[0].getElements("lcServerUrl")!="")
+
+ ...
[truncated message content] |
|
From: <sh...@us...> - 2006-12-14 14:22:10
|
Revision: 109
http://svn.sourceforge.net/hw4mdl/?rev=109&view=rev
Author: shazan
Date: 2006-12-14 06:22:06 -0800 (Thu, 14 Dec 2006)
Log Message:
-----------
version works on php4.3
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/index.php
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/reports.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-08 09:29:21 UTC (rev 108)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-14 14:22:06 UTC (rev 109)
@@ -41,12 +41,12 @@
* @package liveclassroom
*/
-require_once('System.php');
+//require_once('System.php');
require_once('lib.php');
$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
-$LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?';
+$LIVECLASSROOM_API_ADMIN = 'admin/api/api.pl?';
$LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP';
$LIVECLASSROOM_API_FUNCTION_CREATE_USER = 'function=createUser';
$LIVECLASSROOM_API_FUNCTION_MODIFY_USER = 'function=modifyUser';
@@ -65,7 +65,7 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
-$LIVECLASSROOM_LOGS = "logs.php";
+$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
/*
@@ -1281,14 +1281,25 @@
}
$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);
+ 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;
+}
+
/*
* List all the rooms and their archives associed + the orphaned archives list
*
@@ -1415,7 +1426,7 @@
- $listElements = $xmldoc->createElement('listElements');
+ $listElements = $xmldoc->create_element('listElements');
//$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent');
$line = explode("\n",$data);
@@ -1431,10 +1442,10 @@
$roompreview= liveclassroom_parse_line($line[$i],"preview="); //preview
- $element = $xmldoc->createElement('listElement');
+ $element = $xmldoc->create_element('listElement');
- $roomParameters = $xmldoc->createElement('listElementParameters');
+ $roomParameters = $xmldoc->create_element('listElementParameters');
if ($isteacher=="1")
{
@@ -1449,40 +1460,40 @@
if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
- $type = $xmldoc->createElement('typeOfElement');
- $type->appendChild($xmldoc->createTextNode("Main Lecture"));
+ $type = $xmldoc->create_element('typeOfElement');
+ $type->append_child($xmldoc->create_text_node("Main Lecture"));
$positionValue = 1;
}
else{
- $type = $xmldoc->createElement('typeOfElement');
- $type->appendChild($xmldoc->createTextNode("DiscussionRoom"));
+ $type = $xmldoc->create_element('typeOfElement');
+ $type->append_child($xmldoc->create_text_node("DiscussionRoom"));
$positionValue = 2;
}
- $position = $xmldoc->createElement('position');
- $position->appendChild($xmldoc->createTextNode("$positionValue"));
- $id = $xmldoc->createElement('id');
- $id->appendChild($xmldoc->createTextNode("$roomid"));
- $longname = $xmldoc->createElement('nameDisplay');
- $longname->appendChild($xmldoc->createTextNode("$roomname"));
- $preview = $xmldoc->createElement('preview');
+ $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->appendChild($xmldoc->createTextNode("unavailable"));
+ $preview->append_child($xmldoc->create_text_node("unavailable"));
}
else
{
- $preview->appendChild($xmldoc->createTextNode("available"));
+ $preview->append_child($xmldoc->create_text_node("available"));
}
- $roomParameters->appendChild($type);
- $roomParameters->appendChild($position);
- $roomParameters->appendChild($id);
- $roomParameters->appendChild($longname);
- $roomParameters->appendChild($preview);
- $element->appendChild($roomParameters);
+ $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);
@@ -1490,30 +1501,30 @@
$nbrClosedArchive = 0;
- $archives = $xmldoc->createElement('archives');
+ $archives = $xmldoc->create_element('archives');
foreach ($tabarchive as $tabarchive_value) {
- $archive = $xmldoc->createElement('archive');
+ $archive = $xmldoc->create_element('archive');
// $xmlOrphanedArchiveForStudent = $xmldoc->CreateElement("orphanedArchiveForStudent");
- $archiveid = $xmldoc->createElement('id');
- $archiveid->appendChild($xmldoc->createTextNode("$tabarchive_value[1]"));
- $archivename = $xmldoc->createElement('nameDisplay');
- $archivename->appendChild($xmldoc->createTextNode("$tabarchive_value[2]"));
- $archivepreview = $xmldoc->createElement('preview');
+ $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->appendChild($xmldoc->createTextNode("unavailable"));
+ $archivepreview->append_child($xmldoc->create_text_node("unavailable"));
$nbrClosedArchive++;
}
else {
- $archivepreview->appendChild($xmldoc->createTextNode("available"));
+ $archivepreview->append_child($xmldoc->create_text_node("available"));
}
- $archive->appendChild($archiveid);
- $archive->appendChild($archivename);
- $archive->appendChild($archivepreview);
- $archives->appendChild($archive);
+ $archive->append_child($archiveid);
+ $archive->append_child($archivename);
+ $archive->append_child($archivepreview);
+ $archives->append_child($archive);
unset($orphanedArchives[$tabarchive_value[1]]) ;
/*
if ( ($roompreview==1) && ($tabarchive_value[0]==0))
@@ -1537,81 +1548,81 @@
}
*/
}
- $roomParameters->appendChild($archives);
+ $roomParameters->append_child($archives);
}
- $closedArchive = $xmldoc->createElement("closedArchive");
+ $closedArchive = $xmldoc->create_element("closedArchive");
if (sizeof($tabarchive) == $nbrClosedArchive)
{
- $closedArchive->appendChild($xmldoc->createTextNode("true"));
+ $closedArchive->append_child($xmldoc->create_text_node("true"));
}
else
{
- $closedArchive->appendChild($xmldoc->createTextNode("false"));
+ $closedArchive->append_child($xmldoc->create_text_node("false"));
}
- $roomParameters->appendChild($closedArchive);
+ $roomParameters->append_child($closedArchive);
- $element->appendChild($roomParameters);
+ $element->append_child($roomParameters);
- $listElements->appendChild($element);
+ $listElements->append_child($element);
}
foreach ($orphanedArchives as $orphanedArchive)
{
- $xmlOrphanedArchive = $xmldoc->createElement("listElement");
+ $xmlOrphanedArchive = $xmldoc->create_element("listElement");
- $parametersOrphaned = $xmldoc->createElement("listElementParameters");
+ $parametersOrphaned = $xmldoc->create_element("listElementParameters");
- $typeOrphaned = $xmldoc->createElement("typeOfElement");
- $typeOrphaned->appendChild($xmldoc->createTextNode("orphanedArchive"));
- $parametersOrphaned->appendChild($typeOrphaned);
+ $typeOrphaned = $xmldoc->create_element("typeOfElement");
+ $typeOrphaned->append_child($xmldoc->create_text_node("orphanedArchive"));
+ $parametersOrphaned->append_child($typeOrphaned);
- $pos = $xmldoc->createElement("position");
- $pos->appendChild($xmldoc->createTextNode("3"));
- $parametersOrphaned->appendChild($pos);
+ $pos = $xmldoc->create_element("position");
+ $pos->append_child($xmldoc->create_text_node("3"));
+ $parametersOrphaned->append_child($pos);
- $typeOrphanedArchive = $xmldoc->createElement("type");
+ $typeOrphanedArchive = $xmldoc->create_element("type");
if(liveclassroom_api_role_user_room($orphanedArchive[1], $studentuserid)=='Student') { //lecture room
- $typeOrphanedArchive->appendChild($xmldoc->createTextNode("mainLectureRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("mainLectureRoom"));
}
else{
- $typeOrphanedArchive->appendChild($xmldoc->createTextNode("discussionRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("discussionRoom"));
}
- $parametersOrphaned->appendChild($typeOrphanedArchive);
+ $parametersOrphaned->append_child($typeOrphanedArchive);
- $idOrphanedArchive = $xmldoc->createElement("id");
- $idOrphanedArchive->appendChild($xmldoc->createTextNode($orphanedArchive[1]));
- $parametersOrphaned->appendChild($idOrphanedArchive);
+ $idOrphanedArchive = $xmldoc->create_element("id");
+ $idOrphanedArchive->append_child($xmldoc->create_text_node($orphanedArchive[1]));
+ $parametersOrphaned->append_child($idOrphanedArchive);
- $longnameOrphanedArchive = $xmldoc->createElement("nameDisplay");
- $longnameOrphanedArchive->appendChild($xmldoc->createTextNode($orphanedArchive[2]));
- $parametersOrphaned->appendChild($longnameOrphanedArchive);
+ $longnameOrphanedArchive = $xmldoc->create_element("nameDisplay");
+ $longnameOrphanedArchive->append_child($xmldoc->create_text_node($orphanedArchive[2]));
+ $parametersOrphaned->append_child($longnameOrphanedArchive);
- $previewOrphanedArchive = $xmldoc->createElement("preview");
+ $previewOrphanedArchive = $xmldoc->create_element("preview");
if ($orphanedArchive[$j][0]==1)
{
- $previewOrphanedArchive->appendChild($xmldoc->createTextNode("unavailable"));
+ $previewOrphanedArchive->append_child($xmldoc->create_text_node("unavailable"));
}
else
{
- $previewOrphanedArchive->appendChild($xmldoc->createTextNode("available"));
+ $previewOrphanedArchive->append_child($xmldoc->create_text_node("available"));
}
- $parametersOrphaned->appendChild($previewOrphanedArchive);
+ $parametersOrphaned->append_child($previewOrphanedArchive);
- $xmlOrphanedArchive->appendChild($parametersOrphaned);
+ $xmlOrphanedArchive->append_child($parametersOrphaned);
- $listElements->appendChild($xmlOrphanedArchive);
+ $listElements->append_child($xmlOrphanedArchive);
}
- $xmldoc->appendChild($listElements);
+ $xmldoc->append_child($listElements);
return $listElements;
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-08 09:29:21 UTC (rev 108)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-14 14:22:06 UTC (rev 109)
@@ -527,4 +527,16 @@
width:100%;
border-bottom: #818181 1px solid;
- }
\ No newline at end of file
+ }
+
+.toolTip{
+width: 200px;
+display: none;
+position: absolute;
+z-index : 1;
+background-color: #ffffd0;
+padding: 2px;
+margin: 2px;
+font-family: Verdana;
+font-size: 8pt;
+}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-08 09:29:21 UTC (rev 108)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-14 14:22:06 UTC (rev 109)
@@ -64,88 +64,87 @@
}
- $xmldoc = new DomDocument();
+ $xmldoc = domxml_new_doc("1.0");// new DomDocument();
- $root = $xmldoc->createElement('root');
+ $root = $xmldoc->create_element('root');
- $root->appendChild(liveclassroom_get_session_params($xmldoc,$params));
+ $root->append_child(liveclassroom_get_session_params($xmldoc,$params));
- $windows = $xmldoc->createElement('windows');
+ $windows = $xmldoc->create_element('windows');
//HEADER BAR
- $windows->appendChild(liveclassroom_create_headerbar($xmldoc));
+ $windows->append_child(liveclassroom_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(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken']));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php','Management','update','false')", ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "",""));
+ $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', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
+ $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->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(liveclassroom_create_message($xmldoc, 'info', liveclassroom_get_message($params['messageType'])));
}
// LIST
-
- $list = $xmldoc->createElement('windowsElement');
- $typeWindowsElement = $xmldoc->createElement('type');
- $typeWindowsElement->appendChild($xmldoc->createTextNode("list"));
- $list->appendChild($typeWindowsElement);
+
+ $list = $xmldoc->create_element('windowsElement');
+ $typeWindowsElement = $xmldoc->create_element('type');
+ $typeWindowsElement->append_child($xmldoc->create_text_node("list"));
+ $list->append_child($typeWindowsElement);
- $elementParameters = $xmldoc->createElement('windowsElementParameters');
+ $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(liveclassroom_create_product_information($xmldoc,'1','toggleimgmain','productType','Lecture rooms'));
- $listProducts->appendChild(liveclassroom_create_product_information($xmldoc,'2','toggleimgbreakout','productType','Discussion rooms'));
-// $listProducts->appendChild(liveclassroom_create_product_information($xmldoc,'3','toggleimgorphaned','productType','Orphaned archives'));
+ $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->appendChild($listProducts);
+ $products->append_child($listProducts);
// PRODUCTS CONTENT
- $productContent = $xmldoc->createElement('productsContent');
+ $productContent = $xmldoc->create_element('productsContent');
- $productContent->appendChild(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
+ $productContent->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
- $products->appendChild($productContent);
+ $products->append_child($productContent);
- $elementParameters->appendChild($products);
+ $elementParameters->append_child($products);
- $list->appendChild($elementParameters);
+ $list->append_child($elementParameters);
- $windows->appendChild($list);
+ $windows->append_child($list);
+
+ $root->append_child($windows);
- $root->appendChild($windows);
+ $xmldoc->append_child($root);
+
+ $xmlstring = $xmldoc->dump_mem(true); //saveXML(); // Xml datas into a string
- $xmldoc->appendChild($root);
-
- $xmlstring = $xmldoc->saveXML(); // Xml datas into a string
-
$finalstring = str_replace("\n", '', $xmlstring);
echo $xmlstring;
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-08 09:29:21 UTC (rev 108)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-14 14:22:06 UTC (rev 109)
@@ -63,157 +63,157 @@
}
$contextDisplay='all';
- $xmldoc = new DomDocument();
+ $xmldoc = domxml_new_doc("1.0");//new DomDocument();
- $root = $xmldoc->createElement('root');
+ $root = $xmldoc->create_element('root');
- $root->appendChild(liveclassroom_get_session_params($xmldoc,$_GET));
- $windows = $xmldoc->createElement('windows');
+ $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET));
+ $windows = $xmldoc->create_element('windows');
// HEADER BAR
- $windows->appendChild(liveclassroom_create_headerbar($xmldoc));
+ $windows->append_child(liveclassroom_create_headerbar($xmldoc));
// CONTEXT BAR
- $contextbar = $xmldoc->createElement('windowsElement');
- $cbtype = $xmldoc->createElement('type');
- $cbtype->appendChild($xmldoc->createTextNode("contextBar"));
- $contextbar->appendChild($cbtype);
- $cbelementParameters = $xmldoc->createElement("windowsElementParameters");
- $contextbarinformations = $xmldoc->createElement("contextBarInformations");
- $cbname = $xmldoc->createElement("name");
+ $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->appendChild($xmldoc->createTextNode($room_info['longname']));
+ $cbname->append_child($xmldoc->create_text_node($room_info['longname']));
}
- else $cbname->appendChild($xmldoc->createTextNode("New room"));
- $contextbarinformations->appendChild($cbname);
- $cbcontext = $xmldoc->createElement("context");
- $cbcontext->appendChild($xmldoc->createTextNode("Settings"));
- $contextbarinformations->appendChild($cbcontext);
- $cbproduct = $xmldoc->createElement("product");
- $cbproduct->appendChild($xmldoc->createTextNode("Live Classroom"));
- $contextbarinformations->appendChild($cbproduct);
+ 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->appendChild($contextbarinformations);
+ $cbelementParameters->append_child($contextbarinformations);
- $contextbar->appendChild($cbelementParameters);
+ $contextbar->append_child($cbelementParameters);
- $windows->appendChild($contextbar);
+ $windows->append_child($contextbar);
// SETTINGS
- $settings = $xmldoc->createElement('windowsElement');
- $settingstype = $xmldoc->createElement('type');
- $settingstype->appendChild($xmldoc->createTextNode("settings"));
- $settings->appendChild($settingstype);
+ $settings = $xmldoc->create_element('windowsElement');
+ $settingstype = $xmldoc->create_element('type');
+ $settingstype->append_child($xmldoc->create_text_node("settings"));
+ $settings->append_child($settingstype);
- $settingsElementParameters = $xmldoc->createElement("windowsElementParameters");
+ $settingsElementParameters = $xmldoc->create_element("windowsElementParameters");
- $panelsSettings = $xmldoc->createElement('panelsSettings');
+ $panelsSettings = $xmldoc->create_element('panelsSettings');
// -------------- ROOM INFO -------------------
- $panelSettings = $xmldoc->createElement('panelSettings');
+ $panelSettings = $xmldoc->create_element('panelSettings');
// ROOM INFO PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block"));
+ $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block"));
// ROOM INFO CONTENT
- $panelContent = $xmldoc->createElement('panelContent');
+ $panelContent = $xmldoc->create_element('panelContent');
// FIRST LINE
- $panelLine = $xmldoc->createElement('panelLine');
+ $panelLine = $xmldoc->create_element('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
+ $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode("right"));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node("right"));
+ $linepart->append_child($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
- $panelLine->appendChild($linepart);
+ $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->createElement('panelLinePart');
+ $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
+ $panelLine->append_child($linepart);
- $panelContent->appendChild($panelLine);
+ $panelContent->append_child($panelLine);
// SECOND LINE
- $panelLine = $xmldoc->createElement('panelLine');
+ $panelLine = $xmldoc->create_element('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
+ $linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode("right"));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node("right"));
+ $linepart->append_child($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
+ $panelLine->append_child($linepart);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
- $panelLine->appendChild($linepart);
+ $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->appendChild($panelLine);
+ $panelContent->append_child($panelLine);
if(($room_info['archive']!=1) || ($roomId == "")) {
// THIRD LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(""));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode("right"));
- $linepart->appendChild($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
- $panelLine->appendChild($linepart);
+ $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(\"mainLectureRoom\")") ;
if(($action=="update") && ($isLectureRoom==true))
@@ -230,65 +230,65 @@
$parameters['checked']=true;
}
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "mainLectureRoom","input", $parameters));
- $panelLine->appendChild($linepart);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "mainLectureRoom","input", $parameters));
+ $panelLine->append_child($linepart);
$parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "discussionRoom","input", $parameters));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "discussionRoom","input", $parameters));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) ));
- $panelLine->appendChild($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->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Instructors lead the presentation" ) ));
- $panelLine->appendChild($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->appendChild($panelLine);
+ $panelContent->append_child($panelLine);
// FOURTH LINE
- $panelLine = $xmldoc->createElement('panelLine');
+ $panelLine = $xmldoc->create_element('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
- $panelLine->appendChild($linepart);
+ $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->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $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->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
+ $panelLine->append_child($linepart);
$parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ;
@@ -302,78 +302,78 @@
$parameters['checked']=true;
}
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Students and Instructors have the same rigths" ) ));
- $panelLine->appendChild($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->appendChild($panelLine);
+ $panelContent->append_child($panelLine);
}
- $panelSettings->appendChild($panelContent);
+ $panelSettings->append_child($panelContent);
- $panelsSettings->appendChild($panelSettings);
+ $panelsSettings->append_child($panelSettings);
// ----------------- MEDIA ------------------
- $panelSettingsM = $xmldoc->createElement('panelSettings');
+ $panelSettingsM = $xmldoc->create_element('panelSettings');
// MEDIA PANEL INFO
- $panelSettingsM->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
+ $panelSettingsM->append_child(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
// MEDIA CONTENT
- $panelContentM = $xmldoc->createElement('panelContent');
+ $panelContentM = $xmldoc->create_element('panelContent');
// FIRST LINE
- $panelLine = $xmldoc->createElement('panelLine');
+ $panelLine = $xmldoc->create_element('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
+ $panelLineStyle = $xmldoc->create_element('style');
+ $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLine->append_child($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $linepart = $xmldoc->create_element('panelLinePart');
+ $style = $xmldoc->create_element('style');
+ $style->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($style);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $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->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters));
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Audio") ));
- $panelLine->appendChild($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" => "Audio") ));
+ $panelLine->append_child($linepart);
- $panelContentM->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
// SECOND LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
if($action=='update'){
if($room_info['hms_simulcast_restricted']==1){
@@ -386,34 +386,34 @@
}
else $parameters['checked']=true;
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students to use the phone") ));
- $panelLine->appendChild($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->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
+ $panelLine->append_child($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note : Instructors can always use the phone") ));
- $panelLine->appendChild($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->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
// THIRD LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $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'){
@@ -427,26 +427,26 @@
}
else $parameters['checked']=true;
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters) );
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students microphones at presentation start") ));
- $panelLine->appendChild($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" => "Enabled Students microphones at presentation start") ));
+ $panelLine->append_child($linepart);
- $panelContentM->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
//FOURTh LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
$parameters=array("type" => "radio", "value" => "one-way-audio", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
if($action=='update'){
if($room_info['media_type']=="one-way-video"){
@@ -454,539 +454,539 @@
}
}
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() ));
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Presenter uses RealProducer") ));
- $panelLine->appendChild($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" => "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->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
// HIDE LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode("hide"));
- $panelLine->appendChild($panelLineStyle);
- $panelLineId = $xmldoc->createElement('id');
- $panelLineId->appendChild($xmldoc->createTextNode("roomId_row"));
- $panelLine->appendChild($panelLineId);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
- $panelLine->appendChild($linepart);
+ $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->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->appendChild($linepart);
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
+ $panelLine->append_child($linepart);
- $panelContentM->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
//FIFTH LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $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->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Third-party Conference Call") ));
- $panelLine->appendChild($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" => "Third-party Conference Call") ));
+ $panelLine->append_child($linepart);
- $panelContentM->appendChild($panelLine);
+ $panelContentM->append_child($panelLine);
- $panelSettingsM->appendChild($panelContentM);
- $panelsSettings->appendChild($panelSettingsM);
+ $panelSettingsM->append_child($panelContentM);
+ $panelsSettings->append_child($panelSettingsM);
//--------- END MEDIA --------
// ----------------- FEATURES ----------------
- $panelSettings = $xmldoc->createElement('panelSettings');
+ $panelSettings = $xmldoc->create_element('panelSettings');
// FEATURES PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
// FEATURES CONTENT
- $panelContent = $xmldoc->createElement('panelContent');
+ $panelContent = $xmldoc->create_element('panelContent');
// FIRST LINE
- $panelLine = $xmldoc->createElement('panelLine');
- $panelLineStyle = $xmldoc->createElement('style');
- $panelLineStyle->appendChild($xmldoc->createTextNode(" "));
- $panelLine->appendChild($panelLineStyle);
- $linepart = $xmldoc->createElement('panelLinePart');
- $style = $xmldoc->createElement('style');
- $style->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($style);
+ $panelLine = $xmldoc->create_element('panelLine');
+ $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);
- $align = $xmldoc->createElement('align');
- $align->appendChild($xmldoc->createTextNode(""));
- $linepart->appendChild($align);
+ $align = $xmldoc->create_element('align');
+ $align->append_child($xmldoc->create_text_node(""));
+ $linepart->append_child($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_eboard", "name" => "student_wb_enabled") ;
if($action=='update'){
if($room_info['student_wb_enabled']==1) $parameters['checked']=true;
}
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
- $panelLine->appendChild($linepart);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students to use eBoard") ));
- $panelLine->appendChild($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" => "Enabled Students to use eBoard") ));
+ $panelLine->append_child($linepart);
- $panelContent->appendChild($pan...
[truncated message content] |
|
From: <sh...@us...> - 2006-12-08 09:29:23
|
Revision: 108
http://svn.sourceforge.net/hw4mdl/?rev=108&view=rev
Author: shazan
Date: 2006-12-08 01:29:21 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
url encoding
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/view.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-08 09:26:55 UTC (rev 107)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-08 09:29:21 UTC (rev 108)
@@ -67,6 +67,29 @@
$LIVECLASSROOM_LOGS = "logs.php";
+
+/*
+* 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;
+
+ //get the admin user name
+ $aun = $CFG->liveclassroom_adminusername;
+ if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix
+ $prefix = $aun;
+
+ }
+ else {
+ $prefix = '';
+
+ }
+ return $prefix;
+
+}
+
/**
* Creates a CURL session with the Live Classroom server. Upon success, it
* returns a CURL Handle authenticated and ready for use. It returns false
@@ -167,12 +190,12 @@
}
}
- $enc_list = str_replace(" ", "+", $attribute);
+// $enc_list = str_replace(" ", "+", $attribute);
$url = $CFG->liveclassroom_servername.
$LIVECLASSROOM_API_ADMIN.
$const.
- $enc_list;
+ $attribute;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
@@ -281,13 +304,17 @@
global $LIVECLASSROOM_LOGS;
global $COURSE;
+
+
+
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
-
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
+
add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=errorCreateSession&time=".time()."&respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id, "Cannot Create Session.");
return false;
}
@@ -338,8 +365,9 @@
}
$final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $final_list);
+ $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];
@@ -444,8 +472,11 @@
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&filter00=longname&filter00value=$roomname");
+ $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];
@@ -493,8 +524,11 @@
global $LIVECLASSROOM_API_RECORD_SEPERATOR;
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&filter00=longname&filter00value=$roomname");
+
+ $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];
@@ -555,6 +589,7 @@
$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
global $LIVECLASSROOM_LOGS;
global $COURSE;
+
liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0");
preg_match("(\d*)", $data, $matches);
@@ -624,7 +659,9 @@
$final_list = "&target=$roomid".$list_attributes;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $final_list);
+ $enc_list = str_replace(" ", "+", $final_list);
+
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -655,7 +692,10 @@
global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=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);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -697,7 +737,10 @@
global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&filter02=preview&filter02value=1&AccessUser=$userid");
+ $final_list = "&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&filter02=preview&filter02value=1&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];
@@ -738,7 +781,10 @@
global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
global $LIVECLASSROOM_API_RECORD_SEPERATOR;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=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);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1222,7 +1268,10 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR,
$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&attribute=class_id&attribute=longname&filter00=archive&filter00value=0&AccessUser=$userid");
+ $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];
@@ -1258,7 +1307,10 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR,
$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&attribute=class_id&attribute=preview&attribute=longname&attribute=archive&AccessUser=$userid");
+ $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);
@@ -1346,8 +1398,11 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR,
$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&attribute=class_id&attribute=preview&attribute=longname&filter01=archive&filter01value=0&AccessUser=$userid");
+ $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);
// $teacherid = liveclassroom_api_get_teacher_user_id($course->shortname);
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-08 09:26:55 UTC (rev 107)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-08 09:29:21 UTC (rev 108)
@@ -254,7 +254,7 @@
padding-left:5px ;
font-family:Verdana;
color:Black;
- font-size:10;
+ font-size:8;
border-bottom:solid 1px #F3F3F3;
cursor:pointer;
}
@@ -262,7 +262,7 @@
font-family:Verdana;
color:Black;
- font-size:10;
+ font-size:8;
border-bottom:solid 1px #F3F3F3;
cursor:pointer;
}
@@ -276,7 +276,7 @@
cursor:hand;
}
-.archive{
+.archive td{
padding-left:5px ;
font-family:Verdana;
color:#666666;
@@ -284,12 +284,41 @@
font-size:11px;
border-bottom:solid 1px #F3F3F3;
}
+
+.room td{
+ padding-left:5px ;
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+
+.archive label{
+
+ font-family:Verdana;
+ color:Black;
+ font-size:8;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+.room label{
+
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+
+
+
.filterBar table{
padding-left:5px ;
background-image:url("../pictures/backgrounds/filterbar.png");
height:24px;
font-weight:bold ;
- width:100%;
+
border-bottom:fine 1px #C7D3E1
}
@@ -316,10 +345,12 @@
.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;
height:24px;
@@ -329,6 +360,7 @@
.filter_right_enabled
{
background-image:url("../pictures/items/filter-enabled-right.png");
+ background-repeat:no-repeat;
}
.contextBar table
@@ -336,6 +368,7 @@
padding-left:5px;
padding-right:5px;
background-image:url("../pictures/backgrounds/toolbar.png");
+ background-repeat:no-repeat;
height:30px;
width:100%
@@ -447,10 +480,13 @@
.list
{
height:215px;
- overflow-y:scroll;
-
+ overflow-y:scroll;
+ overflow-x: hidden;
+ width:100%;
}
+
+
.lineTitle{
padding-left:10px
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-08 09:26:55 UTC (rev 107)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-08 09:29:21 UTC (rev 108)
@@ -985,8 +985,6 @@
$root->appendChild($windows);
$xmldoc->appendChild($root);
-$xmldoc->save('settings.xml');
-
$xmlstring = $xmldoc->saveXML(); // Xml datas into a string
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-08 09:26:55 UTC (rev 107)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-08 09:29:21 UTC (rev 108)
@@ -39,28 +39,8 @@
-/*
-* 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;
- //get the admin user name
- $aun = $CFG->liveclassroom_adminusername;
- if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix
- $prefix = $aun;
- }
- else {
- $prefix = '';
-
- }
- return $prefix;
-
-}
-
/**
* Validate the data in passed in the configuration page
* @param $config - the information from the form mod.html
@@ -328,7 +308,7 @@
$userid = $LIVECLASSROOM_MOODLE_PREFIX.$course->shortname.
($isteacher?$LIVECLASSROOM_TEACHER_SUFFIX:$LIVECLASSROOM_STUDENT_SUFFIX);
- $nickname = fullname ($USER);
+ $nickname = fullname($USER);
Modified: trunk/moodle/mod/liveclassroom/view.php
===================================================================
--- trunk/moodle/mod/liveclassroom/view.php 2006-12-08 09:26:55 UTC (rev 107)
+++ trunk/moodle/mod/liveclassroom/view.php 2006-12-08 09:29:21 UTC (rev 108)
@@ -64,14 +64,14 @@
require_login($course->id);
- add_to_log($course->id, "liveclassroom", "view", "view.php?id=$cm->id", "$liveclassroom->id");
+ // add_to_log($course->id, "liveclassroom", "view", "view.php?id=$cm->id", "$liveclassroom->id");
// Create the session for this user
if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
- error ("Cannot create session");
- }
+ error ("Cannot create session");
+ }
/// Print the page header
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-08 09:27:03
|
Revision: 107
http://svn.sourceforge.net/hw4mdl/?rev=107&view=rev
Author: shazan
Date: 2006-12-08 01:26:55 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
add "secton" to the liveclassroom database to manage the activities sections update
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/db/mysql.sql
trunk/moodle/mod/liveclassroom/db/postgres7.sql
Modified: trunk/moodle/mod/liveclassroom/db/mysql.sql
===================================================================
--- trunk/moodle/mod/liveclassroom/db/mysql.sql 2006-12-07 16:08:14 UTC (rev 106)
+++ trunk/moodle/mod/liveclassroom/db/mysql.sql 2006-12-08 09:26:55 UTC (rev 107)
@@ -44,6 +44,7 @@
`course` int(10) unsigned NOT NULL default '0',
`type` varchar(255) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
+ `section` int(10) unsigned NOT NULL default '0',
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) COMMENT='Defines liveclassroom';
Modified: trunk/moodle/mod/liveclassroom/db/postgres7.sql
===================================================================
--- trunk/moodle/mod/liveclassroom/db/postgres7.sql 2006-12-07 16:08:14 UTC (rev 106)
+++ trunk/moodle/mod/liveclassroom/db/postgres7.sql 2006-12-08 09:26:55 UTC (rev 107)
@@ -44,6 +44,7 @@
course integer NOT NULL default '0',
type varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
+ section integer NOT NULL default '0',
timemodified integer NOT NULL default '0',
PRIMARY KEY (id)
);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-07 16:08:31
|
Revision: 106
http://svn.sourceforge.net/hw4mdl/?rev=106&view=rev
Author: shazan
Date: 2006-12-07 08:08:14 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
add url encoding anf logs popup displaying
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/logs.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-07 10:41:11 UTC (rev 105)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-07 16:08:14 UTC (rev 106)
@@ -65,8 +65,8 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
+$LIVECLASSROOM_LOGS = "logs.php";
-
/**
* Creates a CURL session with the Live Classroom server. Upon success, it
* returns a CURL Handle authenticated and ready for use. It returns false
@@ -85,7 +85,9 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_NOOP;
-
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
+
if (empty($servername)) { // feed them with $CFG
$servername = $CFG->liveclassroom_servername;
$login = $CFG->liveclassroom_adminusername;
@@ -115,7 +117,7 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- add_to_log("", "liveclassroom", "URL", "", "URL incorrect");
+ add_to_log($COURSE->id, "liveclassroom", "URL", "$LIVECLASSROOM_LOGS?type=errorUrlUnavailable&time=".time()."&courseId=".$COURSE->id, "URL incorrect");
// print curl_error($ch);
return false;
}
@@ -124,12 +126,12 @@
if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
- add_to_log("", "liveclassroom", "Authentication", "", "Authentication Failed: $resp_code");
+ add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=errorAuthentication&time=".time()."&respcode=$resp_code&courseId=".$COURSE->id, "Authentication Failed");
return false;
}
curl_close($ch);
//fclose($cook);
- add_to_log("", "liveclassroom", "Authentication", "", "Authentication succeeded");
+ add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=authentication&time=".time()."&courseId=".$COURSE->id, "Authentication succeeded");
return $ch;
}
@@ -165,10 +167,12 @@
}
}
+ $enc_list = str_replace(" ", "+", $attribute);
+
$url = $CFG->liveclassroom_servername.
$LIVECLASSROOM_API_ADMIN.
$const.
- $attribute;
+ $enc_list;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
@@ -207,6 +211,8 @@
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_CREATE_USER;
global $LIVECLASSROOM_MOODLE_PREFIX;
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_USER, "&target=$userid&first_name=$rolename&last_name=$coursename");
@@ -221,11 +227,11 @@
if ( $respcode != 100 && $respcode != 301) {
- add_to_log("", "liveclassroom", "Create User", "", "$userId Creation Failed");
+ add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userId&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed");
// error( "Response: Account ($userId) Creation Failed: $resp_code");
return false;
}
- add_to_log("", "liveclassroom", "Create User", "", "$userId Creation succeeded");
+ add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=createUser&time=".time()."&userId=$userId&courseId=".$COURSE->id, "User Creation succeeded");
return true;
}
@@ -272,16 +278,17 @@
global $USER;
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_GET_TOKEN;
-
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
+
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
-
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Create Session", "", "Cannot Create Session : $resp_code");
+ add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=errorCreateSession&time=".time()."&respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id, "Cannot Create Session.");
return false;
}
@@ -305,7 +312,7 @@
//error ("Token empty, data=<pre>$data</pre>");
return false;
}
- add_to_log("", "liveclassroom", "", "create session", "Creating Session for $nickname");
+ add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=createSession&time=".time()."&nickname=$nickname&courseId=".$COURSE->id, "Creating Session for $nickname");
return $authtoken;
}
@@ -320,17 +327,20 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_CREATE_CLASS;
-
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
+
unset($attributes['longname']);
while (list($key, $val) = each($attributes)) {
if(($key!='class_id')&&(isset($val))&&($val!="")){
$list_attributes .= "&".$key."=".$val;
}
}
+
$final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$final_list);
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $final_list);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -339,11 +349,11 @@
return false;
}
if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Create Room", "", "Cannot Create Class with id:$roomid, and name: $roomname.");
+ add_to_log($COURSE->id, "liveclassroom", "Create Room", "$LIVECLASSROOM_LOGS?type=errorCreateClass&time=".time()."&roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id, "Cannot Create Class with id : $roomid, and name : $roomname.");
return false;
}
- add_to_log("", "liveclassroom", "Create Room", "", "$roomname create with success");
+ add_to_log($COURSE->id, "liveclassroom", "Create Room", "$LIVECLASSROOM_LOGS?type=createClass&time=".time()."&roomname=$roomname&courseId=".$COURSE->id, "$roomname create with success");
return true;
}
@@ -514,20 +524,22 @@
function liveclassroom_api_delete_room($roomid) {
global $CFG;
global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_DELETE_ROOM;
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
if ( $respcode == 302) {
- add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed, target not found");
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=errorDeleteRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed");
// error( "Target not found");
return false;
}
else if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed");
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=errorDeleteRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed");
return false;
}
- add_to_log("", "liveclassroom", "Delete Room", "", "$roomid has been deleted with success");
+ add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=deleteRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been deleted with success");
return true;
}
@@ -541,20 +553,22 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
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("", "liveclassroom", "Open Room", "", "$roomid opening failed, target nor found");
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=errorOpenRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed");
return false;
}
if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed");
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=errorOpenRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed");
return false;
}
- add_to_log("", "liveclassroom", "Open Room", "", "$roomid has been opened with success");
+ add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=openRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been opened with success");
return true;
}
@@ -568,21 +582,23 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
+ global $LIVECLASSROOM_LOGS;
+ 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("", "liveclassroom", "Close Room", "", "$roomid closing failed, target nor found");
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=errorCloseRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed");
return false;
}
if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed");
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=errorCloseRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed");
return false;
}
- add_to_log("", "liveclassroom", "Close Room", "", "$roomid has been closed with success");
+ add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=closeRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been closed with success");
return true;
}
@@ -597,7 +613,8 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
-
+ global $LIVECLASSROOM_LOGS;
+ global $COURSE;
while (list($key, $val) = each($table_attributes)) {
if(($key!='class_id')&&(isset($val))&&($val!="")){
@@ -613,11 +630,11 @@
$respcode = $matches[0];
if ( $respcode != 100) {
- add_to_log("", "liveclassroom", "Modify Room", "", "$roomid modification failed");
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", "$LIVECLASSROOM_LOGS?type=errorModifyRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "Room modification failed");
return false;
}
- add_to_log("", "liveclassroom", "Modify Room", "", "$roomid has been modified with success");
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", "$LIVECLASSROOM_LOGS?type=modifyRoom&time=".time()."&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 2006-12-07 10:41:11 UTC (rev 105)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-07 16:08:14 UTC (rev 106)
@@ -36,8 +36,8 @@
//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
-$LIVECLASSROOM_LOGS = "logs.php";
+
/*
* Get the prefix to use for creating rooms and users.
@@ -97,7 +97,7 @@
/// will create a new instance and return the id number
/// of the new instance.
global $LIVECLASSROOM_LOGS;
-
+
$liveclassroom->timemodified = time();
# May have to add extra stuff in here #
@@ -105,16 +105,13 @@
$timenow = time();
- //add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$liveclassroom->name."&roomname=$roomname", "Activity ".$liveclassroom->name." has been added with success, associated to the room $roomname");
-
- //return insert_record("liveclassroom", $liveclassroom);
-
+
if($result = insert_record("liveclassroom", $liveclassroom)) {
- add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" added");
+ add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" added");
}
else
{
- add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=errorAddInstance", "Activity \"".$liveclassroom->name."\" has not been added");
+ add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=errorAddInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" has not been added");
$result=false;
}
@@ -131,7 +128,8 @@
$liveclassroom->timemodified = time();
$liveclassroom->id = $liveclassroom->instance;
-
+ $roomname = liveclassroom_api_get_room_name($liveclassroom->type);
+ $timenow = time();
// Need to update the section
@@ -158,7 +156,7 @@
error("Could not update the course module with the correct section");
}
- add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=updateInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=updateInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been updated with success");
return update_record("liveclassroom", $liveclassroom);
/*
@@ -180,19 +178,21 @@
/// and any data that depends on it.
global $LIVECLASSROOM_LOGS;
+
if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) {
return false;
}
-
+ $roomname = liveclassroom_api_get_room_name($liveclassroom->type);
+ $timenow = time();
$result = true;
# Delete any dependent records here #
- if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) {
- add_to_log("", "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance", "Activity ".$liveclassroom->name." deletion failed");
+ if (! delete_records("liveclassroom", "id", $liveclassroom->id)) {
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." deletion failed");
$result = false;
}
- add_to_log("", "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance", "Activity ".$liveclassroom->name." has been deleted with success");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been deleted with success");
return $result;
}
@@ -519,10 +519,11 @@
/// this function will permanently delete the instance
/// and any data that depends on it.
global $LIVECLASSROOM_LOGS;
- $result = true;
+
+ $result = true;
if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) {
$roomname = liveclassroom_api_get_room_name($liveclassroom->type);
-
+ $timenow = time();
# Delete any dependent records here #
foreach($liveclassrooms as $liveclassroom){
@@ -531,18 +532,18 @@
error("Course Module ID was incorrect");
}
if (! delete_course_module($cm->id)) {
- add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)");
+ add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllcm&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&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("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "All activities associated to the room $roomname have not been deleted frome the liveclassroom database");
+ add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAlldb&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "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("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section");
+ add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllsection&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&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");
}
@@ -550,7 +551,7 @@
}
}
- add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=deleteAll", "Delete all activities", "All activities associated to the room $roomname have been deleted with success");
+ add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=deleteAll&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Delete all activities", "All activities associated to the room $roomname have been deleted with success");
return $result;
}
@@ -912,10 +913,10 @@
$signature .= $value;
$url_params .= "enc_".$key."=".$value."&" ;
}
-
+
if(strcmp(md5($signature), $request['signature'])!=0) {
- add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize.");
- error("BadSignatureException");
+ add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize.");
+ error("Signature is not recognize.");
return false;
}
@@ -923,7 +924,7 @@
return true;
}
else {
- add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSessionTimeOut", "Init session", "Session has timed out due to inactivity.");
+ add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=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;
Modified: trunk/moodle/mod/liveclassroom/logs.php
===================================================================
--- trunk/moodle/mod/liveclassroom/logs.php 2006-12-07 10:41:11 UTC (rev 105)
+++ trunk/moodle/mod/liveclassroom/logs.php 2006-12-07 16:08:14 UTC (rev 106)
@@ -1,8 +1,9 @@
<?php
//This page is to show the logs types and errors, and to explain how resolve the errors!
-require_once("../../../config.php");
+require_once("../../config.php");
global $CFG;
+
require_once($CFG->libdir.'/datalib.php');
require_once($CFG->dirroot.'/course/lib.php');
@@ -17,10 +18,15 @@
return false;
}
if (! $course = get_record("course", "id", $liveclassroom->course)) {
- return false;
- }
+ return false;
+ }
+}
+else if (isset($_GET['courseId'])) {
+ if (! $course = get_record("course", "id", $_GET['courseId'])) {
+ return false;
+ }
+}
-}
if(isset($_GET['roomname'])) {
$roomname = $_GET['roomname'];
}
@@ -31,32 +37,187 @@
switch ($type)
{
- case "errorUrlUnavailable":
- $message = "URL unavailable.";
- break;
+
case "addInstance":
$message = "Activity \"".$liveclassroom->name."\" has been added with success, associated to the room \"$roomname\".";
- $information = "Activity \"".$liveclassroom->name."\" added";
+ $information = "Activity \"".$liveclassroom->name."\" creation";
break;
+ case "errorAddInstance":
+ $information = "Activity \"".$liveclassroom->name."\" creation";
+ $message = "Error : URL ".$CFG->liveclassroom_servername." creation failed.";
+ break;
case "updateInstance":
+ $information = "Activity \"".$liveclassroom->name."\" update";
$message = "Activity \"".$liveclassroom->name."\" has been updated with success, associated to the room \"$roomname\".";
-
- break;
+ break;
case "deleteInstance":
- $message = "Activity \"".$liveclassroom->name."\" has been deleted with success.";
+ $information = "Activity \"".$liveclassroom->name."\" suppression";
+ $message = "Activity \"".$liveclassroom->name."\" associated to the room \"$roomname\" has been deleted with success.";
break;
case "errorDeleteInstance":
- $message = "Activity \"".$liveclassroom->name."\" deletion failed. ";
+ $information = "Error : Activity \"".$liveclassroom->name."\" suppression";
+ $message = "Error : Activity \"".$liveclassroom->name."\" associated to the room \"$roomname\". has not been deleted";
break;
case "deleteAll":
+ $information = "Activities suppression";
$message = "All activities associated to the room \"$roomname\" have been deleted with success. ";
break;
+ case "errorDeleteAllcm":
+ $information = "Activities suppression";
+ $message = "All activities associated to the room \"$roomname\" have been deleted with success. ";
+ if(isset($_GET['cm'])){
+ $tip = "Could not delete the ".$_GET['cm']." (coursemodule), please you need to delete it manually";
+ }
+ break;
+ case "errorDeleteAlldb":
+ $information = "Activities suppression";
+ $message = "All activities associated to the room $roomname have not been deleted from the liveclassroom database.";
+ $tip = "Please you need to delete it manually";
+ break;
+ case "errorDeleteAllsection":
+ $information = "Activities suppression";
+ $message = "All activities associated to the room $roomname have not been deleted from the liveclassroom database.";
+ if( (isset($_GET['section'])) && (isset($_GET['cm'])) ){
+ $tip = "Could not delete the ".$_GET['cm']." from the section ".$_GET['section']." , please you need to delete it manually";
+ }
+ break;
case "errorSignature":
- $message = "Signature is not recognize. ";
+ $information = "Testing signature";
+ $message = "Error : Signature is not recognize.";
break;
case "errorSessionTimeOut":
+ $information = "Testing session time";
$message = "Session has timed out due to inactivity.";
+ break;
+ case "errorUrlUnavailable":
+ $information = "URL unavailable.";
+ $message = "Error : URL ".$CFG->liveclassroom_servername." unavailable.";
break;
+ case "errorAuthentication":
+ $information = "Authentication Failed.";
+ if(isset($_GET['respcode'])){
+ $message = "Error : Authentication Failed.";
+ $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ }
+ break;
+ case "authentication":
+ $information = "Authentication succeeded.";
+ $message = "The authentication to the Live Classroom server is succeeded.";
+ break;
+ case "createUser":
+ $information = "User creation succeeded.";
+ if(isset($_GET['userId'])){
+ $message = "User creation succeeded. Id of the new user : ".$_GET['userId'];
+ }
+ break;
+ case "errorCreateUser":
+ $information = "User creation";
+ if(isset($_GET['userId'])){
+ $message = "Error : ".$_GET['userId']." Creation Failed.";
+ $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ }
+ break;
+ case "createSession":
+ $information = "Session creation succeeded.";
+ if(isset($_GET['nickname'])){
+ $message = "Session created for ".$_GET['nickname'];
+ }
+ break;
+ case "errorCreateSession":
+ $information = "Session creation";
+ if( (isset($_GET['respcode'])) && (isset($_GET['nickname'])) ){
+ $message = "Error : Cannot create a session for ".$_GET['nickname'];
+ $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ }
+ break;
+ case "createClass":
+ $information = "Room creation succeeded.";
+ if(isset($_GET['roomname'])){
+ $message = $_GET['roomname']." has been created with success on the Live Classroom server";
+ }
+ break;
+ case "errorCreateClass":
+ $information = "Room creation";
+ if( (isset($_GET['respcode'])) && (isset($_GET['roomname'])) ){
+ $message = "Error : Cannot Create Class with id : ".$_GET['roomId'].", and name : ".$_GET['roomname'];
+ $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ }
+ break;
+ case "deleteRoom":
+ $information = "Room suppression succeeded.";
+ if(isset($_GET['roomId'])){
+ $message = $_GET['roomId']." has been deleted with success.";
+ }
+ break;
+ case "errorDeleteRoom100":
+ $information = "Room suppression";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot delete room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 100. Please contact your administrator.";
+ }
+ break;
+ case "errorDeleteRoom302":
+ $information = "Room suppression";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot delete room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 302. The target is not found. Please contact your administrator.";
+ }
+ break;
+ case "openRoom":
+ $information = "Room opening succeeded.";
+ if(isset($_GET['roomId'])){
+ $message = $_GET['roomId']." has been opened with success.";
+ }
+ break;
+ case "errorOpenRoom100":
+ $information = "Room opening";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot open room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 100. Please contact your administrator.";
+ }
+ break;
+ case "errorOpenRoom302":
+ $information = "Room opening";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot open room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 302. The target is not found. Please contact your administrator.";
+ }
+ break;
+ case "closeRoom":
+ $information = "Room closing succeeded.";
+ if(isset($_GET['roomId'])){
+ $message = $_GET['roomId']." has been closed with success.";
+ }
+ break;
+ case "errorCloseRoom100":
+ $information = "Room closing";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot close room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 100. Please contact your administrator.";
+ }
+ break;
+ case "errorCloseRoom302":
+ $information = "Room closing";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot close room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 302. The target is not found. Please contact your administrator.";
+ }
+ break;
+ case "modifyRoom":
+ $information = "Room modification succeeded.";
+ if(isset($_GET['roomId'])){
+ $message = $_GET['roomId']." has been modified with success.";
+ }
+ break;
+ case "errorModifyRoom100":
+ $information = "Room modification";
+ if(isset($_GET['roomId']) ){
+ $message = "Error : Cannot modify room with id : ".$_GET['roomId'];
+ $tip = "The response code is : 100. Please contact your administrator.";
+ }
+ break;
+
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-07 10:41:23
|
Revision: 105
http://svn.sourceforge.net/hw4mdl/?rev=105&view=rev
Author: shazan
Date: 2006-12-07 02:41:11 -0800 (Thu, 07 Dec 2006)
Log Message:
-----------
add features :logs, new room form when no room are available.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/index.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/reports.php
trunk/moodle/mod/liveclassroom/view.php
trunk/moodle/mod/liveclassroom/welcome.php
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/js/Ajax.js
trunk/moodle/mod/liveclassroom/js/constants.js
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/js/pngfix.js
trunk/moodle/mod/liveclassroom/js/verifForm.js
trunk/moodle/mod/liveclassroom/logs.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -65,7 +65,6 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
-//session_start();
/**
@@ -101,9 +100,6 @@
"&credential_0=". $login.
"&credential_1=". $passwd;
- //add_to_log("", "liveclassroom", "", "", "auth ".time());
-
-
$cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
$cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
fputs($cook,time()); // Add the current time into the file = last authenticate time
@@ -119,7 +115,8 @@
$data = curl_exec($ch);
if (curl_errno($ch)) {
- print curl_error($ch);
+ add_to_log("", "liveclassroom", "URL", "", "URL incorrect");
+ // print curl_error($ch);
return false;
}
preg_match("(\d*)", $data, $matches);
@@ -127,11 +124,12 @@
if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
+ add_to_log("", "liveclassroom", "Authentication", "", "Authentication Failed: $resp_code");
return false;
}
-
curl_close($ch);
//fclose($cook);
+ add_to_log("", "liveclassroom", "Authentication", "", "Authentication succeeded");
return $ch;
}
@@ -186,7 +184,7 @@
print curl_error($ch);
return false;
}
-
+
return $data;
}
@@ -214,18 +212,20 @@
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
- /*
- if ( $respcode == 301) {
- error( "Creation user failed, already exist");
+/*
+ if ( $respcode == 302) {
+ error( "Creation user failed, malformed exist");
return false;
- }*/
-
+ }
+ */
+
+
if ( $respcode != 100 && $respcode != 301) {
- error( "Response: Account ($userId) Creation Failed: $resp_code");
+ add_to_log("", "liveclassroom", "Create User", "", "$userId Creation Failed");
+ // error( "Response: Account ($userId) Creation Failed: $resp_code");
return false;
}
-
-
+ add_to_log("", "liveclassroom", "Create User", "", "$userId Creation succeeded");
return true;
}
@@ -275,13 +275,13 @@
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
- add_to_log("", "liveclassroom", "", "liveclassroom_api_get_session", "userid: ".$userid." nickname ". $nickname);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
- error( "Response: Cannot Create Session: $resp_code");
+ add_to_log("", "liveclassroom", "Create Session", "", "Cannot Create Session : $resp_code");
return false;
}
@@ -299,13 +299,14 @@
$authtoken= substr($currentline, 10);
//DEBUG
- //add_to_log("", "liveclassroom", "", "liveclassroom_api_get_session", "AuthToken: '$authtoken'");
+
if (empty($authtoken)) {
//error ("Token empty, data=<pre>$data</pre>");
return false;
}
-
+ add_to_log("", "liveclassroom", "", "create session", "Creating Session for $nickname");
+
return $authtoken;
}
@@ -327,9 +328,9 @@
}
}
$final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
-// echo $final_list;
+
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$final_list);
- add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "apres query".$roomname);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -338,10 +339,11 @@
return false;
}
if ( $respcode != 100) {
- error( "Response: Cannot Create Class with id:$roomid, and name: $roomname.");
+ add_to_log("", "liveclassroom", "Create Room", "", "Cannot Create Class with id:$roomid, and name: $roomname.");
return false;
}
- // add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "avan retour".time());
+
+ add_to_log("", "liveclassroom", "Create Room", "", "$roomname create with success");
return true;
}
@@ -464,6 +466,8 @@
$response = split($pattern,$line);
//$result = substr($response[1],0,-1);
+
+
return $response[1];
}
@@ -490,7 +494,7 @@
}
$tok = split("100 OK",$data);
$tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]);
- $result = liveclassroom_parse_line($tok1[0],"class_id=");
+ $result = liveclassroom_parse_line($tok1[0],"class_id=");
//Remove le " " at the end of the line
$response = substr($result,0,-1);
@@ -514,12 +518,16 @@
liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid");
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed, target not found");
+ // error( "Target not found");
return false;
}
else if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed");
return false;
}
+
+ add_to_log("", "liveclassroom", "Delete Room", "", "$roomid has been deleted with success");
return true;
}
@@ -539,13 +547,14 @@
$respcode = $matches[0];
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed, target nor found");
return false;
}
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Open Room", "", "$roomid has been opened with success");
return true;
}
@@ -565,13 +574,15 @@
$respcode = $matches[0];
if ( $respcode == 302) {
- error( "Target not found");
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed, target nor found");
+
return false;
}
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Close Room", "", "$roomid has been closed with success");
return true;
}
@@ -602,10 +613,11 @@
$respcode = $matches[0];
if ( $respcode != 100) {
+ add_to_log("", "liveclassroom", "Modify Room", "", "$roomid modification failed");
return false;
}
-
+ add_to_log("", "liveclassroom", "Modify Room", "", "$roomid has been modified with success");
return true;
}
@@ -1344,6 +1356,7 @@
$roomid= liveclassroom_parse_line($line[$i+1],"class_id="); //class_id
$roomname= liveclassroom_parse_line($line[$i+2],"longname="); //longname
+
$roompreview= liveclassroom_parse_line($line[$i],"preview="); //preview
$element = $xmldoc->createElement('listElement');
@@ -1416,7 +1429,7 @@
$archivename = $xmldoc->createElement('nameDisplay');
$archivename->appendChild($xmldoc->createTextNode("$tabarchive_value[2]"));
$archivepreview = $xmldoc->createElement('preview');
- add_to_log("", "liveclassroom", "view all", "archive", $tabarchive_value[0]);
+
if($tabarchive_value[0]=="1") {
$archivepreview->appendChild($xmldoc->createTextNode("unavailable"));
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-07 10:41:11 UTC (rev 105)
@@ -14,6 +14,9 @@
body p, body div, body li, body li li,
body input, body textarea, body select, body option ,td textarea
{font-size:100%;}
+
+
+
.page_title
{
font-family: Verdana, Arial, Helvetica, sans-serif;
@@ -34,61 +37,89 @@
padding-left:2px;
vertical-align:middle;
}
-table.tab
-{
- width:100%;
+.limitWidth
+{
+ width:160px;
}
-table.tab td
+.alignRight
{
- vertical-align:top;
+ padding-right: 5px;
+
}
+.shiftAvailability
+{
+
+ padding-right:100px;
+}
div.tab
{
- padding-top:2%;
- padding-left:5%;
+ padding-top:2%;
+
+ padding-left:5%;
+ padding-right:5%;
display: none;
height:180px;
+
+
}
+
+.button_hide
+{
+
+ width:25px;
+ display:none;
+}
div.current_tab
{
- margin-top:2%;
- margin-left:5%;
+ padding-top:2%;
+
+ padding-left:5%;
+ padding-right:5%;
position: relative;
display: block;
height:180px;
+
+
}
td.tabSelected
-{
+{
+
background-image:url(../pictures/tab_Select.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
-}
-td.tabDisabled
-{
-background-image:url(../pictures/tab_disabled.gif);
+ }
+
+ td.tabDisabled
+{
+ color:#CACACA;
+ background-image:url(../pictures/tab.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
border-bottom:solid 1px #818181;
-}
+ }
td.tabNoSelected
-{
-background-image:url(../pictures/tab.gif);
+{
+
+ background-image:url(../pictures/tab.gif);
background-repeat: no-repeat;
width: 78px;
- font-size: 10pt;
+ font-size: 10px;
font-family: Verdana;
border-bottom:solid 1px #818181;
}
+
a {
text-decoration:none;
color:Black; }
+
a:hover {
text-decoration:none;
color:Black; }
+
td.action,input.action{
background-image:url(../pictures/buttons/general-empty.png);
background-repeat :no-repeat;
@@ -111,28 +142,43 @@
{
cursor:pointer
}
+
.alert
{
color:Red;
}
-a.room {
-color:#889EB3;
+
+
+
+a.room { color:#889EB3;
+
text-decoration:none;
display:block;
width:100%;
+
}
-a.room:hover {color:#889EB3;
+
+a.room:hover {color:#889EB3;
+
+
text-decoration:none;
- border: none;
- background-position: 3px 4px;
+ border: none;
+
+ background-position: 3px 4px;
+
}
+
+
.info a{
position:relative; /*this is the key*/
z-index:24;
color:#000;
text-decoration:none}
+
.info a:hover{z-index:25;text-decoration:underline;}
+
.info a span{display: none;font-size:8pt;}
+
.info a:hover span{ /*the span will display just on :hover state*/
font-size:8pt;
display:block;
@@ -140,55 +186,80 @@
top:1.5em; left:5em; width:28em;
border:1px solid #FFF99F;
background-color:#FFF99F; color:#000;
- text-align: center}
-.button_disabled a{
+ text-align: center}
+
+
+
+.button_disabled {
+
color:#666666;
font-family: Arial;
text-decoration:none;
font-size: 9px;
- height:44px;
+
}
-.button_disabled a:hover
+
+
+.button_enabled a
{
- color:#666666;
+
+ color:black;
font-family: Arial;
- text-decoration:none;
+ width:30px;
font-size: 9px;
- cursor:pointer;
+
}
-.button_enabled a
+
+.separator_space
{
- color:black;
+ width:2px;
+ }
+
+.empty_space
+{
+ width:30px;
+ }
+
+
+.button_enabled a:hover{ color:black;
+
font-family: Arial;
- text-decoration:none;
- font-size: 9px;
-}
-.button_enabled a:hover{ color:black;
- font-family: Arial;
+
font-size: 9px;
- text-decoration: underline;
- display:block;
+ font-weight:bold;
+
cursor:hand;
}
+
+
+
+
tr.selectRoom{
background-color:red;
cursor:hand;
}
.divProduct
{
- padding-top:3px;
+ padding-top:3px;
+padding-left:5px ;
}
+
+
.shortShift{
+
padding-left:5px;
}
-.room td{
+
+.room td{
+ padding-left:5px ;
font-family:Verdana;
color:Black;
font-size:10;
border-bottom:solid 1px #F3F3F3;
cursor:pointer;
}
-.room label{
+.room label{
+
font-family:Verdana;
color:Black;
font-size:10;
@@ -204,35 +275,44 @@
cursor:pointer;
cursor:hand;
}
-.archive{
+
+.archive{
+ padding-left:5px ;
font-family:Verdana;
color:#666666;
font-style:italic;
font-size:11px;
border-bottom:solid 1px #F3F3F3;
}
-.filterBar {
+.filterBar table{
+ padding-left:5px ;
background-image:url("../pictures/backgrounds/filterbar.png");
height:24px;
font-weight:bold ;
width:100%;
border-bottom:fine 1px #C7D3E1
}
+
+
+
.filter_enabled
{
font-family :Verdana;
color:#333333;
height:24px;
- font-size:12px;
+ font-size:10px;
font-weight:bold ;
}
+
.filter_selected
{ font-weight:bold ;
font-family :Verdana;
color:#ffffff;
height:24px;
- font-size:12px;
+ font-size:10px;
+
}
+
.filter_left_enabled
{
background-image:url("../pictures/items/filter-enabled-left.png");
@@ -243,57 +323,78 @@
font-family :Verdana;
color:#ffffff;
height:24px;
- font-size:12px;
+ font-size:10px;
font-weight:bold ;
}
.filter_right_enabled
{
background-image:url("../pictures/items/filter-enabled-right.png");
}
+
.contextBar table
{
+ padding-left:5px;
+ padding-right:5px;
background-image:url("../pictures/backgrounds/toolbar.png");
height:30px;
- width:100%
+ width:100%
+
}
+
.tabBackground
{
background-image:url("../pictures/backgrounds/toolbar.png");
+
}
+
.productChoice table
-{
+{
+
height:72px;
border-bottom:solid 1px #F0F0F0;
margin-left:10px;
margin-right:10px;
+
}
-.comment{
+
+
+.comment{
+
font-family:Verdana;
color:#555555;
font-style:italic;
font-size:11px;
padding-left:20px;
}
+
.subOption td {
- font-family:Verdana;
+
+ font-family:Verdana;
+
font-size:11px;
padding-left:20px;
vertical-align:top;
}
+
.roomNameForSettings
{
font-family:Verdana;
font-weight: bold;
- font-size:12px;
+ font-size:12px;
+
+
}
+
.hide
{
display:none;
}
+
.visible
{
display:block;
}
+
label.moreRoom
{
color:Navy;
@@ -301,56 +402,80 @@
padding-left:20px;
font-weight: bold;
}
+
+
#popup {
+
display:none;
font-size:8pt;
display:block;
position:absolute;
- top:50%; left:50%;
+ top:50%; left:50%;
+
color:#000;
text-align: center;
}
+
+
.expand
{
background-color:Black;
-}.headerBar table
+}
+
+
+.headerBar table
{
-padding:0px ;
+padding-left:5px ;
width:100%;
+padding-right:5px ;
+
background-image:url("../pictures/backgrounds/headerbar.png");
height:32px;
border-bottom:solid 1px Black;
+
}
.toolBar table
{
+ padding-left:5px ;
width:100%;
- padding:0px ;
+
background-image:url("../pictures/backgrounds/toolbar.png");
+
+
}
-.search
-{
- max-width:105px;
- }
+
.list
{
- height:280px;
+ height:215px;
overflow-y:scroll;
+
+
}
-.productTitle {
+.lineTitle{
+
+padding-left:10px
+}
+.productTitle{
+
background-color:#B0C1D5;
font-family:Verdana;
color:White;
font-size:12px;
height:16px;
font-weight:bold;
- cursor:default;
+ cursor:default;
+
+
}
.validationBar table
{
width:100%;
height:24px ;
padding:0px ;
- background-color:#F0F0F0;
+ background-color:#F0F0F0;
+
+
+
}
.panelSettings table
{
@@ -359,12 +484,11 @@
display:none;
width:100%
}
-.part td
+
+
+ .part td
{
+
width:100%;
border-bottom: #818181 1px solid;
- }
- .messageBar
- {
- background-color:#ffff99;
}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -88,7 +88,7 @@
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "hza=".$params['authToken']));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",''));
- $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/new-createroom', 'New', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
+ $menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchAjaxRequest('generateSettings.php','Management','new','true')", ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
$menubar->appendChild(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -130,9 +130,17 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
-
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Title : ") ));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") ));
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") ));
$panelLine->appendChild($linepart);
$parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text");
@@ -141,7 +149,16 @@
}
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"input", $parameters));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters));
$panelLine->appendChild($linepart);
$panelContent->appendChild($panelLine);
@@ -154,11 +171,27 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
-
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Description : ") ));
+
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") ));
$panelLine->appendChild($linepart);
@@ -172,8 +205,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(""));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode("right"));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") ));
$panelLine->appendChild($linepart);
$parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
@@ -192,12 +231,19 @@
}
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "mainLectureRoom","input", $parameters));
$panelLine->appendChild($linepart);
$parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, "discussionRoom","input", $parameters));
$panelLine->appendChild($linepart);
@@ -221,10 +267,24 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>"")));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ;
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
@@ -268,7 +328,7 @@
$panelSettingsM = $xmldoc->createElement('panelSettings');
// MEDIA PANEL INFO
- $panelSettingsM->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabSelected', 'tabDisabled', 'Media', "2", 'none'));
+ $panelSettingsM->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
// MEDIA CONTENT
$panelContentM = $xmldoc->createElement('panelContent');
@@ -281,7 +341,13 @@
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "two-way-audio", "id" => "audio", "name" => "media_type", "onclick" =>"doChangeMedia(\"audio\")") ;
if($action=='update') {
if($room_info['media_type']=="two-way-audio") $parameters['checked']=true;
@@ -301,7 +367,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
if($action=='update'){
if($room_info['hms_simulcast_restricted']==1){
@@ -335,7 +407,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$parameters=array("type" => "checkbox", "value" => "1", "id" => "two_way_enabled", "name" => "hms_two_way_enabled") ;
if($action=='update'){
if($room_info['hms_two_way_enabled']==1){
@@ -361,14 +440,20 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "one-way-audio", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
if($action=='update'){
if($room_info['media_type']=="one-way-video"){
$parameters['checked']=true;
}
}
-
+
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->appendChild($linepart);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") ));
@@ -390,7 +475,13 @@
$panelLineId->appendChild($xmldoc->createTextNode("roomId_row"));
$panelLine->appendChild($panelLineId);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") ));
$panelLine->appendChild($linepart);
@@ -413,7 +504,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "none", "id" => "none", "name" => "media_type", "onclick" => "doChangeMedia(\"none\")") ;
if($action=='update') {
if($room_info['media_type']=="none") $parameters['checked']=true;
@@ -435,7 +532,7 @@
$panelSettings = $xmldoc->createElement('panelSettings');
// FEATURES PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabSelected', 'tabDisabled', 'Features', "3", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
@@ -448,7 +545,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_eboard", "name" => "student_wb_enabled") ;
if($action=='update'){
if($room_info['student_wb_enabled']==1) $parameters['checked']=true;
@@ -467,7 +570,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_liveapp", "name" => "student_wb_liveapp") ;
if($action=='update'){
if($room_info['student_wb_liveapp']==1) $parameters['checked']=true;
@@ -487,7 +596,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_archive", "name" => "can_archive") ;
if($action=='update'){
if($room_info['can_archive']==1) $parameters['checked']=true;
@@ -507,7 +622,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_appshare", "name" => "can_liveshare") ;
if($action=='update'){
if($room_info['can_liveshare']==1) $parameters['checked']=true;
@@ -527,7 +648,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enable_ppt", "name" => "can_ppt_import") ;
if($action=='update'){
if($room_info['can_ppt_import']==1) $parameters['checked']=true;
@@ -549,7 +676,7 @@
// ------------------ CHAT --------------------
// CHAT PANEL INFO
$panelSettings = $xmldoc->createElement('panelSettings');
- $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabSelected', 'tabDisabled', 'Chat', "4", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none'));
// CHAT CONTENT
$panelContent = $xmldoc->createElement('panelContent');
@@ -560,7 +687,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_chat", "name" => "chatenable") ;
if($action=='update'){
if($room_info['chatenable']==1) $parameters['checked']=true;
@@ -579,7 +712,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "1", "id" => "privateenabled", "name" => "privatechatenable") ;
if($action=='update'){
if($room_info['privatechatenable']==1)$parameters['checked']=true;
@@ -598,7 +737,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "0", "id" => "privatedisbledd", "name" => "privatechatenable") ;
if($action=='update'){
if($room_info['privatechatenable']==0) $parameters['checked']=true;
@@ -616,7 +761,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note :Students are always able to chat with presenters and/or technical help") ));
$panelLine->appendChild($linepart);
@@ -630,7 +781,7 @@
// ------------------- ACCESS ----------------------
$panelSettings = $xmldoc->createElement('panelSettings');
// ACCESS PANEL INFO
- $panelSettings->appendChild(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Access', "5", 'none'));
+ $panelSettings->appendChild(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', 'Access', "5", 'none'));
// ACCESS CONTENT
$panelContent = $xmldoc->createElement('panelContent');
@@ -641,7 +792,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "0", "id" => "acessAvailable_true", "name" => "preview") ;
if($action=='update'){
if($room_info['preview']==0) $parameters['checked']=true;
@@ -660,7 +817,14 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"hr", $parameters=array()) );
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"hr", $parameters=array()) );
$panelLine->appendChild($linepart);
$panelContent->appendChild($panelLine);
@@ -670,11 +834,24 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Maximum users : ") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "radio", "value" => "-1", "id" => "userlimit_false", "name" => "userlimit", "onclick" => "toggleUserlimit(\"false\")") ;
if($action=='update'){
if($room_info['userlimit']==-1) $parameters['checked']=true;
@@ -695,11 +872,25 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(" "));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "") ));
$panelLine->appendChild($linepart);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
+
$parameters=array("type" => "radio", "id" => "userlimit_true", "name" => "userlimit", "onclick" => "toggleUserlimit(\"true\")") ;
if($action=='update'){
if($room_info['userlimit']!=-1) $parameters['checked']=true;
@@ -726,7 +917,13 @@
$panelLineStyle->appendChild($xmldoc->createTextNode(""));
$panelLine->appendChild($panelLineStyle);
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAccess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ;
if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){
$parameters['checked']=true;
@@ -750,7 +947,13 @@
$linepart = $xmldoc->createElement('panelLinePart');
+ $style = $xmldoc->createElement('style');
+ $style->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($style);
+ $align = $xmldoc->createElement('align');
+ $align->appendChild($xmldoc->createTextNode(""));
+ $linepart->appendChild($align);
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => "Room Id :") ));
$panelLine->appendChild($linepart);
@@ -782,7 +985,7 @@
$root->appendChild($windows);
$xmldoc->appendChild($root);
-// $xmldoc->save('settings.xml');
+$xmldoc->save('settings.xml');
$xmlstring = $xmldoc->saveXML(); // Xml datas into a string
Modified: trunk/moodle/mod/liveclassroom/index.php
===================================================================
--- trunk/moodle/mod/liveclassroom/index.php 2006-11-29 12:35:15 UTC (rev 104)
+++ trunk/moodle/mod/liveclassroom/index.php 2006-12-07 10:41:11 UTC (rev 105)
@@ -67,14 +67,17 @@
print_header("$course->shortname: $strliveclassrooms", "$course->fullname", "$navigation $strliveclassrooms", "", "", true, "", navmenu($course));
/// Get all the appropriate data
-
+/*
if (! $liveclassrooms = get_all_instances_in_course("liveclassroom", $course)) {
notice("There are no liveclassrooms", "../../course/view.php?id=$course->id");
die;
}
-
+*/
$url = liveclassroom_get_url_params($course->id);
+ //You come frome "Add an ctivity" and no room are available, you must create one!
+ if( (isset($_GET['noliveclassroom'])) &&( $_GET['noliveclassroom']=="true") ) { $url .= "&addnew=true"; }
+
?>
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
<head>
Added: trunk/moodle/mod/liveclassroom/js/Ajax.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/Ajax.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,278 @@
+function getHTTPObject()
+{
+ var xmlhttp = false;
+
+ /* Compilation conditionnelle d'IE */
+ /*@cc_on
+ @if (@_jscript_version >= 5)
+ try
+ {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ }
+ catch (e)
+ {
+ try
+ {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ catch (E)
+ {
+ xmlhttp = false;
+ }
+ }
+ @else
+ xmlhttp = false;
+ @end @*/
+
+ /* on essaie de cr\xE9er l'objet si ce n'est pas d\xE9j\xE0 fait */
+ if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
+ {
+ try
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ catch (e)
+ {
+ xmlhttp = false;
+ }
+ }
+
+ if (xmlhttp)
+ {
+ /* on d\xE9finit ce qui doit se passer quand la page r\xE9pondra */
+ xmlhttp.onreadystatechange=function()
+ {
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+
+ /*alert(xmlhttp.responseText);
+ Traitement de la r\xE9ponse.
+ Ici on affiche la r\xE9ponse dans une bo\xEEte de dialogue.
+ */
+ studentView=false;
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ manageXml("");
+
+ }
+ }
+ }
+ return xmlhttp;
+}
+
+
+function gestionDisplay(isfilter)
+{
+
+
+ if(numberMainLectureRoom>5 && isfilter==false)
+ {
+
+ document.getElementById("div1").style.height=5*19+"px";
+
+
+
+ document.getElementById("div1More").style.display="block";
+ document.getElementById("div1More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div1\",\""+numberMainLectureRoom+"\")'>"+(numberMainLectureRoom-5)+" more...</label>";
+
+ }else if(numberMainLectureRoom==0){
+ document.getElementById("div1").style.display="none";
+ document.getElementById("div1Title").style.display="none";
+ document.getElementById("div1More").style.display="none";
+
+ }else{
+
+ document.getElementById("div1").style.height=numberMainLectureRoom*19+"px";
+ document.getElementById("div1More").style.display="none";
+
+ }
+
+ if(numberBreakoutRoom>5 && isfilter==false)
+ {
+ document.getElementById("div2").style.height=5*19+"px";
+ document.getElementById("div2More").style.display="block";
+ document.getElementById("div2More").innerHTML="<table><tr><td><label class='moreRoom' onclick='displayAllDiv(\"div2\",\""+numberBreakoutRoom+"\")'>"+(numberBreakoutRoom-5)+" more...</label></td></tr></table>";
+
+
+
+
+ }else if(numberBreakoutRoom==0){
+ document.getElementById("div2").style.display="none";
+ document.getElementById("div2Title").style.display="none";
+ document.getElementById("div2More").style.display="none";
+
+ }else{
+
+ document.getElementById("div2").style.height=numberBreakoutRoom*19+"px";
+ document.getElementById("div2More").style.display="none";
+ }
+
+ if(numberVoiceBoard>5 && isfilter==false)
+ {
+ document.getElementById("div3").style.height=5*19+"px";
+ document.getElementById("div3More").style.display="block";
+ document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>";
+
+
+
+
+ }else if(numberVoiceBoard==0){
+ document.getElementById("div3").style.display="none";
+ document.getElementById("div3Title").style.display="none";
+ document.getElementById("div3More").style.display="none";
+
+ }else{
+
+ document.getElementById("div3").style.height=numberVoiceBoard*19+"px";
+ document.getElementById("div3More").style.display="none";
+ }
+
+ if(numberVoicePresentation>5 && isfilter==false)
+ {
+
+ document.getElementById("div4").style.height=5*19+"px";
+ document.getElementById("div4More").style.display="block";
+ document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>";
+
+
+
+ }else if(numberVoicePresentation==0 && isfilter==false){
+ document.getElementById("div4").style.display="none";
+ document.getElementById("div4Title").style.display="none";
+ document.getElementById("div4More").style.display="none";
+
+ }
+ else{
+ document.getElementById("div4").style.height=numberVoicePresentation*19+"px";
+ document.getElementById("div4More").style.display="none";
+ }
+
+
+}
+
+
+function displayAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+
+ document.getElementById(name).style.height=number*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='RemoveAllDiv(\""+name+"\",\""+number+"\")'>Show Top 5...</label>";
+
+}
+function RemoveAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+ document.getElementById(name).style.height=5*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\""+name+"\",\""+number+"\")'>"+(number-5)+" more...</label>";
+
+}
+function createAction(action){
+if(action!="") {
+ return "\"javascript:"+action[0].getElements("name")[0].getText()+"('"+action[0].getElements("parameters")[0].getText()+"')\"";
+}
+return "";
+}
+
+
+
+
+function getURLParameters()
+{
+ var sURL = window.document.URL.toString();
+ var params="";
+ if (sURL.indexOf("?") > 0)
+ {
+ var arrParams = sURL.split("?");
+
+ var arrURLParams = arrParams[1].split("&");
+
+ var arrParamNames = new Array(arrURLParams.length);
+ var arrParamValues = new Array(arrURLParams.length);
+
+ var i = 0;
+ for (i=0;i<arrURLParams.length;i++)
+ {
+ var sParam = arrURLParams[i];
+ arrParamNames[i] = sParam[0];
+ if (sParam[1] != "")
+ params += "&"+unescape(sParam);
+
+ }
+ params=params.substring(1,params.length)
+ }
+ return params;
+}
+
+
+function DisplayFirstPage(){
+
+/* Cr\xE9ation de l'objet : */
+/*
+var m=
+if(t!=null) m=t;
+
+else m=getURLParameters();
+*/
+/* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+xmlhttp.open("POST", 'generateListRooms.php',true);
+/* Effectue la requ\xEAte : */
+xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ xmlhttp.onreadystatechange=Management;
+
+xmlhttp.send(getURLParameters())
+
+
+}
+
+
+function launchAjaxRequest(url,fonction,action,init){
+
+ showPopup()
+
+ var parameters="";
+ if(currentProduct != "" )
+ parameters="product="+currentProduct+"&"
+
+ if( currentId != "")
+ parameters+="id="+currentId+"&"
+ if(action!="")
+ parameters+="action="+action+"&";
+
+ if(init=="true")
+ currentId = ""
+ /* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+ xmlhttp.open("GET", url+'?'+parameters+'time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'',true);
+ /* Effectue la requ\xEAte : */
+ xmlhttp.onreadystatechange=eval(fonction);
+
+ xmlhttp.send(null);
+}
+
+
+function launchNew(url,fonction,action,product){
+
+ currentProduct = product;
+ launchAjaxRequest(url,fonction,action,"true");
+}
+
+
+
+
+
+function Management(){
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+ hidePopup()
+
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ objDomTree = objDom.docNode;
+
+ //session management
+ manageXml("","all");
+ }
+}
+
+
Property changes on: trunk/moodle/mod/liveclassroom/js/Ajax.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/js/constants.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/constants.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,30 @@
+// JScript File
+
+var session=new Array();
+var timeOfLoad="";
+var currentFilter='all';
+var numberOfProduct=4;
+var currentId="";
+var currentProduct="";
+var typeSelect="mainLecture"
+
+var currentDiv=0;
+var numberMainLectureRoom=0;
+var numberBreakoutRoom=0;
+var numberVoiceBoard=0;
+var numberVoicePresentation=0;
+var studentView=false;
+var numberArchive=new Array();
+// xml
+var objDom;
+var objDomTree;
+
+//Constants
+var LIVECLASSROOM="liveclassroom";
+var MAINLECTURE="mainLectureRoom";
+var DISCUSSION="discussionRoom";
+var BOARD="voiceBoard";
+var PRESENTATION="voicePresentation";
+
+//Ajax
+var xmlhttp = getHTTPObject();
\ No newline at end of file
Property changes on: trunk/moodle/mod/liveclassroom/js/constants.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-07 10:41:11 UTC (rev 105)
@@ -0,0 +1,400 @@
+function changePicture(id,pictureUrl){
+ if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
+ {
+ document.getElementById(id).style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+pictureUrl+"', sizingMethod='scale')";
+ }
+ else
+ {
+ document.images[id].src=pictureUrl;
+
+ }
+
+}
+
+
+
+ function toggleUserlimit(isLimited){
+ document.forms[0].userlimittext.disabled = (isLimited==false);
+ }
+ function doChangeChat() {
+ var radio = document.forms[0].privateChatEnabled;
+ for (i=0; i<radio.length; i++) {
+ radio[i].disabled = !document.forms[0].chatEnabled.checked;
+ }
+ }
+
+ function doChangeMedia(mediatype)
+ {
+ document.forms[0].student_simulcast.disabled = (mediatype=="video" || mediatype=="none")
+ document.forms[0].two_way_enabled.disabled = (mediatype=="video" || mediatype=="none")
+ if (mediatype=="video"){document.getElementById('roomId_row').style.display="block"}else{
+ document.getElementById('roomId_row').style.display="none"}
+ }
+ function doChangeLink()
+ {
+
+ if (document.getElementById('launcher_link_row').style.display=="block"){
+ document.getElementById('launcher_link_row').style.display="none"
+ }else{
+ document.getElementById('launcher_link_row').style.display="block"
+ }
+ }
+
+
+ function toggleType(type)
+ {
+ typeSelect=type;
+ manageXml('','all');
+
+
+
+
+ }
+ function confirmDelete(delUrl, type){
+ if (confirm("Are you sure you want to delete this " + type)) {
+ if (confirm("Are you really sure you want to delete this " + type)) {
+ location.href = delUrl
+ }
+ }
+ }
+
+
+
+ var currentIdtab="1";
+ function onTab(id)
+ {
+
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_Select.gif)";
+ document.getElementById('tab'+currentIdtab).style.borderBottom="#818181 1px solid";
+ document.getElementById('tab'+currentIdtab).style.backgroundImage="url(pictures/tab.gif)";
+ document.getElementById('tab'+id).style.borderBottom="none";
+ document.getElementById('span'+currentIdtab).style.display="none";
+ document.getElementById('span'+id).style.display="block";
+ currentIdtab=id;
+ }
+
+ function onOver(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_over.gif)";
+
+ }
+ function onOut(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab.gif)";
+
+ }
+
+ function hwSubmit(action) {
+ if(action != null)
+ {
+ document.forms[0].action.value=action;
+ }
+ document.forms[0].submit();
+ }
+
+
+ function hideDiv(id,pictureId){
+ if (document.getElementById(id).style.display=="none")
+ {
+
+ document.getElementById(id).style.display="block";
+ document.getElementById(id+"More").style.display="block";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).style.display=="block")
+ {
+
+ document.getElementById(id).style.display="none";
+ document.getElementById(id+"More").style.display="none";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+ if (document.getElementById(id).className=="hide")
+ {
+ document.getElementById(id).className="visible";
+ document.getElementById(id+"More").className="visible";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).className=="visible")
+ {
+ document.getElementById(id).className="hide";
+ document.getElementById(id+"More").className="hide";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+}
+
+
+
+
+function hideArchive(type,id,pictureId,roomId)
+{
+
+ if (document.getElementById(id).style.display=="none")
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom+=numberArchive[roomId];
+ else
+ numberBreakoutRoom+=numberArchive[roomId];
+ document.getElementById(id).style.display="block";
+ document.images[pictureId].src="pictures/minus.gif";
+
+
+ }
+ else
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom-=numberArchive[roomId];
+ else
+ numberBreakoutRoom-=numberArchive[roomId];
+
+ document.getElementById(id).style.display="none";
+ document.images[pictureId].src="pictures/plus.gif";
+
+
+ }
+ gestionDisplay(false)
+}
+
+function Navigateur()
+{
+ if (navigator.appName.indexOf("Netscape") > -1)
+ {
+ return "Netscape";
+ }
+ if (navigator.appName.indexOf("Explorer") > -1)
+ {
+ return "Explorer";
+ }
+ return "Unknown";
+}
+
+
+
+
+function OneClick(id,product,type)
+
+{
+
+ if(currentId!="" && currentId!=id)
+ document.getElementById(currentId).style.backgroundColor="white";
+ if(currentId!=id)
+ {
+ document.getElementById(id).style.backgroundColor="#c3dbf7";
+ }
+ currentI...
[truncated message content] |
|
From: <hu...@us...> - 2006-11-29 12:35:21
|
Revision: 104
http://svn.sourceforge.net/hw4mdl/?rev=104&view=rev
Author: hugues
Date: 2006-11-29 04:35:15 -0800 (Wed, 29 Nov 2006)
Log Message:
-----------
Fixed text files not at the right place
Modified Paths:
--------------
trunk/moodle/bin/package.sh
Modified: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh 2006-11-29 12:32:21 UTC (rev 103)
+++ trunk/moodle/bin/package.sh 2006-11-29 12:35:15 UTC (rev 104)
@@ -19,11 +19,12 @@
SVN_URL=${SVN_URL_TRUNK}
- BASEDIR=`pwd`
- SVN_EXPORT_DIR=${BASEDIR}/export
- BUILD_DIR=${BASEDIR}/build
+BASEDIR=`pwd`
+SVN_EXPORT_DIR=${BASEDIR}/export
+BUILD_DIR=${BASEDIR}/build
+
function initdir()
{
echo -n "Creating build directories..."
@@ -89,7 +90,7 @@
${SVN_EXPORT_DIR}/moodle/README.txt\
${SVN_EXPORT_DIR}/moodle/LICENSE.txt\
${SVN_EXPORT_DIR}/moodle/INSTALL.txt\
- ${BUILD_DIR}
+ ${BUILD_DIR}/${target}
echo "ok!"
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-11-29 12:32:23
|
Revision: 103
http://svn.sourceforge.net/hw4mdl/?rev=103&view=rev
Author: hugues
Date: 2006-11-29 04:32:21 -0800 (Wed, 29 Nov 2006)
Log Message:
-----------
Created the build script
Added Paths:
-----------
trunk/moodle/bin/
trunk/moodle/bin/package.sh
Added: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh (rev 0)
+++ trunk/moodle/bin/package.sh 2006-11-29 12:32:21 UTC (rev 103)
@@ -0,0 +1,111 @@
+#!/bin/bash
+
+DEBUG=1
+
+TARGET=liveclassroom
+#TARGET=liveclassroom, voicetool, pronto
+
+SVN_USER_PARAM=
+SVN_PASS_PARAM=
+SVN_TAG_PARAM=liveclassroom_0.9
+
+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"
+fi
+SVN_URL=${SVN_URL_TRUNK}
+
+
+ BASEDIR=`pwd`
+ SVN_EXPORT_DIR=${BASEDIR}/export
+ BUILD_DIR=${BASEDIR}/build
+
+
+function initdir()
+{
+ echo -n "Creating build directories..."
+ if [ -d ${SVN_EXPORT_DIR} ]; then
+ rm -rf ${SVN_EXPORT_DIR}
+ fi
+ if [ -d "${BUILD_DIR}" ]; then
+ rm -rf ${BUILD_DIR}
+ fi
+
+ mkdir -p ${BUILD_DIR}/${TARGET}/mod
+ mkdir -p ${BUILD_DIR}/${TARGET}/lang
+ echo "ok!"
+}
+
+
+function export_files () {
+ SVN_ARGS="-q --non-interactive"
+
+ if [ -n "$SVN_USER_PARAM" ]; then
+ if [ -n "$DEBUG" ]; then
+ echo "Using username: ${SVN_USERNAME}";
+ fi
+ SVN_ARGS="${SVN_ARGS} --username ${SVN_USER_PARAM}"
+ fi
+
+ if [ -n "$SVN_PASS_PARAM" ]; then
+ if [ -z "$SVN_USER_PARAM" ]; then
+ echo "error: pass without username"
+ exit -1
+ fi
+ SVN_ARGS="${SVN_ARGS} --password ${SVN_PASS_PARAM}"
+ fi
+
+ if [ -n "$DEBUG" ]; then
+ echo "Using args: $SVN_ARGS"
+ fi
+ echo -n "Exporting source code..."
+ svn export ${SVN_ARGS} ${SVN_URL} ${SVN_EXPORT_DIR}
+ echo "ok!"
+}
+
+
+
+function prepare ()
+{
+
+ target=$1;
+
+ echo -n "Building distribution for ${target}..."
+ cp -r ${SVN_EXPORT_DIR}/moodle/mod/${target} ${BUILD_DIR}/${target}/mod/
+
+ LANG_EXPORT_DIR="${SVN_EXPORT_DIR}/moodle/lang"
+ LANG_BUILD_DIR="${BUILD_DIR}/${target}/lang"
+ for afile in `find ${LANG_EXPORT_DIR} -name "${target}.php"` ; do
+ src=`dirname ${afile}`
+ dst=${src/#${LANG_EXPORT_DIR}/${LANG_BUILD_DIR}}
+ mkdir -p ${dst}
+ cp -r ${afile} ${dst}
+ done
+
+ cp \
+ ${SVN_EXPORT_DIR}/moodle/README.txt\
+ ${SVN_EXPORT_DIR}/moodle/LICENSE.txt\
+ ${SVN_EXPORT_DIR}/moodle/INSTALL.txt\
+ ${BUILD_DIR}
+
+ echo "ok!"
+}
+
+function pack ()
+{
+ target=$1;
+
+ echo -n "Packing ${target}..."
+ tar czf ${target}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${target}
+ echo "ok!"
+}
+
+
+
+initdir;
+export_files;
+prepare $TARGET;
+pack $TARGET;
Property changes on: trunk/moodle/bin/package.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-11-29 12:11:56
|
Revision: 102
http://svn.sourceforge.net/hw4mdl/?rev=102&view=rev
Author: hugues
Date: 2006-11-29 04:11:53 -0800 (Wed, 29 Nov 2006)
Log Message:
-----------
Initial installation document
Added Paths:
-----------
trunk/moodle/INSTALL.txt
Added: trunk/moodle/INSTALL.txt
===================================================================
--- trunk/moodle/INSTALL.txt (rev 0)
+++ trunk/moodle/INSTALL.txt 2006-11-29 12:11:53 UTC (rev 102)
@@ -0,0 +1,32 @@
+This is the Installation file for the Horizon Wimba 4 Moodle Modules and blocks.
+
+Activity Modules:
+-----------------
+
+Installation of the Moodle Activity Module can be performed in two steps:
+ 1) Installing the Module files
+ 2) Configuring the Module
+
+
+To Install the files, pick up the folder named after the module you want to
+install (e.g. one of liveclassroom, voicetools or pronto), and copy this folder
+over to the directory <MOODLE>/mod of you Moodle installation.
+
+Then, for each language you have available in you Moodle installation, pick
+the appropriate lang file in the lang folder of this package. The default lang
+file that should be installed is located in lang/en_utf8.
+
+Et Voila! You're done with files.
+
+
+To configure the Module, login to Moodle as an administratior and navigate
+to the "Configuration" section. Moodle will discover automatically that you
+installed a new Activity Module and will initialize the Database accordingly.
+At the time of this writting, the HW4Mdl modules only support MySQL and
+PostgreSQL.
+
+Once the tables are created succefully, navogate to the settings page of the
+Appropriate activity module and fill the form according to the information
+provided by your PSM.
+
+
Property changes on: trunk/moodle/INSTALL.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-11-24 15:37:07
|
Revision: 101
http://svn.sourceforge.net/hw4mdl/?rev=101&view=rev
Author: shazan
Date: 2006-11-24 07:37:06 -0800 (Fri, 24 Nov 2006)
Log Message:
-----------
pictures/css/js files
Added Paths:
-----------
trunk/moodle/mod/voicetool/css/
trunk/moodle/mod/voicetool/css/StyleSheet.css
trunk/moodle/mod/voicetool/js/
trunk/moodle/mod/voicetool/js/General.js
trunk/moodle/mod/voicetool/js/verif.js
trunk/moodle/mod/voicetool/js/xml.js
trunk/moodle/mod/voicetool/js/xmldom.js
trunk/moodle/mod/voicetool/pictures/
trunk/moodle/mod/voicetool/pictures/backgrounds/
trunk/moodle/mod/voicetool/pictures/backgrounds/headerbar.png
trunk/moodle/mod/voicetool/pictures/backgrounds/toolbar.png
trunk/moodle/mod/voicetool/pictures/buttons/
trunk/moodle/mod/voicetool/pictures/buttons/angel.gif
trunk/moodle/mod/voicetool/pictures/buttons/general-cancel.png
trunk/moodle/mod/voicetool/pictures/buttons/general-create.png
trunk/moodle/mod/voicetool/pictures/buttons/general-empty-over.png
trunk/moodle/mod/voicetool/pictures/buttons/general-empty.png
trunk/moodle/mod/voicetool/pictures/buttons/general-saveall.png
trunk/moodle/mod/voicetool/pictures/buttons/headerbar-logo.png
trunk/moodle/mod/voicetool/pictures/buttons/listitem-available.png
trunk/moodle/mod/voicetool/pictures/buttons/listitem-hide.png
trunk/moodle/mod/voicetool/pictures/buttons/listitem-show.png
trunk/moodle/mod/voicetool/pictures/buttons/listitem-unavailable.png
trunk/moodle/mod/voicetool/pictures/buttons/new-createroom.png
trunk/moodle/mod/voicetool/pictures/buttons/new-createvoiceboard.png
trunk/moodle/mod/voicetool/pictures/buttons/new-createvoicepresentation.png
trunk/moodle/mod/voicetool/pictures/buttons/searchfield.gif
trunk/moodle/mod/voicetool/pictures/buttons/tab.gif
trunk/moodle/mod/voicetool/pictures/buttons/tab_disabled.gif
trunk/moodle/mod/voicetool/pictures/buttons/tab_over.gif
trunk/moodle/mod/voicetool/pictures/buttons/tab_select.gif
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-activities-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-activities.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-availability-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-availability.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-content-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-content.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-delete-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-delete.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-launch-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-launch.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-new.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-newboard-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-newboard.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-newroom-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-poll-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-poll.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-schedule-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-schedule.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-settings-disabled.png
trunk/moodle/mod/voicetool/pictures/buttons/toolbar-settings.png
trunk/moodle/mod/voicetool/pictures/items/
trunk/moodle/mod/voicetool/pictures/items/category-collapsed.png
trunk/moodle/mod/voicetool/pictures/items/category-expanded.png
trunk/moodle/mod/voicetool/pictures/items/filter-enabled-left.png
trunk/moodle/mod/voicetool/pictures/items/filter-enabled-middle.png
trunk/moodle/mod/voicetool/pictures/items/filter-enabled-right.png
trunk/moodle/mod/voicetool/pictures/items/filter-rollover-left.png
trunk/moodle/mod/voicetool/pictures/items/filter-rollover-middle.png
trunk/moodle/mod/voicetool/pictures/items/filter-rollover-right.png
trunk/moodle/mod/voicetool/pictures/items/filterbar-separator.png
trunk/moodle/mod/voicetool/pictures/items/headerbar-logo.png
trunk/moodle/mod/voicetool/pictures/items/headerbar-searchfield-left.png
trunk/moodle/mod/voicetool/pictures/items/headerbar-searchfield-middle.png
trunk/moodle/mod/voicetool/pictures/items/headerbar-searchfield-right.png
trunk/moodle/mod/voicetool/pictures/items/listitem-available.png
trunk/moodle/mod/voicetool/pictures/items/listitem-hide.png
trunk/moodle/mod/voicetool/pictures/items/listitem-liveclassroomicon.png
trunk/moodle/mod/voicetool/pictures/items/listitem-show.png
trunk/moodle/mod/voicetool/pictures/items/listitem-subitem.png
trunk/moodle/mod/voicetool/pictures/items/listitem-unavailable.png
trunk/moodle/mod/voicetool/pictures/items/listitem-voiceboardicon.png
trunk/moodle/mod/voicetool/pictures/items/listitem-voicepresentationicon.png
trunk/moodle/mod/voicetool/pictures/items/messagelabel-info.png
trunk/moodle/mod/voicetool/pictures/items/space-16px.png
trunk/moodle/mod/voicetool/pictures/items/space-16x16px.png
trunk/moodle/mod/voicetool/pictures/items/space-18px.png
trunk/moodle/mod/voicetool/pictures/items/space-24px.png
trunk/moodle/mod/voicetool/pictures/items/space-32px.png
trunk/moodle/mod/voicetool/pictures/items/space-44px.png
trunk/moodle/mod/voicetool/pictures/items/toolbar-separator.png
trunk/moodle/mod/voicetool/pictures/items/wheel-03.gif
trunk/moodle/mod/voicetool/pictures/items/x_normal.gif
trunk/moodle/mod/voicetool/pictures/items/x_normal.png
trunk/moodle/mod/voicetool/pictures/items/x_over.gif
trunk/moodle/mod/voicetool/pictures/items/x_over.png
trunk/moodle/mod/voicetool/pictures/minus.gif
trunk/moodle/mod/voicetool/pictures/plus.gif
trunk/moodle/mod/voicetool/pictures/tab.gif
trunk/moodle/mod/voicetool/pictures/tab_Select.gif
trunk/moodle/mod/voicetool/pictures/tab_disabled.gif
trunk/moodle/mod/voicetool/pictures/tab_over.gif
Added: trunk/moodle/mod/voicetool/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/voicetool/css/StyleSheet.css (rev 0)
+++ trunk/moodle/mod/voicetool/css/StyleSheet.css 2006-11-24 15:37:06 UTC (rev 101)
@@ -0,0 +1,370 @@
+body
+{ background-color:#ffffff;
+ margin-top:0px;
+ margin-bottom:0px;
+ margin-right:0px;
+ margin-left:0px;
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size:70%;
+}
+/* size remaining text relative to baseline */
+/* some indiv classes and elements have different sizes, later in doc */
+body a,
+body table, body td, body th,
+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;
+font-size:14px;
+font-weight:bold;
+color:#3c4b5b;
+vertical-align: middle;
+}
+.area_title
+{
+font-family: Verdana, Arial, Helvetica, sans-serif;
+font-size:12px;
+font-weight:bold;
+color:#3c4b5b;
+vertical-align: middle;
+background-color:#c4cedc;
+
+padding-left:2px;
+vertical-align:middle;
+}
+table.tab
+{
+ width:100%;
+}
+table.tab td
+{
+ vertical-align:top;
+}
+div.tab
+{
+ padding-top:2%;
+ padding-left:5%;
+ display: none;
+ height:180px;
+}
+div.current_tab
+{
+ margin-top:2%;
+ margin-left: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-family: Verdana;
+}
+td.tabDisabled
+{
+background-image:url(../pictures/tab_disabled.gif);
+ background-repeat: no-repeat;
+ width: 78px;
+ font-size: 10pt;
+ font-family: Verdana;
+ border-bottom:solid 1px #818181;
+}
+td.tabNoSelected
+{
+background-image:url(../pictures/tab.gif);
+ background-repeat: no-repeat;
+ width: 78px;
+ font-size: 10pt;
+ 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;
+ background-position:center;
+ text-decoration:none;
+ color:Black;
+ text-align:center;
+ cursor:pointer
+}
+td.action:hover,input.action:hover{
+ background-image:url(../pictures/buttons/general-empty-over.png);
+ background-repeat :no-repeat;
+ background-position:center;
+ text-decoration:none;
+ color:Black;
+ text-align:center;
+ cursor:pointer
+}
+.action label
+{
+ cursor:pointer
+}
+.alert
+{
+ color:Red;
+}
+a.room {
+color:#889EB3;
+text-decoration:none;
+display:block;
+width:100%;
+}
+a.room:hover {color:#889EB3;
+ text-decoration:none;
+ border: none;
+ background-position: 3px 4px;
+}
+.info a{
+ position:relative; /*this is the key*/
+ z-index:24;
+ color:#000;
+ text-decoration:none}
+.info a:hover{z-index:25;text-decoration:underline;}
+.info a span{display: none;font-size:8pt;}
+.info a:hover span{ /*the span will display just on :hover state*/
+ font-size:8pt;
+ display:block;
+ position:absolute;
+ top:1.5em; left:5em; width:28em;
+ border:1px solid #FFF99F;
+ background-color:#FFF99F; color:#000;
+ text-align: center}
+.button_disabled a{
+ color:#666666;
+ font-family: Arial;
+ text-decoration:none;
+ font-size: 9px;
+ height:44px;
+}
+.button_disabled a:hover
+{
+ color:#666666;
+ font-family: Arial;
+ text-decoration:none;
+ font-size: 9px;
+ cursor:pointer;
+}
+.button_enabled a
+{
+ 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;
+}
+.divProduct
+{
+ padding-top:3px;
+}
+.shortShift{
+ padding-left:5px;
+}
+.room td{
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+.room label{
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+tr.overRoom{
+ font-family:Verdana;
+ color:Black;
+ font-size:11px;
+ border-bottom:solid 1px #F3F3F3;
+ background-color:#f0f3f5;
+ cursor:pointer;
+ cursor:hand;
+}
+.archive{
+ font-family:Verdana;
+ color:#666666;
+ font-style:italic;
+ font-size:11px;
+ border-bottom:solid 1px #F3F3F3;
+}
+.filterBar {
+ background-image:url("../pictures/backgrounds/filterbar.png");
+ height:24px;
+ font-weight:bold ;
+ width:100%;
+ border-bottom:fine 1px #C7D3E1
+}
+.filter_enabled
+{
+ font-family :Verdana;
+ color:#333333;
+ height:24px;
+ font-size:12px;
+ font-weight:bold ;
+}
+.filter_selected
+{ font-weight:bold ;
+ font-family :Verdana;
+ color:#ffffff;
+ height:24px;
+ font-size:12px;
+}
+.filter_left_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-left.png");
+}
+.filter_middle_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-middle.png");
+ font-family :Verdana;
+ color:#ffffff;
+ height:24px;
+ font-size:12px;
+ font-weight:bold ;
+}
+.filter_right_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-right.png");
+}
+.contextBar table
+{
+ background-image:url("../pictures/backgrounds/toolbar.png");
+ height:30px;
+ 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{
+ font-family:Verdana;
+ color:#555555;
+ font-style:italic;
+ font-size:11px;
+ padding-left:20px;
+}
+.subOption td {
+ font-family:Verdana;
+ font-size:11px;
+ padding-left:20px;
+ vertical-align:top;
+}
+.roomNameForSettings
+{
+ font-family:Verdana;
+ font-weight: bold;
+ font-size:12px;
+}
+.hide
+{
+ display:none;
+}
+.visible
+{
+ display:block;
+}
+label.moreRoom
+{
+ color:Navy;
+ text-decoration:underline;
+ padding-left:20px;
+ font-weight: bold;
+}
+#popup {
+display:none;
+ font-size:8pt;
+ display:block;
+ position:absolute;
+ top:50%; left:50%;
+ color:#000;
+ text-align: center;
+}
+.expand
+{
+ background-color:Black;
+}.headerBar table
+{
+padding:0px ;
+width:100%;
+background-image:url("../pictures/backgrounds/headerbar.png");
+height:32px;
+border-bottom:solid 1px Black;
+}
+.toolBar table
+{
+ width:100%;
+ padding:0px ;
+ background-image:url("../pictures/backgrounds/toolbar.png");
+}
+.search
+{
+ max-width:105px;
+ }
+.list
+{
+ height:280px;
+ overflow-y:scroll;
+}
+.productTitle {
+ background-color:#B0C1D5;
+ font-family:Verdana;
+ color:White;
+ font-size:12px;
+ height:16px;
+ font-weight:bold;
+ cursor:default;
+}
+.validationBar table
+{
+ width:100%;
+ height:24px ;
+ padding:0px ;
+ background-color:#F0F0F0;
+}
+.panelSettings table
+{
+border-bottom: #818181 1px solid;
+height:220px;
+display:none;
+width:100%
+}
+.part td
+ {
+ width:100%;
+ border-bottom: #818181 1px solid;
+ }
+ .messageBar
+ {
+ background-color:#ffff99;
+ }
\ No newline at end of file
Property changes on: trunk/moodle/mod/voicetool/css/StyleSheet.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/voicetool/js/General.js
===================================================================
--- trunk/moodle/mod/voicetool/js/General.js (rev 0)
+++ trunk/moodle/mod/voicetool/js/General.js 2006-11-24 15:37:06 UTC (rev 101)
@@ -0,0 +1,369 @@
+// JScript File
+
+ function toggleUserlimit(isLimited){
+ document.forms[0].userlimittext.disabled = (isLimited==false);
+ }
+ function doChangeChat() {
+ var radio = document.forms[0].privateChatEnabled;
+ for (i=0; i<radio.length; i++) {
+ radio[i].disabled = !document.forms[0].chatEnabled.checked;
+ }
+ }
+
+ function doChangeMedia(mediatype)
+ {
+ document.forms[0].student_simulcast.disabled = (mediatype=="video" || mediatype=="none")
+ document.forms[0].two_way_enabled.disabled = (mediatype=="video" || mediatype=="none")
+ if (mediatype=="video"){document.getElementById('roomId_row').style.display="block"}else{
+ document.getElementById('roomId_row').style.display="none"}
+ }
+ function doChangeLink()
+ {
+
+ if (document.getElementById('launcher_link_row').style.display=="block"){
+ document.getElementById('launcher_link_row').style.display="none"
+ }else{
+ document.getElementById('launcher_link_row').style.display="block"
+ }
+ }
+
+
+ function toggleType(type)
+ {
+ typeSelect=type;
+ manageXml('','all');
+
+
+
+
+ }
+ function confirmDelete(delUrl, type){
+ if (confirm("Are you sure you want to delete this " + type)) {
+ if (confirm("Are you really sure you want to delete this " + type)) {
+ location.href = delUrl
+ }
+ }
+ }
+
+
+
+ var currentIdtab="1";
+ function onTab(id)
+ {
+
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_Select.gif)";
+ document.getElementById('tab'+currentIdtab).style.borderBottom="#818181 1px solid";
+ document.getElementById('tab'+currentIdtab).style.backgroundImage="url(pictures/tab.gif)";
+ document.getElementById('tab'+id).style.borderBottom="none";
+ document.getElementById('span'+currentIdtab).style.display="none";
+ document.getElementById('span'+id).style.display="block";
+ currentIdtab=id;
+ }
+
+ function onOver(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab_over.gif)";
+
+ }
+ function onOut(id)
+ {
+ if(currentIdtab!=id)
+ document.getElementById('tab'+id).style.backgroundImage="url(pictures/tab.gif)";
+
+ }
+
+ function hwSubmit(action) {
+ if(action != null)
+ {
+ document.forms[0].action.value=action;
+ }
+ document.forms[0].submit();
+ }
+
+
+ function hideDiv(id,pictureId){
+ if (document.getElementById(id).style.display=="none")
+ {
+
+ document.getElementById(id).style.display="block";
+ document.getElementById(id+"More").style.display="block";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).style.display=="block")
+ {
+
+ document.getElementById(id).style.display="none";
+ document.getElementById(id+"More").style.display="none";
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+ if (document.getElementById(id).className=="hide")
+ {
+ document.getElementById(id).className="visible";
+ document.getElementById(id+"More").className="visible";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-expanded.png";
+
+ }
+ else if (document.getElementById(id).className=="visible")
+ {
+ document.getElementById(id).className="hide";
+ document.getElementById(id+"More").className="hide";
+
+ if(pictureId!="")
+ document.images[pictureId].src="pictures/items/category-collapsed.png";
+ }
+}
+
+
+
+
+function hideArchive(type,id,pictureId,roomId)
+{
+
+ if (document.getElementById(id).style.display=="none")
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom+=numberArchive[roomId];
+ else
+ numberBreakoutRoom+=numberArchive[roomId];
+ document.getElementById(id).style.display="block";
+ document.images[pictureId].src="pictures/minus.gif";
+
+
+ }
+ else
+ {
+ if(type=="MainLecture")
+ numberMainLectureRoom-=numberArchive[roomId];
+ else
+ numberBreakoutRoom-=numberArchive[roomId];
+
+ document.getElementById(id).style.display="none";
+ document.images[pictureId].src="pictures/plus.gif";
+
+
+ }
+ gestionDisplay(false)
+}
+
+function Navigateur()
+{
+ if (navigator.appName.indexOf("Netscape") > -1)
+ {
+ return "Netscape";
+ }
+ if (navigator.appName.indexOf("Explorer") > -1)
+ {
+ return "Explorer";
+ }
+ return "Unknown";
+}
+
+
+function changePicture(id,pictureUrl){
+ if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
+ {
+ document.getElementById(id).style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+pictureUrl+"', sizingMethod='scale')";
+ }
+ else
+ {
+ // document.images[id].src=pictureUrl;
+
+ }
+
+}
+
+function OneClick(id,product,type)
+
+{
+
+ if(currentId!="" && currentId!=id)
+ document.getElementById(currentId).style.backgroundColor="white";
+ if(currentId!=id)
+ {
+ document.getElementById(id).style.backgroundColor="#c3dbf7";
+ }
+ currentId=id;
+ currentProduct=product;
+ typeSelect=type;
+
+ //alert(typeSelect);
+ if(document.getElementById("info")!=null && document.getElementById("info").style.display=="block")
+ document.getElementById("info").style.display="none";
+ if(currentId!="")
+ manageXml("","toolBar");
+}
+function dclick(id)
+{
+ if(currentId!=""){
+ document.getElementById(currentId).style.backgroundColor="white";
+ currentId=id;
+ Launch();
+ }
+}
+
+function Horizon()
+{
+
+ if(currentId!="")
+ startHorizon(currentId, null, null, null, null, 'hzA='+session['authToken'])
+}
+
+function ChangeView()
+{
+//alert("eeeE")
+ if( document.getElementById("view").value=="student")
+ {
+ studentView=true;
+
+ }
+ else
+ {
+ studentView=false;
+ }
+ currentId="";
+ currentProduct="";
+ manageXml("","all");
+
+
+}
+
+function LaunchWizard(url)
+{
+var w = window.open(url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+w.focus();
+}
+
+function doOpen(url,param)
+{
+
+ if(currentId!="")
+ {
+ var complete_url=url+'?roomId='+currentId+'&'+param;
+
+ window.open(complete_url,"_self");
+
+ }
+}
+function doOpenPopup(url,param)
+{
+ if(currentId!="")
+ {
+ var complete_url=url+'?roomId='+currentId+'&'+param;
+ var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+ w.focus();
+ }
+}
+function doOpenExtern(url,param)
+{
+ if(currentId!="")
+ {
+ var complete_url=url+'?class_id='+currentId+'&'+param;
+ var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+ w.focus();
+ }
+}
+function hideCroix(v)
+{
+ if(v.length>0)
+ document.getElementById("croix").style.display="block";
+ else
+ document.getElementById("croix").style.display="none";
+}
+var hiddenCroix=0;
+function overCroix(v)
+{
+ if(hiddenCroix==0)
+ {
+ v.src="pictures/x_normal.gif";
+ hiddenCroix=1;
+ }
+ else
+ {
+ v.src="pictures/x_over.gif";
+ hiddenCroix=0;
+
+ }
+}
+function clickCroix()
+{
+ document.getElementById("search").value="";
+ document.getElementById("croix").style.display="none";
+}
+
+// JScript File
+
+//manage the filter
+function activateFilter(id,divNumber){
+ currentFilter=id;
+ currentDiv=divNumber;
+ currentId="";
+ currentProduct="";
+ manageXml('',"all");
+
+}
+
+function onFilter(id){
+ if(currentFilter!=id){
+ document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-rollover-left.png)";
+ document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-rollover-middle.png)";
+ document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-rollover-right.png)";
+ }
+}
+
+function outFilter(id){
+
+ if(currentFilter==id){
+ document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-enabled-left.png)";
+ document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-enabled-middle.png)";
+ document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-enabled-right.png)";
+ }else{
+ document.getElementById(id+"_left").style.backgroundImage="";
+ document.getElementById(id+"_center").style.backgroundImage="";
+ document.getElementById(id+"_right").style.backgroundImage="";
+ }
+}
+function startBoard()
+{
+
+ if(currentId!="")
+ {
+ //openPopup('<%=Setup.getInstance().getVtServerURL()%>/board?action=display_popup&nid='+currentId)
+ }
+
+}
+
+function search(value){
+ currentId=""
+ currentProduct=""
+ manageXml(search.value,"all");
+
+}
+function Launch(){
+
+ if(currentProduct="liveclassroom"){
+ Horizon();
+ }else if(currentProduct="voiceboard"){
+ startBoard();
+ }
+
+}
+
+function openContentWindows(){
+ if(currentId!="")
+ window.open('http://test13.horizonwimba.com/admin/class/carousels.epl?class_id='+currentId+'&hzA='+session["authToken"],'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
+}
+
+
+
+function submitForm(url,action){
+ //alert(currentId)
+ document.myform.action=url+'?id='+currentId+'&action='+action+'&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"];
+ document.myform.submit();
+ }
+
\ No newline at end of file
Property changes on: trunk/moodle/mod/voicetool/js/General.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/voicetool/js/verif.js
===================================================================
--- trunk/moodle/mod/voicetool/js/verif.js (rev 0)
+++ trunk/moodle/mod/voicetool/js/verif.js 2006-11-24 15:37:06 UTC (rev 101)
@@ -0,0 +1,57 @@
+// 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
Property changes on: trunk/moodle/mod/voicetool/js/verif.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/voicetool/js/xml.js
===================================================================
--- trunk/moodle/mod/voicetool/js/xml.js (rev 0)
+++ trunk/moodle/mod/voicetool/js/xml.js 2006-11-24 15:37:06 UTC (rev 101)
@@ -0,0 +1,956 @@
+// JScript File
+
+function manageXml(search,divToReload){
+
+ var display="";
+
+ if(divToReload=="all"){
+ display+="<form method=post name=myform>"
+ display+=initDisplay();
+ }
+ //session management
+ var information= objDomTree.getElements("information");
+
+ if(information!="")
+ createSession(information);
+
+ //Get windows Element
+ var windows = objDomTree.getElements("windows");
+ //get the different part of the windows
+ var windowsElements = windows[0].getElements("windowsElement");
+ for(var i=0;i<windowsElements.length;i++){
+ // display+=openPart();
+ var type = windowsElements[i].getElements("type")[0].getText();
+
+ switch(type){
+ case "headerBar":
+ if(divToReload=="all" ){
+ display+=openDiv("headerBar","headerBar");
+ display+=displayHeaderBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="headerBar"){
+
+ display+=displayHeaderBar(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
+ case "toolBar":
+ if(divToReload=="all"){
+ display+=openDiv("toolBar","toolBar")
+ display+=displayToolBar(windowsElements[i].getElements("windowsElementParameters"),search);
+ display+=closeDiv();
+ }
+ else if(divToReload=="toolBar"){
+ display+=displayToolBar(windowsElements[i].getElements("windowsElementParameters"),search);
+
+ }
+ break;
+ case "filterBar":
+ if(divToReload=="all"){
+ display+=openDiv("filterBar","filterBar")
+ display+=displayFilterBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="filterBar"){
+
+ display+=displayFilterBar(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
+ case "messageBar":
+ if(divToReload=="all"){
+ display+=openDiv("messageBar","messageBar")
+ display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="messageBar"){
+
+ display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
+ case "list":
+ if(divToReload=="all"){
+ display+=openDiv("list","list") //style='height:245px;overflow-y:scroll'"
+ display+=displayList(windowsElements[i].getElements("windowsElementParameters"),search);
+ display+=closeDiv();
+ }else if(divToReload=="list"){
+
+ display+=displayList(windowsElements[i].getElements("windowsElementParameters"),search);
+
+ }
+ break;
+ case "settings":
+ if(divToReload=="all" ){
+ display+=openDiv("settings","settings")
+ display+=displaySettings(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="settings"){
+ display+=displaySettings(windowsElements[i].getElements("windowsElementParameters"));
+
+
+ }
+ break;
+ case "contextBar":
+ if(divToReload=="all"){
+ display+=openDiv("contextBar","contextBar")
+ display+=displayContextBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="contextBar"){
+
+ display+=displayContextBar(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
+ case "validationBar":
+ if(divToReload=="all" ){
+ display+=openDiv("validationBar","validationBar")
+ display+=displayValidationBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+
+ display+="</form>"
+ }else if(divToReload=="validationBar"){
+ display+=displayValidationBar(windowsElements[i].getElements("windowsElementParameters"));
+ display+="</form>"
+
+ }
+ break;
+ case "productChoice":
+ if(divToReload=="all"){
+ display+=openDiv("productChoice","productChoice")
+ display+=displayProductChoice(windowsElements[i].getElements("windowsElementParameters"));
+ display+=closeDiv();
+ }else if(divToReload=="productChoice"){
+
+ display+=displayProductChoice(windowsElements[i].getElements("windowsElementParameters"));
+
+ }
+ break;
+
+ }
+ // display+=displayPart();
+ }
+
+ display+=closeDisplay();
+
+ document.getElementById(divToReload).innerHTML = display;
+
+ if(divToReload=="all"){
+ //gestionDisplay(false);
+ // document.getElementById("search").focus();
+ }
+}
+
+
+function displayHeaderBar(elementParameters){
+ var display="";
+ var headerBarInformations=elementParameters[0].getElements("headerBarInformations")
+ display="<table cellspacing=0 cellpadding=0>"
+ display+= "<tr>"
+ display+= "<td><img src='"+headerBarInformations[0].getElements("pictureUrl")[0].getText()+"' /></td>"
+ display+= "<td align='right' valign='middle'>"
+ //if(isInstructor){
+ if(session["role"]=="Instructor"){
+ display+= "<select id='view' onchange='ChangeView()'>"
+ display+= "<option value='normal'>Instructor View</option>"
+ //alert(studentView)
+ if(studentView==true)
+ display+= "<option value='student' selected>Student View</option>"
+ else
+ display+= "<option value='student'>Student View</option>"
+
+ display+= "</select>"
+ }
+ display+= "</td>"
+ display+= "</tr>"
+ display+="</table>"
+ return display;
+
+}
+
+//Manage The toolBar
+function displayToolBar(elementParameters,search)
+{
+ var display="";
+ //Get Menu
+ var toolbar = elementParameters[0].getElements("menuElements");
+
+ //get the different element of the menu
+ var menuElements = toolbar[0].getElements("menuElement");
+
+ display += "<table cellspacing=0 cellpadding=0>"
+ display += "<tr id='menu'>"
+
+ for(var i=0;i<menuElements.length; i++){
+ if(menuElements[i].getElements("type")[0].getText()=="button")
+ display +=displayToolBarButton(menuElements[i].getElements("typeOfProduct")[0].getText(),menuElements[i].getElements("availibility")[0].getText(),menuElements[i].getElements("typeOfUser")[0].getText(),menuElements[i].getElements("pictureUrl")[0].getText(),menuElements[i].getElements("value")[0].getText(),menuElements[i].getElements("action")) ;
+ else if(menuElements[i].getElements("type")[0].getText()=="separator")
+ display +=displayToolBarSeparator(search);
+ else if(menuElements[i].getElements("type")[0].getText()=="search")
+ display +=displayToolBarSearch(search);
+ else if(menuElements[i].getElements("type")[0].getText()=="variableSpace")
+ display +=displaySearch(search);
+ else if(menuElements[i].getElements("type")[0].getText()=="fixSpace")
+ display +=displaySpace();
+ }
+
+ display +="</tr></table>";
+
+ return display;
+}
+
+function displaySpace(){
+ var display="";
+ display+= "<td width='184px'></td>";
+ return display;
+}
+
+function displayMessageBar(elementParameters){
+ var display="";
+ var messageInformations=elementParameters[0].getElements("message")
+
+ switch(messageInformations[0].getElements("type")[0].getText()){
+ case "info":
+ pictureUrl="";
+ break;
+ case "exception":
+ pictureUrl="";
+ break;
+ }
+
+ display="<table cellspacing=0 cellpadding=0>"
+ display+= "<tr>"
+ display+= "<td><img src='pictures/items/messagelabel-info.png'></td>"
+ display+= "<td>"+messageInformations[0].getElements("value")[0].getText()+"</td>";
+ display+= "</tr>"
+ display+="</table>"
+ return display;
+
+}
+
+
+function displayToolBarButton(product,availibility,typeOfUser,pictureUrl,value,action)
+{
+ var display="";
+
+ var actionString=""
+
+
+ var actionString=action[0].getElements("name")[0].getText()+"(";
+
+ var actionParam=action[0].getElements("parameters");
+ var actionParameters=actionParam[0].getElements("parameter");
+ for(var j=0;j<actionParameters.length;j++){
+ if(j==(actionParameters.length-1))
+ actionString+="\'"+ actionParameters[j].getText()+"\' ";
+ else
+ actionString+="\'"+ actionParameters[j].getText()+"\',";
+ }
+ actionString+=")";
+
+ if(typeOfUser=="all" || (typeOfUser=="instructor" && studentView==false)){
+ display+="<td width='15px'></td> "
+ if(availibility=="true" || currentId!=""){
+ if(product=="all" || currentProduct==product){
+ display+="<td width='24px' align='center' class='button_enabled'>"
+ display+="<a href=\"javascript:"+actionString+";\">"
+
+
+ display+="<img src='"+pictureUrl+".png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
+ }else{
+ display+="<td width='24px' align='center' class='button_disabled' >"
+ display+="<a href=\"javascript:"+actionString+";\">"
+ display+="<img src='"+pictureUrl+"-disabled.png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
+
+ }
+ }else{
+ display+="<td width='24px' align='center' class='button_disabled'>"
+ display+="<a href=\"javascript:"+actionString+";\">"
+ display+="<img src='"+pictureUrl+"-disabled.png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
+ }
+ display+=value ;
+ display+="</a></td> "
+ }else{ // the button is unavalaible for this user
+ display+="<td width='24px' align='center' ></td>"
+ }
+
+ return display;
+}
+
+
+function displayToolBarSearch(search)
+{
+ var display="";
+
+ display+="<td align='right'>"
+ display+="<table border=0 class='search' cellspacing=0 cellpadding=0 >"
+ display+="<tr>"
+ display+="<td align='right' width=26px style='background-image: url(pictures/items/headerbar-searchfield-left.png); background-repeat:no-repeat;'>"
+ 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,\"all\");' 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'> "
+ display+="<img onmouseover='overCroix(this)' Onclick='clickCroix();launchDisplay();' Onmouseout='overCroix(this)' src='pictures/x_normal.gif' align='middle' style='border:none ' />"
+ display+="</div>"
+ display+="</td>"
+ display+="<td width=5px></td>"
+ display+="</tr>"
+ display+="</table>"
+ display+="</td>"
+ return display;
+}
+
+function displayToolBarSeparator()
+{
+ var display="";
+ display+="<td width='15px'></td> "
+ display+="<td width='1px'><img src='pictures/items/toolbar-separator.png' height='44px' width='1px' /></td> ";
+ return display;
+}
+
+
+//Manage the filterBar
+
+function displayFilterBar(elementParameters){
+
+ var display="";
+ //Get filter
+ var filterBar = elementParameters[0].getElements("filters");
+ //get the different filters
+ var filterElements = filterBar[0].getElements("filter");
+
+ display +="<table cellspacing='0' cellpadding='0'>"
+ display += "<tr>"
+
+ for(var i=0;i<filterElements.length;i++){
+ display+="<td width='15px'></td> "
+ display += "<td>"
+ display+=displayfilter(filterElements[i].getElements("value")[0].getText(),filterElements[i].getElements("name")[0].getText(),filterElements[i].getElements("action")[0].getText(),filterElements[i].getElements("availibility")[0].getText());
+ display += "</td>"
+
+ }
+ display+="</tr></table>";
+
+ return display;
+}
+
+function displayfilter(value,name,action,availibility){
+ var display="";
+ display+="<table border='0' align='center' cellpadding='0' cellspacing='0' heigth='24px'>";
+ display+="<tr heigth='24px' class='filter'>";
+
+ if(currentFilter==name){
+ display+="<td width='8px' class='filter_left_enabled' id='"+name+"_left'></td>";
+ display+="<td class='filter_middle_enabled' id='"+name+"_center' class='filter_selected'>";
+ display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>";
+ display+="</td>";
+ display+="<td width='8px' class='filter_right_enabled' id='"+name+"_right'></td>";
+
+ }
+ else{
+ display+="<td width='8px' id='"+name+"_left'></td>";
+ display+="<td id='"+name+"_center' class='filter_enabled'>";
+ display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>";
+ display+="</td>";
+ display+="<td width='8px' id='"+name+"_right'></td>";
+ }
+ display+="</tr>";
+ display+="</table>";
+ return display;
+}
+
+
+//ManageList
+function displayList(elementParameters,search)
+{
+ //clear the global variable
+ numberMainLectureRoom=0;
+ numberBreakoutRoom=0;
+ numberVoiceBoard=0;
+ numberVoicePresentation=0;
+
+ var parts=new Array();
+ var numberProducts=new Array();
+ var breakout="";
+
+ var numberArchive=0;
+ var number=0;
+ var roomId;
+ var mysearch=new String(search);
+
+ //get the list of products
+ var list= elementParameters[0].getElements("products");
+
+ var listProducts = list[0].getElements("listProducts");
+
+ //get the different informations fro each product
+ var products = listProducts[0].getElements("productInformations");
+
+ var start=0;
+
+ //
+ for(i=0; i< products.length; i++)
+ {
+
+ var positionOfDiv=products[i].getElements("position")[0].getText();
+ if(currentFilter=="all" || currentDiv== positionOfDiv){
+
+ var cssStyle=products[i].getElements("style")[0].getText();
+ var value=products[i].getElements("value")[0].getText();//string display
+ parts[eval(parseInt(positionOfDiv))]=openDivProduct(positionOfDiv,cssStyle,value)
+ }
+ if(start>parseInt(positionOfDiv) || start==0)
+ start=parseInt(positionOfDiv);
+ }
+
+ var productsContent = list[0].getElements("productsContent");
+ var content = productsContent[0].getElements("listElements");
+ var listElements = content[0].getElements("listElement");
+ var positionDiscussionRoom=0;
+ var positionMainLecture=0;
+ var orphanedMainLecture="";
+ var orphanedDiscussion="";
+ for(i=0; i< listElements.length; i++)
+ {
+ var parameters=listElements[i].getElements("listElementParameters");
+
+ var results = parameters[0].getElements("nameDisplay")[0].getText().toLowerCase().match(mysearch.toLowerCase())
+ if(search==null || results!=null)
+ {
+
+ if(studentView==false || (studentView==true && parameters[0].getElements("preview")[0].getText()=="available")){
+
+ switch(parameters[0].getElements("typeOfElement")[0].getText()){
+ case "Main Lecture":
+ if(currentFilter=="all" || currentDiv== parameters[0].getElements("position")[0].getText()){
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addRoomElement("mainLectureRoom",parameters);
+ numberMainLectureRoom++;
+ positionMainLecture=parameters[0].getElements("position")[0].getText();
+ }
+ break;
+ case "DiscussionRoom":
+ if(currentFilter=="all" || currentDiv== parameters[0].getElements("position")[0].getText()){
+
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addRoomElement("discussionRoom",parameters);
+ numberBreakoutRoom++;
+ positionDiscussionRoom=parameters[0].getElements("position")[0].getText();
+ }
+ break;
+ case "VoiceBoard":
+
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addBoardElement(parameters);
+ numberVoiceBoard++;
+ break;
+ case "VoicePresentation":
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addBoardElement(parameters);
+ numberVoicePresentation++;
+ break;
+ case "orphanedArchive":
+
+
+ if(parameters[0].getElements("type")[0].getText()=="discussionRoom")
+ { orphanedDiscussion=orphanedDiscussion+addOrphanedElement(parameters);
+
+ numberBreakoutRoom++;
+
+ }
+ else if(parameters[0].getElements("type")[0].getText()=="mainLectureRoom")
+ { orphanedMainLecture=orphanedMainLecture+addOrphanedElement(parameters);
+ numberMainLectureRoom++;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ var display="";
+
+ for(i=start; i< parts.length; i++)
+ {
+ if(currentFilter=="all" || currentDiv== i){
+ if(positionMainLecture==i)
+ parts[i]=parts[i].toString()+orphanedMainLecture;
+ if(positionDiscussionRoom==i)
+ parts[i]=parts[i].toString()+orphanedDiscussion;
+ parts[i]=parts[i].toString()+closeDivProduct(i);
+ parts[i]+="<div id='div"+i+"More' class='hide'></div>"
+ display+=parts[i];
+ }
+ }
+
+ return display;
+}
+
+
+function openDivProduct(name,cssStyle,value){
+ var display="";
+ display+="<div id='div"+name+"Title'>";
+ display+="<table cellpadding='0' cellspacing='0' width='100%'>";
+ display+="<tr class='productTitle'>";
+ display+="<td width='16px' onclick='javascript:hideDiv(\"div"+name+"\",\""+name+"toggleimgorphaned\")'>";
+ display+="<img src='pictures/items/category-expanded.png' id='"+name+"toggleimgorphaned' border='0'";
+ display+="</td>";
+ display+="<td class='shortShift'>"+value+"</td>";
+ display+="</tr>";
+ display+="<tr><td colspan=3>"
+ display+="<div id='div"+name+"' style='display:block;overflow:hidden'>";
+ display+="<table width='100%' cellspacing='0' cellpadding='1' border='0' class='divProduct'>";
+
+ return display
+}
+
+
+function addOrphanedElement(parameters)
+{
+ var retour="";
+
+ retour += "<tr id="+parameters[0].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+parameters[0].getElements("id")[0].getText()+"','liveclassroom')\" Ondblclick=\"javascript:startHorizon('"+parameters[0].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='room'>"
+ retour += "<td width=1px></td>";
+ retour += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
+ retour += "<td width=16px align=\"left\"><img src=\"pictures/items/space-16x16px.png\" border=\"0\" /></td>";
+
+ retour += "<td width='300px' class='archive'>"+parameters[0].getElements("nameDisplay")[0].getText()+"</td>";
+ retour += "<td align=\"left\"><img src=\"pictures/items/listitem-"+parameters[0].getElements("preview")[0].getText()+".png\"/></td>";
+ retour += "</tr>";
+
+ return retour;
+}
+
+
+function addBoardElement(parameters)
+{
+ var display="";
+ if(studentView==false || (studentView==true && parameters[0].getElements("preview")[0]=="False")){
+ display+=displayBoard(parameters[0].getElements("preview")[0].getText(),parameters[0].getElements("nameDisplay")[0].getText(),parameters[0].getElements("rid")[0].getText(),parameters[0].getElements("nid")[0].getText());
+ }
+
+ return display;
+
+}
+
+function displayBoard(availibility,title,rid,nid)
+{
+ var retour="";
+ retour += "<tr id="+rid+" height=16px Onclick=\"OneClick('"+rid+"','voiceboard')\" Ondblclick=\"javascript:startBoard('"+nid+"')\" class='room'>"
+ retour += "<td width=1px></td>";
+ retour += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-voiceboardicon.png\" border=\"0\" /></td>";
+ retour += "<td width=16px align=\"left\" Ondblclick=''></td>";
+ retour += "<td width='300px' class='roomTitle'>"+title+"</td>";
+ retour += "<td align=\"left\"><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
+ retour += "</tr>";
+
+ return retour;
+}
+
+function addRoomElement(type,parameters){
+
+ var display="";
+ var archives;
+ if(parameters[0].getElements("archives")!="")
+ archives=parameters[0].getElements("archives");
+ if(archives!=null ){
+ if(studentView==false || parameters[0].getElements("closedArchive")[0].getText()=="false")
+ display=displayRoom(type,parameters[0].getElements("preview")[0].getText(),parameters[0].getElements("nameDisplay")[0].getText(),parameters[0].getElements("id")[0].getText(),"pictures/items/listitem-show.png",archives)
+ else
+ display=displayRoom(type,parameters[0].getElements("preview")[0].getText(),parameters[0].getElements("nameDisplay")[0].getText(),parameters[0].getElements("id")[0].getText(),"pictures/items/space-16x16px.png",archives)
+ }else{
+ display=displayRoom(type,parameters[0].getElements("preview")[0].getText(),parameters[0].getElements("nameDisplay")[0].getText(),parameters[0].getElements("id")[0].getText(),"pictures/items/space-16x16px.png",archives)
+
+ }
+
+ return display;
+}
+function displayRoom(type,availibility,longname,roomId,archive,archives)
+{
+
+ var retour="";
+
+ retour += "<tr id="+roomId+" height=16px Onclick=\"OneClick('"+roomId+"','liveclassroom','"+type+"')\" class='room'>"
+ retour += "<td Ondblclick=\"dclick('"+roomId+"')\" width=1px></td>";
+ retour += "<td Ondblclick=\"dclick('"+roomId+"')\" width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
+ retour += "<td width=16px align=\"left\" Ondblclick=''><img src='"+archive+"' onclick=\"hideArchive('"+type+"','"+roomId+"hide','pictures/items/listitem-subitem.png','"+roomId+"')\" id=\"toggleimg"+roomId+"hide\" border=\"0\" /></td>";
+ retour += "<td Ondblclick=\"dclick('"+roomId+"')\" width='700px'><label>"+longname+"</label></td>";
+ retour += "<td Ondblclick=\"dclick('"+roomId+"')\" align=\"left\"><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
+ retour += "</tr>";
+
+ if(archives!=null){
+
+ retour+=displayArchive(roomId,archives);
+ }
+
+ return retour;
+}
+
+function displayArchive(roomId,archives)
+{
+ var closeArchive=0;
+ var archive = archives[0].getElements("archive");
+
+ if(archive!=""){
+
+ var retour="<tr><td colspan=5 style='padding:0px 0px 0px 0px'><div id='"+roomId+"hide' class='hide' >";
+ retour += " <table width=100% cellspacing=0 cellpadding=1 border=0>";
+ for(var i=0; i< archive.length; i++)
+ {
+ if(studentView==false || (studentView==true && archive[i].getElements("preview")[0].getText()=="available")){
+
+ retour += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','liveclassroom')\" Ondblclick=\"javascript:startHorizon('"+archive[i].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='room'>"
+ retour += "<td width=1px></td>";
+ retour += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>";
+ retour += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.png\" border=\"0\" /></td>";
+ retour += "<td width='700px' class='archive'>"+archive[i].getElements("nameDisplay")[0].getText()+"</td>";
+ retour += "<td align=\"left\"><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".png\"/></td>";
+ retour += "</tr>";
+ }else{
+ closeArchive++;
+ }
+ }
+ retour +="</table></div></tr>";
+ }
+ numberArchive[roomId]=archive.length-closeArchive;
+ if(closeArchive==archive.length){//no open archive for student
+
+
+ //changePicture("toggleimg"+roomId+"hide","pictures/items/listitem-subitem.png");
+
+ }
+ return retour;
+
+}
+
+
+function displayProductChoice(elementParameters){
+ var display="";
+ var informations = elementParameters[0].getElements("productInformations");
+ var action=informations[0].getElements("action");
+
+ var actionJavascript=""+action[0].getElements("name")[0].getText()+"(";
+
+ var actionParam=action[0].getElements("parameters");
+ var actionParameters=actionParam[0].getElements("parameter");
+ for(var j=0;j<actionParameters.length;j++){
+ if(j==(actionParameters.length-1))
+ actionJavascript+="\""+ actionParameters[j].getText()+"\" ";
+ else
+ actionJavascript+="\""+ actionParameters[j].getText()+"\",";
+ }
+ actionJavascript+=")";
+
+
+ display +="<table cellspacing='0' cellpadding='0' align=center width=100% border='0' >";
+ display +="<tr onclick='"+actionJavascript+"'>";
+ display+= "<td align=center width=130px><img src='"+informations[0].getElements("pictureUrl")[0].getText()+"' /><br><label>"+informations[0].getElements("value")[0].getText()+"</label></td>"
+ display +="<td>"+informations[0].getElements("description")[0].getText()+"</td>";
+ display +="</tr>";
+ display +="</table>";
+
+ return display;
+
+}
+function displaySettings(elementParameters){
+
+ var display="";
+
+ display+="<table cellspacing='0' cellpadding='0' width='100%' border='0' ><tr><td style='padding:0px 0px 0px 0px'>"
+
+ var displayPanelTitle ="";
+ var displayPanel="";
+ var panelsSettings=elementParameters[0].getElements("panelsSettings");
+ var panelSettings=panelsSettings[0].getElements("panelSettings");
+
+ for(var i=0;i<panelSettings.length; i++){
+
+ var panelInformations=panelSettings[i].getElements("panelInformations");
+ var panelContent=panelSettings[i].getElements("panelContent");
+ displayPanelTitle +=DisplayTab(panelInformations);
+ displayPanel +=DisplayDivSettings(panelInformations,panelContent);
+
+
+ }
+ display+=DisplayTabtitle(displayPanelTitle);
+ display+=displayPanel;
+ return display;
+}
+
+
+function DisplayTabtitle(alltab){
+ var display="";
+ display +="<div cellspacing='0' cellpadding='0' id='' class=tabBackground>";
+ display +="<table cellspacing='0' cellpadding='0' border='0' width=100%>";
+ display +="<tr>";
+ display +="<td width='2px' style='border-bottom: #818181 1px solid; height: 18px;'> </td>";
+ display +=alltab;
+ display +="<td style='border-bottom: #818181 1px solid; height: 18px;' align='center'> </td>";
+ display +="</tr>";
+ display +="</table>";
+ display +="</div>";
+ return display;
+}
...
[truncated message content] |
|
From: <sh...@us...> - 2006-11-24 15:32:00
|
Revision: 100
http://svn.sourceforge.net/hw4mdl/?rev=100&view=rev
Author: shazan
Date: 2006-11-24 07:31:35 -0800 (Fri, 24 Nov 2006)
Log Message:
-----------
Add new files to generate the list of Voice Tools and to choose the different types of products
Modified Paths:
--------------
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/voicetoolapi.php
Added Paths:
-----------
trunk/moodle/mod/voicetool/displayChoicePage.php
trunk/moodle/mod/voicetool/generateListPanel.php
trunk/moodle/mod/voicetool/welcome.php
Added: trunk/moodle/mod/voicetool/displayChoicePage.php
===================================================================
--- trunk/moodle/mod/voicetool/displayChoicePage.php (rev 0)
+++ trunk/moodle/mod/voicetool/displayChoicePage.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -0,0 +1,175 @@
+<?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: Hazan Samy *
+ * *
+ * Date: October 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id$ */
+
+
+ require_once("../../config.php");
+ require_once("lib.php");
+ // require_once("api.php");
+
+ // Variables needed
+ global $CFG;
+
+ if(empty($_POST)){
+ $params = $_GET;
+ }
+ else $params = $_POST;
+
+
+ //print_r($params);
+ $courseid = $params['enc_course_id'];
+ add_to_log("", "voicetool", "view", "test", $courseid);
+ // echo $courseid;
+/*
+
+ if(isteacher($courseid, $USER->id) ) {
+ $userid = liveclassroom_api_get_teacher_user_id($courseid);
+ $isteacher = 1;
+
+ }
+ else if (isstudent($courseid) ) {
+
+ $userid = liveclassroom_api_get_student_user_id($courseid);
+ $isteacher = 0;
+
+ }
+
+ if (!liveclassroom_init_session($params)) {
+ error("ExpiredSessionException");
+ }
+*/
+
+ $xmldoc = new DomDocument();
+
+ $root = $xmldoc->createElement('root');
+
+ $root->appendChild(voicetool_get_session_params($xmldoc,$params));
+
+ $windows = $xmldoc->createElement('windows');
+
+ //HEADER BAR
+ $windows->appendChild(voicetool_create_headerbar($xmldoc));
+
+ // NEW BOARD
+ $productChoice = $xmldoc->createElement('windowsElement');
+ $productChoicetype = $xmldoc->createElement('type');
+ $productChoicetype->appendChild($xmldoc->createTextNode("productChoice"));
+ $productChoice->appendChild($productChoicetype);
+
+ $productChoiceElementParameters = $xmldoc->createElement("windowsElementParameters");
+
+ $productInfo = $xmldoc->createElement('productInformations');
+
+ $action = $xmldoc->createElement('action');
+
+ $actionName = $xmldoc->createElement('name');
+ $actionName->appendChild($xmldoc->createTextNode("gaga.php"));
+ $action->appendChild($actionName);
+
+ $productParameters = $xmldoc->createElement('parameters');
+ $productParameter = $xmldoc->createElement('parameter');
+ $productParameter->appendChild($xmldoc->createTextNode("test=2"));
+ $productParameters->appendChild($productParameter);
+ $action->appendChild($productParameters);
+
+ $productInfo->appendChild($action);
+
+ $pictureUrl = $xmldoc->createElement('pictureUrl');
+ $pictureUrl->appendChild($xmldoc->createTextNode("pictures/buttons/new-createvoiceboard.png"));
+ $productInfo->appendChild($pictureUrl);
+
+ $value = $xmldoc->createElement('value');
+ $value->appendChild($xmldoc->createTextNode("New Board"));
+ $productInfo->appendChild($value);
+
+ $description = $xmldoc->createElement('description');
+ $description->appendChild($xmldoc->createTextNode(get_string('newVoiceBoard', 'voicetool')));
+ $productInfo->appendChild($description);
+
+ $productChoiceElementParameters->appendChild($productInfo);
+
+ $productChoice->appendChild($productChoiceElementParameters);
+
+ $windows->appendChild($productChoice);
+
+ // NEW PRESENTATION
+ $productPresentation = $xmldoc->createElement('windowsElement');
+ $productPresentationtype = $xmldoc->createElement('type');
+ $productPresentationtype->appendChild($xmldoc->createTextNode("productChoice"));
+ $productPresentation->appendChild($productPresentationtype);
+
+ $productPresentationElementParameters = $xmldoc->createElement("windowsElementParameters");
+
+ $productPresentationInfo = $xmldoc->createElement('productInformations');
+
+ $productPresentationaction = $xmldoc->createElement('action');
+
+ $productPresentationactionName = $xmldoc->createElement('name');
+ $productPresentationactionName->appendChild($xmldoc->createTextNode("gaga.php"));
+ $productPresentationaction->appendChild($productPresentationactionName);
+
+ $productPresentationproductParameters = $xmldoc->createElement('parameters');
+ $productPresentationproductParameter = $xmldoc->createElement('parameter');
+ $productPresentationproductParameter->appendChild($xmldoc->createTextNode("test=2"));
+ $productPresentationproductParameters->appendChild($productPresentationproductParameter);
+ $productPresentationaction->appendChild($productPresentationproductParameters);
+
+ $productPresentationInfo->appendChild($productPresentationaction);
+
+ $productPresentationpictureUrl = $xmldoc->createElement('pictureUrl');
+ $productPresentationpictureUrl->appendChild($xmldoc->createTextNode("pictures/buttons/new-createvoicepresentation.png"));
+ $productPresentationInfo->appendChild($productPresentationpictureUrl);
+
+ $productPresentationvalue = $xmldoc->createElement('value');
+ $productPresentationvalue->appendChild($xmldoc->createTextNode("New Presentation"));
+ $productPresentationInfo->appendChild($productPresentationvalue);
+
+ $productPresentationdescription = $xmldoc->createElement('description');
+ $productPresentationdescription->appendChild($xmldoc->createTextNode(get_string('newVoicePresentation', 'voicetool')));
+ $productPresentationInfo->appendChild($productPresentationdescription);
+
+ $productPresentationElementParameters->appendChild($productPresentationInfo);
+
+ $productPresentation->appendChild($productPresentationElementParameters);
+
+ //---------
+
+ $windows->appendChild($productPresentation);
+
+ $root->appendChild($windows);
+
+ $xmldoc->appendChild($root);
+ $xmldoc->save('choice.xml');
+
+ $xmlstring = $xmldoc->saveXML(); // Xml datas into a string
+
+ $finalstring = str_replace("\n", '', $xmlstring);
+ echo $xmlstring;
+?>
\ No newline at end of file
Property changes on: trunk/moodle/mod/voicetool/displayChoicePage.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/voicetool/generateListPanel.php
===================================================================
--- trunk/moodle/mod/voicetool/generateListPanel.php (rev 0)
+++ trunk/moodle/mod/voicetool/generateListPanel.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -0,0 +1,154 @@
+<?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: Hazan Samy *
+ * *
+ * Date: October 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id$ */
+
+/// This page is to generate the list of VT
+
+ require_once("../../config.php");
+ require_once("lib.php");
+ // require_once("api.php");
+
+ // Variables needed
+ global $CFG;
+
+ if(empty($_POST)){
+ $params = $_GET;
+ }
+ else $params = $_POST;
+
+
+ //print_r($params);
+ $courseid = $params['enc_course_id'];
+ add_to_log("", "voicetool", "view", "test", $courseid);
+ // echo $courseid;
+/*
+
+ if(isteacher($courseid, $USER->id) ) {
+ $userid = liveclassroom_api_get_teacher_user_id($courseid);
+ $isteacher = 1;
+
+ }
+ else if (isstudent($courseid) ) {
+
+ $userid = liveclassroom_api_get_student_user_id($courseid);
+ $isteacher = 0;
+
+ }
+
+ if (!liveclassroom_init_session($params)) {
+ error("ExpiredSessionException");
+ }
+*/
+
+ $xmldoc = new DomDocument();
+
+ $root = $xmldoc->createElement('root');
+
+ $root->appendChild(voicetool_get_session_params($xmldoc,$params));
+
+ $windows = $xmldoc->createElement('windows');
+
+ //HEADER BAR
+ $windows->appendChild(voicetool_create_headerbar($xmldoc));
+
+
+ //TOOL BAR
+ $toolbar = $xmldoc->createElement('windowsElement');
+ $tbtype = $xmldoc->createElement('type');
+ $tbtype->appendChild($xmldoc->createTextNode("toolBar"));
+ $toolbar->appendChild($tbtype);
+
+ $tbelementParameters = $xmldoc->createElement("windowsElementParameters");
+
+ $menubar = $xmldoc->createElement('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')", ''));
+ //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', "", "", "", "",""));
+
+ $tbelementParameters->appendChild($menubar);
+ $toolbar->appendChild($tbelementParameters);
+
+ $windows->appendChild($toolbar);
+ /*
+ // MESSAGE BAR
+ if (isset($params['messageType'])) {
+ $windows->appendChild(liveclassroom_create_message($xmldoc, 'info', liveclassroom_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');
+
+ $products = $xmldoc->createElement('products');
+
+ // LIST PRODUCTS
+
+ $listProducts = $xmldoc->createElement('listProducts');
+
+ $listProducts->appendChild(voicetool_create_product_information($xmldoc,'1','','productType','Voice Boards'));
+ $listProducts->appendChild(voicetool_create_product_information($xmldoc,'2','','productType','Voice Presentations'));
+
+ $products->appendChild($listProducts);
+
+
+ // PRODUCTS CONTENT
+ $productContent = $xmldoc->createElement('productsContent');
+ $productContent->appendChild(voicetool_xml_list_voice_board($xmldoc,$courseid));
+
+ $products->appendChild($productContent);
+
+ $elementParameters->appendChild($products);
+
+ $list->appendChild($elementParameters);
+
+ $windows->appendChild($list);
+
+ $root->appendChild($windows);
+
+ $xmldoc->appendChild($root);
+ $xmldoc->save('list.xml');
+ $xmlstring = $xmldoc->saveXML(); // Xml datas into a string
+
+ $finalstring = str_replace("\n", '', $xmlstring);
+ echo $xmlstring;
+
+?>
\ No newline at end of file
Property changes on: trunk/moodle/mod/voicetool/generateListPanel.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Modified: trunk/moodle/mod/voicetool/index.php
===================================================================
--- trunk/moodle/mod/voicetool/index.php 2006-11-23 16:30:56 UTC (rev 99)
+++ trunk/moodle/mod/voicetool/index.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -30,11 +30,12 @@
/// This page lists all the instances of voicetools in a particular course
- require_once("../../config.php");
+ require_once("../../config.php");
require_once("lib.php");
- require_variable($id); // course
-
+ $id = optional_param('id', 0, PARAM_INT); // course
+ //$course = optional_param('course', 0, PARAM_INT);
+ $course = optional_param('course', 0, PARAM_INT);
if (! $course = get_record("course", "id", $id)) {
error("Course ID is incorrect");
}
@@ -60,51 +61,42 @@
/// Get all the appropriate data
- if (! $voicetools = get_all_instances_in_course("voicedirect", $course)) {
+ if (! $voicetools = get_all_instances_in_course("voicetool", $course)) {
notice("There are no voicetools", "../../course/view.php?id=$course->id");
die;
}
+
+ global $CFG;
-/// Print the list of instances (your module will probably extend this)
+
+ $url = voicetool_get_url_params($course->id);
+
+?>
- $timenow = time();
- $strname = get_string("name");
- $strweek = get_string("week");
- $strtopic = get_string("topic");
+ <head>
+ </head>
+<br>
+<body>
+<br>
- if ($course->format == "weeks") {
- $table->head = array ($strweek, $strname);
- $table->align = array ("CENTER", "LEFT");
- } else if ($course->format == "topics") {
- $table->head = array ($strtopic, $strname);
- $table->align = array ("CENTER", "LEFT", "LEFT", "LEFT");
- } else {
- $table->head = array ($strname);
- $table->align = array ("LEFT", "LEFT", "LEFT");
- }
+<div align="center">
+ <table height="95%">
+ <iframe src="welcome.php?id=<?php echo $id; ?>&<?php echo $url; ?>&time=<?php echo time() ?>" width="800" height="400" name="frameWidget" FRAMEBORDER=0 align="middle">
+ <p>Sorry your navigator can't display this iframe
- foreach ($voicetools as $voicetool) {
- if (!$voicetool->visible) {
- //Show dimmed if the mod is hidden
- $link = "<A class=\"dimmed\" HREF=\"view.php?id=$voicetool->coursemodule\">$voicetool->name</A>";
- } else {
- //Show normal if the mod is visible
- $link = "<A HREF=\"view.php?id=$voicetool->coursemodule\">$voicetool->name</A>";
- }
+ </iframe>
+</table>
+</div>
+
+</body>
- if ($course->format == "weeks" or $course->format == "topics") {
- $table->data[] = array ($voicedirect->section, $link);
- } else {
- $table->data[] = array ($link);
- }
- }
- echo "<BR>";
- print_table($table);
-/// Finish the page
- print_footer($course);
+<?php
+/// Finish the page
+
+ print_footer($course);
?>
Modified: trunk/moodle/mod/voicetool/lib.php
===================================================================
--- trunk/moodle/mod/voicetool/lib.php 2006-11-23 16:30:56 UTC (rev 99)
+++ trunk/moodle/mod/voicetool/lib.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -29,7 +29,8 @@
/* $Id$ */
require_once ('voicetoolapi.php');
-
+require_once($CFG->libdir.'/datalib.php');
+require_once($CFG->dirroot.'/course/lib.php');
/// Library of functions and constants for module voicetool
@@ -242,7 +243,7 @@
$result = new PairSet ();
- $result->addNameValuePair ('type', $VT_API_VDIRECT);
+ $result->addNameValuePair ('type', 'board');
$result->addNameValuePair ('title', $voicetool->name);
$result->addNameValuePair ('description', $voicetool->description);
$result->addNameValuePair ('email', $voicetool->email);
@@ -284,10 +285,10 @@
$rights = new PairSet ();
if (isteacher($voicetool->course)) {
- $rights->addNameValuePair ('profile', 'blackboard.voicetool.instructor');
+ $rights->addNameValuePair ('profile', 'moodle.voicetool.instructor');
}
else {
- $rights->addNameValuePair ('profile', 'blackboard.voicetool.student');
+ $rights->addNameValuePair ('profile', 'moodle.voicetool.student');
}
return array ('user' => $user->getData(),
@@ -296,4 +297,309 @@
'rights' => $rights->getData() );
}
-?>
+/**
+ * List all the board for the course given
+ * @param $courseId - the current course id
+ * @return the list of boards
+ */
+function voicetool_get_voiceBoard_list($courseId) {
+
+ if(!($board_list = get_records('voicetool','course',$courseId))) {
+ error( "Response get_board_list : query to database failed");
+ }
+ $result = array();
+ foreach($board_list as $board) {
+
+ if ($board->type == "board") array_push($result, $board);
+
+ }
+
+ return $result;
+}
+
+/**
+ * List all the voice direct for the course given
+ * @param $courseId - the current course id
+ * @return the list of voice direct
+ */
+function voicetool_get_voicePresentation_list($courseId) {
+
+ if(!($voicedirect_list = get_records('voicetool','course',$courseId))) {
+ error( "Response get_voicedirect_list : query to database failed");
+ }
+ $result = array();
+ foreach($voicedirect_list as $presentation) {
+
+ if ($presentation->type == "presentation") array_push($result, $presentation);
+
+ }
+ return $result;
+
+}
+
+function voicetool_get_all_tools_list($courseId) {
+
+ if(!($voicedirect_list = get_records('voicetool','course',$courseId))) {
+ error( "Response get_voicedirect_list : query to database failed");
+ }/*
+ $result = array();
+ foreach($voicedirect_list as $presentation) {
+
+ if ($presentation->type == "presentation") array_push($result, $presentation);
+
+ }*/
+ return $voicedirect_list;
+
+}
+
+
+/*
+* Create a header bar element
+*
+* @param $xmldoc : the DOM document
+*
+* Return a DOM document element which represent the header bar
+**/
+function voicetool_create_headerbar($xmldoc){
+ $headerbar = $xmldoc->createElement('windowsElement');
+
+ $hbtype = $xmldoc->createElement('type');
+ $hbtype->appendChild($xmldoc->createTextNode("headerBar"));
+ $headerbar->appendChild($hbtype);
+ $hbelementParameters = $xmldoc->createElement("windowsElementParameters");
+ $headerbarinformations = $xmldoc->createElement("headerBarInformations");
+ $hbstyle = $xmldoc->createElement("style");
+ $hbstyle->appendChild($xmldoc->createTextNode("headerBar"));
+ $headerbarinformations->appendChild($hbstyle);
+ $hbpictureUrl = $xmldoc->createElement("pictureUrl");
+ $hbpictureUrl->appendChild($xmldoc->createTextNode("pictures/items/headerbar-logo.png"));
+ $headerbarinformations->appendChild($hbpictureUrl);
+ $hbelementParameters->appendChild($headerbarinformations);
+
+ $headerbar->appendChild($hbelementParameters);
+
+ return $headerbar;
+}
+
+/*
+* Create a menu element
+*
+* @param $xmldoc : the DOM document
+* @params $p_... : parameters of the menu element
+*
+* Return a DOM document element which correspond to a menu element
+**/
+function voicetool_create_menu_element($xmldoc,$p_availibility, $p_type, $p_typeOfUser, $p_typeOfProduct, $p_pictureUrl, $p_value, $p_lcTypeAction, $p_lcNameAction){
+
+ $menuElement = $xmldoc->createElement('menuElement');
+
+ $type = $xmldoc->createElement('type');
+ $type->appendChild($xmldoc->createTextNode("$p_type"));
+ $menuElement->appendChild($type);
+
+ $typeOfProduct = $xmldoc->createElement('typeOfProduct');
+ $typeOfProduct->appendChild($xmldoc->createTextNode("$p_typeOfProduct"));
+ $menuElement->appendChild($typeOfProduct);
+
+ $availibility = $xmldoc->createElement('availibility');
+ $availibility->appendChild($xmldoc->createTextNode("$p_availibility"));
+ $menuElement->appendChild($availibility);
+
+ $typeOfUser = $xmldoc->createElement('typeOfUser');
+ $typeOfUser->appendChild($xmldoc->createTextNode("$p_typeOfUser"));
+ $menuElement->appendChild($typeOfUser);
+
+ $pictureUrl = $xmldoc->createElement('pictureUrl');
+ $pictureUrl->appendChild($xmldoc->createTextNode("$p_pictureUrl"));
+ $menuElement->appendChild($pictureUrl);
+
+ $value = $xmldoc->createElement('value');
+ $value->appendChild($xmldoc->createTextNode("$p_value"));
+ $menuElement->appendChild($value);
+
+ $lcAction = $xmldoc->createElement('action');
+ $lcActionName = $xmldoc->createElement('name');
+ $lcActionName->appendChild($xmldoc->createTextNode("$p_lcTypeAction"));
+
+ $lcAction->appendChild($lcActionName);
+ $lcActionParameters = $xmldoc->createElement('parameters');
+
+ $lcActionParameter = $xmldoc->createElement('parameter');
+ $lcActionParameter->appendChild($xmldoc->createTextNode("$p_lcNameAction"));
+ $lcActionParameters->appendChild($lcActionParameter);
+
+ $lcAction->appendChild($lcActionParameters);
+
+ $lcAction->appendChild($lcActionParameters);
+
+
+ $menuElement->appendChild($lcAction);
+
+ $xmldoc->appendChild($menuElement);
+
+ return $menuElement;
+}
+/*
+* Create a product information element
+*
+* @param $xmldoc : the DOM document
+* @param $position : type of the element
+* @param $name : name of the element
+* @param $style : style of the element
+* @param $value : value of the element
+*
+* Return a DOM document element which correspond to a product information element
+**/
+function voicetool_create_product_information($xmldoc,$position,$name,$style,$value) {
+
+ $productInfo = $xmldoc->createElement('productInformations');
+
+ $productPosition = $xmldoc->createElement('position');
+ $productPosition->appendChild($xmldoc->createTextNode("$position"));
+ $productInfo->appendChild($productPosition);
+
+ $productName = $xmldoc->createElement('name');
+ $productName->appendChild($xmldoc->createTextNode("$name"));
+ $productInfo->appendChild($productName);
+
+ $productStyle = $xmldoc->createElement('style');
+ $productStyle->appendChild($xmldoc->createTextNode("$style"));
+ $productInfo->appendChild($productStyle);
+
+ $productValue = $xmldoc->createElement('value');
+ $productValue->appendChild($xmldoc->createTextNode("$value"));
+ $productInfo->appendChild($productValue);
+
+ return $productInfo;
+
+}
+
+function voicetool_xml_list_voice_board($xmldoc, $courseId) {
+
+ $list = voicetool_get_all_tools_list($courseId);
+ $listElements = $xmldoc->createElement('listElements');
+ //print_($list);
+
+ add_to_log("", "voicetool", "view", "size", sizeof($list));
+ foreach ($list as $board) {
+
+ $element = $xmldoc->createElement('listElement');
+ $roomParameters = $xmldoc->createElement('listElementParameters');
+
+ $type = $xmldoc->createElement('typeOfElement');
+ $type->appendChild($xmldoc->createTextNode("VoiceBoard"));
+ $roomParameters->appendChild($type);
+ $position = $xmldoc->createElement('position');
+ if($board->type == "board"){
+ $position->appendChild($xmldoc->createTextNode("1"));
+ }
+ else if($board->type == "presentation"){
+ $position->appendChild($xmldoc->createTextNode("2"));
+ }
+
+ $roomParameters->appendChild($position);
+
+ $longname = $xmldoc->createElement('nameDisplay');
+ $longname->appendChild($xmldoc->createTextNode($board->name));
+ $roomParameters->appendChild($longname);
+ $preview = $xmldoc->createElement('preview');
+ $preview->appendChild($xmldoc->createTextNode("available"));
+ $roomParameters->appendChild($preview);
+ $nid = $xmldoc->createElement('nid');
+ $nid->appendChild($xmldoc->createTextNode($board->id));
+ $roomParameters->appendChild($nid);
+ $rid = $xmldoc->createElement('rid');
+ $rid->appendChild($xmldoc->createTextNode($board->rid));
+ $roomParameters->appendChild($rid);
+ /*if ($roompreview=="1")
+ {
+ $preview->appendChild($xmldoc->createTextNode("unavailable"));
+ }
+ else
+ {
+ $preview->appendChild($xmldoc->createTextNode("available"));
+ }
+ */
+
+ $element->appendChild($roomParameters);
+ $listElements->appendChild($element);
+
+ }
+ $xmldoc->appendChild($listElements);
+
+
+
+ return $listElements;
+
+}
+
+/*
+* Give the parameters with the signature md5 to give to the frame
+* @param $courseid : the id of the current course
+* return a string with all the parameters to give to the url
+*/
+function voicetool_get_url_params($courseid) {
+
+ global $USER;
+
+ if (isstudent($courseid)) {
+ $role='Student';
+ }
+ else if (isteacher($courseid, $USER->id)) {
+ $role='Instructor';
+ }
+ $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;
+}
+
+
+
+/* Create a information element
+* @param $xmldoc : the DOM document to add the information element
+* @param $sessionParams : array with the url parameters
+* return a DOM Document element with the general information
+*/
+
+function voicetool_get_session_params($xmldoc, $sessionParams) {
+
+// General Information
+
+ $information = $xmldoc->createElement("information");
+
+ $firstName = $xmldoc->createElement("firstName");
+ $firstName->appendChild($xmldoc->createTextNode($sessionParams['enc_firstname']));
+ $lastName = $xmldoc->createElement("lastName");
+ $lastName->appendChild($xmldoc->createTextNode($sessionParams['enc_lastname']));
+ $role = $xmldoc->createElement("role");
+ $role->appendChild($xmldoc->createTextNode($sessionParams['enc_role']));
+ $email = $xmldoc->createElement("email");
+ $email->appendChild($xmldoc->createTextNode($sessionParams['enc_email']));
+ $timeOfLoad = $xmldoc->createElement("timeOfLoad");
+ $timeOfLoad->appendChild($xmldoc->createTextNode($sessionParams['time']));
+ $courseId = $xmldoc->createElement("courseId");
+ $courseId->appendChild($xmldoc->createTextNode($sessionParams['enc_course_id']));
+ if ($sessionParams['authToken'] != null) {
+ $authToken = $xmldoc->createElement("authToken");
+ $authToken->appendChild($xmldoc->createTextNode($sessionParams['authToken']));
+ }
+ $signature = $xmldoc->createElement("signature");
+ $signature->appendChild($xmldoc->createTextNode($sessionParams['signature']));
+
+ $information->appendChild($firstName);
+ $information->appendChild($lastName);
+ $information->appendChild($role);
+ $information->appendChild($email);
+ $information->appendChild($timeOfLoad);
+ $information->appendChild($courseId);
+ $information->appendChild($authToken);
+ $information->appendChild($signature);
+
+ return $information;
+
+ // END of General Information
+
+}
+
+?>
\ No newline at end of file
Modified: trunk/moodle/mod/voicetool/mod.html
===================================================================
--- trunk/moodle/mod/voicetool/mod.html 2006-11-23 16:30:56 UTC (rev 99)
+++ trunk/moodle/mod/voicetool/mod.html 2006-11-24 15:31:35 UTC (rev 100)
@@ -44,13 +44,28 @@
<input type="text" name="description" id="description" size="30" value="<?php p($form->description) ?>">
</td>
</tr>
+
<tr valign="top">
+ <td align="right"><label for="type"><?php echo get_string('type', 'voicetool') ?>:</label></td>
+ <td>
+ <select id="type" name="type">
+ <option value="board" <?php if ($form->type == 'voiceBoard') { echo 'selected';}?>><?php echo get_string ('voiceBoard', 'voicetool') ?></option>
+ <option value="presentation" <?php if ($form->type == 'voicePresentation') { echo 'selected';}?>><?php echo get_string ('voicePresentation', 'voicetool') ?></option>
+ </select>
+
+ </td>
+</tr>
+
+<tr valign="top">
<td align="right"><b><label for="quality"><?php echo get_string ('audioquality', 'voicetool') ?></label>:</b></td>
<td>
<select id="quality" name="quality">
<option value="spx_8_q3" <?php if ($form->quality == 'spx_8_q3') { echo 'selected';}?>><?php echo get_string ('basicquality', 'voicetool') ?></option>
<option value="spx_16_q4" <?php if ($form->quality == 'spx_16_q4') { echo 'selected';}?>><?php echo get_string ('standardquality', 'voicetool') ?></option>
<option value="spx_16_q6" <?php if ($form->quality == 'spx_16_q6') { echo 'selected';}?>><?php echo get_string ('goodquality', 'voicetool') ?></option>
+<option value="spx_32_q8" <?php if ($form->quality == 'spx_32_q8') { echo 'selected';}?>><?php echo get_string ('superiorquality', 'voicetool') ?></option>
+
+
</select>
</td>
</tr>
@@ -64,8 +79,8 @@
<!-- The following line for Moodle 1.5 prints the visibility setting form element -->
<?php print_visible_setting($form); ?>
<!-- and if your module uses groups you would also have -->
-<?php print_groupmode_setting($form); ?>
+
</table>
<input type="hidden" name="rid" value="<?php p($form->rid) ?>" />
@@ -78,6 +93,7 @@
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
+
<input type="submit" value="<?php print_string("savechanges") ?>" />
</center>
Modified: trunk/moodle/mod/voicetool/view.php
===================================================================
--- trunk/moodle/mod/voicetool/view.php 2006-11-23 16:30:56 UTC (rev 99)
+++ trunk/moodle/mod/voicetool/view.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -35,8 +35,8 @@
require_once('lib.php');
require_once('voicetoolapi.php');
- optional_variable($id); // Course Module ID, or
- optional_variable($a); // voicetool ID
+ $id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
+ $a = optional_param('a', 0, PARAM_INT); // voicetool ID
if ($id) {
if (! $cm = get_record("course_modules", "id", $id)) {
@@ -71,6 +71,7 @@
error(get_string ('cannotgetsession', 'voicetool'));
}
+ add_to_log($course->id, "voicetool", "view", "view.php?id=$cm->id", "fffff ");
/// Print the page header
Modified: trunk/moodle/mod/voicetool/voicetoolapi.php
===================================================================
--- trunk/moodle/mod/voicetool/voicetoolapi.php 2006-11-23 16:30:56 UTC (rev 99)
+++ trunk/moodle/mod/voicetool/voicetoolapi.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -28,7 +28,10 @@
/* $Id$ */
-require_once("$CFG->dirroot/lib/nusoap/nusoap.php");
+//WebService Client.
+require_once($CFG->libdir.'/soapadded/lib/nusoap.php');
+//require_once($CFG->dirroot.'/lib/soap/nusoap.php');
+//require_once("$CFG->dirroot./lib/soap/nusoap.php");
/// Library of functions and constants for the voicetool API
@@ -40,16 +43,24 @@
$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';
/**
@@ -64,23 +75,32 @@
global $CFG,
$VT_API_SERVICES,
$VT_API_CREATE_RESOURCE;
-
+
+ // print_r($resource_data);
+
+ // Set the WebService URL
$soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+ // Set the parameters to send to the WebService
$resource = array ($CFG->voicetool_adminusername,
$CFG->voicetool_adminpassword,
$resource_data);
- //print_r($resource);
+
+ //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;
}
@@ -97,24 +117,58 @@
$VT_API_SERVICES,
$VT_API_MODIFY_RESOURCE;
+
$soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
$resource = array ($CFG->voicetool_adminusername,
$CFG->voicetool_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 voicetool_api_message_exists ($rid, $mid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_MESSAGE_EXISTS;
+
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_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.
@@ -137,17 +191,115 @@
$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 voicetool_api_resource_exists ($rid) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_RESOURCE_EXISTS;
+
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_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 voicetool_api_get_resource($rid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_GET_RESOURCE;
+
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_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 voicetool_api_get_resources($ridtable) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_GET_RESOURCES;
+
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_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
@@ -176,10 +328,11 @@
$result = $soapclient->call($VT_API_CREATE_SESSION, $resource);
+ echo "create session".'<br>';
+ print_r ($result);
- //print_r ($result);
-
if (!voicetool_api_check_result ($result)) {
+
return false;
}
@@ -206,17 +359,19 @@
global $VT_API_SERVICES,
$VT_API_ALLOWEDDOCBASE;
+
$soapclient = new soapclient($server.$VT_API_SERVICES,true);
-
+
$resource = array ($login,
$password,
$url);
-
+
$result = $soapclient->call($VT_API_ALLOWEDDOCBASE, $resource);
//print_r($result);
if (!voicetool_api_check_result ($result)) {
+ add_to_log("", "voice tool", "", "", "result ".$result);
return voicetool_api_get_error_message ($result);
}
@@ -229,8 +384,55 @@
error('Return Value not Found');
}
+function voicetool_api_audio_exists ($rid, $mid) {
+
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_AUDIO_EXISTS;
+
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_adminpassword,
+ $rid,
+ $mid);
+ //print_r($resource);
+
+ $result = $soapclient->call($VT_API_AUDIO_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;
+}
+function voicetool_api_store_audio($rid, $mid, $audio, $filename) {
+ global $CFG,
+ $VT_API_SERVICES,
+ $VT_API_STORE_AUDIO;
+ $soapclient = new soapclient($CFG->voicetool_servername.$VT_API_SERVICES,true);
+
+ $resource = array ($CFG->voicetool_adminusername,
+ $CFG->voicetool_adminpassword,
+ $rid,
+ $mid,
+ $audio,
+ $filename);
+
+ $result = $soapclient->call($VT_API_STORE_AUDIO, $resource);
+}
+
////////// Helper Function, kind of private
/**
@@ -239,14 +441,18 @@
* @return true f $result does not contain an error code, false otherwise.
*/
function voicetool_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;
}
-
- if (voicetool_api_get_status_code($result) != 'ok') {
+ //$resultcode = voicetool_api_get_status_code($result);
+ if (voicetool_api_get_status_code($result) != 'ok') {
+ add_to_log("", "voice tool", "", "", "voicetool_api_check_result: not ok");
error_log( "voicetool_api_check_result: ".voicetool_api_get_error_message($result));
return false;
}
@@ -261,6 +467,7 @@
* @return string - the status code returned if any, or the empty string if none is found
*/
function voicetool_api_get_status_code ($result) {
+
foreach ($result['values'] as $values) {
if ($values['name'] == 'status_code') {
return $values['value'];
@@ -283,8 +490,21 @@
return '';
}
+function voicetool_api_get_options($resourceid) {
+
+ $result = voicetool_api_get_resource($resourceid) ;
+
+ foreach ($result['groups'] as $values) {
+ if ($values['name'] == 'options'){
+ return $values['pairSet'];
+ }
+ }
+
+
+}
+
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Added: trunk/moodle/mod/voicetool/welcome.php
===================================================================
--- trunk/moodle/mod/voicetool/welcome.php (rev 0)
+++ trunk/moodle/mod/voicetool/welcome.php 2006-11-24 15:31:35 UTC (rev 100)
@@ -0,0 +1,663 @@
+<?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: Hazan Samy *
+ * *
+ * Date: September 2006 *
+ * *
+ ******************************************************************************/
+
+/* $Id$ */
+
+/// This page is to display the widget - Voice Tools list
+
+
+
+ require_once("../../config.php");
+ require_once("lib.php");
+
+ $id = optional_param('id', 0, PARAM_INT);
+
+ $course = optional_param('course', 0, PARAM_INT);
+
+ global $CFG;
+
+ if (! $course = get_record("course", "id", $id)) {
+ error("Course ID is incorrect");
+ }
+
+ require_login($course->id);
+
+/*
+ if (!liveclassroom_init_session($_GET)) {
+ error("ExpiredSessionException");
+ }
+*/
+
+ //session_start();
+
+/// Get all required strings
+
+ $strvoicetools = get_string("modulenameplural", "voicetool");
+ $strvoicetool = get_string("modulename", "voicetool");
+
+
+// Get all the appropriate data
+
+ if (! $voicetools = get_all_instances_in_course("voicetool", $course)) {
+ notice("There are no voicetools", "../../course/view.php?id=$course->id");
+ die;
+ }
+?>
+<html>
+<head>
+<title>Wimba Voice Tools</title>
+<link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" />
+
+<script type="text/javascript" src='js/xmldom.js'></script>
+<script language="javascript" src="js/verif.js"></script>
+<script type="text/javascript" src="js/xml.js"></script>
+<script type="text/javascript" src="js/Hw.js"></script>
+<script language="javascript" src="js/General.js"></script>
+
+
+
+<script type="text/javascript">
+
+function getHTTPObject()
+{
+ var xmlhttp = false;
+
+ /* Compilation conditionnelle d'IE */
+ /*@cc_on
+ @if (@_jscript_version >= 5)
+ try
+ {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ }
+ catch (e)
+ {
+ try
+ {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ catch (E)
+ {
+ xmlhttp = false;
+ }
+ }
+ @else
+ xmlhttp = false;
+ @end @*/
+
+ /* on essaie de cr\xE9er l'objet si ce n'est pas d\xE9j\xE0 fait */
+ if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
+ {
+ try
+ {
+ xmlhttp = new XMLHttpRequest();
+ }
+ catch (e)
+ {
+ xmlhttp = false;
+ }
+ }
+
+ if (xmlhttp)
+ {
+ /* on d\xE9finit ce qui doit se passer quand la page r\xE9pondra */
+ xmlhttp.onreadystatechange=function()
+ {
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+
+ /*alert(xmlhttp.responseText);
+ Traitement de la r\xE9ponse.
+ Ici on affiche la r\xE9ponse dans une bo\xEEte de dialogue.
+ */
+ studentView=false;
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ manageXml("");
+
+ }
+ }
+ }
+ return xmlhttp;
+}
+
+
+function ChangeView()
+{
+ if( document.getElementById("view").value=="student")
+ {
+ studentView=true;
+ }
+ else
+ {
+ studentView=false;
+ }
+ manageXml("","all");
+}
+
+function gestionDisplay(isfilter)
+{
+
+
+ if(numberMainLectureRoom>5 && isfilter==false)
+ {
+
+ document.getElementById("div1").style.height=5*19+"px";
+
+
+
+ document.getElementById("div1More").style.display="block";
+ document.getElementById("div1More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div1\",\""+numberMainLectureRoom+"\")'>"+(numberMainLectureRoom-5)+" more...</label>";
+
+ }else if(numberMainLectureRoom==0){
+ document.getElementById("div1").style.display="none";
+ document.getElementById("div1Title").style.display="none";
+ document.getElementById("div1More").style.display="none";
+
+ }else{
+
+ document.getElementById("div1").style.height=numberMainLectureRoom*19+"px";
+ document.getElementById("div1More").style.display="none";
+
+ }
+
+ if(numberBreakoutRoom>5 && isfilter==false)
+ {
+ document.getElementById("div2").style.height=5*19+"px";
+ document.getElementById("div2More").style.display="block";
+ document.getElementById("div2More").innerHTML="<table><tr><td><label class='moreRoom' onclick='displayAllDiv(\"div2\",\""+numberBreakoutRoom+"\")'>"+(numberBreakoutRoom-5)+" more...</label></td></tr></table>";
+
+
+
+
+ }else if(numberBreakoutRoom==0){
+ document.getElementById("div2").style.display="none";
+ document.getElementById("div2Title").style.display="none";
+ document.getElementById("div2More").style.display="none";
+
+ }else{
+
+ document.getElementById("div2").style.height=numberBreakoutRoom*19+"px";
+ document.getElementById("div2More").style.display="none";
+ }
+
+ if(numberVoiceBoard>5 && isfilter==false)
+ {
+ document.getElementById("div3").style.height=5*19+"px";
+ document.getElementById("div3More").style.display="block";
+ document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>";
+
+
+
+
+ }else if(numberVoiceBoard==0){
+ document.getElementById("div3").style.display="none";
+ document.getElementById("div3Title").style.display="none";
+ document.getElementById("div3More").style.display="none";
+
+ }else{
+
+ document.getElementById("div3").style.height=numberVoiceBoard*19+"px";
+ document.getElementById("div3More").style.display="none";
+ }
+
+ if(numberVoicePresentation>5 && isfilter==false)
+ {
+
+ document.getElementById("div4").style.height=5*19+"px";
+ document.getElementById("div4More").style.display="block";
+ document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>";
+
+
+
+ }else if(numberVoicePresentation==0 && isfilter==false){
+ document.getElementById("div4").style.display="none";
+ document.getElementById("div4Title").style.display="none";
+ document.getElementById("div4More").style.display="none";
+
+ }
+ else{
+ document.getElementById("div4").style.height=numberVoicePresentation*19+"px";
+ document.getElementById("div4More").style.display="none";
+ }
+
+
+}
+
+
+ function execAction(lcAction,VtAction){
+
+
+ eval(lcAction);
+
+ }
+
+
+
+
+var session=new Array();
+var timeOfLoad="";
+var currentFilter='all';
+var numberOfProduct=4;
+var currentId="";
+var currentProduct="";
+var currentDiv=0;
+var numberMainLectureRoom=0;
+var numberBreakoutRoom=0;
+var numberVoiceBoard=0;
+var numberVoicePresentation=0;
+var studentView=false;
+
+var typeSelect="mainLectureRoom";
+var numberArchive=new Array();
+// xml
+
+var objDom;
+var objDomTree;
+
+
+
+function createSession(informations){
+ session["timeOfLoad"] = informations[0].getElements("timeOfLoad")[0].getText();
+ session["courseId"] = informations[0].getElements("courseId")[0].getText();
+ session["firstName"] = informations[0].getElements("firstName")[0].getText();
+ session["lastName"] = informations[0].getElements("lastName")[0].getText();
+ session["email"] = informations[0].getElements("email")[0].getText();
+ session["signature"] = informations[0].getElements("signature")[0].getText();
+ session["role"] = informations[0].getElements("role")[0].getText();
+ if(informations[0].getElements("authToken")!="")
+ session["authToken"] = informations[0].getElements("authToken")[0].getText();
+ if(informations[0].getElements("vtServerUrl")!="")
+ session["vtServerUrl"] = informations[0].getElements("vtServerUrl")[0].getText();
+ if(informations[0].getElements("lcServerUrl")!="")
+ session["lcServerUrl"] = informations[0].getElements("lcServerUrl")[0].getText();
+
+}
+
+
+
+function redirection(url){
+ window.location=url;
+
+}
+
+
+
+
+function initDisplay(){
+ var display="<table cellspacing='0' cellpadding='0' width='100%' border='0' align='center' id='MainTable'>"
+
+ return display;
+}
+function openDiv(id,style){
+ var display="<tr><td><div id='"+id+"' class="+style+">";
+ return display;
+}
+function closeDiv(){
+ var display="</div></td></tr>";
+ return display;
+}
+
+function closeDisplay(){
+ var display="</td></tr></table>";
+ return display;
+}
+
+function closeDivProduct(position){
+ var display="";
+ display+="</table></div></td></tr></table></div>";
+ return display
+}
+
+
+
+
+
+function displayAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+
+ document.getElementById(name).style.height=number*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='RemoveAllDiv(\""+name+"\",\""+number+"\")'>Show Top 5...</label>";
+
+}
+function RemoveAllDiv(name,number){
+ if(currentId!="")
+ document.getElementById(currentId).style.backgroundColor="white";
+currentId="";
+ document.getElementById(name).style.height=5*19+"px";
+ document.getElementById(name+"More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\""+name+"\",\""+number+"\")'>"+(number-5)+" more...</label>";
+
+}
+function createAction(action){
+if(action!="") {
+ return "\"javascript:"+action[0].getElements("name")[0].getText()+"('"+action[0].getElements("parameters")[0].getText()+"')\"";
+}
+return "";
+}
+
+
+
+
+
+
+
+/*
+
+
+function getSessionParameters(){
+
+xmlhttp.open("GET", 'getSessionParameters.php',true);
+
+xmlhttp.onreadystatechange=sessionManagement;
+xmlhttp.send(null);
+
+
+}
+*/
+function sessionManagement(){
+
+ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */
+ {
+
+ objDom=new XMLDoc(xmlhttp.responseText, null);
+ objDomTree = objDom.docNode;
+
+ //session management
+ var information= objDomTree.getElements("information");
+ if(information!="")
+ createSession(information);
+
+
+ DisplayFirstPage()
+ }
+}
+
+function getURLParameters()
+{
+ var sURL = window.document.URL.toString();
+ var params="";
+ if (sURL.indexOf("?") > 0)
+ {
+ var arrParams = sURL.split("?");
+
+ var arrURLParams = arrParams[1].split("&");
+
+ var arrParamNames = new Array(arrURLParams.length);
+ var arrParamValues = new Array(arrURLParams.length);
+
+ var i = 0;
+ for (i=0;i<arrURLParams.length;i++)
+ {
+ var sParam = arrURLParams[i];
+ arrParamNames[i] = sParam[0];
+ if (sParam[1] != "")
+ params += "&"+unescape(sParam);
+
+ }
+ params=params.substring(1,params.length)
+ }
+
+ return params;
+}
+
+function DisplayFirstPage(){
+
+/* Cr\xE9ation de l'objet : */
+
+
+/* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+xmlhttp.open("POST", 'generateListPanel.php',true);
+/* Effectue la requ\xEAte : */
+xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ xmlhttp.onreadystatechange=Management;
+xmlhttp.send(getURLParameters())
+
+
+}
+
+function DisplayChoicePage(){
+
+xmlhttp.open("GET", 'displayChoicePage.php?teacherid=<?php echo $teacherid; ?>&courseid=<?php echo $course->id; ?>&isteacher=<?php echo isteacher($course->id, $USER->id); ?>&usersession=<?php echo $usersession;?>',true);
+
+xmlhttp.onreadystatechange=ManagementNew;
+xmlhttp.send(getURLParameters())
+
+
+}
+function launchAjaxRequest(url,fonction,action,init){
+
+showPopup()
+
+ var parameters="";
+ if(currentProduct != "" )
+ parameters="product="+currentProduct+"&"
+
+ if( currentId != "")
+ parameters+="id="+currentId+"&"
+ if(action!="")
+ parameters+="action="+action+"&";
+
+ if(init=="true")
+ currentId = ""
+ /* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
+ xmlhttp.open("GET", url+'?'+parameters+'time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'',true);
+ /* Effectue la requ\xEAte : */
+ xmlhttp.onreadystatechange=eval(fonction);
+ //alert(currentId);
+ xmlhttp.send(null);
+}
+
+
+function launchNew(url,fonction,action,product){
+
+ currentProduct = product;
+
+ launchAjaxRequest(url,fonction,action,"true");
+}
+
+
+function Affiche_forms() {
+
+ // Fonction qui affiche le nom de tous les formulaires
+ // et de tous les les \xE9l\xE9ments d'un document HTML
+ // Boucle tous les formulaire
+ for (var i = 0; i < document.forms.length; i++) {
+
+ // Affiche le nom ou la propri\xE9t\xE9 name du formulaire i
+ alert(document.forms[i].name+"<br />"+document.forms[i].value);
+
+ // Boucle tous les \xE9l\xE9ments du formulaire i
+ for (var l = 0; l < document.forms[i].elements.length; l++) {
+
+ // Affiche le nom ou la propri\xE9t\xE9 name de l'\xE9l\xE9ment l
+ alert("- "+document.forms[i].elements[l].name+"<br />");
+ }
+ }
+}
+
+function getFormVariables(){
+
+ var formvars='';
+
+ if(document.getElementsByName('myform')!=null){
+ var childElements=document.getElementsByName('myform')[0].childNodes;
+
+ for(var i=0;i<childElements.length;i++){
+//alert(childElements[i].nodeName)
+
+
+ }
+
+
+
+ formvars=formvars.substring(0,formvars.length-1);
+}
+ return formvars;
+
+}
+
+function displayNew(){
+ if (xmlhttp.readyState == 4) /* 4 : \xE9ta...
[truncated message content] |
|
From: <sh...@us...> - 2006-11-23 16:31:07
|
Revision: 99
http://svn.sourceforge.net/hw4mdl/?rev=99&view=rev
Author: shazan
Date: 2006-11-23 08:30:56 -0800 (Thu, 23 Nov 2006)
Log Message:
-----------
new style for the message added
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/js/xml.js
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-11-23 10:23:26 UTC (rev 98)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-11-23 16:30:56 UTC (rev 99)
@@ -580,7 +580,7 @@
* Modify the settings of a room
* @param $roomid : the id of the room
* return true if the room has being modified, false otherwise
-* TO CHECK !!!!!
+* return true if the room has being modified, false otherwise
*/
function liveclassroom_api_modify_room($roomid,$table_attributes) {
global $CFG;
@@ -775,7 +775,7 @@
/*
* Give the rights for a lecture room to the room given
* @param $roomid : the id of the room to modifiy the settings
-* TO CHECK !!!!!
+*
*/
function liveclassroom_api_give_lectureroom_attributes() {
@@ -803,7 +803,7 @@
/*
* Give the rights for a breackout room to the room given
* @param $roomid : the id of the room to modifiy the settings
-* TO CHECK !!!!!
+*
*/
function liveclassroom_api_give_discussionroom_attributes() {
global $CFG;
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-11-23 10:23:26 UTC (rev 98)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-11-23 16:30:56 UTC (rev 99)
@@ -363,4 +363,8 @@
{
width:100%;
border-bottom: #818181 1px solid;
+ }
+ .messageBar
+ {
+ background-color:#ffff99;
}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-11-23 10:23:26 UTC (rev 98)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-11-23 16:30:56 UTC (rev 99)
@@ -190,10 +190,17 @@
{
$parameters['checked']=true;
}
+
$linepart = $xmldoc->createElement('panelLinePart');
- $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"all","input", $parameters));
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
$panelLine->appendChild($linepart);
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
+
+ $linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
+ $panelLine->appendChild($linepart);
+
+
$linepart->appendChild(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) ));
$panelLine->appendChild($linepart);
Modified: trunk/moodle/mod/liveclassroom/js/xml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/xml.js 2006-11-23 10:23:26 UTC (rev 98)
+++ trunk/moodle/mod/liveclassroom/js/xml.js 2006-11-23 16:30:56 UTC (rev 99)
@@ -216,8 +216,8 @@
break;
}
- display="<table cellspacing=0 cellpadding=0 bgcolor='yellow'>"
- display+= "<tr >"
+ display="<table cellspacing=0 cellpadding=0>"
+ display+= "<tr>"
display+= "<td><img src='pictures/items/messagelabel-info.png'></td>"
display+= "<td>"+messageInformations[0].getElements("value")[0].getText()+"</td>";
display+= "</tr>"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-11-23 10:23:29
|
Revision: 98
http://svn.sourceforge.net/hw4mdl/?rev=98&view=rev
Author: shazan
Date: 2006-11-23 02:23:26 -0800 (Thu, 23 Nov 2006)
Log Message:
-----------
lang file for liveclassroom
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-11-23 09:56:32 UTC (rev 97)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-11-23 10:23:26 UTC (rev 98)
@@ -41,14 +41,8 @@
$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['alert.submit'] = 'Are you sure these settings are correct?';
$string['liveclassroomtype'] = 'Room associated';
-//$string['basetype'] = 'Select a Room type';
-$string['lecturehall'] = 'Lecture Hall Room';
-$string['breackout'] = 'BreackOut Room';
$string['linksfor'] = 'Access Live Classrooms for ';
-$string['listroom'] = 'List of Rooms and Archives for ';
-$string['otherroom'] = 'Create Other Room Type...';
$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)';
@@ -69,4 +63,7 @@
$string['wizard.text2.2'] = 'setup wizard';
$string['wizard.text2.3'] = 'to make sure that your computer is ready to use the Live Classroom';
+$string['topicdisplay'] = 'Topic';
+$string['firstsection'] = 'Section 0';
+
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-11-23 09:56:33
|
Revision: 97
http://svn.sourceforge.net/hw4mdl/?rev=97&view=rev
Author: shazan
Date: 2006-11-23 01:56:32 -0800 (Thu, 23 Nov 2006)
Log Message:
-----------
Code complete commit
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/icon.gif
trunk/moodle/mod/liveclassroom/index.php
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/mod.html
trunk/moodle/mod/liveclassroom/welcome.php
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/js/General.js
trunk/moodle/mod/liveclassroom/js/verif.js
trunk/moodle/mod/liveclassroom/js/xml.js
trunk/moodle/mod/liveclassroom/pictures/backgrounds/
trunk/moodle/mod/liveclassroom/pictures/backgrounds/headerbar.png
trunk/moodle/mod/liveclassroom/pictures/backgrounds/toolbar.png
trunk/moodle/mod/liveclassroom/pictures/items/listitem-available.png
trunk/moodle/mod/liveclassroom/pictures/items/listitem-hide.png
trunk/moodle/mod/liveclassroom/pictures/items/listitem-show.png
trunk/moodle/mod/liveclassroom/pictures/items/listitem-unavailable.png
trunk/moodle/mod/liveclassroom/pictures/items/messagelabel-info.png
trunk/moodle/mod/liveclassroom/pictures/items/wheel-03.gif
trunk/moodle/mod/liveclassroom/pictures/minus.gif
trunk/moodle/mod/liveclassroom/pictures/plus.gif
trunk/moodle/mod/liveclassroom/pictures/tab.gif
trunk/moodle/mod/liveclassroom/pictures/tab_Select.gif
trunk/moodle/mod/liveclassroom/pictures/tab_disabled.gif
trunk/moodle/mod/liveclassroom/pictures/tab_over.gif
trunk/moodle/mod/liveclassroom/reports.php
Removed Paths:
-------------
trunk/moodle/mod/liveclassroom/accueil.php
trunk/moodle/mod/liveclassroom/create.php
trunk/moodle/mod/liveclassroom/manageRoom.php
Deleted: trunk/moodle/mod/liveclassroom/accueil.php
===================================================================
--- trunk/moodle/mod/liveclassroom/accueil.php 2006-11-23 09:50:48 UTC (rev 96)
+++ trunk/moodle/mod/liveclassroom/accueil.php 2006-11-23 09:56:32 UTC (rev 97)
@@ -1,916 +0,0 @@
-<?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$ */
-
-/// This page lists all the instances of liveclassroom in a particular course
-
-
- require_once("../../config.php");
- require_once("lib.php");
-
- $id = optional_param('id', 0, PARAM_INT);
-
- $course = optional_param('course', 0, PARAM_INT);
- $roomname = optional_param('idroomname', 0, PARAM_TEXT);
- //$roomid = optional_param('idroom', 0, PARAM_TEXT);
-
- if (! $room = get_record("liveclassroom", "course", $id)) {
- error("Course ID is incorrect");
- }
-
- //$id = require_param('id', 0, PARAM_INT);
- //require_variable($id); // course
- global $CFG;
-
- if (! $course = get_record("course", "id", $id)) {
- error("Course ID is incorrect");
- }
-
- require_login($course->id);
-
- add_to_log($course->id, "liveclassroom", "view all", "index.php?id=$course->id", "");
-
-
-/// Get all required strings
-
- $strliveclassrooms = get_string("modulenameplural", "liveclassroom");
- $strliveclassroom = get_string("modulename", "liveclassroom");
-
- if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
- error ("Cannot create session");
- }
-
-/// Print the header
-
- if ($course->category) {
- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
- }
-
- // print_header("$course->shortname: $strliveclassrooms", "$course->fullname", "$navigation $strliveclassrooms", "", "", true, "", navmenu($course));
-
-/// Get all the appropriate data
-
- if (! $liveclassrooms = get_all_instances_in_course("liveclassroom", $course)) {
- notice("There are no liveclassrooms", "../../course/view.php?id=$course->id");
- die;
- }
-?>
- <head>
- <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 type="text/javascript">
-var hidestatus = new Array();
-function hideArchive(id)
-{
- if(hidestatus[id]==null)//first use
- hidestatus[id]=1;
- if (hidestatus[id]==1)
- {
- document.getElementById(id).style.display="block";
- document.images['toggleimg'+id].src="pictures/minus.gif";
- hidestatus[id]=0;
- }
- else
- {
- document.getElementById(id).style.display="none";
- document.images['toggleimg'+id].src="pictures/plus.gif";
- hidestatus[id]=1;
- }
-}
-var TampNumberMainLectureRoom=0;
-var TampNumberBreakoutRoom=0;
-var TampNumberOrphanedRoom=0;
-function hideBloc(id)
-{
-
- if(hidestatus[id]==null)//first use
- hidestatus[id]=0;
- if (hidestatus[id]==1)
- {
- document.getElementById(id).style.display="block";
- //document.images['toggleimg'+id].src="<%=Setup.getInstance().getLcServerURL()%>/images/integration/small_collapse.gif";
- document.images['toggleimg'+id].src="pictures/small_collapse.gif";
- hidestatus[id]=0;
- if(id=='orphaned'){
-
- NumberOrphanedRoom=TampNumberOrphanedRoom;
- }
- else if(id=='breakout'){
-
- NumberBreakoutRoom=TampNumberBreakoutRoom;
- }
- else if(id=='main'){
-
- NumberMainLectureRoom=TampNumberMainLectureRoom;
- }
- }
- else
- {
- document.getElementById(id).style.display="none";
- document.images['toggleimg'+id].src="pictures/small_expand.gif";
- hidestatus[id]=1;
- if(id=='orphaned'){
- TampNumberOrphanedRoom=NumberOrphanedRoom;
- NumberOrphanedRoom=0;
- }
- else if(id=='breakout'){
- TampNumberBreakoutRoom=NumberBreakoutRoom;
- NumberBreakoutRoom=0;
- }
- else if(id=='main'){
- TampNumberMainLectureRoom=NumberMainLectureRoom;
- NumberMainLectureRoom=0;
- }
- }
- // gestionDisplay('collapse');
-}
-function Navigateur()
-{
- if (navigator.appName.indexOf("Netscape") > -1)
- {
- return "Netscape";
- }
- if (navigator.appName.indexOf("Explorer") > -1)
- {
- return "Explorer";
- }
- return "Unknown";
-}
-var current="";
-function OneClick(id)
-{
- if(studentView==false)
- {
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- {
- document.getElementById('schedule_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/schedule.png', sizingMethod='scale')";
- document.getElementById('launch_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/launch.png', sizingMethod='scale')";
- document.getElementById('launch_icon_student').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/launch.png', sizingMethod='scale')";
- document.getElementById('settings_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/settings.png', sizingMethod='scale')";
- document.getElementById('content_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/content.png', sizingMethod='scale')";
- document.getElementById('poll_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/poll.png', sizingMethod='scale')";
- }
- else
- {
- document.images["launch_icon"].src="pictures/launch.png";
- document.images["schedule_icon"].src="pictures/schedule.png";
- document.images["settings_icon"].src="pictures/settings.png";
- document.images["content_icon"].src="pictures/content.png";
- document.images["poll_icon"].src="pictures/poll.png";
- }
- document.getElementById("menu_admin").className="button_enabled";
- }
- else
- {
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- {
- document.getElementById('launch_icon_student').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/launch.png', sizingMethod='scale')";
- }
- else
- {
- document.images["launch_icon_student"].src="pictures/launch.png";
- }
- document.getElementById("menu_student").className="button_enabled";
- }
- if(current!="" && current!=id)
- document.getElementById(current).style.backgroundColor="white";
- if(current!=id)
- {
- document.getElementById(id).style.backgroundColor="#c3dbf7";
- }
- current=id;
- if(document.getElementById("info")!=null && document.getElementById("info").style.display=="block")
- document.getElementById("info").style.display="none";
-}
-function dclick(id)
-{
- if(current!="")
- document.getElementById(current).style.backgroundColor="white";
- current=id;
-}
-function onOver(id)
-{
- if(current!=id)
- {
- document.getElementById(id).style.backgroundColor="#f0f3f5";
- document.getElementById(id).style.cursor="pointer";
- }
-}
-function onOut(id)
-{
- if(current!=id)
- document.getElementById(id).style.backgroundColor="white";
-}
-function Horizon(tok)
-{
- if(current!="")
- startHorizon(current, null, null, null, null, tok)
-}
-<?php if(isstudent($course->id))
-{
-?>
-
- var studentView=true;
- document.getElementById("admin_Menu").style.display="block";
- document.getElementById("student_Menu").style.display="none";
-<?php
-}
-else
-{
-?>
-
- var studentView=false;
- //document.getElementById("admin_Menu").style.display="none";
- //document.getElementById("student_Menu").style.display="block";
-<?php
-}
-?>
-function ChangeView()
-{
- if( document.getElementById("view").value=="student")
- {
- studentView=true;
-
- //document.getElementById("admin_Menu").style.display="none";
- //document.getElementById("student_Menu").style.display="block";
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- {
- document.getElementById('launch_icon_student').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/launch_Black.png', sizingMethod='scale')";
- }
- else
- {
- document.images["launch_icon_student"].src="pictures/launch_Black.png";
- }
- }
- else
- {
- studentView=false;
- //document.getElementById("admin_Menu").style.display="block";
- //document.getElementById("student_Menu").style.display="none";
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- {
- document.getElementById('schedule_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/schedule_Black.png', sizingMethod='scale')";
- document.getElementById('launch_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/launch_Black.png', sizingMethod='scale')";
- document.getElementById('settings_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/settings_Black.png', sizingMethod='scale')";
- document.getElementById('content_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/content_Black.png', sizingMethod='scale')";
- document.getElementById('poll_icon').style.filter=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pictures/poll_Black.png', sizingMethod='scale')";
- }
- else
- {
- document.images["launch_icon"].src="pictures/launch_Black.png";
- document.images["schedule_icon"].src="pictures/schedule_Black.png";
- document.images["settings_icon"].src="pictures/settings_Black.png";
- document.images["content_icon"].src="pictures/content_Black.png";
- document.images["poll_icon"].src="pictures/poll_Black.png";
- }
- }
- getMainLectureRoom("");
- getBreakoutRoom("");
- //getOrphanedArchive("");
- if(document.getElementById("info")!=null && document.getElementById("info").style.display=="block")
- document.getElementById("info").style.display="none";
- current="";
- //document.getElementById("menu_admin").className="button_disabled"
- //document.getElementById("menu_student").className="button_disabled";
-}
-
-function LaunchWizard(url)
-{
-var w = window.open(url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
-w.focus();
-}
-function doOpenIntern(popup,url){
- if(current!="")
- {
-
- if(popup==false)
- {
- window.open(url,"_top");
- }
- else
- {
- var w = window.open(url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
- w.focus();
- }
- }
-
-}
-function doOpen(popup,url,param)
-{
-
- if(current!="")
- {
- var complete_url=url+'?roomId='+current+'&'+param;
- if(popup==false)
- {
- window.open(complete_url,"_self");
- }
- else
- {
- var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
- w.focus();
- }
- }
-}
-function doOpenExtern(url,param)
-{
- if(current!="")
- {
- var complete_url=url+'?class_id='+current+'&'+param;
- var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500');
- w.focus();
- }
-}
-function hideCroix(v)
-{
- if(v.length>0)
- document.getElementById("croix").style.display="block";
- else
- document.getElementById("croix").style.display="none";
-}
-var hiddenCroix=0;
-function overCroix(v)
-{
- if(hiddenCroix==0)
- {
- v.src="pictures/x_normal.gif";
- hiddenCroix=1;
- }
- else
- {
- v.src="pictures/x_over.gif";
- hiddenCroix=0;
-
- }
-}
-function clickCroix()
-{
- document.getElementById("search").value="";
- document.getElementById("croix").style.display="none";
-}
-
-
-var NumberMainLectureRoom=0;
-var NumberBreakoutRoom=0;
-var NumberOrphanedRoom=0;
-function getMainLectureRoom(search)
-{
-
- <?php
- $tab = liveclassroom_get_main_room_list($course);
- ?>
- /*
- <%
- SortedList archiveOfThisRoomID;
- %>*/
- var retour="";
- NumberMainLectureRoom=0;
- var numberArchive=0;
- var number=0;
- retour += " <table width=990px cellspacing=0 cellpadding=1 border=0>";
- <?php for($i=0; $i<sizeof($tab[0]); $i++)
- {
- // print ($tab[0][$i]);
- ?>
- myString = new String("<?php p(liveclassroom_get_room_name_from_id($tab[0][$i])) ?>");
- mysearch=new String(search);
- mysearch=mysearch.toLowerCase();
- results = myString.match(mysearch)
- if(search==null || results!=null)
- {
- var preview;
- <?php
- if(!liveclassroom_api_room_is_preview($tab[0][$i]))
- {
- ?>
- preview=true;
- <?php
- }
- else
- {
- ?>
- preview=false;
- <?php
- }
- ?>
- if(studentView==false || ( studentView==true && !preview))
- {
- retour += "<tr id='<?php p($tab[0][$i]) ?>' Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\">"
-
- if(studentView==false)
- {
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"> </td>";
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"> </td>";
-
- }else{
-
- <?php /*
- if((openArchive[((LCRoom)mainLectureRoom.GetByIndex(i)).getRoomId()])!=null)
- {
- ?>
-
- numberArchive++;
-
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?')\"></td>";
- retour+="<td width=\"20px\" align=\"right\"><img src=\"pictures/plus.gif\" onclick=\"hideArchive('<?php p($tab[0][$i]) ?>hide')\" name=\"toggleimg<?php p($tab[0][$i]) ?>hide\" border=\"0\" alt=\"Expand/Collapse More Options\" /></td>";
-
- <?php
- }
- else
- {
- */?>
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"> </td>";
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"> </td>";
-
- }
- retour += "<td width=\"550px\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"><?php p(liveclassroom_get_room_name_from_id($tab[0][$i])) ?></td>";
- if(!preview)
- {
- if(studentView==false)
- {
- retour +="<td width=\"16px\" align=\"center\"><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=closeRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"16px\" align=\"center\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
-
- }
- else
- {
- if(studentView==false)
- {
- retour +="<td width=\"16px\" align=\"center\"><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=openRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"16px\" align=\"center\" Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
- }
- retour +="</td><td width='520px' Onclick=\"OneClick('<?php p($tab[0][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[0][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[0][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[0][$i]) ?>')\"></td></tr>";
-
- NumberMainLectureRoom++;
- }
- }
- <?php
- }
- ?>
- if(numberArchive>0){
-
- NumberMainLectureRoom++;
- }
-
- retour += "</table>";
- document.getElementById("main").innerHTML = retour;
- gestionDisplay();
- //if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- //correctPNG();
-}
-
-
-function getBreakoutRoom(search)
-{
-
- <?php
- $tab = liveclassroom_get_main_room_list($course);
- ?>
-
- var retour="";
- NumberBreakoutRoom=0;
- var numberArchive=0;
- var number=0;
- retour += " <table width=990px cellspacing=0 cellpadding=1 border=0>";
- <?php for($i=0; $i<sizeof($tab[1]); $i++)
- {
- ?>
-
- myString = new String("<?php p(liveclassroom_get_room_name_from_id($tab[1][$i])) ?>");
- mysearch=new String(search);
- mysearch=mysearch.toLowerCase();
- results = myString.match(mysearch)
- if(search==null || results!=null)
- {
- var preview;
- <?php
- if(!liveclassroom_api_room_is_preview($tab[1][$i]))
- {
- ?>
- preview=true;
- <?php
- }
- else
- {
- ?>
- preview=false;
- <?php
- }
- ?>
- if(studentView==false || ( studentView==true && !preview))
- {
- retour += "<tr id='<?php p($tab[1][$i]) ?>' Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\">"
- if(studentView==false)
- {
-
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"> </td>";
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"> </td>";
-
- }else{
-
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"> </td>";
- retour+="<td width=\"20px\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"> </td>";
-
-
- }
- retour += "<td width=\"550\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"><?php p(liveclassroom_get_room_name_from_id($tab[1][$i])) ?></td>";
- if(!preview)
- {
- if(studentView==false)
- {
- retour +="<td width=\"16px\" align=\"center\"><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=closeRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"16px\" align=\"center\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
-
-
- }
- else
- {
- if(studentView==false)
- {
- retour +="<td width=\"16px\" align=\"center\"><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=openRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"16px\" align=\"center\" Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<?php p($usersession)?>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
- }
- retour +="</td><td width='520px' Onclick=\"OneClick('<?php p($tab[1][$i]) ?>')\" Ondblclick=\"javascript:startHorizon('<?php p($tab[1][$i]) ?>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<?php p($tab[1][$i]) ?>')\" onmouseout=\"onOut('<?php p($tab[1][$i]) ?>')\"></td></tr>";
-
- NumberBreakoutRoom++;
- }
- }
- <?php
- }
- ?>
- if(numberArchive>0){
-
- NumberBreakoutRoom++;
- }
-
- retour += "</table>";
- document.getElementById("breakout").innerHTML = retour;
- gestionDisplay();
- // if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- // correctPNG();
-}
-
-function deleteRoom() {
-
-}
-
-/*
-function getOrphanedArchive(search)
-{
- NumberOrphanedRoom=0;
- var retour="";
- retour += " <table width=460px cellspacing=0 border=0 >";
- <% for(i=0; i<orphanedArchive.Count; i++)
- {
- %>
- myString = new String("<%=((LCRoom)orphanedArchive.GetByIndex(i)).getLongname().ToLower()%>");
- mysearch=new String(search);
- mysearch=mysearch.toLowerCase();
- results = myString.match(mysearch);
- if(search==null || results!=null)
- {
- var preview;
- <%if(((LCRoom)orphanedArchive.GetByIndex(i)).isPreview())
- {
- %>
- preview=true;
- <%
- }
- else
- {
- %>
- preview=false;
- <%
- }
- %>
- if(studentView==false|| ( studentView==true && !preview))
- {
- retour += "<tr id='<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>' Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\">";
- retour += "<td width=\"20px\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" ></td>";
- retour += "<td width=\"20px\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" ></td>";
-
- retour += "<td width=300px onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\">";
-
- retour += "<%=((LCRoom)orphanedArchive.GetByIndex(i)).getLongname()%></td>";
- if(!preview)
- {
- if(studentView==false)
- retour +="<td width=\"20px\" align=\"center\" ><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=closeRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- else
- retour +="<td width=\"20px\" align=\"center\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- }
- else
- {
- if(studentView==false)
- {
- retour +="<td width=\"20px\" align=\"center\" ><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=openRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"20px\" align=\"center\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
- }
- retour +="</td><td width='100px' Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchive.GetByIndex(i)).getRoomId()%>')\"></td></tr>";
- NumberOrphanedRoom++;
- }
- }
- <%
- }
- %>
- <% for(i=0; i<orphanedArchiveForStudent.Count; i++)
- {
- %>
- myString = new String("<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getLongname().ToLower()%>");
- mysearch=new String(search);
- mysearch=mysearch.toLowerCase();
- results = myString.match(mysearch);
- if(search==null || results!=null)
- {
- var preview;
- <%if(((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).isPreview())
- {
- %>
- preview=true;
- <%
- }
- else
- {
- %>
- preview=false;
- <%
- }
- %>
- if( studentView==true && !preview)
- {
- retour += "<tr id='<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>'><td width=\"10px\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" ></td><td onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\">";
- retour += "<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getLongname()%></td>";
- if(!preview)
- {
- if(studentView==false)
- retour +="<td width=\"20px\" align=\"center\" ><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=closeRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- else
- retour +="<td width=\"20px\" align=\"center\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\"><img src=\"pictures/online.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- }
- else
- {
- if(studentView==false)
- {
- retour +="<td width=\"20px\" align=\"center\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\"><a style='cursor:hand;' href=\"javascript:doOpen(false,'','time=<%=session.getTimeOfLoad()%>&<%=session.url_params %>action=openRoom&signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"";
- retour +="alt=\"Change Availibility\" title=\"Change Availability\"></a>";
- }
- else
- retour +="<td width=\"20px\" align=\"center\" Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\"><img src=\"pictures/away.png\" style=\"WIDTH: 16px; HEIGHT: 16px\" border=\"0\"></a>";
- }
- retour +="</td><td width='100px' Onclick=\"OneClick('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" Ondblclick=\"javascript:startHorizon('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>', null, null, null, null, 'hzA=<%=AuthToken%>')\" onmouseover=\"onOver('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\" onmouseout=\"onOut('<%=prefix+((LCRoom)orphanedArchiveForStudent.GetByIndex(i)).getRoomId()%>')\"></td></tr>";
- NumberOrphanedRoom++;
- }
- }
- <%
- }
- %>
- retour += "</table>";
- document.getElementById("orphaned").innerHTML = retour;
- gestionDisplay();
- if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5)
- correctPNG();
-}
-*/
-function gestionDisplay(type)
-{
-
-
-
-}
-
-</script>
-
-
- </head>
-<body>
-
-
-<table cellspacing="0" cellpadding="0" width="1000" border="0" align="center" id="TABLE1">
- <tr style="background-color: #f0f0f0">
- <td colspan="6" style="border-top:white 1px solid">
- <?php if (isstudent($course->id)){ ?>
- <span id="student_Menu">
- <table style="width: 1000" cellspacing="0" cellpadding="1" align="center">
- <tr class="button_disabled" id="menu_student">
- <td width="5px"></td>
- <td align="center" >
- <a href="javascript:Horizon('hzA=<?php p($usersession)?>');" >
- <img src="pictures/launch_Black.png" border="0" alt="Edit RoomSettings" title="Launch Room" id="launch_icon_student" name="launch_icon_student" height="24" width="24"><br />
- Launch
- </a>
- </td>
- <td width=50%></td>
- <td colspan="3" align="right" valign="middle" >
- <table border=0 style="background-image: url(pictures/searchfield.gif); background-repeat:no-repeat;">
- <tr>
- <td align="right" width=15px></td>
- <td align="right" width=105px height=25px>
- <input name="search" id="search" type="text" style="border:0; width: 105px;"
- onkeyup="hideCroix(search.value);javascript:getBreakoutRoom(search.value); getMainLectureRoom(search.value); getOrphanedArchive(search.value);" />
- </td>
- <td align=left width=20px >
- <div id="croix" style="display:none">
- <img onmouseover="overCroix(this)" Onclick="clickCroix();javascript:getBreakoutRoom(''); getMainLectureRoom(''); getOrphanedArchive('');" Onmouseout="overCroix(this)" src="pictures/x_normal.gif" align="middle" style="border:none " />
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </span>
- <?php
- }else if (isteacher($course->id, $USER->id))
- { ?>
- <span id="admin_Menu">
- <table style="width: 1000" cellspacing="0" cellpadding="1" align="center">
- <tr class="button_disabled" id="menu_admin" >
- <td width="9%" align="center" >
- <a href="javascript:Horizon('hzA=<?php p($usersession)?>');" >
- <img src="pictures/launch_Black.png" border="0" alt="Edit RoomSettings" title="Launch Room" id="launch_icon" name="launch_icon" height="24" width="24"><br />
- Launch</a>
-
- </td>
- <td width="9%" align="center" >
- <a href="javascript:window.open('../../course/mod.php?id=<?php p($course->id)?>§ion=0&sesskey=<?php echo sesskey(); ?>&add=liveclassroom','_top')" >
- <img src="pictures/launch_Black.png" border="0"
- alt="Edit RoomSettings" title="Add Activity" id="launch_icon" name="launch_icon" height="24" width="24"><br />
- Add Activity</a>
-
- </td>
- <td style="border-right: 1px solid #666666;"> </td>
- <td width="5px"></td>
- <td width="9%" align=center class="button_enabled">
-
- <a href="javascript:doOpen(false,'manageRoom.php','action=createRoom')" >
- <img src="pictures/new.png" border="0" alt="Calendar" title="New Room" id="Img1" height="24" width="24">
- <br />New Room</a>
- </td>
- <td width="5px"></td>
- <td width="9%" align="center" >
- <a href="javascript:doOpenExtern('<?php p($CFG->liveclassroom_servername)?>/admin/class/carousels.epl','hzA=<?php p($usersession)?>')" >
- <img src="pictures/content_Black.png" border="0"
- alt="Manage Content" title="Manage Content" id="content_icon" name="content_icon" height="24" width="24"><br />
- Content
- </a>
- </td>
- <td width="9%" align="center" >
- <!-- <a href="javascript:doOpen(true,'View_Report.aspx','hzA=<?php p($usersession)?>')" >
- --> <img src="pictures/poll_Black.png" border="0"
- alt="View Room Records" title="View Poll Results" id="poll_icon" name="poll_icon" height="24" width="24"><br />
- Poll</a>
- </td>
- <td style="border-right: 1px solid #666666;"> </td>
- <td width="9%" align="center" >
- <!-- <a href="javascript:doOpen(false,'AddCalendarEvent.aspx','time=<%=session.getTimeOfLoad() %>&<%=session.url_params %>signature=<%=Util.mD5Crypt(session.getSignature()+ Setup.getInstance().getHashKey())%>')" >
- --> <img src="pictures/schedule_Black.png" border="0" alt="Schedule"
- name="schedule_icon" title="Change Availability Room" id="schedule_icon" height="24" width="24" ><br />
- Availability</a>
- </td>
- <td width="9%" align="center" >
- <a href="javascript:doOpen(false,'manageRoom.php','action=editRoom')" >
- <img src="pictures/settings_Black.png" border="0"
- alt="Edit RoomSettings" title="Edit Room Settings" id="settings_icon" name="settings_icon" height="24" width="24"><br />
- Settings</a>
- </td>
-
-
- <td width="9%" align="center" >
- <a href="javascript:doOpen(false,'','')" onclick=";return confirm('Are you sure to delete this room ?');" >
- <img src="pictures/delete_Black.png" border="0"
- alt="Delete Room" title="Delete Room" id="delete_icon" height="24" width="24"><br />
- Delete</a>
- </td>
- <td colspan="3" align="right" valign="middle" >
- <table border=0 style="background-image: url(pictures/searchfield.gif); background-repeat:no-repeat;">
- <tr>
- <td align="right" width=15px></td>
- <td align="right" width=105px height=25px>
- <input name="search" id="search" type="text" style="border:0; width: 105px;"
- onkeyup="hideCroix(search.value);javascript:getBreakoutRoom(search.value); getMainLectureRoom(search.value); getOrphanedArchive(search.value);" />
- </td>
- <td align=left width=20px >
- <div id="croix" style="display:none">
- <img onmouseover="overCroix(this)" Onclick="clickCroix();javascript:getBreakoutRoom(''); getMainLectureRoom(''); getOrphanedArchive('');" Onmouseout="overCroix(this)" src="pictures/x_normal.gif" align="middle" style="border:none " />
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </span>
- <?php
- } ?>
- </td>
- </tr>
- <tr>
- <td colspan="15" style="background-color: #c9d2df;">
- <div id="main_title">
- <a href="javascript:hideBloc('main')" title="Expand/Collapse Archive List">
- <img src="<?php p($CFG->liveclassroom_servername)?>/images/integration/small_collapse.gif" name="toggleimgmain"
- border="0" alt="Expand/Collapse More Options" />
- <strong style="color: white">Main rooms:
- </a></strong>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="15" >
- <div id="main" style=" overflow-y:auto;overflow-x: hidden;width:100%;" >
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="15" style="background-color: #c9d2df; " >
- <div id="breakout_title">
- <a href="javascript:hideBloc('breakout')" title="Expand/Collapse Archive List">
- <img src="<?php p($CFG->liveclassroom_servername)?>/images/integration/small_collapse.gif" name="toggleimgbreakout"
- border="0" alt="Expand/Collapse More Options" /></a><strong style="color: white"> Discussion rooms:
- </strong></div>
- </td>
- </tr>
- <tr>
- <td colspan="15" >
- <div id="breakout" style=" overflow-y:auto;overflow-x: hidden;width:100%" >
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="8" style="background-color: #c9d2df; " >
- <div id="orphaned_title" >
-
- <a href="javascript:hideBloc('orphaned')" title="Expand/Collapse Archive List">
- <img src="<?php p($CFG->liveclassroom_servername)?>/images/integration/small_collapse.gif" name="toggleimgorphaned"
- border="0" alt="Expand/Collapse More Options" /></a><strong style="color: white"> Orphaned archives:
- </strong>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="8" >
- <div id="orphaned" style=" overflow-y: auto;overflow-x: hidden;width:100%" >
- </div>
- </td>
- </tr>
-</table>
-
-</body>
-<script>
-
- getMainLectureRoom();
- getBreakoutRoom();
- //getOrphanedArchive();
-
-
-
- <?php if (isstudent($course->id)){ ?>/*
- document.getElementById("admin_Menu").style.display="none";
- document.getElementById("student_Menu").style.display="block";
- <?php }else { ?>
- document.getElementById("admin_Menu").style.display="block";
- document.getElementById("student_Menu").style.display="none";
- <?php } ?>
-</script>
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-11-23 09:50:48 UTC (rev 96)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-11-23 09:56:32 UTC (rev 97)
@@ -42,6 +42,7 @@
*/
require_once('System.php');
+require_once('lib.php');
$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix();
@@ -64,7 +65,7 @@
$LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD";
-session_start();
+//session_start();
/**
@@ -100,11 +101,8 @@
"&credential_0=". $login.
"&credential_1=". $passwd;
- add_to_log("", "liveclassroom", "", "", "auth ".time());
-
+ //add_to_log("", "liveclassroom", "", "", "auth ".time());
- //add_to_log("", "liveclassroom", "", "liveclassroom_api_authenticate", "URL Sent: $url");
- //add_to_log("", "liveclassroom", "", "", "Creating Auth Cookie in: ".dirname(__FILE__).'/cookie.txt');
$cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
$cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
@@ -155,6 +153,7 @@
if(file_exists($cook)) {
$fileContent = file_get_contents($cook);
+
}
else {
$lastModifTime = 0;
@@ -190,6 +189,7 @@
return $data;
}
+
@@ -275,11 +275,13 @@
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
+ add_to_log("", "liveclassroom", "", "liveclassroom_api_get_session", "userid: ".$userid." nickname ". $nickname);
+
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
if ( $respcode != 100) {
- //error( "Response: Cannot Create Session: $resp_code");
+ error( "Response: Cannot Create Session: $resp_code");
return false;
}
@@ -311,21 +313,23 @@
* Create a room on the LC server
* @param $roomid : id of the room created
* @param $roomname : name of the room created
+* return true if the room is created on the server, false otherwise
*/
-function liveclassroom_api_create_class ($roomid, $roomname,$bool) {
+function liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes) {
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
$LIVECLASSROOM_API_FUNCTION_CREATE_CLASS;
- if($bool==true){ //lecture room
- $attributes = "&target=$roomid&longname=$roomname&preview=0&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1&archive=0&can_archive=1";
+ unset($attributes['longname']);
+ while (list($key, $val) = each($attributes)) {
+ if(($key!='class_id')&&(isset($val))&&($val!="")){
+ $list_attributes .= "&".$key."=".$val;
+ }
}
- else { //discussion room
- $attributes = "&target=$roomid&longname=$roomname&preview=0&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1&archive=0&can_archive=1&can_liveshare=1&can_ppt_import=1";
- }
-
- $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$attributes);
- //add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "apres query".time());
+ $final_list = "&target=$roomid"."&longname=$roomname".$list_attributes;
+// echo $final_list;
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$final_list);
+ add_to_log("", "liveclassroom", "", "liveclassroom_api_create_class", "apres query".$roomname);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -342,6 +346,13 @@
}
+/*
+* Add a role to a user for a room given
+* @param $roomid : id of the room on the server
+* @param $userid : id of the user on the server
+* @param $role : role of the user for the room
+* return true if the role is added, false otherwise
+*/
function liveclassroom_api_add_user_role ($roomid, $userid, $role) {
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
@@ -362,7 +373,13 @@
return true;
}
-
+/*
+* Remove a role to a user for a room given
+* @param $roomid : id of the room on the server
+* @param $userid : id of the user on the server
+* @param $role : role of the user for the room
+* return true if the role is removed, false otherwise
+*/
function liveclassroom_api_remove_user_role ($roomid, $userid, $role) {
global $CFG;
global $LIVECLASSROOM_API_ADMIN,
@@ -405,9 +422,8 @@
/**
* Check if a room exist on the server
-*
-* @param roomname
-* Return a boolean : true if the room exist, false if not!
+* @param roomname
+* return true if the room exist, false otherwise
*/
function liveclassroom_api_room_exist($roomname) {
@@ -454,7 +470,7 @@
/**
* Get the room id from a roomname
-* @params $roomname
+* @param $roomname
* return the room_id from the server
*/
@@ -489,6 +505,7 @@
* delete Room from the server
*
* @param roomid : id of the to delete
+ * return true if the room is deleted, false otherwise
*/
function liveclassroom_api_delete_room($roomid) {
global $CFG;
@@ -510,6 +527,7 @@
* Open Room on the LC server
*
* @param roomid : id of the room to open
+ * return true if the room has being opened, false otherwise
*/
function liveclassroom_api_open_room($roomid) {
global $CFG;
@@ -535,6 +553,7 @@
* Close Room on the LC server
*
* @param roomid : id of the room to close
+ * return true if the room has being closed, false otherwise
*/
function liveclassroom_api_close_room($roomid) {
global $CFG;
@@ -560,7 +579,7 @@
/*
* Modify the settings of a room
* @param $roomid : the id of the room
-*
+* return true if the room has being modified, false otherwise
* TO CHECK !!!!!
*/
function liveclassroom_api_modify_room($roomid,$table_attributes) {
@@ -568,19 +587,15 @@
global $LIVECLASSROOM_API_ADMIN;
global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM;
- //echo sizeof($table_attributes);
+
while (list($key, $val) = each($table_attributes)) {
- if($key=='class_id'){
+ if(($key!='class_id')&&(isset($val))&&($val!="")){
+ $list_attributes .= "&".$key."=".$val;
}
- else $list_attributes .= "&".$key."=".$val;
}
-// echo $list_attributes;
-
+ $final_list = "&target=$roomid".$list_attributes;
- $final_list = "&target=$roomid".$list_attributes;
- //echo $final_list;
-
$data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $final_list);
preg_match("(\d*)", $data, $matches);
@@ -602,7 +617,8 @@
* List all the archive room associated with the room given
*
* @param $roomid : the id of the room
-* return a table with all the archive room id
+* @param $userid : the id of the user
+* return an array with all the archive room id
*/
function liveclassroom_api_get_archive_list_for_a_room($roomid,$userid) {
global $CFG;
@@ -640,6 +656,88 @@
}
/*
+* List all the open archive room associated with the room given
+*
+* @param $roomid : the id of the room
+* @param $userid : the id of the user
+* return an array with all the archive room id
+*/
+function liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid) {
+ global $CFG;
+ global $LIVECLASSROOM_API_ADMIN;
+ global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
+ global $LIVECLASSROOM_API_RECORD_SEPERATOR;
+
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&filter02=preview&filter02value=1&AccessUser=$userid");
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $data;
+
+
+ $line = explode ("\n",$data);
+
+ $j=0;
+
+ for($i=1;$i<sizeof($line)-2;$i=$i+3) {
+ $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++;
+ }
+ }
+
+
+ return $list_return;
+}
+
+/*
+* List all the archive room (used for the orphaned archives)
+*
+* @param $roomid : the id of the room
+* return an array with all the archive room id
+*/
+function liveclassroom_api_get_archive_list($userid) {
+ global $CFG;
+ global $LIVECLASSROOM_API_ADMIN;
+ global $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST;
+ global $LIVECLASSROOM_API_RECORD_SEPERATOR;
+
+ $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&AccessUser=$userid");
+
+ preg_match("(\d*)", $data, $matches);
+ $respcode = $matches[0];
+
+ if ( $respcode != 100) {
+ return false;
+ }
+ //print $data;
+
+
+ $line = explode ("\n",$data);
+
+ $j=0;
+
+ for($i=1;$i<sizeof($line)-3;$i=$i+4) {
+
+ $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++;
+
+ }
+
+
+ return $list_return;
+}
+
+/*
* Check if a user exist in the course given
* link : user last name = course shortname
* @param $course : an instance of a course
@@ -680,12 +778,15 @@
* TO CHECK !!!!!
*/
-function liveclassroom_api_give_lectureroom_attri...
[truncated message content] |
|
From: <sh...@us...> - 2006-11-23 09:50:53
|
Revision: 96
http://svn.sourceforge.net/hw4mdl/?rev=96&view=rev
Author: shazan
Date: 2006-11-23 01:50:48 -0800 (Thu, 23 Nov 2006)
Log Message:
-----------
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-10-27 15:32:12 UTC (rev 95)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-11-23 09:50:48 UTC (rev 96)
@@ -1,4 +1,4 @@
-body
+body
{ background-color:#ffffff;
margin-top:0px;
margin-bottom:0px;
@@ -14,10 +14,6 @@
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;
@@ -38,168 +34,105 @@
padding-left:2px;
vertical-align:middle;
}
-
table.tab
-{
- margin-top:10px;
- margin-left:20px;
+{
width:100%;
}
-
-span.tab
+table.tab td
{
- position: relative;
+ vertical-align:top;
+}
+div.tab
+{
+ padding-top:2%;
+ padding-left:5%;
display: none;
- height:190px
+ height:180px;
}
-span.current_tab
+div.current_tab
{
+ margin-top:2%;
+ margin-left:5%;
position: relative;
display: block;
- height:190px
+ height:180px;
}
-td.tab_Select
-{
-background-image:url(pictures/tab_Select.gif);
+td.tabSelected
+{
+background-image:url(../pictures/tab_Select.gif);
background-repeat: no-repeat;
width: 78px;
font-size: 10pt;
font-family: Verdana;
- }
-h2
-{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size:13px;
- font-weight:bold;
- color:#3c4b5b;
- vertical-align: middle;
+}
+td.tabDisabled
+{
+background-image:url(../pictures/tab_disabled.gif);
+ background-repeat: no-repeat;
+ width: 78px;
+ font-size: 10pt;
+ font-family: Verdana;
+ border-bottom:solid 1px #818181;
}
-
-tr.headcell td, tr.headcell th, .headcell {
- border-left:1px solid #fff !important;
- border-top:1px solid #fff !important;
- color:#394859 !important;
- background-color:#c4cedc !important;
- font-weight:bold !important;
- text-decoration:none !important;
- text-align:left;
- font-size:10px;
+td.tabNoSelected
+{
+background-image:url(../pictures/tab.gif);
+ background-repeat: no-repeat;
+ width: 78px;
+ font-size: 10pt;
+ font-family: Verdana;
+ border-bottom:solid 1px #818181;
}
-
-/* color: fixed? */
-tr.subcell td, tr.subcell th, .subcell {
- border-left:1px solid #ffffff;
- border-top:1px solid #ffffff;
- background-color:#e4eaef;
- font-weight:normal;
- color:black;
- text-decoration:none;
-}
-
-/* color: fixed? */
-tr.subcell2 td, tr.subcell2 th, .subcell2 {
- border-left:1px solid #ffffff;
- border-top:1px solid #ffffff;
- background-color:#e4eaef;
- font-weight:normal;
- color:black;
- text-decoration:none;
-}
-.datatable {
- background-color:#ffffff;
- border-left:1px solid #999;
- border-top:1px solid #999;
- border-right:2px solid #888;
- border-bottom:2px solid #888;
-}
-
-
-/* color: white (fixed) */
-tr.oddRow td, tr.oddRow th, .oddRow {
- border-left:1px solid #ffffff;
- background-color:#fff;
- font-weight:normal;
- color:black;
- text-decoration:none
-}
-
-/* color: gray (fixed?) */
-tr.evenRow td, tr.evenRow th, .evenRow {
- border-left:1px solid #ffffff;
- background-color:#f0f0f0;
- font-weight:normal;
- color:black;
- text-decoration:none
-}
-/* color: fixed */
-tr.divider td, tr.divider th, td.divider, th.divider, .divider {
- border-bottom:1px solid #797979;
-}
-tr.divider2 td, tr.divider2 th, td.divider2, th.divider2, .divider2 {
- border-bottom:1px solid #d9d9d9;
-}
-.clear,table.clear td,tr.clear,tr.clear td,table.clear {
- border:none !important;
-}
-
a {
text-decoration:none;
color:Black; }
-
a:hover {
text-decoration:none;
color:Black; }
-
td.action,input.action{
- background-image:url(../pictures/general-empty.png);
+ background-image:url(../pictures/buttons/general-empty.png);
background-repeat :no-repeat;
background-position:center;
text-decoration:none;
color:Black;
+ text-align:center;
+ cursor:pointer
}
td.action:hover,input.action:hover{
- background-image:url(../pictures/general-empty-over.png);
- background-repeat :no-repeat;
- background-position:center;
- text-decoration:none;
- color:Black;
+ background-image:url(../pictures/buttons/general-empty-over.png);
+ background-repeat :no-repeat;
+ background-position:center;
+ text-decoration:none;
+ color:Black;
+ text-align:center;
+ cursor:pointer
}
+.action label
+{
+ cursor:pointer
+}
.alert
{
color:Red;
}
-
-
-
-a.room { color:#889EB3;
-
+a.room {
+color:#889EB3;
text-decoration:none;
display:block;
width:100%;
-
}
-
-a.room:hover {color:#889EB3;
-
-
+a.room:hover {color:#889EB3;
text-decoration:none;
- border: none;
-
- background-position: 3px 4px;
-
+ border: none;
+ background-position: 3px 4px;
}
-
-
.info a{
position:relative; /*this is the key*/
z-index:24;
color:#000;
text-decoration:none}
-
.info a:hover{z-index:25;text-decoration:underline;}
-
.info a span{display: none;font-size:8pt;}
-
.info a:hover span{ /*the span will display just on :hover state*/
font-size:8pt;
display:block;
@@ -207,35 +140,227 @@
top:1.5em; left:5em; width:28em;
border:1px solid #FFF99F;
background-color:#FFF99F; color:#000;
- text-align: center}
-
-
-
-.button_disabled a{ color:#666666;
-
+ text-align: center}
+.button_disabled a{
+ color:#666666;
+ font-family: Arial;
text-decoration:none;
font-size: 9px;
-
+ height:44px;
}
-.button_disabled a:hover{ color:#666666;
-
+.button_disabled a:hover
+{
+ color:#666666;
+ font-family: Arial;
text-decoration:none;
font-size: 9px;
-
-
+ cursor:pointer;
}
-
-.button_enabled a{ color:black;
-
+.button_enabled a
+{
+ color:black;
+ font-family: Arial;
text-decoration:none;
- font-size: 9px;
-
+ font-size: 9px;
}
-.button_enabled a:hover{ color:black;
-
- text-decoration:none;
+.button_enabled a:hover{ color:black;
+ font-family: Arial;
font-size: 9px;
+ text-decoration: underline;
display:block;
- background-color:#d7d8d9;
cursor:hand;
-}
\ No newline at end of file
+}
+tr.selectRoom{
+ background-color:red;
+ cursor:hand;
+}
+.divProduct
+{
+ padding-top:3px;
+}
+.shortShift{
+ padding-left:5px;
+}
+.room td{
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+.room label{
+ font-family:Verdana;
+ color:Black;
+ font-size:10;
+ border-bottom:solid 1px #F3F3F3;
+ cursor:pointer;
+}
+tr.overRoom{
+ font-family:Verdana;
+ color:Black;
+ font-size:11px;
+ border-bottom:solid 1px #F3F3F3;
+ background-color:#f0f3f5;
+ cursor:pointer;
+ cursor:hand;
+}
+.archive{
+ font-family:Verdana;
+ color:#666666;
+ font-style:italic;
+ font-size:11px;
+ border-bottom:solid 1px #F3F3F3;
+}
+.filterBar {
+ background-image:url("../pictures/backgrounds/filterbar.png");
+ height:24px;
+ font-weight:bold ;
+ width:100%;
+ border-bottom:fine 1px #C7D3E1
+}
+.filter_enabled
+{
+ font-family :Verdana;
+ color:#333333;
+ height:24px;
+ font-size:12px;
+ font-weight:bold ;
+}
+.filter_selected
+{ font-weight:bold ;
+ font-family :Verdana;
+ color:#ffffff;
+ height:24px;
+ font-size:12px;
+}
+.filter_left_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-left.png");
+}
+.filter_middle_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-middle.png");
+ font-family :Verdana;
+ color:#ffffff;
+ height:24px;
+ font-size:12px;
+ font-weight:bold ;
+}
+.filter_right_enabled
+{
+ background-image:url("../pictures/items/filter-enabled-right.png");
+}
+.contextBar table
+{
+ background-image:url("../pictures/backgrounds/toolbar.png");
+ height:30px;
+ 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{
+ font-family:Verdana;
+ color:#555555;
+ font-style:italic;
+ font-size:11px;
+ padding-left:20px;
+}
+.subOption td {
+ font-family:Verdana;
+ font-size:11px;
+ padding-left:20px;
+ vertical-align:top;
+}
+.roomNameForSettings
+{
+ font-family:Verdana;
+ font-weight: bold;
+ font-size:12px;
+}
+.hide
+{
+ display:none;
+}
+.visible
+{
+ display:block;
+}
+label.moreRoom
+{
+ color:Navy;
+ text-decoration:underline;
+ padding-left:20px;
+ font-weight: bold;
+}
+#popup {
+display:none;
+ font-size:8pt;
+ display:block;
+ position:absolute;
+ top:50%; left:50%;
+ color:#000;
+ text-align: center;
+}
+.expand
+{
+ background-color:Black;
+}.headerBar table
+{
+padding:0px ;
+width:100%;
+background-image:url("../pictures/backgrounds/headerbar.png");
+height:32px;
+border-bottom:solid 1px Black;
+}
+.toolBar table
+{
+ width:100%;
+ padding:0px ;
+ background-image:url("../pictures/backgrounds/toolbar.png");
+}
+.search
+{
+ max-width:105px;
+ }
+.list
+{
+ height:280px;
+ overflow-y:scroll;
+}
+.productTitle {
+ background-color:#B0C1D5;
+ font-family:Verdana;
+ color:White;
+ font-size:12px;
+ height:16px;
+ font-weight:bold;
+ cursor:default;
+}
+.validationBar table
+{
+ width:100%;
+ height:24px ;
+ padding:0px ;
+ background-color:#F0F0F0;
+}
+.panelSettings table
+{
+border-bottom: #818181 1px solid;
+height:220px;
+display:none;
+width:100%
+}
+.part td
+ {
+ width:100%;
+ border-bottom: #818181 1px solid;
+ }
\ 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-10-27 15:32:22
|
Revision: 95
http://svn.sourceforge.net/hw4mdl/?rev=95&view=rev
Author: shazan
Date: 2006-10-27 08:32:12 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
remove group possibility
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/mod.html
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-10-20 14:21:24 UTC (rev 94)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-10-27 15:32:12 UTC (rev 95)
@@ -106,9 +106,10 @@
//add_to_log("", "liveclassroom", "", "liveclassroom_api_authenticate", "URL Sent: $url");
//add_to_log("", "liveclassroom", "", "", "Creating Auth Cookie in: ".dirname(__FILE__).'/cookie.txt');
- $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
-
-
+ $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path
+ $cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
+ fputs($cook,time()); // Add the current time into the file = last authenticate time
+
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
@@ -118,7 +119,7 @@
// curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
- $cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date
+
if (curl_errno($ch)) {
print curl_error($ch);
return false;
@@ -132,7 +133,7 @@
}
curl_close($ch);
- fclose($cook);
+ //fclose($cook);
return $ch;
}
@@ -149,20 +150,18 @@
global $CFG;
global $LIVECLASSROOM_API_ADMIN;
- $cook = fopen($CFG->dataroot.'/tmp.txt',"a+"); //Open the temp file to check the last modification date
+ $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)) {
- $lastModifTime = filemtime($cook);
- add_to_log("", "liveclassroom", "", "", "last modif time ".$lastModifTime);
+ $fileContent = file_get_contents($cook);
}
else {
- $lastModifTime = time();
+ $lastModifTime = 0;
}
//1800 seconds = 30 minutes
- $modif = $lastModifTime+1800;
-
-
+ $modif = $fileContent+1800;
+
if( (!file_exists($cookie_file_path)) || ((file_exists($cook)) && (time()>$modif)) ){
if (!$ch = liveclassroom_api_authenticate()) {
return false;
@@ -191,7 +190,6 @@
return $data;
}
-
Modified: trunk/moodle/mod/liveclassroom/mod.html
===================================================================
--- trunk/moodle/mod/liveclassroom/mod.html 2006-10-20 14:21:24 UTC (rev 94)
+++ trunk/moodle/mod/liveclassroom/mod.html 2006-10-27 15:32:12 UTC (rev 95)
@@ -207,9 +207,9 @@
<!-- The following line for Moodle 1.5 prints the visibility setting form element -->
<?php print_visible_setting($form); ?>
-<!-- and if your module uses groups you would also have -->
-<?php print_groupmode_setting($form); ?>
+
+
<tr>
<td><br></td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-10-20 14:21:31
|
Revision: 94
http://svn.sourceforge.net/hw4mdl/?rev=94&view=rev
Author: shazan
Date: 2006-10-20 07:21:24 -0700 (Fri, 20 Oct 2006)
Log Message:
-----------
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/index.php
Modified: trunk/moodle/mod/liveclassroom/index.php
===================================================================
--- trunk/moodle/mod/liveclassroom/index.php 2006-10-20 14:05:16 UTC (rev 93)
+++ trunk/moodle/mod/liveclassroom/index.php 2006-10-20 14:21:24 UTC (rev 94)
@@ -76,6 +76,9 @@
notice("There are no liveclassrooms", "../../course/view.php?id=$course->id");
die;
}
+ session_start();
+ $_SESSION['id']=$course->id;
+
?>
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
<head>
@@ -86,26 +89,14 @@
<body>
<br>
<div align="center">
-
- <iframe src="welcome.php?id=<?php p($id) ?>" width="1000" height="400" name="yo" frameborder="1" align="middle">
+ <table height="95%">
+ <iframe src="welcome.php?id=<?php p($id) ?>" width="800" height="400" name="frameWidget" frameborder="1" align="middle">
<p>Sorry your navigator can't display this iframe
-<a href="../../../index.htm">SELFHTML</a></p>
- </iframe>
+ </iframe>
+</table>
</div>
- <table width="1000" align="center">
- <tr style="background-color: white">
- <td width="55%" valign=top style="color: #cccccc; font-family: Verdana; height: 9px;">
- <a href="javascript:startWizard()" target="_self" class="external"><?php echo get_string('wizard.text.2', 'liveclassroom') ?></a>
- </td>
- <td align=right valign=middle style="color: #cccccc; font-style: italic; font-family: Verdana; height: 12px;">
-
- Powered by :
- </td>
- <td align="right"><img src="pictures/logo.gif" /></td>
- </tr>
- </table>
-
+
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-10-20 14:05:22
|
Revision: 93
http://svn.sourceforge.net/hw4mdl/?rev=93&view=rev
Author: shazan
Date: 2006-10-20 07:05:16 -0700 (Fri, 20 Oct 2006)
Log Message:
-----------
Modified Paths:
--------------
trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php
Modified: trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php
===================================================================
--- trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php 2006-10-20 13:55:25 UTC (rev 92)
+++ trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php 2006-10-20 14:05:16 UTC (rev 93)
@@ -25,6 +25,7 @@
die;
}
+
$this->content = new stdClass;
$this->content->text = '';
@@ -69,14 +70,20 @@
// print $line;
$cm = get_record("course_modules", "id", "$line");
if($cm->module==$lc->id) {
- if(sizeof($result1)==$gnumber) {
+ if(sizeof($result)>=$gnumber) {
$full=true;
break;
}
else{
- array_push($result,$line);
+ $block_instance = array();
+
+ $course = get_record("course", "id", "$cm->course");
+ $block_instance['course'] =$course->fullname;
+ $block_instance['summary'] = $section->summary;
+ $block_instance['cm_id'] = $line; //$cm id
$liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
- array_push($result1,$liveclassroom->name);
+ $block_instance['lc_name'] = $liveclassroom->name;
+ array_push($result,$block_instance);
}
}
}
@@ -85,7 +92,24 @@
}
$sectionnumber++;
}
-
+ $this->content->text .= '<table width="100%">';
+ //Display the list
+
+ foreach ($result as $block) {
+ $this->content->text .= '<tr><td>';
+ $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >';
+ if($block['summary'] !=null) {
+ $this->content->text .= $block['summary'].': ';
+ }
+ $this->content->text .= $block['lc_name'].'</a>';
+ $this->content->text .= '</tr></td>';
+ $this->content->text .= '<tr style="font-style:italic; color: #969696;"><td>';
+ $this->content->text .= $block['course'];
+ $this->content->text .= '</tr></td>';
+ $this->content->text .= '<tr style="border-bottom: 1px solid #666666; "><td ></td></tr>';
+
+ }
+ $this->content->text .= '</table>';
}
@@ -110,31 +134,42 @@
//Look just the liveclasssroom instance
$cm = get_record("course_modules", "id", "$line");
if($cm->module==$lc->id) {
- if(sizeof($result1)==$cnumber){
+ if(sizeof($result1)>=$cnumber){
$full=true;
}
else {
- array_push($result,$line);
+ $block_instance = array();
+
+ $block_instance['course'] =$COURSE->fullname;
+ $block_instance['summary'] = $section->summary;
+ $block_instance['cm_id'] = $line; //$cm id
$liveclassroom = get_record("liveclassroom", "id", "$cm->instance");
- array_push($result1,$liveclassroom->name);
+ $block_instance['lc_name'] = $liveclassroom->name;
+ array_push($result,$block_instance);
}
}
}
}
}
}
-
- }
$this->content->text .= '<table width="100%">';
//Display the list
- for($r=0;$r<sizeof($result);$r++) {
- // $this->content->text .= '<div style="text-align: left; font-size: 1; padding-top: 5px;">';
+ foreach ($result as $block) {
+
$this->content->text .= '<tr><td>';
- $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$result[$r].'" >'.$result1[$r].'</a>';
+ $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >'.$block['lc_name'].'</a>';
$this->content->text .= '</tr> </td>';
- // $this->content->text .= '</div>';
+ if($block['summary'] !=null) {
+ $this->content->text .= '<tr style="font-style:italic; color: #969696;"><td>';
+ $this->content->text .= $block['summary'];
+ $this->content->text .= '</tr></td>';
+ }
+ $this->content->text .= '<tr style="border-bottom: 1px solid #666666; "><td ></td></tr>';
+
}
$this->content->text .= '</table>';
+ }
+
return $this->content;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-10-20 13:55:38
|
Revision: 92
http://svn.sourceforge.net/hw4mdl/?rev=92&view=rev
Author: shazan
Date: 2006-10-20 06:55:25 -0700 (Fri, 20 Oct 2006)
Log Message:
-----------
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/css/
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/js/
trunk/moodle/mod/liveclassroom/js/xmldom.js
Added: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css (rev 0)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-10-20 13:55:25 UTC (rev 92)
@@ -0,0 +1,241 @@
+body
+{ background-color:#ffffff;
+ margin-top:0px;
+ margin-bottom:0px;
+ margin-right:0px;
+ margin-left:0px;
+ font-family: Verdana,Arial,Helvetica,sans-serif;
+ font-size:70%;
+}
+/* size remaining text relative to baseline */
+/* some indiv classes and elements have different sizes, later in doc */
+body a,
+body table, body td, body th,
+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;
+font-size:14px;
+font-weight:bold;
+color:#3c4b5b;
+vertical-align: middle;
+}
+.area_title
+{
+font-family: Verdana, Arial, Helvetica, sans-serif;
+font-size:12px;
+font-weight:bold;
+color:#3c4b5b;
+vertical-align: middle;
+background-color:#c4cedc;
+
+padding-left:2px;
+vertical-align:middle;
+}
+
+table.tab
+{
+ margin-top:10px;
+ margin-left:20px;
+ width:100%;
+}
+
+span.tab
+{
+ position: relative;
+ display: none;
+ height:190px
+}
+span.current_tab
+{
+ position: relative;
+ display: block;
+ height:190px
+}
+td.tab_Select
+{
+background-image:url(pictures/tab_Select.gif);
+ background-repeat: no-repeat;
+ width: 78px;
+ font-size: 10pt;
+ font-family: Verdana;
+ }
+h2
+{
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size:13px;
+ font-weight:bold;
+ color:#3c4b5b;
+ vertical-align: middle;
+}
+
+tr.headcell td, tr.headcell th, .headcell {
+ border-left:1px solid #fff !important;
+ border-top:1px solid #fff !important;
+ color:#394859 !important;
+ background-color:#c4cedc !important;
+ font-weight:bold !important;
+ text-decoration:none !important;
+ text-align:left;
+ font-size:10px;
+}
+
+/* color: fixed? */
+tr.subcell td, tr.subcell th, .subcell {
+ border-left:1px solid #ffffff;
+ border-top:1px solid #ffffff;
+ background-color:#e4eaef;
+ font-weight:normal;
+ color:black;
+ text-decoration:none;
+}
+
+/* color: fixed? */
+tr.subcell2 td, tr.subcell2 th, .subcell2 {
+ border-left:1px solid #ffffff;
+ border-top:1px solid #ffffff;
+ background-color:#e4eaef;
+ font-weight:normal;
+ color:black;
+ text-decoration:none;
+}
+.datatable {
+ background-color:#ffffff;
+ border-left:1px solid #999;
+ border-top:1px solid #999;
+ border-right:2px solid #888;
+ border-bottom:2px solid #888;
+}
+
+
+/* color: white (fixed) */
+tr.oddRow td, tr.oddRow th, .oddRow {
+ border-left:1px solid #ffffff;
+ background-color:#fff;
+ font-weight:normal;
+ color:black;
+ text-decoration:none
+}
+
+/* color: gray (fixed?) */
+tr.evenRow td, tr.evenRow th, .evenRow {
+ border-left:1px solid #ffffff;
+ background-color:#f0f0f0;
+ font-weight:normal;
+ color:black;
+ text-decoration:none
+}
+/* color: fixed */
+tr.divider td, tr.divider th, td.divider, th.divider, .divider {
+ border-bottom:1px solid #797979;
+}
+tr.divider2 td, tr.divider2 th, td.divider2, th.divider2, .divider2 {
+ border-bottom:1px solid #d9d9d9;
+}
+.clear,table.clear td,tr.clear,tr.clear td,table.clear {
+ border:none !important;
+}
+
+a {
+text-decoration:none;
+ color:Black; }
+
+a:hover {
+ text-decoration:none;
+ color:Black; }
+
+td.action,input.action{
+ background-image:url(../pictures/general-empty.png);
+ background-repeat :no-repeat;
+ background-position:center;
+ text-decoration:none;
+ color:Black;
+}
+td.action:hover,input.action:hover{
+ background-image:url(../pictures/general-empty-over.png);
+ background-repeat :no-repeat;
+ background-position:center;
+ text-decoration:none;
+ color:Black;
+}
+.alert
+{
+ color:Red;
+}
+
+
+
+a.room { color:#889EB3;
+
+text-decoration:none;
+display:block;
+width:100%;
+
+}
+
+a.room:hover {color:#889EB3;
+
+
+ text-decoration:none;
+ border: none;
+
+ background-position: 3px 4px;
+
+}
+
+
+.info a{
+ position:relative; /*this is the key*/
+ z-index:24;
+ color:#000;
+ text-decoration:none}
+
+.info a:hover{z-index:25;text-decoration:underline;}
+
+.info a span{display: none;font-size:8pt;}
+
+.info a:hover span{ /*the span will display just on :hover state*/
+ font-size:8pt;
+ display:block;
+ position:absolute;
+ top:1.5em; left:5em; width:28em;
+ border:1px solid #FFF99F;
+ background-color:#FFF99F; color:#000;
+ text-align: center}
+
+
+
+.button_disabled a{ color:#666666;
+
+ text-decoration:none;
+ font-size: 9px;
+
+}
+.button_disabled a:hover{ color:#666666;
+
+ text-decoration:none;
+ font-size: 9px;
+
+
+}
+
+.button_enabled a{ color:black;
+
+ text-decoration:none;
+ font-size: 9px;
+
+}
+.button_enabled a:hover{ color:black;
+
+ text-decoration:none;
+ font-size: 9px;
+ display:block;
+ background-color:#d7d8d9;
+ cursor:hand;
+}
\ No newline at end of file
Property changes on: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/js/xmldom.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/xmldom.js (rev 0)
+++ trunk/moodle/mod/liveclassroom/js/xmldom.js 2006-10-20 13:55:25 UTC (rev 92)
@@ -0,0 +1,1524 @@
+// =========================================================================
+//
+// xmldom.js - an XML DOM parser in JavaScript.
+//
+// This is the classic DOM that has shipped with XML for <SCRIPT>
+// since the beginning. For a more standards-compliant DOM, you may
+// wish to use the standards-compliant W3C DOM that is included
+// with XML for <SCRIPT> versions 3.0 and above
+//
+// version 3.1
+//
+// =========================================================================
+//
+// Copyright (C) 2000 - 2002, 2003 Michael Houghton (mi...@id...), Raymond Irving and David Joham (dj...@ya...)
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+
+// This library 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
+// Lesser General Public License for more details.
+
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+//
+// Visit the XML for <SCRIPT> home page at http://xmljs.sourceforge.net
+//
+
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+// CONSTANTS
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+//define the characters which constitute whitespace, and quotes
+var whitespace = "\n\r\t ";
+var quotes = "\"'";
+
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+// CONVENIENCE FUNCTIONS
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+
+function convertEscapes(str) {
+ /*******************************************************************************************************************
+ function: convertEscapes
+
+ Author: David Joham <dj...@ya...>
+
+ Description:
+ Characters such as less-than signs, greater-than signs and ampersands are
+ illegal in XML syntax and must be escaped before being inserted into the DOM.
+ This function is a convience function to take those escaped characters and
+ return them to their original values for processing outside the parser
+
+ This XML Parser automagically converts the content of the XML elements to
+ their non-escaped values when xmlNode.getText() is called for every element
+ except CDATA.
+
+ EXAMPLES:
+
+ & == &
+ < == <
+ > == >
+
+ *********************************************************************************************************************/
+ // not all Konqueror installations have regex support for some reason. Here's the original code using regexes
+ // that is probably a little more efficient if it matters to you
+ /*
+ var escAmpRegEx = /&/g;
+ var escLtRegEx = /</g;
+ var escGtRegEx = />/g;
+
+ str = str.replace(escAmpRegEx, "&");
+ str = str.replace(escLtRegEx, "<");
+ str = str.replace(escGtRegEx, ">");
+ */
+ var gt;
+
+ //<
+ gt = -1;
+ while (str.indexOf("<", gt + 1) > -1) {
+ var gt = str.indexOf("<", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += "<";
+ newStr = newStr + str.substr(gt + 4, str.length);
+ str = newStr;
+ }
+
+ //>
+ gt = -1;
+ while (str.indexOf(">", gt + 1) > -1) {
+ var gt = str.indexOf(">", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += ">";
+ newStr = newStr + str.substr(gt + 4, str.length);
+ str = newStr;
+ }
+
+ //&
+ gt = -1;
+ while (str.indexOf("&", gt + 1) > -1) {
+ var gt = str.indexOf("&", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += "&";
+ newStr = newStr + str.substr(gt + 5, str.length);
+ str = newStr;
+ }
+
+ return str;
+} // end function convertEscapes
+
+
+function convertToEscapes(str) {
+ /*******************************************************************************************************************
+ function: convertToEscapes
+
+ Author: David Joham dj...@ya...
+
+ Description:
+ Characters such as less-than signs, greater-than signs and ampersands are
+ illegal in XML syntax. This function is a convience function to escape those
+ characters out to there legal values.
+
+ EXAMPLES:
+
+ < == <
+ > == >
+ & == &
+ *********************************************************************************************************************/
+ // not all Konqueror installations have regex support for some reason. Here's the original code using regexes
+ // that is probably a little more efficient if it matters to you
+ /*
+ var escAmpRegEx = /&/g;
+ var escLtRegEx = /</g;
+ var escGtRegEx = />/g;
+ str = str.replace(escAmpRegEx, "&");
+ str = str.replace(escLtRegEx, "<");
+ str = str.replace(escGtRegEx, ">");
+ */
+
+ // start with &
+ var gt = -1;
+ while (str.indexOf("&", gt + 1) > -1) {
+ gt = str.indexOf("&", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += "&";
+ newStr = newStr + str.substr(gt + 1, str.length);
+ str = newStr;
+ }
+
+ // now <
+ gt = -1;
+ while (str.indexOf("<", gt + 1) > -1) {
+ var gt = str.indexOf("<", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += "<";
+ newStr = newStr + str.substr(gt + 1, str.length);
+ str = newStr;
+ }
+
+ //now >
+ gt = -1;
+ while (str.indexOf(">", gt + 1) > -1) {
+ var gt = str.indexOf(">", gt + 1);
+ var newStr = str.substr(0, gt);
+ newStr += ">";
+ newStr = newStr + str.substr(gt + 1, str.length);
+ str = newStr;
+ }
+
+
+ return str;
+} // end function convertToEscapes
+
+
+function _displayElement(domElement, strRet) {
+ /*******************************************************************************************************************
+ function: _displayElement
+
+ Author: dj...@ya...
+
+ Description:
+ returns the XML string associated with the DOM element passed in
+ recursively calls itself if child elements are found
+
+ *********************************************************************************************************************/
+ if(domElement==null) {
+ return;
+ }
+ if(!(domElement.nodeType=='ELEMENT')) {
+ return;
+ }
+
+ var tagName = domElement.tagName;
+ var tagInfo = "";
+ tagInfo = "<" + tagName;
+
+ // attributes
+ var attributeList = domElement.getAttributeNames();
+
+ for(var intLoop = 0; intLoop < attributeList.length; intLoop++) {
+ var attribute = attributeList[intLoop];
+ tagInfo = tagInfo + " " + attribute + "=";
+ tagInfo = tagInfo + "\"" + domElement.getAttribute(attribute) + "\"";
+ }
+
+ //close the element name
+ tagInfo = tagInfo + ">";
+
+ strRet=strRet+tagInfo;
+
+ // children
+ if(domElement.children!=null) {
+ var domElements = domElement.children;
+ for(var intLoop = 0; intLoop < domElements.length; intLoop++) {
+ var childNode = domElements[intLoop];
+ if(childNode.nodeType=='COMMENT') {
+ strRet = strRet + "<!--" + childNode.content + "-->";
+ }
+
+ else if(childNode.nodeType=='TEXT') {
+ var cont = trim(childNode.content,true,true);
+ strRet = strRet + childNode.content;
+ }
+
+ else if (childNode.nodeType=='CDATA') {
+ var cont = trim(childNode.content,true,true);
+ strRet = strRet + "<![CDATA[" + cont + "]]>";
+ }
+
+ else {
+ strRet = _displayElement(childNode, strRet);
+ }
+ } // end looping through the DOM elements
+ } // end checking for domElements.children = null
+
+ //ending tag
+ strRet = strRet + "</" + tagName + ">";
+ return strRet;
+} // end function displayElement
+
+
+function firstWhiteChar(str,pos) {
+ /*******************************************************************************************************************
+ function: firstWhiteChar
+
+ Author: ma...@ps... ?
+
+ Description:
+ return the position of the first whitespace character in str after position pos
+
+ *********************************************************************************************************************/
+ if (isEmpty(str)) {
+ return -1;
+ }
+
+ while(pos < str.length) {
+ if (whitespace.indexOf(str.charAt(pos))!=-1) {
+ return pos;
+ }
+ else {
+ pos++;
+ }
+ }
+ return str.length;
+} // end function firstWhiteChar
+
+
+function isEmpty(str) {
+ /*******************************************************************************************************************
+ function: isEmpty
+
+ Author: mi...@id...
+
+ Description:
+ convenience function to identify an empty string
+
+ *********************************************************************************************************************/
+ return (str==null) || (str.length==0);
+
+} // end function isEmpty
+
+function trim(trimString, leftTrim, rightTrim) {
+ /*******************************************************************************************************************
+ function: trim
+
+ Author: ma...@ps...
+
+ Description:
+ helper function to trip a string (trimString) of leading (leftTrim)
+ and trailing (rightTrim) whitespace
+
+ *********************************************************************************************************************/
+ if (isEmpty(trimString)) {
+ return "";
+ }
+
+ // the general focus here is on minimal method calls - hence only one
+ // substring is done to complete the trim.
+
+ if (leftTrim == null) {
+ leftTrim = true;
+ }
+
+ if (rightTrim == null) {
+ rightTrim = true;
+ }
+
+ var left=0;
+ var right=0;
+ var i=0;
+ var k=0;
+
+ // modified to properly handle strings that are all whitespace
+ if (leftTrim == true) {
+ while ((i<trimString.length) && (whitespace.indexOf(trimString.charAt(i++))!=-1)) {
+ left++;
+ }
+ }
+ if (rightTrim == true) {
+ k=trimString.length-1;
+ while((k>=left) && (whitespace.indexOf(trimString.charAt(k--))!=-1)) {
+ right++;
+ }
+ }
+ return trimString.substring(left, trimString.length - right);
+} // end function trim
+
+
+
+
+
+
+
+
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+// XML DOC FUNCTIONS
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+function XMLDoc(source, errFn) {
+ /*******************************************************************************************************************
+ function: XMLDoc
+
+ Author: mi...@id...
+
+ Description:
+ a constructor for an XML document
+ source: the string containing the document
+ errFn: the (optional) function used to log errors
+ *********************************************************************************************************************/
+ // stack for document construction
+
+ this.topNode=null;
+
+ // set up the properties and methods for this object
+
+ this.errFn = errFn; // user defined error functions
+
+ this.createXMLNode = _XMLDoc_createXMLNode;
+ this.error = _XMLDoc_error;
+ this.getUnderlyingXMLText = _XMLDoc_getUnderlyingXMLText;
+ this.handleNode = _XMLDoc_handleNode;
+ this.hasErrors = false; // were errors found during the parse?
+ this.insertNodeAfter = _XMLDoc_insertNodeAfter;
+ this.insertNodeInto = _XMLDoc_insertNodeInto;
+ this.loadXML = _XMLDoc_loadXML;
+ this.parse = _XMLDoc_parse;
+ this.parseAttribute = _XMLDoc_parseAttribute;
+ this.parseDTD = _XMLDoc_parseDTD;
+ this.parsePI = _XMLDoc_parsePI;
+ this.parseTag = _XMLDoc_parseTag;
+ this.removeNodeFromTree = _XMLDoc_removeNodeFromTree;
+ this.replaceNodeContents = _XMLDoc_replaceNodeContents;
+ this.selectNode = _XMLDoc_selectNode;
+ this.selectNodeText = _XMLDoc_selectNodeText;
+ this.source = source; // the string source of the document
+
+ // parse the document
+
+ if (this.parse()) {
+ // we've run out of markup - check the stack is now empty
+ if (this.topNode!=null) {
+ return this.error("expected close " + this.topNode.tagName);
+ }
+ else {
+ return true;
+ }
+ }
+} // end function XMLDoc
+
+
+function _XMLDoc_createXMLNode(strXML) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_createXMLNode
+
+ Author: dj...@ya...
+
+ Description:
+ convienience function to create a new node that inherits
+ the properties of the document object
+ *********************************************************************************************************************/
+ return new XMLDoc(strXML, this.errFn).docNode;
+
+} // end function _XMLDoc_createXMLNode
+
+
+function _XMLDoc_error(str) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_error
+
+ Author: mi...@id...
+
+ Description:
+ used to log an error in parsing or validating
+ *********************************************************************************************************************/
+
+ this.hasErrors=true;
+ if(this.errFn){
+ this.errFn("ERROR: " + str);
+ }else if(this.onerror){
+ this.onerror("ERROR: " + str);
+ }
+ return 0;
+
+} // end function _XMLDoc_error
+
+
+function _XMLDoc_getTagNameParams(tag,obj){
+ /*******************************************************************************************************************
+ function: _XMLDoc_getTagNameParams
+
+ Author: xw...@ya...
+
+ Description:
+ convienience function for the nodeSearch routines
+ *********************************************************************************************************************/
+ var elm=-1,e,s=tag.indexOf('[');
+ var attr=[];
+ if(s>=0){
+ e=tag.indexOf(']');
+ if(e>=0)elm=tag.substr(s+1,(e-s)-1);
+ else obj.error('expected ] near '+tag);
+ tag=tag.substr(0,s);
+ if(isNaN(elm) && elm!='*'){
+ attr=elm.substr(1,elm.length-1); // remove @
+ attr=attr.split('=');
+ if(attr[1]) { //remove "
+ s=attr[1].indexOf('"');
+ attr[1]=attr[1].substr(s+1,attr[1].length-1);
+ e=attr[1].indexOf('"');
+ if(e>=0) attr[1]=attr[1].substr(0,e);
+ else obj.error('expected " near '+tag)
+ };elm=-1;
+ }else if(elm=='*') elm=-1;
+ }
+ return [tag,elm,attr[0],attr[1]]
+} // end function _XMLDoc_getTagNameParams
+
+
+function _XMLDoc_getUnderlyingXMLText() {
+ /*******************************************************************************************************************
+ function: _XMLDoc_getUnderlyingXMLText
+
+ Author: dj...@ya...
+
+ Description:
+ kicks off the process that returns the XML text representation of the XML
+ document inclusive of any changes made by the manipulation of the DOM
+ *********************************************************************************************************************/
+ var strRet = "";
+ //for now, hardcode the xml version 1 information. When we handle Processing Instructions later, this
+ //should be looked at again
+ strRet = strRet + "<?xml version=\"1.0\"?>";
+ if (this.docNode==null) {
+ return;
+ }
+
+ strRet = _displayElement(this.docNode, strRet);
+ return strRet;
+
+} // end function _XMLDoc_getCurrentXMLText
+
+
+
+function _XMLDoc_handleNode(current) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_handleNode
+
+ Author: mi...@id...
+
+ Description:
+ adds a markup element to the document
+ *********************************************************************************************************************/
+
+ if ((current.nodeType=='COMMENT') && (this.topNode!=null)) {
+ return this.topNode.addElement(current);
+ }
+ else if ((current.nodeType=='TEXT') || (current.nodeType=='CDATA')) {
+
+ // if the current node is a text node:
+
+
+ // if the stack is empty, and this text node isn't just whitespace, we have
+ // a problem (we're not in a document element)
+
+ if(this.topNode==null) {
+ if (trim(current.content,true,false)=="") {
+ return true;
+ }
+ else {
+ return this.error("expected document node, found: " + current);
+ }
+ }
+ else {
+ // otherwise, append this as child to the element at the top of the stack
+ return this.topNode.addElement(current);
+ }
+
+
+ }
+ else if ((current.nodeType=='OPEN') || (current.nodeType=='SINGLE')) {
+ // if we find an element tag (open or empty)
+ var success = false;
+
+ // if the stack is empty, this node becomes the document node
+
+ if(this.topNode==null) {
+ this.docNode = current;
+ current.parent = null;
+ success = true;
+ }
+ else {
+ // otherwise, append this as child to the element at the top of the stack
+ success = this.topNode.addElement(current);
+ }
+
+
+ if (success && (current.nodeType!='SINGLE')) {
+ this.topNode = current;
+ }
+
+ // rename it as an element node
+
+ current.nodeType = "ELEMENT";
+
+ return success;
+ }
+
+ // if it's a close tag, check the nesting
+
+ else if (current.nodeType=='CLOSE') {
+
+ // if the stack is empty, it's certainly an error
+
+ if (this.topNode==null) {
+ return this.error("close tag without open: " + current.toString());
+ }
+ else {
+
+ // otherwise, check that this node matches the one on the top of the stack
+
+ if (current.tagName!=this.topNode.tagName) {
+ return this.error("expected closing " + this.topNode.tagName + ", found closing " + current.tagName);
+ }
+ else {
+ // if it does, pop the element off the top of the stack
+ this.topNode = this.topNode.getParent();
+ }
+ }
+ }
+ return true;
+} // end function _XMLDoc_handleNode
+
+
+
+function _XMLDoc_insertNodeAfter (referenceNode, newNode) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_insertNodeAfter
+
+ Author: dj...@ya...
+
+ Description:
+ inserts a new XML node after the reference node;
+
+ for example, if we insert the node <tag2>hello</tag2>
+ after tag1 in the xml <rootnode><tag1></tag1></rootnode>
+ we will end up with <rootnode><tag1></tag1><tag2>hello</tag2></rootnode>
+
+ NOTE: the return value of this function is a new XMLDoc object!!!!
+
+ *********************************************************************************************************************/
+
+ var parentXMLText = this.getUnderlyingXMLText();
+ var selectedNodeXMLText = referenceNode.getUnderlyingXMLText();
+ var originalNodePos = parentXMLText.indexOf(selectedNodeXMLText) + selectedNodeXMLText.length;
+ var newXML = parentXMLText.substr(0,originalNodePos);
+ newXML += newNode.getUnderlyingXMLText();
+ newXML += parentXMLText.substr(originalNodePos);
+ var newDoc = new XMLDoc(newXML, this.errFn);
+ return newDoc;
+
+} // end function _XMLDoc_insertNodeAfter
+
+
+
+function _XMLDoc_insertNodeInto (referenceNode, insertNode) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_insertNodeInto
+
+ Author: mi...@id...
+
+ Description:
+ inserts a new XML node into the reference node;
+
+ for example, if we insert the node <tag2>hello</tag2>
+ into tag1 in the xml <rootnode><tag1><tag3>foo</tag3></tag1></rootnode>
+ we will end up with <rootnode><tag1><tag2>hello</tag2><tag3>foo</tag3></tag1></rootnode>
+
+ NOTE: the return value of this function is a new XMLDoc object!!!!
+ *********************************************************************************************************************/
+
+ var parentXMLText = this.getUnderlyingXMLText();
+ var selectedNodeXMLText = referenceNode.getUnderlyingXMLText();
+ var endFirstTag = selectedNodeXMLText.indexOf(">") + 1;
+ var originalNodePos = parentXMLText.indexOf(selectedNodeXMLText) + endFirstTag;
+ var newXML = parentXMLText.substr(0,originalNodePos);
+ newXML += insertNode.getUnderlyingXMLText();
+ newXML += parentXMLText.substr(originalNodePos);
+ var newDoc = new XMLDoc(newXML, this.errFn);
+ return newDoc;
+
+
+} // end function _XMLDoc_insertNodeInto
+
+function _XMLDoc_loadXML(source){
+ /*******************************************************************************************************************
+ function: _XMLDoc_insertNodeInto
+
+ Author: xw...@ya...
+
+ Description:
+ allows an already existing XMLDoc object to load XML
+ *********************************************************************************************************************/
+ this.topNode=null;
+ this.hasErrors = false;
+ this.source=source;
+ // parse the document
+ return this.parse();
+
+} // end function _XMLDoc_loadXML
+
+function _XMLDoc_parse() {
+ /*******************************************************************************************************************
+ function: _XMLDoc_parse
+
+ Author: mi...@id...
+
+ Description:
+ scans through the source for opening and closing tags
+ checks that the tags open and close in a sensible order
+ *********************************************************************************************************************/
+
+ var pos = 0;
+
+ // set up the arrays used to store positions of < and > characters
+
+ err = false;
+
+ while(!err) {
+ var closing_tag_prefix = '';
+ var chpos = this.source.indexOf('<',pos);
+ var open_length = 1;
+
+ var open;
+ var close;
+
+ if (chpos ==-1) {
+ break;
+ }
+
+ open = chpos;
+
+ // create a text node
+
+ var str = this.source.substring(pos, open);
+
+ if (str.length!=0) {
+ err = !this.handleNode(new XMLNode('TEXT',this, str));
+ }
+
+ // handle Programming Instructions - they can't reliably be handled as tags
+
+ if (chpos == this.source.indexOf("<?",pos)) {
+ pos = this.parsePI(this.source, pos + 2);
+ if (pos==0) {
+ err=true;
+ }
+ continue;
+ }
+
+ // nobble the document type definition
+
+ if (chpos == this.source.indexOf("<!DOCTYPE",pos)) {
+ pos = this.parseDTD(this.source, chpos+ 9);
+ if (pos==0) {
+ err=true;
+ }
+ continue;
+ }
+
+ // if we found an open comment, we need to ignore angle brackets
+ // until we find a close comment
+
+ if(chpos == this.source.indexOf('<!--',pos)) {
+ open_length = 4;
+ closing_tag_prefix = '--';
+ }
+
+ // similarly, if we find an open CDATA, we need to ignore all angle
+ // brackets until a close CDATA sequence is found
+
+ if (chpos == this.source.indexOf('<![CDATA[',pos)) {
+ open_length = 9;
+ closing_tag_prefix = ']]';
+ }
+
+ // look for the closing sequence
+
+ chpos = this.source.indexOf(closing_tag_prefix + '>',chpos);
+ if (chpos ==-1) {
+ return this.error("expected closing tag sequence: " + closing_tag_prefix + '>');
+ }
+
+ close = chpos + closing_tag_prefix.length;
+
+ // create a tag node
+
+ str = this.source.substring(open+1, close);
+
+ var n = this.parseTag(str);
+ if (n) {
+ err = !this.handleNode(n);
+ }
+
+ pos = close +1;
+
+ // and loop
+
+ }
+ return !err;
+
+} // end function _XMLDoc_parse
+
+
+
+function _XMLDoc_parseAttribute(src,pos,node) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_parseAttribute
+
+ Author: mi...@id...
+
+ Description:
+ parse an attribute out of a tag string
+
+ *********************************************************************************************************************/
+
+ // chew up the whitespace, if any
+
+ while ((pos<src.length) && (whitespace.indexOf(src.charAt(pos))!=-1)) {
+ pos++;
+ }
+
+ // if there's nothing else, we have no (more) attributes - just break out
+
+ if (pos >= src.length) {
+ return pos;
+ }
+
+ var p1 = pos;
+
+ while ((pos < src.length) && (src.charAt(pos)!='=')) {
+ pos++;
+ }
+
+ var msg = "attributes must have values";
+
+ // parameters without values aren't allowed.
+
+ if(pos >= src.length) {
+ return this.error(msg);
+ }
+
+ // extract the parameter name
+
+ var paramname = trim(src.substring(p1,pos++),false,true);
+
+ // chew up whitespace
+
+ while ((pos < src.length) && (whitespace.indexOf(src.charAt(pos))!=-1)) {
+ pos++;
+ }
+
+ // throw an error if we've run out of string
+
+ if (pos >= src.length) {
+ return this.error(msg);
+ }
+
+ msg = "attribute values must be in quotes";
+
+ // check for a quote mark to identify the beginning of the attribute value
+
+ var quote = src.charAt(pos++);
+
+ // throw an error if we didn't find one
+
+ if (quotes.indexOf(quote)==-1) {
+ return this.error(msg);
+ }
+
+ p1 = pos;
+
+ while ((pos < src.length) && (src.charAt(pos)!=quote)) {
+ pos++;
+ }
+
+ // throw an error if we found no closing quote
+
+ if (pos >= src.length) {
+ return this.error(msg);
+ }
+
+ // store the parameter
+
+ if (!node.addAttribute(paramname,trim(src.substring(p1,pos++),false,true))) {
+ return 0;
+ }
+
+ return pos;
+
+} //end function _XMLDoc_parseAttribute
+
+
+
+function _XMLDoc_parseDTD(str,pos) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_parseDTD
+
+ Author: mi...@id...
+
+ Description:
+ parse a document type declaration
+
+ NOTE: we're just going to discard the DTD
+
+ *********************************************************************************************************************/
+ // we're just going to discard the DTD
+
+ var firstClose = str.indexOf('>',pos);
+
+ if (firstClose==-1) {
+ return this.error("error in DTD: expected '>'");
+ }
+
+ var closing_tag_prefix = '';
+
+ var firstOpenSquare = str.indexOf('[',pos);
+
+ if ((firstOpenSquare!=-1) && (firstOpenSquare < firstClose)) {
+ closing_tag_prefix = ']';
+ }
+
+ while(true) {
+ var closepos = str.indexOf(closing_tag_prefix + '>',pos);
+
+ if (closepos ==-1) {
+ return this.error("expected closing tag sequence: " + closing_tag_prefix + '>');
+ }
+
+ pos = closepos + closing_tag_prefix.length +1;
+
+ if (str.substring(closepos-1,closepos+2) != ']]>') {
+ break;
+ }
+ }
+ return pos;
+
+} // end function _XMLDoc_ParseDTD
+
+
+function _XMLDoc_parsePI(str,pos) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_parsePI
+
+ Author: mi...@id...
+
+ Description:
+ parse a processing instruction
+
+ NOTE: we just swallow them up at the moment
+
+ *********************************************************************************************************************/
+ // we just swallow them up
+
+ var closepos = str.indexOf('?>',pos);
+ return closepos + 2;
+
+} // end function _XMLDoc_parsePI
+
+
+
+function _XMLDoc_parseTag(src) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_parseTag
+
+ Author: mi...@id...
+
+ Description:
+ parse out a non-text element (incl. CDATA, comments)
+ handles the parsing of attributes
+ *********************************************************************************************************************/
+
+ // if it's a comment, strip off the packaging, mark it a comment node
+ // and return it
+
+ if (src.indexOf('!--')==0) {
+ return new XMLNode('COMMENT', this, src.substring(3,src.length-2));
+ }
+
+ // if it's CDATA, do similar
+
+ if (src.indexOf('![CDATA[')==0) {
+ return new XMLNode('CDATA', this, src.substring(8,src.length-2));
+ }
+
+ var n = new XMLNode();
+ n.doc = this;
+
+
+ if (src.charAt(0)=='/') {
+ n.nodeType = 'CLOSE';
+ src = src.substring(1);
+ }
+ else {
+ // otherwise it's an open tag (possibly an empty element)
+ n.nodeType = 'OPEN';
+ }
+
+ // if the last character is a /, check it's not a CLOSE tag
+
+ if (src.charAt(src.length-1)=='/') {
+ if (n.nodeType=='CLOSE') {
+ return this.error("singleton close tag");
+ }
+ else {
+ n.nodeType = 'SINGLE';
+ }
+
+ // strip off the last character
+
+ src = src.substring(0,src.length-1);
+ }
+
+ // set up the properties as appropriate
+
+ if (n.nodeType!='CLOSE') {
+ n.attributes = new Array();
+ }
+
+ if (n.nodeType=='OPEN') {
+ n.children = new Array();
+ }
+
+ // trim the whitespace off the remaining content
+
+ src = trim(src,true,true);
+
+ // chuck out an error if there's nothing left
+
+ if (src.length==0) {
+ return this.error("empty tag");
+ }
+
+ // scan forward until a space...
+
+ var endOfName = firstWhiteChar(src,0);
+
+ // if there is no space, this is just a name (e.g. (<tag>, <tag/> or </tag>
+
+ if (endOfName==-1) {
+ n.tagName = src;
+ return n;
+ }
+
+ // otherwise, we should expect attributes - but store the tag name first
+
+ n.tagName = src.substring(0,endOfName);
+
+ // start from after the tag name
+
+ var pos = endOfName;
+
+ // now we loop:
+
+ while(pos< src.length) {
+ pos = this.parseAttribute(src, pos, n);
+ if (this.pos==0) {
+ return null;
+ }
+
+ // and loop
+
+ }
+ return n;
+
+} // end function _XMLDoc_parseTag
+
+
+
+function _XMLDoc_removeNodeFromTree(node) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_removeNodeFromTree
+
+ Author: dj...@ya...
+
+ Description:
+ removes the specified node from the tree
+
+ NOTE: the return value of this function is a new XMLDoc object
+
+ *********************************************************************************************************************/
+
+ var parentXMLText = this.getUnderlyingXMLText();
+ var selectedNodeXMLText = node.getUnderlyingXMLText();
+ var originalNodePos = parentXMLText.indexOf(selectedNodeXMLText);
+ var newXML = parentXMLText.substr(0,originalNodePos);
+ newXML += parentXMLText.substr(originalNodePos + selectedNodeXMLText.length);
+ var newDoc = new XMLDoc(newXML, this.errFn);
+ return newDoc;
+} // end function _XMLDoc_removeNodeFromTree
+
+
+
+function _XMLDoc_replaceNodeContents(referenceNode, newContents) {
+ /*******************************************************************************************************************
+ function: _XMLDoc_replaceNodeContents
+
+ Author: dj...@ya...
+
+ Description:
+
+ make a node object out of the newContents text
+ coming in ----
+
+ The "X" node will be thrown away and only the children
+ used to replace the contents of the reference node
+
+ NOTE: the return value of this function is a new XMLDoc object
+
+ *********************************************************************************************************************/
+
+ var newNode = this.createXMLNode("<X>" + newContents + "</X>");
+ referenceNode.children = newNode.children;
+ return this;
+} // end function _XMLDoc_replaceNodeContents
+
+
+function _XMLDoc_selectNode(tagpath){
+ /*******************************************************************************************************************
+ function: _XMLDoc_selectNode
+
+ Author: xw...@ya...
+
+ Description:
+ selects a single node using the nodes tag path.
+ examples: /node1/node2 or /taga/tag1[0]/tag2
+ *********************************************************************************************************************/
+
+ tagpath = trim(tagpath, true, true);
+
+ var srcnode,node,tag,params,elm,rg;
+ var tags,attrName,attrValue,ok;
+ srcnode=node=((this.source)?this.docNode:this);
+ if (!tagpath) return node;
+ if(tagpath.indexOf('/')==0)tagpath=tagpath.substr(1);
+ tagpath=tagpath.replace(tag,'');
+ tags=tagpath.split('/');
+ tag=tags[0];
+ if(tag){
+ if(tagpath.indexOf('/')==0)tagpath=tagpath.substr(1);
+ tagpath=tagpath.replace(tag,'');
+ params=_XMLDoc_getTagNameParams(tag,this);
+ tag=params[0];elm=params[1];
+ attrName=params[2];attrValue=params[3];
+ node=(tag=='*')? node.getElements():node.getElements(tag);
+ if (node.length) {
+ if(elm<0){
+ srcnode=node;var i=0;
+ while(i<srcnode.length){
+ if(attrName){
+ if (srcnode[i].getAttribute(attrName)!=attrValue) ok=false;
+ else ok=true;
+ }else ok=true;
+ if(ok){
+ node=srcnode[i].selectNode(tagpath);
+ if(node) return node;
+ }
+ i++;
+ }
+ }else if (elm<node.length){
+ node=node[elm].selectNode(tagpath);
+ if(node) return node;
+ }
+ }
+ }
+} // end function _XMLDoc_selectNode
+
+function _XMLDoc_selectNodeText(tagpath){
+ /*******************************************************************************************************************
+ function: _XMLDoc_selectNodeText
+
+ Author: xw...@ya...
+
+ Description:
+ selects a single node using the nodes tag path and then returns the node text.
+ *********************************************************************************************************************/
+
+ var node=this.selectNode(tagpath);
+ if (node != null) {
+ return node.getText();
+ }
+ else {
+ return null;
+ }
+} // end function _XMLDoc_selectNodeText
+
+
+
+
+
+
+
+
+// =========================================================================
+// =========================================================================
+// =========================================================================
+// XML NODE FUNCTIONS
+// =========================================================================
+// =========================================================================
+// =========================================================================
+
+
+function XMLNode(nodeType,doc, str) {
+ /*******************************************************************************************************************
+ function: xmlNode
+
+ Author: mi...@id...
+
+ Description:
+
+ XMLNode() is a constructor for a node of XML (text, comment, cdata, tag, etc)
+
+ nodeType = indicates the node type of the node
+ doc == contains a reference to the XMLDoc object describing the document
+ str == contains the text for the tag or text entity
+
+ *********************************************************************************************************************/
+
+
+ // the content of text (also CDATA and COMMENT) nodes
+ if (nodeType=='TEXT' || nodeType=='CDATA' || nodeType=='COMMENT' ) {
+ this.content = str;
+ }
+ else {
+ this.content = null;
+ }
+
+ this.attributes = null; // an array of attributes (used as a hash table)
+ this.children = null; // an array (list) of the children of this node
+ this.doc = doc; // a reference to the document
+ this.nodeType = nodeType; // the type of the node
+ this.parent = "";
+ this.tagName = ""; // the name of the tag (if a tag node)
+
+ // configure the methods
+ this.addAttribute = _XMLNode_addAttribute;
+ this.addElement = _XMLNode_addElement;
+ this.getAttribute = _XMLNode_getAttribute;
+ this.getAttributeNames = _XMLNode_getAttributeNames;
+ this.getElementById = _XMLNode_getElementById;
+ this.getElements = _XMLNode_getElements;
+ this.getText = _XMLNode_getText;
+ this.getParent = _XMLNode_getParent;
+ this.getUnderlyingXMLText = _XMLNode_getUnderlyingXMLText;
+ this.removeAttribute = _XMLNode_removeAttribute;
+ this.selectNode = _XMLDoc_selectNode;
+ this.selectNodeText = _XMLDoc_selectNodeText;
+ this.toString = _XMLNode_toString;
+
+} // end function XMLNode
+
+
+function _XMLNode_addAttribute(attributeName,attributeValue) {
+ /*******************************************************************************************************************
+ function: _XMLNode_addAttribute
+
+ Author: mi...@id...
+
+ Description:
+ add an attribute to a node
+ *********************************************************************************************************************/
+
+ //if the name is found, the old value is overwritten by the new value
+ this.attributes['_' + attributeName] = attributeValue;
+ return true;
+
+} // end function _XMLNode_addAttribute
+
+
+
+function _XMLNode_addElement(node) {
+ /*******************************************************************************************************************
+ function: _XMLNode_addElement
+
+ Author: mi...@id...
+
+ Description:
+ add an element child to a node
+ *********************************************************************************************************************/
+ node.parent = this;
+ this.children[this.children.length] = node;
+ return true;
+
+} // end function _XMLNode_addElement
+
+
+function _XMLNode_getAttribute(name) {
+ /*******************************************************************************************************************
+ function: _XMLNode_getAttribute
+
+ Author: mi...@id...
+
+ Description:
+ get the value of a named attribute from an element node
+
+ NOTE: we prefix with "_" because of the weird 'length' meta-property
+
+ *********************************************************************************************************************/
+ if (this.attributes == null) {
+ return null;
+ }
+ return this.attributes['_' + name];
+} // end function _XMLNode_getAttribute
+
+
+
+function _XMLNode_getAttributeNames() {
+ /*******************************************************************************************************************
+ function: _XMLNode_getAttributeNames
+
+ Author: mi...@id...
+
+ Description:
+ get a list of attribute names for the node
+
+ NOTE: we prefix with "_" because of the weird 'length' meta-property
+
+ NOTE: Version 1.0 of getAttributeNames breaks backwards compatibility. Previous to 1.0
+ getAttributeNames would return null if there were no attributes. 1.0 now returns an
+ array of length 0.
+
+
+ *********************************************************************************************************************/
+ if (this.attributes == null) {
+ var ret = new Array();
+ return ret;
+ }
+
+ var attlist = new Array();
+
+ for (var a in this.attributes) {
+ attlist[attlist.length] = a.substring(1);
+ }
+ return attlist;
+} // end function _XMLNode_getAttributeNames
+
+function _XMLNode_getElementById(id) {
+
+ /***********************************************************************************
+ Function: getElementById
+
+ Author: dj...@ya...
+
+ Description:
+ Brute force searches through the XML DOM tree
+ to find the node with the unique ID passed in
+
+ ************************************************************************************/
+ var node = this;
+ var ret;
+
+ //alert("tag name=" + node.tagName);
+ //alert("id=" + node.getAttribute("id"));
+ if (node.getAttribute("id") == id) {
+ return node;
+ }
+ else{
+ var elements = node.getElements();
+ //alert("length=" + rugrats.length);
+ var intLoop = 0;
+ //do NOT use a for loop here. For some reason
+ //it kills some browsers!!!
+ while (intLoop < elements.length) {
+ //alert("intLoop=" + intLoop);
+ var element = elements[intLoop];
+ //alert("recursion");
+ ret = element.getElementById(id);
+ if (ret != null) {
+ //alert("breaking");
+ break;
+ }
+ intLoop++;
+ }
+ }
+ return ret;
+} // end function _XMLNode_getElementById
+
+
+function _XMLNode_getElements(byName) {
+ /*******************************************************************************************************************
+ function: _XMLNode_getElements
+
+ Author: mi...@id...
+
+ Description:
+ get an array of element children of a node
+ with an optional filter by name
+
+ NOTE: Version 1.0 of getElements breaks backwards compatibility. Previous to 1.0
+ getElements would return null if there were no attributes. 1.0 now returns an
+ array of length 0.
+
+
+ *********************************************************************************************************************/
+ if (this.children==null) {
+ var ret = new Array();
+ return ret;
+ }
+
+ var elements = new Array();
+ for (var i=0; i<this.children.length; i++) {
+ if ((this.children[i].nodeType=='ELEMENT') && ((byName==null) || (this.children[i].tagName == byName))) {
+ elements[elements.length] = this.children[i];
+ }
+ }
+ return elements;
+} // end function _XMLNode_getElements
+
+
+
+function _XMLNode_getText() {
+ /*******************************************************************************************************************
+ function: _XMLNode_getText
+
+ Author: mi...@id...
+
+ Description:
+ a method to get the text of a given node (recursively, if it's an element)
+ *********************************************************************************************************************/
+
+ if (this.nodeType=='ELEMENT') {
+ if (this.children==null) {
+ return null;
+ }
+ var str = "";
+ for (var i=0; i < this.children.length; i++) {
+ var t = this.children[i].getText();
+ str += (t == null ? "" : t);
+ }
+ return str;
+ }
+ else if (this.nodeType=='TEXT') {
+ return convertEscapes(this.content);
+ }
+ else {
+ return this.content;
+ }
+} // end function _XMLNode_getText
+
+
+
+function _XMLNode_getParent() {
+ /*******************************************************************************************************************
+ function: _XMLNode_getParent
+
+ Author: mi...@id...
+
+ Description:
+ get the parent of this node
+ *********************************************************************************************************************/
+ return this.parent;
+
+} // end function _XMLNode_getParent
+
+
+function _XMLNode_getUnderlyingXMLText() {
+ /*******************************************************************************************************************
+ function: David Joham
+
+ Author: dj...@ya...
+
+ Description:
+ returns the underlying XML text for the node
+ by calling the _displayElement function
+ *********************************************************************************************************************/
+
+ var strRet = "";
+ strRet = _displayElement(this, strRet);
+ return strRet;
+
+} // end function _XMLNode_getUnderlyingXMLText
+
+
+
+function _XMLNode_removeAttribute(attributeName) {
+ /*******************************************************************************************************************
+ function: _XMLNode_removeAttribute
+
+ Author: dj...@ya...
+
+ Description:
+ remove an attribute from a node
+ *********************************************************************************************************************/
+ if(attributeName == null) {
+ return this.doc.error("You must pass an attribute name into the removeAttribute function");
+ }
+
+ //now remove the attribute from the list.
+ // I want to keep the logic for adding attribtues in one place. I'm
+ // going to get a temp array of attributes and values here and then
+ // use the addAttribute function to re-add the attributes
+ var attributes = this.getAttributeNames();
+ var intCount = attributes.length;
+ var tmpAttributeValues = new Array();
+ for ( intLoop = 0; intLoop < intCount; intLoop++) {
+ tmpAttributeValues[intLoop] = this.getAttribute(attributes[intLoop]);
+ }
+
+ // now blow away the old attribute list
+ this.attributes = new Array();
+
+ //now add the attributes back to the array - leaving out the one we're removing
+ for (intLoop = 0; intLoop < intCount; intLoop++) {
+ if ( attributes[intLoop] != attributeName) {
+ this.addAttribute(attributes[intLoop], tmpAttributeValues[intLoop]);
+ }
+ }
+
+return true;
+
+} // end function _XMLNode_removeAttribute
+
+
+
+function _XMLNode_toString() {
+ /*******************************************************************************************************************
+ function: _XMLNode_toString
+
+ Author: mi...@id...
+
+ Description:
+ produces a diagnostic string description of a node
+ *********************************************************************************************************************/
+ return "" + this.nodeType + ":" + (this.nodeType=='TEXT' || this.nodeType=='CDATA' || this.nodeType=='COMMENT' ? this.content : this.tagName);
+
+} // end function _XMLNode_toString
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: trunk/moodle/mod/liveclassroom/js/xmldom.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|