hw4mdl-svn Mailing List for Wimba Moodle Integration (Page 6)
Brought to you by:
jhlinder,
trollinger
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(7) |
Jun
|
Jul
(3) |
Aug
(13) |
Sep
(20) |
Oct
(20) |
Nov
(9) |
Dec
(49) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(34) |
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(39) |
Feb
(14) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(3) |
Nov
(4) |
Dec
|
|
From: <hu...@us...> - 2006-12-28 14:45:09
|
Revision: 141
http://svn.sourceforge.net/hw4mdl/?rev=141&view=rev
Author: hugues
Date: 2006-12-28 06:45:06 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10528
- The intermediate page monitors the presence of the LC window and display a message when it is not displayed
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
trunk/moodle/mod/liveclassroom/view.php
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-28 13:47:21 UTC (rev 140)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-28 14:45:06 UTC (rev 141)
@@ -41,9 +41,7 @@
$string['settinguniqueid'] = 'Unique Prefix ID';
$string['configsettinguniqueid'] = 'A unique prefix id so that multiple moodle instances can share one Live Classroom Server without collision.';
$string['lcversion'] = 'Live Classroom Version';
-$string['lcversionnumber'] = '4.3.1';
$string['integrationversion'] = 'Integration Version';
-$string['integrationversionnumber'] = '1.0';
$string['emptyAdminUsername'] = 'Admin user name is empty';
$string['emptyAdminPassword'] = 'Admin user password is empty';
@@ -82,9 +80,9 @@
$string['wizard.text2.3'] = 'to make sure that your computer is ready to use the Live Classroom';
+$string['lcpopupshouldappear'] = 'The Live Classroom should now appear.<br/> if it does not, please click <a href=\"javascript:startActivity ();\">this link</a> to open it. ';
-
//First Time Use - not use yet
$string['firstRoom'] = 'Main classroom';
$string['secondRoom'] = 'Group 1';
Modified: trunk/moodle/mod/liveclassroom/view.php
===================================================================
--- trunk/moodle/mod/liveclassroom/view.php 2006-12-28 13:47:21 UTC (rev 140)
+++ trunk/moodle/mod/liveclassroom/view.php 2006-12-28 14:45:06 UTC (rev 141)
@@ -30,67 +30,83 @@
/// This page prints a particular instance of the live classroom links
- require_once("../../config.php");
- require_once("lib.php");
+require_once("../../config.php");
+require_once("lib.php");
- $id = optional_param('id', 0, PARAM_INT);
- $a = optional_param('a', 0, PARAM_INT);// liveclassroom ID
+$id = optional_param('id', 0, PARAM_INT);
+$a = optional_param('a', 0, PARAM_INT);// liveclassroom ID
- if ($id) {
- if (! $cm = get_record("course_modules", "id", $id)) {
- error("Course Module ID was incorrect 1 ");
- }
-
- if (! $course = get_record("course", "id", $cm->course)) {
- error("Course is misconfigured");
- }
-
- if (! $liveclassroom = get_record("liveclassroom", "id", $cm->instance)) {
- error("Course module is incorrect1");
- }
+if ($id) {
+ if (! $cm = get_record("course_modules", "id", $id)) {
+ error("Course Module ID was incorrect 1 ");
+ }
+ if (! $course = get_record("course", "id", $cm->course)) {
+ error("Course is misconfigured");
+ }
+ if (! $liveclassroom = get_record("liveclassroom", "id", $cm->instance)) {
+ error("Course module is incorrect1");
+ }
+} else {
+ if (! $liveclassroom = get_record("liveclassroom", "id", $a)) {
+ error("Course module is incorrect2");
+ }
+ if (! $course = get_record("course", "id", $liveclassroom->course)) {
+ error("Course is misconfigured");
+ }
+ if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $course->id)) {
+ error("Course Module ID was incorrect");
+ }
+}
- } else {
- if (! $liveclassroom = get_record("liveclassroom", "id", $a)) {
-
- error("Course module is incorrect2");
- }
- if (! $course = get_record("course", "id", $liveclassroom->course)) {
- error("Course is misconfigured");
- }
- if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $course->id)) {
- error("Course Module ID was incorrect");
- }
- }
+require_login($course->id);
- require_login($course->id);
-
// Create the session for this user
- if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
- error ("Cannot create session");
- }
+if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
+ error ("Cannot create session");
+}
- $classid = $liveclassroom->type;
+$classid = $liveclassroom->type;
+/// Print the main part of the page
+if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+}
-/// Print the main part of the page
+$strlcs = get_string("modulenameplural", "liveclassroom");
+$strlc = get_string("modulename", "liveclassroom");
+
+print_header("$course->shortname: $liveclassroom->name", "$course->fullname",
+ "$navigation <A HREF=index.php?id=$course->id>$strlcs</A> -> $liveclassroom->name",
+ "", "", true, "",
+ navmenu($course, $cm));
+
?>
-<!--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">
- <script type="text/javascript">
-
- function startActivity(){
+function monitor (name, destination) {
+ if (win[name] == null) {
+ setTimeout(monitor(name, destination), 1000);
+ }
+ else { // window exists
+ location.href= destination;
+ }
+}
- 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>
-
-
- <script> startActivity(); </script>
-
-
\ No newline at end of file
+function startActivity(){
+ startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>');
+ setTimeout (monitor('horizonWin', "<?php echo "$CFG->wwwroot/course/view.php?id=$course->id" ?>"), 1000);
+}
+
+startActivity();
+</script>
+
+<?php echo get_string ('lcpopupshouldappear', 'liveclassroom');?>
+
+<?php
+/// Finish the page
+print_footer($course);
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 13:47:25
|
Revision: 140
http://svn.sourceforge.net/hw4mdl/?rev=140&view=rev
Author: shazan
Date: 2006-12-28 05:47:21 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10547: same as revision 139. The option must have a value "0" is they are unchecked, not the value 0
Revision Links:
--------------
http://svn.sourceforge.net/hw4mdl/?rev=139&view=rev
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 13:43:22 UTC (rev 139)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 13:47:21 UTC (rev 140)
@@ -78,8 +78,8 @@
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+ if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
-
if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
@@ -97,10 +97,10 @@
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+ if (!isset($list_attributes['chatenable'])) $list_attributes['chatenable']="0";
-
//print_r($list_attributes);
//Test if the type of room has been changed
if($_SESSION['led']!=$list_attributes['led']) { // Type changed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 13:43:26
|
Revision: 139
http://svn.sourceforge.net/hw4mdl/?rev=139&view=rev
Author: shazan
Date: 2006-12-28 05:43:22 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10546 : when a case is unchecked, the option must be written is a "0" and not a 0.
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -625,11 +625,13 @@
global $COURSE;
while (list($key, $val) = each($table_attributes)) {
+
if(($key!='class_id')&&(isset($val))&&($val!="")){
+
$list_attributes .= "&".$key."=".$val;
}
}
-
+
$final_list = "&target=$roomid".$list_attributes;
$enc_list = str_replace(" ", "+", $final_list);
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -636,9 +636,7 @@
$panelSettings = $xmldoc->create_element('panelSettings');
// FEATURES PANEL INFO
$panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
-
-
// FEATURES CONTENT
$panelContent = $xmldoc->create_element('panelContent');
@@ -666,6 +664,7 @@
if($room_info['student_wb_enabled']==1) $parameters['checked']=true;
}
+
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled Students to use eBoard") ));
@@ -698,9 +697,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN", "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN","label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -729,9 +728,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Archiving") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Archiving") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -760,9 +759,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Appshare") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Appshare") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -791,9 +790,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 12:49:53 UTC (rev 138)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 13:43:22 UTC (rev 139)
@@ -70,10 +70,16 @@
}
else $bool = false;
//Available
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
- if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+
if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
@@ -83,10 +89,18 @@
else if($_GET['action']=='updateRoom') {
//Available
-
- if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
+ if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0";
+ if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0";
+ if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0";
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0";
if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
+ if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0";
+ if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0";
+
+
+
+
//print_r($list_attributes);
//Test if the type of room has been changed
if($_SESSION['led']!=$list_attributes['led']) { // Type changed
@@ -96,6 +110,7 @@
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Student');
}
else {
+
liveclassroom_api_remove_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid) , 'Student') ;
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 12:50:02
|
Revision: 138
http://svn.sourceforge.net/hw4mdl/?rev=138&view=rev
Author: shazan
Date: 2006-12-28 04:49:53 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10539 : Enabled Students to use the phone is uncheckable
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/generateSettings.php
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/view.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -1381,6 +1381,8 @@
else //just the open archive
{
$tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid);
+ add_to_log("", "liveclassroom", "test id", "test", $userid);
+ add_to_log("", "liveclassroom", "test archive", "test", sizeof($tabarchive));
}
if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room
@@ -1512,10 +1514,10 @@
$typeOrphanedArchive = $xmldoc->create_element("type");
if(liveclassroom_api_role_user_room($orphanedArchive[1], $studentuserid)=='Student') { //lecture room
- $typeOrphanedArchive->append_child($xmldoc->create_text_node("mainLectureRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("MainLecture"));
}
else{
- $typeOrphanedArchive->append_child($xmldoc->create_text_node("discussionRoom"));
+ $typeOrphanedArchive->append_child($xmldoc->create_text_node("Discussion"));
}
$parametersOrphaned->append_child($typeOrphanedArchive);
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -51,15 +51,12 @@
$courseid = $params['enc_course_id'];
- $userid = liveclassroom_api_get_teacher_user_id($courseid);
- if(isteacher($courseid, $USER->id) ) {
-
- $isteacher = 1;
-
+ $userid = liveclassroom_api_get_teacher_user_id($courseid);
+
+ if(isteacher($courseid, $USER->id) ) {
+ $isteacher = 1;
}
else if (isstudent($courseid) ) {
-
- //$userid = liveclassroom_api_get_student_user_id($courseid);
$isteacher = 0;
}
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -448,15 +448,15 @@
$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") ;
+ $parameters=array("type" => "checkbox", "value" => "0", "id" => "student_simulcast", "name" => "hms_simulcast_restricted") ;
if($action=='update'){
- if($room_info['hms_simulcast_restricted']==1){
+ if($room_info['hms_simulcast_restricted']==0){
$parameters['checked']=true;
}
else if($room_info['media_type']=="two-way-video"){
$parameters['checked']=false;
}
- else $parameters['checked']=true;
+ //else $parameters['checked']=true;
}
else $parameters['checked']=true;
@@ -499,12 +499,13 @@
$parameters=array("type" => "checkbox", "value" => "1", "id" => "two_way_enabled", "name" => "hms_two_way_enabled") ;
if($action=='update'){
if($room_info['hms_two_way_enabled']==1){
- $parameters['checked']=true;
+ $parameters['checked']=true;
}
else if($room_info['media_type']=="two-way-video"){
$parameters['checked']=false;
- }
- $parameters['checked']=true;
+ }
+
+ //$parameters['checked']=true;
}
else $parameters['checked']=true;
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -71,6 +71,8 @@
else $bool = false;
//Available
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $bool, $list_attributes)) {
notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
@@ -81,8 +83,11 @@
else if($_GET['action']=='updateRoom') {
//Available
+
+ if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']=0;
+ if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1;
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
-
+ //print_r($list_attributes);
//Test if the type of room has been changed
if($_SESSION['led']!=$list_attributes['led']) { // Type changed
@@ -95,7 +100,7 @@
liveclassroom_api_add_user_role ($_GET['id'], liveclassroom_api_get_student_user_id ($courseid), 'Instructor');
}
}
-
+ //print_r($list_attributes);
if(!liveclassroom_api_modify_room($_GET['id'],$list_attributes)) {
notice(get_string("roommodificationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]);
exit;
Modified: trunk/moodle/mod/liveclassroom/view.php
===================================================================
--- trunk/moodle/mod/liveclassroom/view.php 2006-12-28 09:01:30 UTC (rev 137)
+++ trunk/moodle/mod/liveclassroom/view.php 2006-12-28 12:49:53 UTC (rev 138)
@@ -78,25 +78,19 @@
?>
<!--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 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; ?>";
-
+ 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
-
-
- if ((isstudent($course->id)) or (isteacher($course->id, $USER->id))) {
-?>
-
-
-<?php
- }
- ?>
- <script>startActivity();</script>
\ No newline at end of file
+
+ <script> startActivity(); </script>
+
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-28 09:01:31
|
Revision: 137
http://svn.sourceforge.net/hw4mdl/?rev=137&view=rev
Author: shazan
Date: 2006-12-28 01:01:30 -0800 (Thu, 28 Dec 2006)
Log Message:
-----------
fix bug 10515 : string for wrong password added
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-12-27 14:28:11 UTC (rev 136)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-28 09:01:30 UTC (rev 137)
@@ -44,7 +44,13 @@
$string['lcversionnumber'] = '4.3.1';
$string['integrationversion'] = 'Integration Version';
$string['integrationversionnumber'] = '1.0';
+$string['emptyAdminUsername'] = 'Admin user name is empty';
+$string['emptyAdminPassword'] = 'Admin user password is empty';
+$string['wrongconfigurationURLunavailable'] = 'Wrong server configuration, URL unavailable, please see the logs to fix the error';
+$string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error';
+$string['wrongAdminPassword'] = 'Wrong password';
+$string['wrongadminpass'] = 'Invalid Authentication, please check your admin name or password';
//Add activity form
$string['name'] = 'Name';
@@ -78,8 +84,6 @@
-$string['wrongconfigurationURLunavailable'] = 'Wrong server configuration, URL unavailable, please see the logs to fix the error';
-$string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error';
//First Time Use - not use yet
$string['firstRoom'] = 'Main classroom';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 14:28:13
|
Revision: 136
http://svn.sourceforge.net/hw4mdl/?rev=136&view=rev
Author: shazan
Date: 2006-12-27 06:28:11 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10517 : only one prompt "Are you sure you want to delete this room ?"
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/js/manageXml.js
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 14:26:52 UTC (rev 135)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 14:28:11 UTC (rev 136)
@@ -317,7 +317,7 @@
if(product=="all" || currentTool=="all"){
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure you want to delete the room ?');\""
+ actionDelete="onclick=\";return confirm('Are you sure you want to delete this room ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
@@ -331,7 +331,7 @@
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure you want to delete the room ?');\""
+ actionDelete="onclick=\";return confirm('Are you sure you want to delete this room ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 14:26:53
|
Revision: 135
http://svn.sourceforge.net/hw4mdl/?rev=135&view=rev
Author: shazan
Date: 2006-12-27 06:26:52 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10517 : only one prompt "Are you sure you want to delete the room ?"
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/js/manageXml.js
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 14:11:49 UTC (rev 134)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 14:26:52 UTC (rev 135)
@@ -317,7 +317,7 @@
if(product=="all" || currentTool=="all"){
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure to delete this room '+longname+' ?');\""
+ actionDelete="onclick=\";return confirm('Are you sure you want to delete the room ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
@@ -331,7 +331,7 @@
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure to delete this room '+longname+' ?');\""
+ actionDelete="onclick=\";return confirm('Are you sure you want to delete the room ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 14:11:54
|
Revision: 134
http://svn.sourceforge.net/hw4mdl/?rev=134&view=rev
Author: shazan
Date: 2006-12-27 06:11:49 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10372: submit form check rooms and archives, thomas has fixed this problem
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/js/verifForm.js
trunk/moodle/mod/liveclassroom/lib.php
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-27 13:36:56 UTC (rev 133)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-27 14:11:49 UTC (rev 134)
@@ -466,8 +466,13 @@
}
function submitForm(url,action,id){
- if(currentProduct==LC_PRODUCT)
- 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"]);
+ if(currentProduct==LC_PRODUCT){
+
+ if(action=="updateRoom")
+ verifyFormLiveClassRoomUpdate(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
+ 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"]);
}
Modified: trunk/moodle/mod/liveclassroom/js/verifForm.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-27 13:36:56 UTC (rev 133)
+++ trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-27 14:11:49 UTC (rev 134)
@@ -1,5 +1,7 @@
- function verifyFormLiveClassRoomUpdate() {
+ function verifyFormLiveClassRoomUpdate(url) {
+
var theForm = window.document.myform;
+ theForm.action=url;
var validated = false;
var errorMessage = "";
var roomIdPattern = /^[a-z|A-Z|0-9|_]{1,32}$/;
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-27 13:36:56 UTC (rev 133)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-27 14:11:49 UTC (rev 134)
@@ -721,6 +721,7 @@
$submit = "createRoom";
$submitName = "Create";
}
+
$parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName");
$actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 13:36:57
|
Revision: 133
http://svn.sourceforge.net/hw4mdl/?rev=133&view=rev
Author: shazan
Date: 2006-12-27 05:36:56 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10523: the token to enter into a Live Classroom was not saved after the setting confirmation. Now it is
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/js/hwCommons.js
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/manageRoomAction.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-27 12:43:14 UTC (rev 132)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-27 13:36:56 UTC (rev 133)
@@ -49,7 +49,6 @@
}
else $params = $_POST;
-
$courseid = $params['enc_course_id'];
$userid = liveclassroom_api_get_teacher_user_id($courseid);
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-27 12:43:14 UTC (rev 132)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-27 13:36:56 UTC (rev 133)
@@ -248,7 +248,6 @@
function Horizon()
{
-
if(currentId!="")
startHorizon(currentId, null, null, null, null, 'hzA='+session['authToken'])
}
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 12:43:14 UTC (rev 132)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 13:36:56 UTC (rev 133)
@@ -317,7 +317,7 @@
if(product=="all" || currentTool=="all"){
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure to delete this element?');\""
+ actionDelete="onclick=\";return confirm('Are you sure to delete this room '+longname+' ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
@@ -331,7 +331,7 @@
if(value=="Delete")
{
- actionDelete="onclick=\";return confirm('Are you sure to delete this element?');\""
+ actionDelete="onclick=\";return confirm('Are you sure to delete this room '+longname+' ?');\""
}
display+="<td align='center' class='button_enabled' "+actionDelete+">"
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-27 12:43:14 UTC (rev 132)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-27 13:36:56 UTC (rev 133)
@@ -123,7 +123,11 @@
$messageType = 'roomDeleted';
}
- $urlParams = $url.'&time='.$_GET['time'];
+ if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) {
+ error ("Cannot create session");
+ }
+
+ $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time'];
if(isset($messageType)) $urlParams .= '&messageType='.$messageType;
header('Location: welcome.php?id='.$courseid.'&'.$urlParams);
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-27 12:43:14 UTC (rev 132)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-27 13:36:56 UTC (rev 133)
@@ -126,17 +126,11 @@
{
if(currentId!="")
{
-
-
- if (confirm("Are you really sure you want to delete this room ?")) {
- var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
- location.href = complete_url
+ var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
+ location.href = complete_url
//var w = window.open(complete_url, '_top');
// w.focus();
- }
-
-
-
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-27 12:43:16
|
Revision: 132
http://svn.sourceforge.net/hw4mdl/?rev=132&view=rev
Author: hugues
Date: 2006-12-27 04:43:14 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
updated build script to put artifact in a target folder
Modified Paths:
--------------
trunk/moodle/bin/package.sh
Modified: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh 2006-12-27 12:38:10 UTC (rev 131)
+++ trunk/moodle/bin/package.sh 2006-12-27 12:43:14 UTC (rev 132)
@@ -27,9 +27,9 @@
BASEDIR=`pwd`
SVN_EXPORT_DIR=${BASEDIR}/export
BUILD_DIR=${BASEDIR}/build
+ARTIFACT_DIR=${BASEDIR}/target
-
function initdir()
{
@@ -45,6 +45,9 @@
mkdir -p ${BUILD_DIR}/${package}/mod
mkdir -p ${BUILD_DIR}/${package}/lang
+
+ mkdir -p ${ARTIFACT_DIR}
+
echo "ok!"
}
@@ -107,9 +110,10 @@
function pack ()
{
package=$1
+ artifact_dir=$2
echo -n "Packing ${package}..."
- tar czf ${package}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${package}
+ tar czf ${artifact_dir}/${package}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${package}
echo "ok!"
}
@@ -125,5 +129,5 @@
initdir $PACKAGE;
export_files;
prepare $TARGET $PACKAGE;
-pack $PACKAGE;
+pack $PACKAGE $ARTIFACT_DIR;
cleanup;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-27 12:38:12
|
Revision: 131
http://svn.sourceforge.net/hw4mdl/?rev=131&view=rev
Author: hugues
Date: 2006-12-27 04:38:10 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
updated build script to perform cleanup at the end of the process
Modified Paths:
--------------
trunk/moodle/bin/package.sh
Modified: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh 2006-12-27 11:01:38 UTC (rev 130)
+++ trunk/moodle/bin/package.sh 2006-12-27 12:38:10 UTC (rev 131)
@@ -2,7 +2,7 @@
DEBUG=1
-VERSION=0.9
+VERSION=0.9-SNAPSHOT
TARGET=liveclassroom
#TARGET=liveclassroom, voicetool, pronto
@@ -113,9 +113,17 @@
echo "ok!"
}
+cleanup ()
+{
+ echo -n "Cleaning up..."
+ rm -rf ${SVN_EXPORT_DIR}
+ rm -rf ${BUILD_DIR}
+ echo "ok!"
+}
initdir $PACKAGE;
export_files;
prepare $TARGET $PACKAGE;
pack $PACKAGE;
+cleanup;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 11:01:40
|
Revision: 130
http://svn.sourceforge.net/hw4mdl/?rev=130&view=rev
Author: shazan
Date: 2006-12-27 03:01:38 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10522: radio box one-way-video checkable
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateSettings.php
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-27 10:40:53 UTC (rev 129)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-27 11:01:38 UTC (rev 130)
@@ -535,7 +535,7 @@
$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\")") ;
+ $parameters=array("type" => "radio", "value" => "one-way-video", "id" => "video", "name" => "media_type", "onclick" => "doChangeMedia(\"video\")") ;
if($action=='update'){
if($room_info['media_type']=="one-way-video"){
$parameters['checked']=true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 10:40:54
|
Revision: 129
http://svn.sourceforge.net/hw4mdl/?rev=129&view=rev
Author: shazan
Date: 2006-12-27 02:40:53 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug : 10519. pictures was in .png and we called a .jpg. Now all pictures are on .png
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/js/manageXml.js
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 10:32:22 UTC (rev 128)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-27 10:40:53 UTC (rev 129)
@@ -736,10 +736,10 @@
display += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','"+LC_PRODUCT+"')\" Ondblclick=\"javascript:startHorizon('"+archive[i].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='archive'>"
- display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.jpg\" border=\"0\" /></td>";
- display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.jpg\" border=\"0\" /></td>";
+ 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'><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 += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".png\"/></td>";
display += "</tr>";
}else{
closeArchive++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 10:32:24
|
Revision: 128
http://svn.sourceforge.net/hw4mdl/?rev=128&view=rev
Author: shazan
Date: 2006-12-27 02:32:22 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix bug 10515 : an error message is display if the user name or password is incorrect
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/config.html
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-27 09:39:30 UTC (rev 127)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-27 10:32:22 UTC (rev 128)
@@ -143,11 +143,18 @@
preg_match("(\d*)", $data, $matches);
$resp_code = $matches[0];
- if ( $resp_code != 100 && $resp_code != 301) {
+ if ( $resp_code == 204 ) {
+ add_to_log($COURSE->id, "liveclassroom", "Authentication", liveclassroom_send_logs("errorAuthentication2","respcode=$resp_code&courseId=".$COURSE->id), "Authentication Failed");
+ error(get_string('wrongadminpass', 'liveclassroom'));
+ return false;
+ }
+ else if ( $resp_code != 100 && $resp_code != 301) {
//error( "Response: Authentication Failed: $resp_code");
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_send_logs("authentication","courseId=".$COURSE->id), "Authentication succeeded");
Modified: trunk/moodle/mod/liveclassroom/config.html
===================================================================
--- trunk/moodle/mod/liveclassroom/config.html 2006-12-27 09:39:30 UTC (rev 127)
+++ trunk/moodle/mod/liveclassroom/config.html 2006-12-27 10:32:22 UTC (rev 128)
@@ -32,7 +32,7 @@
<tr valign="top">
<td align="right"><?php print_string('adminpassword', 'liveclassroom')?> :</td>
<td>
- <input name="adminpassword" type="text" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" />
+ <input name="adminpassword" type="password" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" />
</td>
<td>
<?php print_string("configadminpassword", "liveclassroom") ?>
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-27 09:39:30 UTC (rev 127)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-27 10:32:22 UTC (rev 128)
@@ -49,13 +49,17 @@
if(empty($config->servername)){
add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'));
+ }
+ else if(empty($config->adminusername)){
+ error(get_string('emptyAdminUsername', 'liveclassroom'));
+ }
+ else if(empty($config->adminpassword)){
+ error(get_string('emptyAdminPassword', 'liveclassroom'));
}
- else if (!liveclassroom_api_authenticate($config->servername,
- $config->adminusername,
- $config->adminpassword))
- {
- error(get_string('wrongconfigurationURLincorrect', 'liveclassroom'));
-}
+ liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword);
+
+// error(get_string('wrongconfigurationURLincorrect', 'liveclassroom'));
+
//TODO: check the user is really an admin
return;
Modified: trunk/moodle/mod/liveclassroom/logs.php
===================================================================
--- trunk/moodle/mod/liveclassroom/logs.php 2006-12-27 09:39:30 UTC (rev 127)
+++ trunk/moodle/mod/liveclassroom/logs.php 2006-12-27 10:32:22 UTC (rev 128)
@@ -97,9 +97,16 @@
$information = "Authentication Failed.";
if(isset($_GET['respcode'])){
$message = "Error : Authentication Failed.";
- $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ $tip = "The response code is : ".$_GET['respcode']." Please contact your administrator.";
}
break;
+ case "errorAuthentication2":
+ $information = "Authentication Failed.";
+ if(isset($_GET['respcode'])){
+ $message = "Error : Authentication Failed. Bad username or password";
+ $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.";
@@ -114,7 +121,7 @@
$information = "User creation";
if(isset($_GET['userId'])){
$message = "Error : ".$_GET['userId']." Creation Failed.";
- $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator.";
+ $tip = "The response code is : ".$_GET['respcode']." Please contact your administrator.";
}
break;
case "createSession":
@@ -127,7 +134,7 @@
$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.";
+ $tip = "The response code is : ".$_GET['respcode']." Please contact your administrator.";
}
break;
case "createClass":
@@ -140,7 +147,7 @@
$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.";
+ $tip = "The response code is : ".$_GET['respcode']." Please contact your administrator.";
}
break;
case "deleteRoom":
@@ -380,7 +387,7 @@
</tr>
<tr bgcolor="yellow">
<td bgcolor="yellow" width="1"></td>
- <td bgcolor="#ffffd0"><font size="-1" face="Courier New,Courier,Monaco">tips
+ <td bgcolor="#ffffd0"><font size="-1" face="Courier New,Courier,Monaco"><?php echo $tip; ?>
</font>
<p></p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-27 09:39:33
|
Revision: 127
http://svn.sourceforge.net/hw4mdl/?rev=127&view=rev
Author: shazan
Date: 2006-12-27 01:39:30 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
fix the bug 1051. When a course shortnane was created with a space, it made errors with the profiles creation. Now space is replace with an underscore
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
trunk/moodle/mod/liveclassroom/lib.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-26 11:15:55 UTC (rev 126)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-27 09:39:30 UTC (rev 127)
@@ -228,8 +228,11 @@
global $CFG;
global $LIVECLASSROOM_MOODLE_PREFIX;
global $COURSE;
+
+ $final_list = "&target=$userid&first_name=$rolename&last_name=$coursename";
+ $enc_list = str_replace(" ", "+", $final_list);
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, "&target=$userid&first_name=$rolename&last_name=$coursename");
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -291,7 +294,12 @@
global $USER;
global $COURSE;
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname");
+
+ $final_list = "&target=$userid&nickname=$nickname";
+ $enc_list = str_replace(" ", "+", $final_list);
+
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, $enc_list);
preg_match("(\d*)", $data, $matches);
@@ -772,8 +780,12 @@
global $CFG;
$name = $course->shortname;
-
- $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$name");
+ $enc_name = str_replace(" ", "_", $name);
+
+ $final_list = "&filter00=last_name&filter00value=$enc_name";
+ $enc_list = str_replace(" ", "+", $final_list);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, $enc_list);
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -888,7 +900,9 @@
$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");
+ $enc_coursename = str_replace(" ", "_", $course->shortname);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$enc_coursename&filter01=first_name&filter01value=Student");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
@@ -1110,7 +1124,9 @@
$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");
+ $enc_coursename = str_replace(" ", "_", $course->shortname);
+
+ $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$enc_coursename&filter01=first_name&filter01value=Teacher");
preg_match("(\d*)", $data, $matches);
$respcode = $matches[0];
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-26 11:15:55 UTC (rev 126)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-27 09:39:30 UTC (rev 127)
@@ -247,17 +247,20 @@
global $LIVECLASSROOM_TEACHER_SUFFIX;
global $LIVECLASSROOM_STUDENT_SUFFIX;
global $LIVECLASSROOM_MOODLE_PREFIX;
- //$userid = $CFG->liveclassroom_settinguniqueid."_".$course->id.$LIVECLASSROOM_TEACHER_SUFFIX;
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$course->shortname.$LIVECLASSROOM_TEACHER_SUFFIX;
-
- if (! liveclassroom_api_create_user ($userid, $course->shortname, 'Teacher')) {
+
+ $enc_coursename = str_replace(" ", "_", $course->shortname);
+
+ $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX;
+
+ if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Teacher')) {
//error("Cannot Create Teacher profile");
- return false;
+ return false;
}
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$course->shortname.$LIVECLASSROOM_STUDENT_SUFFIX;
- if (! liveclassroom_api_create_user ($userid, $course->shortname, 'Student')) {
+ $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX;
+
+ if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Student')) {
//error("Cannot Create Student profile");
return false;
@@ -292,8 +295,11 @@
global $LIVECLASSROOM_STUDENT_SUFFIX;
global $LIVECLASSROOM_MOODLE_PREFIX;
- $userid = $LIVECLASSROOM_MOODLE_PREFIX.$course->shortname.
+ $enc_coursename = str_replace(" ", "_", $course->shortname);
+
+ $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.
($isteacher?$LIVECLASSROOM_TEACHER_SUFFIX:$LIVECLASSROOM_STUDENT_SUFFIX);
+
$nickname = fullname($USER);
@@ -315,10 +321,12 @@
global $LIVECLASSROOM_MOODLE_PREFIX;
$course_name = liveclassroom_get_course_shortname($courseid);
- $roomid = $LIVECLASSROOM_MOODLE_PREFIX.$course_name.'_'.rand();
+ $enc_coursename = str_replace(" ", "_", $course_name);
+
+ $roomid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.'_'.rand();
- $teacherid = $LIVECLASSROOM_MOODLE_PREFIX.$course_name.$LIVECLASSROOM_TEACHER_SUFFIX;
- $studentid = $LIVECLASSROOM_MOODLE_PREFIX.$course_name.$LIVECLASSROOM_STUDENT_SUFFIX;
+ $teacherid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX;
+ $studentid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX;
if($bool==true) { // main lecture hall
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hu...@us...> - 2006-12-26 11:15:58
|
Revision: 126
http://svn.sourceforge.net/hw4mdl/?rev=126&view=rev
Author: hugues
Date: 2006-12-26 03:15:55 -0800 (Tue, 26 Dec 2006)
Log Message:
-----------
http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=9983
I've updated the way we package the integration to reflect the requested changes.
Modified Paths:
--------------
trunk/moodle/bin/package.sh
Modified: trunk/moodle/bin/package.sh
===================================================================
--- trunk/moodle/bin/package.sh 2006-12-22 15:16:30 UTC (rev 125)
+++ trunk/moodle/bin/package.sh 2006-12-26 11:15:55 UTC (rev 126)
@@ -2,12 +2,17 @@
DEBUG=1
+VERSION=0.9
+
TARGET=liveclassroom
#TARGET=liveclassroom, voicetool, pronto
+
+PACKAGE=WimbaMoodle-${VERSION}
+
SVN_USER_PARAM=
SVN_PASS_PARAM=
-SVN_TAG_PARAM=liveclassroom_0.9
+SVN_TAG_PARAM=${TARGET}_${VERSION}
SVN_URL_BASE=https://svn.sourceforge.net/svnroot/hw4mdl
SVN_URL_TRUNK=${SVN_URL_BASE}/trunk
@@ -27,6 +32,9 @@
function initdir()
{
+
+ package=$1;
+
echo -n "Creating build directories..."
if [ -d ${SVN_EXPORT_DIR} ]; then
rm -rf ${SVN_EXPORT_DIR}
@@ -35,8 +43,8 @@
rm -rf ${BUILD_DIR}
fi
- mkdir -p ${BUILD_DIR}/${TARGET}/mod
- mkdir -p ${BUILD_DIR}/${TARGET}/lang
+ mkdir -p ${BUILD_DIR}/${package}/mod
+ mkdir -p ${BUILD_DIR}/${package}/lang
echo "ok!"
}
@@ -73,12 +81,13 @@
{
target=$1;
+ package=$2;
echo -n "Building distribution for ${target}..."
- cp -r ${SVN_EXPORT_DIR}/moodle/mod/${target} ${BUILD_DIR}/${target}/mod/
+ cp -r ${SVN_EXPORT_DIR}/moodle/mod/${target} ${BUILD_DIR}/${package}/mod/
LANG_EXPORT_DIR="${SVN_EXPORT_DIR}/moodle/lang"
- LANG_BUILD_DIR="${BUILD_DIR}/${target}/lang"
+ LANG_BUILD_DIR="${BUILD_DIR}/${package}/lang"
for afile in `find ${LANG_EXPORT_DIR} -name "${target}.php"` ; do
src=`dirname ${afile}`
dst=${src/#${LANG_EXPORT_DIR}/${LANG_BUILD_DIR}}
@@ -90,23 +99,23 @@
${SVN_EXPORT_DIR}/moodle/README.txt\
${SVN_EXPORT_DIR}/moodle/LICENSE.txt\
${SVN_EXPORT_DIR}/moodle/INSTALL.txt\
- ${BUILD_DIR}/${target}
+ ${BUILD_DIR}/${package}
echo "ok!"
}
function pack ()
{
- target=$1;
+ package=$1
- echo -n "Packing ${target}..."
- tar czf ${target}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${target}
+ echo -n "Packing ${package}..."
+ tar czf ${package}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${package}
echo "ok!"
}
-initdir;
+initdir $PACKAGE;
export_files;
-prepare $TARGET;
-pack $TARGET;
+prepare $TARGET $PACKAGE;
+pack $PACKAGE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-22 15:16:31
|
Revision: 125
http://svn.sourceforge.net/hw4mdl/?rev=125&view=rev
Author: shazan
Date: 2006-12-22 07:16:30 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
manage the database creation on moodle 1.7
Added Paths:
-----------
trunk/moodle/mod/liveclassroom/db/install.xml
trunk/moodle/mod/liveclassroom/db/migrate2utf8.php
trunk/moodle/mod/liveclassroom/db/migrate2utf8.xml
Added: trunk/moodle/mod/liveclassroom/db/install.xml
===================================================================
--- trunk/moodle/mod/liveclassroom/db/install.xml (rev 0)
+++ trunk/moodle/mod/liveclassroom/db/install.xml 2006-12-22 15:16:30 UTC (rev 125)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<XMLDB PATH="mod/liveclassroom/db" VERSION="20060812" COMMENT="XMLDB file for Moodle mod/liveclassroom">
+ <TABLES>
+ <TABLE NAME="liveclassroom" COMMENT="Defines liveclassroom">
+ <FIELDS>
+ <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="course"/>
+ <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="type"/>
+ <FIELD NAME="type" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="name"/>
+ <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="type" NEXT="section"/>
+ <FIELD NAME="section" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="timemodified"/>
+ <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="section"/>
+ </FIELDS>
+ <KEYS>
+ <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for liveclassroom"/>
+ </KEYS>
+ <INDEXES>
+ <INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
+ </INDEXES>
+ </TABLE>
+ </TABLES>
+
+</XMLDB>
\ No newline at end of file
Property changes on: trunk/moodle/mod/liveclassroom/db/install.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/db/migrate2utf8.php
===================================================================
--- trunk/moodle/mod/liveclassroom/db/migrate2utf8.php (rev 0)
+++ trunk/moodle/mod/liveclassroom/db/migrate2utf8.php 2006-12-22 15:16:30 UTC (rev 125)
@@ -0,0 +1,157 @@
+<?php // $Id$
+function migrate2utf8_wiki_name($recordid){
+ global $CFG, $globallang;
+
+/// Some trivial checks
+ if (empty($recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if (!$wiki = get_record('wiki','id',$recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if ($globallang) {
+ $fromenc = $globallang;
+ } else {
+ $sitelang = $CFG->lang;
+ $courselang = get_course_lang($wiki->course); //Non existing!
+ $userlang = get_main_teacher_lang($wiki->course); //N.E.!!
+
+ $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
+ }
+
+/// We are going to use textlib facilities
+
+/// Convert the text
+ if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
+ $result = utfconvert($wiki->name, $fromenc);
+
+ $newwiki = new object;
+ $newwiki->id = $recordid;
+ $newwiki->name = $result;
+ migrate2utf8_update_record('wiki',$newwiki);
+ }
+/// And finally, just return the converted field
+ return $result;
+}
+
+function migrate2utf8_wiki_summary($recordid){
+ global $CFG, $globallang;
+
+/// Some trivial checks
+ if (empty($recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if (!$wiki = get_record('wiki','id',$recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if ($globallang) {
+ $fromenc = $globallang;
+ } else {
+ $sitelang = $CFG->lang;
+ $courselang = get_course_lang($wiki->course); //Non existing!
+ $userlang = get_main_teacher_lang($wiki->course); //N.E.!!
+
+ $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
+ }
+
+/// We are going to use textlib facilities
+
+/// Convert the text
+ if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
+ $result = utfconvert($wiki->summary, $fromenc);
+
+ $newwiki = new object;
+ $newwiki->id = $recordid;
+ $newwiki->summary = $result;
+ migrate2utf8_update_record('wiki',$newwiki);
+ }
+/// And finally, just return the converted field
+ return $result;
+}
+
+function migrate2utf8_wiki_pagename($recordid){
+ global $CFG, $globallang;
+
+/// Some trivial checks
+ if (empty($recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if (!$wiki = get_record('wiki','id',$recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if ($globallang) {
+ $fromenc = $globallang;
+ } else {
+ $sitelang = $CFG->lang;
+ $courselang = get_course_lang($wiki->course); //Non existing!
+ $userlang = get_main_teacher_lang($wiki->course); //N.E.!!
+
+ $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
+ }
+
+/// We are going to use textlib facilities
+
+/// Convert the text
+ if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
+ $result = utfconvert($wiki->pagename, $fromenc);
+
+ $newwiki = new object;
+ $newwiki->id = $recordid;
+ $newwiki->pagename = $result;
+ migrate2utf8_update_record('wiki',$newwiki);
+ }
+/// And finally, just return the converted field
+ return $result;
+}
+
+function migrate2utf8_wiki_initialcontent($recordid){
+ global $CFG, $globallang;
+
+/// Some trivial checks
+ if (empty($recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+
+ if (!$wiki = get_record('wiki','id',$recordid)) {
+ log_the_problem_somewhere();
+ return false;
+ }
+ if ($globallang) {
+ $fromenc = $globallang;
+ } else {
+ $sitelang = $CFG->lang;
+ $courselang = get_course_lang($wiki->course); //Non existing!
+ $userlang = get_main_teacher_lang($wiki->course); //N.E.!!
+
+ $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
+ }
+
+/// We are going to use textlib facilities
+
+/// Convert the text
+ if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
+ $result = utfconvert($wiki->initialcontent, $fromenc);
+
+ $newwiki = new object;
+ $newwiki->id = $recordid;
+ $newwiki->initialcontent = $result;
+ migrate2utf8_update_record('wiki',$newwiki);
+ }
+/// And finally, just return the converted field
+ return $result;
+}
+
+?>
Property changes on: trunk/moodle/mod/liveclassroom/db/migrate2utf8.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Added: trunk/moodle/mod/liveclassroom/db/migrate2utf8.xml
===================================================================
--- trunk/moodle/mod/liveclassroom/db/migrate2utf8.xml (rev 0)
+++ trunk/moodle/mod/liveclassroom/db/migrate2utf8.xml 2006-12-22 15:16:30 UTC (rev 125)
@@ -0,0 +1,126 @@
+<DBMIGRATION type="mod/wiki" VERSION="2005120100">
+ <TABLES>
+ <TABLE name="wiki_entries">
+ <FIELDS>
+ <FIELD name="pagename" method="PLAIN_SQL_UPDATE" type="varchar" length="255" dropindex="pagename" addindex="pagename(pagename(255))">
+ <SQL_DETECT_USER>
+ SELECT we.userid
+ FROM {$CFG->prefix}wiki_entries we
+ WHERE we.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_entries we
+ WHERE w.id = we.wikiid
+ AND we.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ </FIELDS>
+ </TABLE>
+ <TABLE name="wiki_pages">
+ <FIELDS>
+ <FIELD name="pagename" method="PLAIN_SQL_UPDATE" type="varchar" length="160" dropindex="wiki_pages_uk" addindex="wiki_pages_uk(pagename(160), version, wiki)">
+ <SQL_DETECT_USER>
+ SELECT wp.userid
+ FROM {$CFG->prefix}wiki_pages wp
+ WHERE wp.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_pages wp
+ WHERE w.id = wp.wiki
+ AND wp.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ <FIELD name="content" method="PLAIN_SQL_UPDATE" type="mediumtext" length="0">
+ <SQL_DETECT_USER>
+ SELECT wp.userid
+ FROM {$CFG->prefix}wiki_pages wp
+ WHERE wp.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_pages wp
+ WHERE w.id = wp.wiki
+ AND wp.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ <FIELD name="author" method="PLAIN_SQL_UPDATE" type="varchar" length="100" default="ewiki">
+ <SQL_DETECT_USER>
+ SELECT wp.userid
+ FROM {$CFG->prefix}wiki_pages wp
+ WHERE wp.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_pages wp
+ WHERE w.id = wp.wiki
+ AND wp.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ <FIELD name="refs" method="PLAIN_SQL_UPDATE" type="mediumtext" length="0">
+ <SQL_DETECT_USER>
+ SELECT wp.userid
+ FROM {$CFG->prefix}wiki_pages wp
+ WHERE wp.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_pages wp
+ WHERE w.id = wp.wiki
+ AND wp.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ <FIELD name="meta" method="NO_CONV" type="mediumtext" length="0" />
+ </FIELDS>
+ </TABLE>
+ <TABLE name="wiki">
+ <FIELDS>
+ <FIELD name="name" method="PHP_FUNCTION" type="varchar" length="255">
+ <PHP_FUNCTION>
+ migrate2utf8_wiki_name(RECORDID)
+ </PHP_FUNCTION>
+ </FIELD>
+ <FIELD name="summary" method="PHP_FUNCTION" type="text" length="0">
+ <PHP_FUNCTION>
+ migrate2utf8_wiki_summary(RECORDID)
+ </PHP_FUNCTION>
+ </FIELD>
+ <FIELD name="pagename" method="PHP_FUNCTION" type="varchar" length="255">
+ <PHP_FUNCTION>
+ migrate2utf8_wiki_pagename(RECORDID)
+ </PHP_FUNCTION>
+ </FIELD>
+ <FIELD name="wtype" method="NO_CONV" type="enum('teacher', 'group', 'student')" length="0" default="group" />
+ <FIELD name="initialcontent" method="PHP_FUNCTION" type="varchar" length="255">
+ <PHP_FUNCTION>
+ migrate2utf8_wiki_initialcontent(RECORDID)
+ </PHP_FUNCTION>
+ </FIELD>
+ </FIELDS>
+ </TABLE>
+ <TABLE name="wiki_locks">
+ <FIELDS>
+ <FIELD name="pagename" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
+ <SQL_DETECT_USER>
+ SELECT wl.userid
+ FROM {$CFG->prefix}wiki_locks wl
+ WHERE wl.id=RECORDID
+ </SQL_DETECT_USER>
+ <SQL_DETECT_COURSE>
+ SELECT w.course
+ FROM {$CFG->prefix}wiki w,
+ {$CFG->prefix}wiki_locks wl
+ WHERE w.id = wl.wikiid
+ AND wl.id = RECORDID
+ </SQL_DETECT_COURSE>
+ </FIELD>
+ </FIELDS>
+ </TABLE>
+ </TABLES>
+</DBMIGRATION>
Property changes on: trunk/moodle/mod/liveclassroom/db/migrate2utf8.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
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-22 15:15:11
|
Revision: 124
http://svn.sourceforge.net/hw4mdl/?rev=124&view=rev
Author: shazan
Date: 2006-12-22 07:15:10 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
update to manage the role on moodle 1.7
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/lib.php
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 13:43:04 UTC (rev 123)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 15:15:10 UTC (rev 124)
@@ -903,17 +903,27 @@
function liveclassroom_get_url_params($courseid) {
global $USER;
-/*
+ global $CFG;
+
//For moodle 1.7
- if(strstr($CFG->release,"1.6")) // 1.6.* version
- else if(strstr($CFG->release,"1.7")) // 1.7.* version
-*/
- if (isstudent($courseid)) {
- $role='Student';
- }
- else if (isteacher($courseid, $USER->id) || isteacheredit($courseid)) {
+// if(strstr($CFG->release,"1.6")) // 1.6.* version
+
+ if(isstudent($courseid)) { //Student
+ $role='Student';
+ }
+ else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher
$role='Instructor';
}
+
+ if(strstr($CFG->release,"1.7")) { // 1.7.* version
+ if (iscreator()) { // Course Creator
+ $role='Instructor';
+ }
+ else if (!isteacheredit($courseid)) { // Non-editing Teacher
+ $role='Student';
+ }
+ }
+
$signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role);
$url_params = "enc_course_id=".$courseid."&enc_email=".$USER->email."&enc_firstname=".$USER->firstname."&enc_lastname=".$USER->lastname."&enc_role=".$role."&signature=".$signature;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-22 13:43:06
|
Revision: 123
http://svn.sourceforge.net/hw4mdl/?rev=123&view=rev
Author: shazan
Date: 2006-12-22 05:43:04 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
message bar color changed
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-22 12:45:02 UTC (rev 122)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-22 13:43:04 UTC (rev 123)
@@ -638,4 +638,9 @@
margin : 0;
text-align : left;
vertical-align : top;
- }
\ No newline at end of file
+ }
+
+ .message{
+
+ background-color:#ffff99;
+ }
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 12:45:02 UTC (rev 122)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 13:43:04 UTC (rev 123)
@@ -169,7 +169,7 @@
switch(messageInformations[0].getElements("type")[0].getText()){
case "message":
- display="<table><tr><td><img src='pictures/items/messagelabel-info.png'></td><td>"+messageInformations[0].getElements("value")[0].getText()+"</td></tr></table>"
+ display="<table class=message width=100%><tr><td><img src='pictures/items/messagelabel-info.png'></td><td>"+messageInformations[0].getElements("value")[0].getText()+"</td></tr></table>"
break;
case "error":
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 12:45:02 UTC (rev 122)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 13:43:04 UTC (rev 123)
@@ -83,7 +83,7 @@
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
- <script language="javascript" src="js/ajax.js"></script>
+ <script language="javascript" src="js/Ajax.js"></script>
<script language="javascript" src="js/xmldom.js"></script>
<script language="javascript" src="js/verifForm.js"></script>
<script language="javascript" src="js/constants.js"></script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-22 12:45:13
|
Revision: 122
http://svn.sourceforge.net/hw4mdl/?rev=122&view=rev
Author: shazan
Date: 2006-12-22 04:45:02 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
message Bar well displayed
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/generateListRooms.php
trunk/moodle/mod/liveclassroom/js/manageXml.js
trunk/moodle/mod/liveclassroom/lib.php
trunk/moodle/mod/liveclassroom/welcome.php
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-22 10:11:12 UTC (rev 121)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-22 12:45:02 UTC (rev 122)
@@ -109,7 +109,7 @@
// MESSAGE BAR
if (isset($params['messageType'])) {
- $windows->append_child(liveclassroom_create_message($xmldoc, 'info', liveclassroom_get_message($params['messageType'])));
+ $windows->append_child(liveclassroom_create_message($xmldoc, liveclassroom_get_message($params['messageType'])));
}
// LIST
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 10:11:12 UTC (rev 121)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 12:45:02 UTC (rev 122)
@@ -208,7 +208,7 @@
display+="<div id='error_frame' align='center'>"
display+="<table width='100%' border='0' cellpadding='0' height='254px'>"
- display+="<tr>"
+ 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>"
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 10:11:12 UTC (rev 121)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 12:45:02 UTC (rev 122)
@@ -979,12 +979,12 @@
* @param $value : value of the message
* return a DOM Document element with the message element
*/
-function liveclassroom_create_message($xmldoc, $type, $value) {
+function liveclassroom_create_message($xmldoc, $value) {
$message = $xmldoc->create_element('windowsElement');
$messagetype = $xmldoc->create_element('type');
- $messagetype->append_child($xmldoc->create_text_node("messageBar"));
+ $messagetype->append_child($xmldoc->create_text_node("message"));
$message->append_child($messagetype);
$messageElementParameters = $xmldoc->create_element("windowsElementParameters");
@@ -992,7 +992,7 @@
$m = $xmldoc->create_element("message");
$mtype = $xmldoc->create_element("type");
- $mtype->append_child($xmldoc->create_text_node($type));
+ $mtype->append_child($xmldoc->create_text_node("message"));
$m->append_child($mtype);
$mvalue = $xmldoc->create_element("value");
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 10:11:12 UTC (rev 121)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 12:45:02 UTC (rev 122)
@@ -155,8 +155,12 @@
{
?>
showPopup()
-
- var parameters="";
+
+
+ currentProduct = "LiveClassroom";
+ typeSelect="MainLecture";
+
+ var parameters="";
parameters="product=liveclassroom&";
parameters+="action=new&";
parameters+=getURLParameters();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-22 10:11:17
|
Revision: 121
http://svn.sourceforge.net/hw4mdl/?rev=121&view=rev
Author: shazan
Date: 2006-12-22 02:11:12 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
new js files
Modified 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
Removed Paths:
-------------
trunk/moodle/mod/liveclassroom/js/General.js
trunk/moodle/mod/liveclassroom/js/xml.js
Modified: trunk/moodle/mod/liveclassroom/js/Ajax.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -59,7 +59,7 @@
function gestionDisplay(isfilter)
{
-
+if(currentTool==LC_PRODUCT || currentTool=="all"){
if(numberMainLectureRoom>5 && isfilter==false)
{
@@ -82,68 +82,71 @@
}
- if(numberBreakoutRoom>5 && isfilter==false)
+ if(numberDiscussionRoom>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>";
+ document.getElementById("div2More").innerHTML="<table><tr><td><label class='moreRoom' onclick='displayAllDiv(\"div2\",\""+numberDiscussionRoom+"\")'>"+(numberDiscussionRoom-5)+" more...</label></td></tr></table>";
- }else if(numberBreakoutRoom==0){
+ }else if(numberDiscussionRoom==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("div2").style.height=numberDiscussionRoom*19+"px";
document.getElementById("div2More").style.display="none";
}
+ }
+
+ if(currentTool==VT_PRODUCT || currentTool=="all"){
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";
}
-
}
+}
function displayAllDiv(name,number){
@@ -200,13 +203,13 @@
return params;
}
-function DisplayFirstPage(){
+function DisplayFirstPage(url){
/* Cr\xE9ation de l'objet : */
/* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */
-xmlhttp.open("POST", 'generateListRooms.php',true);
+xmlhttp.open("POST", url,true);
/* Effectue la requ\xEAte : */
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.onreadystatechange=Management;
@@ -224,8 +227,10 @@
var parameters="";
if(currentProduct != "" )
parameters="product="+currentProduct+"&"
-
- if( currentId != "")
+ if(typeSelect != "" )
+ parameters+="type="+typeSelect+"&"
+
+ if( currentId != "")
parameters+="id="+currentId+"&"
if(action!="")
parameters+="action="+action+"&";
@@ -241,9 +246,10 @@
}
-function launchNew(url,fonction,action,product){
+function launchNew(url,fonction,action,product,type){
- currentProduct = product;
+ currentProduct = product;
+ typeSelect=type;
launchAjaxRequest(url,fonction,action,"true");
}
Deleted: trunk/moodle/mod/liveclassroom/js/General.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/General.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/General.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -1,369 +0,0 @@
-// 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
Modified: trunk/moodle/mod/liveclassroom/js/constants.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -1,5 +1,14 @@
// JScript File
+//Constants
+var LC_PRODUCT= "LiveClassroom";
+var LC_MAINLECTURE = "MainLecture";
+var LC_DISCUSSION = "Discussion";
+var VT_PRODUCT = "VoiceTools";
+var VB_PRODUCT = "VoiceBoard";
+var VP_PRODUCT = "VoicePresentation";
+
+
var session=new Array();
var timeOfLoad="";
var currentFilter='all';
@@ -7,14 +16,14 @@
var currentId="";
var currentProduct="";
var currentTool="all";
-var typeSelect="mainLecture"
+var typeSelect=LC_MAINLECTURE;
var longname="";
var description="";
+var currentNid="";
-
var currentDiv=0;
var numberMainLectureRoom=0;
-var numberBreakoutRoom=0;
+var numberDiscussionRoom=0;
var numberVoiceBoard=0;
var numberVoicePresentation=0;
var studentView=false;
@@ -23,12 +32,5 @@
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
Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -46,13 +46,13 @@
function toggleType(type)
{
-
+
longname=document.getElementById('longname').value;
description=document.getElementById('description').value;
typeSelect=type;
-
+
manageXml('','all');
- longname="";
+ longname="";
description="";
@@ -60,11 +60,10 @@
}
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)) {
+ if (confirm("Are you really sure you want to delete this " + type + " ?" )) {
location.href = delUrl
}
- }
+
}
@@ -148,10 +147,10 @@
if (document.getElementById(id).style.display=="none" || document.getElementById(id).className=="hide")
{
- if(type=="MainLecture")
+ if(type==LC_MAINLECTURE)
numberMainLectureRoom+=numberArchive[roomId];
else
- numberBreakoutRoom+=numberArchive[roomId];
+ numberDiscussionRoom+=numberArchive[roomId];
if (document.getElementById(id).className=="hide")
{
document.getElementById(id).className="visible";
@@ -164,10 +163,10 @@
}
else
{
- if(type=="MainLecture")
+ if(type==LC_MAINLECTURE)
numberMainLectureRoom-=numberArchive[roomId];
else
- numberBreakoutRoom-=numberArchive[roomId];
+ numberDiscussionRoom-=numberArchive[roomId];
if (document.getElementById(id).className=="visible")
{
@@ -183,6 +182,9 @@
gestionDisplay(false)
}
+
+
+
function Navigateur()
{
if (navigator.appName.indexOf("Netscape") > -1)
@@ -193,16 +195,19 @@
{
return "Explorer";
}
+
+ if ( navigator.userAgent.indexOf("Safari") != -1)
+ {
+ return "Safari";
+ }
return "Unknown";
}
-function OneClick(id,product,type)
-
-{
-
+function OneClick(id,product,type,nid)
+{
if(currentId!="" && currentId!=id)
document.getElementById(currentId).style.backgroundColor="white";
if(currentId!=id)
@@ -210,27 +215,40 @@
document.getElementById(id).style.backgroundColor="#c3dbf7";
}
currentId=id;
+
+ if(product==VT_PRODUCT )
+ currentNid=nid;
+
currentProduct=product;
typeSelect=type;
-
+
if(document.getElementById("info")!=null && document.getElementById("info").style.display=="block")
document.getElementById("info").style.display="none";
if(currentId!="")
- manageXml("","toolBar");
+ manageXml("","toolBar");
}
function dclick(id)
{
+
if(currentId!=""){
- document.getElementById(currentId).style.backgroundColor="white";
+
currentId=id;
Launch();
}
}
+function managePublicState(id,type){
+if(type=="private")
+ document.getElementById(id).disabled=true;
+else
+ document.getElementById(id).disabled=false;
+}
+
function Horizon()
{
+
if(currentId!="")
startHorizon(currentId, null, null, null, null, 'hzA='+session['authToken'])
}
@@ -248,6 +266,7 @@
studentView=false;
}
currentId="";
+ currentNid="";
currentProduct="";
manageXml("","all");
@@ -265,7 +284,7 @@
if(currentId!="")
{
- var complete_url=url+'?product='+currentProduct+'&id='+currentId+'&'+param;
+ var complete_url=url+'?type='+typeSelect+'&product='+currentProduct+'&id='+currentId+'&'+param;
window.open(complete_url,"_self");
@@ -317,6 +336,7 @@
currentFilter=id;
currentDiv=divNumber;
currentId="";
+ currentNid="";
currentProduct="";
manageXml('',"all");
@@ -347,38 +367,42 @@
function startBoard(type)
{
- if(currentId!="")
+ if(currentNid!="")
{
- 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')
- }
+ var type;
+ if(typeSelect==VB_PRODUCT){
+ type="board"
+ window.open(session["vtServerUrl"]+'/'+type+'?action=display_popup&nid='+currentNid,"vt_popup",'scrollbars=yes,resizable=yes,width=800,height=500')
+ }
+ else if(typeSelect==VP_PRODUCT){
+ type="presentation"
+ window.open(session["vtServerUrl"]+'/'+type+'?action=display_popup&nid='+currentNid,"vt_popup",'scrollbars=yes,resizable=yes,width=100,height=500')
+
+ }
+ }
+
}
function search(value){
currentId=""
+ currentNid=""
currentProduct=""
manageXml(search.value,"all");
gestionDisplay();
}
function Launch(){
- if(currentProduct=="liveClassroom"){
+
+
+ if(currentProduct==LC_PRODUCT){
Horizon();
- }else if(currentProduct=="voiceBoard"){
-
+ }else if(currentProduct==VT_PRODUCT){
+
startBoard(typeSelect);
}
-
- currentId="";
- currentProduct="";
-
+
+
}
@@ -407,23 +431,23 @@
}
if ( useplugin != null ) {
- horizonurl += "&useplugin=" + useplugin;
+ horizonurl += "&useplugin=" + useplugin;
}
if ( user != null ) {
- horizonurl += "&AuthName=Horizon&credential_0=" + user;
+ horizonurl += "&AuthName=Horizon&credential_0=" + user;
}
if ( password != null ) {
- horizonurl += "&credential_1=" + password;
+ horizonurl += "&credential_1=" + password;
}
if ( nickname != null ) {
- horizonurl += "&credential_2=" + nickname;
+ horizonurl += "&credential_2=" + nickname;
}
if ( paramstring != null ) {
- horizonurl += "&" + paramstring;
+ horizonurl += "&" + paramstring;
}
// open a window with the horizon ui
@@ -442,8 +466,8 @@
}
function submitForm(url,action,id){
-alert(id);
- if(currentProduct=="liveClassroom")
+
+ if(currentProduct==LC_PRODUCT)
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"]);
@@ -483,6 +507,7 @@
function initSearch(search){
currentProduct="";
currentId="";
+ currentNid=""
manageXml(search,"all");
document.getElementById("search").focus();
}
Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -3,7 +3,7 @@
function manageXml(search,divToReload){
var display="";
-
+
if(divToReload=="all"){
display+="<form method=post name=myform>"
display+=initDisplay();
@@ -23,7 +23,7 @@
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" ){
@@ -60,7 +60,7 @@
}
break;
- case "messageBar":
+ case "message":
if(divToReload=="all"){
display+=openDiv("messageBar","messageBar")
display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters"));
@@ -153,7 +153,8 @@
correctPNG();
if(divToReload=="all" || divToReload=="list"){
- gestionDisplay(false);
+
+ gestionDisplay(false);
document.getElementById("search").focus();
}
@@ -167,8 +168,9 @@
var messageInformations=elementParameters[0].getElements("message")
switch(messageInformations[0].getElements("type")[0].getText()){
- case "info":
- pictureUrl="pictures/items/messagelabel-info.png";
+ case "message":
+ display="<table><tr><td><img src='pictures/items/messagelabel-info.png'></td><td>"+messageInformations[0].getElements("value")[0].getText()+"</td></tr></table>"
+
break;
case "error":
@@ -293,7 +295,8 @@
var display="";
var actionString=""
-
+ if(session["role"]=="Student")
+ studentView=true;
var actionString=action[0].getElements("name")[0].getText()+"(";
@@ -306,40 +309,73 @@
actionString+="\'"+ actionParameters[j].getText()+"\',";
}
actionString+=")";
-
- if(typeOfUser=="all" || (typeOfUser=="instructor" && studentView==false)){
-
+ var actionDelete="";
+ if( typeOfUser=="all" || (typeOfUser=="instructor" && studentView==false)){
+
if(availibility=="true" || currentId!=""){
- if(product=="all" || currentProduct==product){
- display+="<td align='center' class='button_enabled'>"
- display+="<a href=\"javascript:"+actionString+";\">"
-
- display+="<img src='"+pictureUrl+".png' style='text-decoration:none;' border=0 id='"+value+"' name='"+value+"_icon' ><br style='text-decoration:none;' />"
+ if(product=="all" || currentTool=="all"){
+ if(value=="Delete")
+ {
+ actionDelete="onclick=\";return confirm('Are you sure to delete this element?');\""
+ }
+ display+="<td align='center' class='button_enabled' "+actionDelete+">"
+
+ display+="<a href=\"javascript:"+actionString+";\">"
+ display+="<img src='"+pictureUrl+".png' style='text-decoration:none;height:26px' border=0 id='"+value+"' name='"+value+"_icon' ><br style='text-decoration:none;' />"
+
display+=value ;
display+="</a></td> "
- }else{
- display+="<td align='center' class='button_disabled' >"
+ }else if(currentTool==product ){
+ if(value=="Delete")
+ {
+ actionDelete="onclick=\";return confirm('Are you sure to delete this element?');\""
+ }
+ display+="<td align='center' class='button_enabled' "+actionDelete+">"
+
+ display+="<a href=\"javascript:"+actionString+";\">"
+
+ display+="<img src='"+pictureUrl+".png' style='text-decoration:none;height:26px' border=0 id='"+value+"' name='"+value+"_icon' ><br style='text-decoration:none;' />"
+
+ display+=value ;
+ display+="</a></td> "
+
+ }else if(currentTool!=product ){
+
+ display+="<td align='center' class='empty_space'> </td>"
+
+ }else {
+
+ display+="<td align='center' class='button_disabled' "+actionDelete+">"
+
display+="<img src='"+pictureUrl+"-disabled.png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
display+=value ;
- display+="</td> "
+ display+="</td> "
+
}
}else{
- display+="<td align='center' class='button_disabled' >"
-
- display+="<img src='"+pictureUrl+"-disabled.png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
+
+ if(currentTool==product || product=="all" || currentTool=="all"){
+ display+="<td align='center' class='button_disabled' "+actionDelete+" >"
+
+ display+="<img src='"+pictureUrl+"-disabled.png' border=0 id='"+value+"' name='"+value+"_icon' height='24' width='24'><br />"
- display+=value ;
- display+="</td> "
+ display+=value ;
+ display+="</td> "
+ }else{
+ display+="<td align='center' class='empty_space'> </td>"
+
+
+ }
}
}else{ // the button is unavalaible for this user
display+="<td align='center' class='empty_space'> </td>"
}
- display+="<td class='separator_space'></td> "
+ display+="<td class='separator_space'> </td> "
return display;
}
@@ -347,9 +383,23 @@
function displayToolBarSearch(search)
{
var display="";
+
+ if(Navigateur()=="Safari"){
+ display+="<td align='right' width=115px>"
+ display+="<table border=0 class='search' cellspacing=0 cellpadding=0 >"
+ display+="<tr>"
+
+ display+="<td align='right' >"
+ display+="<input name='search' id='search' type='search' style='border:0; width: 110px;' "
+ display+="onkeyup='javascript:manageXml(search.value,\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />"
+ display+="</td>"
+ display+="</tr>"
+ display+="</table>"
+ display+="</td>"
+ }else{
display+="<td align='right' width=115px>"
- display+="<table border=0 class='search' cellspacing=0 cellpadding=0 >"
+ display+="<table border=0 class='search' cellspacing=0 cellpadding=0 style=border:none>"
display+="<tr>"
display+="<td align='right' width=26px style='background-image: url(pictures/items/headerbar-searchfield-left.png); background-repeat:no-repeat;'>"
display+="</td>"
@@ -366,6 +416,8 @@
display+="</tr>"
display+="</table>"
display+="</td>"
+ }
+
return display;
}
@@ -435,7 +487,7 @@
{
//clear the global variable
numberMainLectureRoom=0;
- numberBreakoutRoom=0;
+ numberDiscussionRoom=0;
numberVoiceBoard=0;
numberVoicePresentation=0;
@@ -475,11 +527,17 @@
var content = list[0].getElements("listElements");
+
+ if(content!=""){
var listElements = content[0].getElements("listElement");
var positionDiscussionRoom=0;
var positionMainLecture=0;
var orphanedMainLecture="";
var orphanedDiscussion="";
+
+ if(session["role"]=="Student")
+ studentView=true;
+
for(i=0; i< listElements.length; i++)
{
var parameters=listElements[i].getElements("listElementParameters");
@@ -487,47 +545,46 @@
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")){
-
+ if(studentView==false || ((studentView==true) && parameters[0].getElements("preview")[0].getText()=="available")){
+
switch(parameters[0].getElements("typeOfElement")[0].getText()){
- case "Main Lecture":
+ case LC_MAINLECTURE:
//test needed for orphaned
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);
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addRoomElement(LC_MAINLECTURE,parameters);
numberMainLectureRoom++;
positionMainLecture=parameters[0].getElements("position")[0].getText();
}
break;
- case "DiscussionRoom":
+ case "Discussion":
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++;
+
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addRoomElement("Discussion",parameters);
+ numberDiscussionRoom++;
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("voiceBoard",parameters);
+ case VB_PRODUCT:
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addBoardElement(VB_PRODUCT,parameters);
numberVoiceBoard++;
break;
- case "VoicePresentation":
+ case VP_PRODUCT:
- parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addBoardElement("voicePresentation",parameters);
+ parts[parameters[0].getElements("position")[0].getText()]=parts[parameters[0].getElements("position")[0].getText()]+addBoardElement(VP_PRODUCT,parameters);
numberVoicePresentation++;
break;
case "orphanedArchive":
- if(parameters[0].getElements("type")[0].getText()=="discussionRoom")
+ if(parameters[0].getElements("type")[0].getText()==LC_DISCUSSION)
{ orphanedDiscussion=orphanedDiscussion+addOrphanedElement(parameters);
- numberBreakoutRoom++;
+ numberDiscussionRoom++;
}
- else if(parameters[0].getElements("type")[0].getText()=="mainLectureRoom")
+ else if(parameters[0].getElements("type")[0].getText()==LC_MAINLECTURE)
{ orphanedMainLecture=orphanedMainLecture+addOrphanedElement(parameters);
numberMainLectureRoom++;
}
@@ -536,7 +593,7 @@
}
}
}
-
+ }
var display="";
display+="<table border='0' align='center' cellpadding='0' cellspacing='0' width=100% >";
@@ -554,15 +611,18 @@
display+=parts[i];
}
display+="</td></tr>";
+ display+="<tr><td height=5px></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' class='separateProduct'>";
display+="<table cellpadding='0' cellspacing='0' width='100%'>";
display+="<tr class='productTitle'>";
@@ -583,7 +643,7 @@
{
var display="";
- display += "<tr id="+parameters[0].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+parameters[0].getElements("id")[0].getText()+"','liveclassroom','archive')\" Ondblclick=\"javascript:startHorizon('"+parameters[0].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='room'>"
+ display += "<tr id="+parameters[0].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+parameters[0].getElements("id")[0].getText()+"','"+LC_PRODUCT+"','archive')\" Ondblclick=\"javascript:startHorizon('"+parameters[0].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='room'>"
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>";
@@ -610,7 +670,7 @@
function displayBoard(type,availibility,title,rid,nid)
{
var display="";
- display += "<tr id="+rid+" height=16px Onclick=\"OneClick('"+rid+"','voiceBoard','"+type+"')\" Ondblclick=\"javascript:dclick('"+nid+"')\" class='room'>"
+ display += "<tr id='"+rid+"' height=16px Onclick=\"OneClick('"+rid+"','"+VT_PRODUCT+"','"+type+"','"+nid+"')\" Ondblclick=\"javascript:dclick('"+rid+"')\" class='room'>"
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>";
@@ -647,10 +707,10 @@
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 Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','"+LC_PRODUCT+"','"+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 += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','"+LC_PRODUCT+"','"+type+"')\" width=300px ><label onmousemove='javascript:ShowToolTip(event,\""+longname+"\",\""+availibility+"\")' onmouseout='javascript:HideToolTip()'>"+longname+"</label></td>";
+ display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','"+LC_PRODUCT+"','"+type+"')\" class='shiftAvailability' align=right ><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>";
display += "</tr>";
if(archives!=null){
@@ -674,11 +734,11 @@
{
if(studentView==false || (studentView==true && archive[i].getElements("preview")[0].getText()=="available")){
- 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 += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','"+LC_PRODUCT+"')\" Ondblclick=\"javascript:startHorizon('"+archive[i].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='archive'>"
display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.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 width='300px'><label onmousemove='javascript:ShowToolTip(event,\""+archive[i].getElements("nameDisplay")[0].getText()+"\",\""+archive[i].getElements("preview")[0].getText()+"\")' onmouseout='javascript:HideToolTip()'>"+archive[i].getElements("nameDisplay")[0].getText()+"</label></td>";
display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".jpg\"/></td>";
display += "</tr>";
}else{
@@ -715,9 +775,13 @@
actionJavascript+="\""+ actionParameters[j].getText()+"\",";
}
actionJavascript+=")";
-
+ var height="72px";
- display +="<table cellspacing='0' cellpadding='0' align=center width=100% border='0' >";
+
+ if(currentProduct==VT_PRODUCT)
+ height="116px"
+
+ display +="<table cellspacing='0' cellpadding='0' align=center width=100% border='0' height="+height+" >";
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>";
@@ -797,32 +861,45 @@
var line=div[j].getElements("panelLine");
display +="<div style='border-bottom: #818181 1px solid;height:200px;display:"+info[j].getElements("display")[0].getText()+";' id='span"+info[j].getElements("position")[0].getText()+"' class=tab>";
-display +="<table cellspacing='5px' cellpadding='0' align='center' border='0' width=100%>";
+display +="<table cellspacing='5px' cellpadding='0px' align='center' border='0' width=100%>";
for(var i=0;i<line.length; i++){
- if(line[i].getElements("style")[0].getText()!="" && (line[i].getElements("style")[0].getText()=="hide"|| line[i].getElements("style")[0].getText()=="hideAndShift")){
- display +="<tr ><td>";
+ if(line[i].getElements("style")[0].getText()=="hide" ){
+
+ display +="<tr>";
- display +="<div id='"+line[i].getElements("id")[0].getText()+"' class='"+line[i].getElements("style")[0].getText()+"'><table cellspacing='0px' cellpadding='0'><tr>"
- display += DisplayElementsLine(line[i].getElements("panelLinePart"));
- display += "</tr></table></div>"
- display +="</td></tr>";
+ display += DisplayElementsLine(line[i].getElements("panelLinePart"),line[i].getElements("id")[0].getText(),true,line[i].getElements("style")[0].getText());
+
+ display +="</tr>";
+
- }else{
- display +="<tr class='"+line[i].getElements("style")[0].getText()+"'>";
+ }
+ else if(line[i].getElements("style")[0].getText()=="visible" ){
+
+ display +="<tr>";
- display += DisplayElementsLine(line[i].getElements("panelLinePart"));
+ display += DisplayElementsLine(line[i].getElements("panelLinePart"),line[i].getElements("id")[0].getText(),true,line[i].getElements("style")[0].getText());
- display +="</tr>";
+ display +="</tr>";
+
+
}
+
+
+ else{
+
+ display +="<tr class='"+line[i].getElements("style")[0].getText()+"'>";
+
+ display += DisplayElementsLine(line[i].getElements("panelLinePart"),line[i].getElements("id")[0].getText());
+
+ display +="</tr>";
+ }
}
-
-
display +="</table>";
display +="</div>";
}
@@ -832,28 +909,45 @@
return display;
}
+function displayDiv(){
-function DisplayElementsLine(linePart){
+}
+
+
+
+
+function DisplayElementsLine(linePart,id,hide,styleDiv){
+
+
var display="";
for(var j=0;j<linePart.length; j++){
var elements=linePart[j].getElements("lineElement")
display +="<td";
var style=new String(linePart[j].getElements("style")[0].getText());
- if(style != "")
+
+ 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());
+ var align=new String(linePart[j].getElements("align")[0].getText());
if(align != "")
+ display+=" align="+align;
display+=" >"
+
+ if(hide==true)
+ display+="<div id="+id+" class='"+styleDiv+"'><table ><tr><td>"
for(var i=0;i<elements.length; i++){
+
+
var context=new String(elements[i].getElements("displayContext")[0].getText());
-
+
if(context.indexOf("all")!=-1 || context.indexOf(typeSelect)!=-1){
switch(elements[i].getElements("type")[0].getText()){
+
case "label":
display += displayElement("label",elements[i].getElements("parameters"));
@@ -882,6 +976,8 @@
}
}
}
+ if(hide==true)
+ display+="</td></tr></table></div>"
display +="</td>";
}
@@ -989,7 +1085,6 @@
}
-
return display;
}
@@ -1010,7 +1105,7 @@
var product="";
display="<table cellspacing='0' cellpadding='0'>"
display+= "<tr>"
- display+= "<td align=left><label class='roomNameForSettings'> "+contextBarInformations[0].getElements("name")[0].getText()+"</label><label>: "+context+"</label></td>"
+ display+= "<td align=left class='roomNameForSetting'>"+contextBarInformations[0].getElements("name")[0].getText()+"<label> : "+context+"</label></td>"
display+= "<td align=right>"+product+"</td>"
display+= "</tr>"
@@ -1106,14 +1201,24 @@
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();
-
- else
- currentTool="voiceTools";
- if(informations[0].getElements("lcServerUrl")!="")
+
+
+ if(informations[0].getElements("lcServerUrl")[0].getText()!="" && informations[0].getElements("vtServerUrl")[0].getText()!=""){
+ session["vtServerUrl"] = informations[0].getElements("vtServerUrl")[0].getText();
+ session["lcServerUrl"] = informations[0].getElements("lcServerUrl")[0].getText();
+
+ currentTool="all";
+ }
+ else if(informations[0].getElements("vtServerUrl")[0].getText()!=""){
+ session["vtServerUrl"] = informations[0].getElements("vtServerUrl")[0].getText();
+
+ currentTool=VT_PRODUCT;
+ }
+ else if(informations[0].getElements("lcServerUrl")[0].getText()!=""){
session["lcServerUrl"] = informations[0].getElements("lcServerUrl")[0].getText();
- else
- currentTool="liveClassroom";
+ currentTool=LC_PRODUCT;
+
+ }
-}
+
+}
\ No newline at end of file
Modified: trunk/moodle/mod/liveclassroom/js/pngfix.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/pngfix.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/pngfix.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -32,4 +32,4 @@
}
}
-
\ No newline at end of file
+
Modified: trunk/moodle/mod/liveclassroom/js/verifForm.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -107,7 +107,7 @@
function check_time(fd, fm, fy, fth, ftm, td, tm, ty, tth, ttm) {
- var d = window.document.entry_info_form;
+ var d = window.document.myform;
var fday = parseInt(fd);
var fmon = parseInt(fm);
var fyear = parseInt(fy);
Deleted: trunk/moodle/mod/liveclassroom/js/xml.js
===================================================================
--- trunk/moodle/mod/liveclassroom/js/xml.js 2006-12-22 10:01:56 UTC (rev 120)
+++ trunk/moodle/mod/liveclassroom/js/xml.js 2006-12-22 10:11:12 UTC (rev 121)
@@ -1,956 +0,0 @@
-// 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...
[truncated message content] |
|
From: <sh...@us...> - 2006-12-22 10:01:58
|
Revision: 120
http://svn.sourceforge.net/hw4mdl/?rev=120&view=rev
Author: shazan
Date: 2006-12-22 02:01:56 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
make change to be compatible with the last js files
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/css/StyleSheet.css
Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css
===================================================================
--- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-22 10:01:20 UTC (rev 119)
+++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2006-12-22 10:01:56 UTC (rev 120)
@@ -16,7 +16,6 @@
{font-size:100%;}
-
.page_title
{
font-family: Verdana, Arial, Helvetica, sans-serif;
@@ -43,13 +42,13 @@
}
.alignRight
{
- padding-right: 5px;
+
}
.shiftAvailability
{
- padding-right:100px;
+ padding-right:50px;
}
div.tab
{
@@ -62,7 +61,24 @@
}
+.titlePodcaster
+ {
+ color:#305060;
+ font-size:14pt;
+ padding-left:10px;
+ font-family:Century Gothic, Verdana, Helvetica, Arial;
+ font-weight:bold;
+ font-style:italic;
+ vertical-align:top;
+
+ }
+
+
+ .podcaster
+ {
+ padding-left:15px;
+ }
.button_hide
{
@@ -155,6 +171,7 @@
text-decoration:none;
display:block;
width:100%;
+cursor:help;
}
@@ -165,7 +182,7 @@
border: none;
background-position: 3px 4px;
-
+ cursor:help;
}
@@ -213,20 +230,18 @@
.separator_space
{
width:2px;
- }
+}
.empty_space
{
- width:30px;
- }
+ width:50px;
+}
.button_enabled a:hover{ color:black;
font-family: Arial;
-
font-size: 9px;
- font-weight:bold;
cursor:hand;
}
@@ -237,34 +252,42 @@
tr.selectRoom{
background-color:red;
cursor:hand;
+ text-decoration:none;
}
.divProduct
{
padding-top:3px;
-padding-left:5px ;
+padding-left:2px ;
+
}
+.separateProduct
+{
+ border-top:solid 1px #C7D3E1
+}
-
.shortShift{
padding-left:5px;
}
.room td{
- padding-left:5px ;
+ padding-left:0px ;
font-family:Verdana;
color:Black;
- font-size:8;
- border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+ font-size:10;
+
+ cursor:default;
+ text-decoration:none;
}
+
.room label{
font-family:Verdana;
color:Black;
- font-size:8;
- border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+ font-size:10;
+
+ cursor:default;
+ text-decoration:none;
}
tr.overRoom{
font-family:Verdana;
@@ -272,17 +295,17 @@
font-size:11px;
border-bottom:solid 1px #F3F3F3;
background-color:#f0f3f5;
- cursor:pointer;
- cursor:hand;
+
+ cursor:default;
}
.archive td{
- padding-left:5px ;
+ padding-left:2px ;
font-family:Verdana;
color:#666666;
font-style:italic;
font-size:11px;
- border-bottom:solid 1px #F3F3F3;
+
}
.room td{
@@ -291,16 +314,16 @@
color:Black;
font-size:10;
border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+ cursor:default;
}
.archive label{
font-family:Verdana;
color:Black;
- font-size:8;
+ font-size:10;
border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+ cursor:default;
}
.room label{
@@ -308,13 +331,13 @@
color:Black;
font-size:10;
border-bottom:solid 1px #F3F3F3;
- cursor:pointer;
+ cursor:default;
}
.filterBar table{
- padding-left:5px ;
+
background-image:url("../pictures/backgrounds/filterbar.png");
height:24px;
font-weight:bold ;
@@ -329,6 +352,7 @@
font-family :Verdana;
color:#333333;
height:24px;
+ text-align:center;
font-size:10px;
font-weight:bold ;
}
@@ -337,6 +361,7 @@
{ font-weight:bold ;
font-family :Verdana;
color:#ffffff;
+ text-align:center;
height:24px;
font-size:10px;
@@ -350,9 +375,9 @@
.filter_middle_enabled
{
background-image:url("../pictures/items/filter-enabled-middle.png");
-
font-family :Verdana;
color:#ffffff;
+ text-align:center;
height:24px;
font-size:10px;
font-weight:bold ;
@@ -362,13 +387,48 @@
background-image:url("../pictures/items/filter-enabled-right.png");
background-repeat:no-repeat;
}
+.filter_right_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-right.png");
+ background-repeat:no-repeat;
+}
+.noFilter
+{
+ background-image:none;
+ font-family :Verdana;
+ color:#333333;
+ text-align:center;
+ height:24px;
+ font-size:10px;
+ font-weight:bold ;
+}
+.filter_middle_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-middle.png");
+ font-family :Verdana;
+ color:#333333;
+ text-align:center;
+ height:24px;
+ font-size:10px;
+ font-weight:bold ;
+
+}
+.filter_left_rollover
+{
+ background-image:url("../pictures/items/filter-rollover-left.png");
+ background-repeat:no-repeat;
+}
+.filterSpace
+{
+ padding-left:10px;
+}
.contextBar table
{
padding-left:5px;
padding-right:5px;
background-image:url("../pictures/backgrounds/toolbar.png");
- background-repeat:no-repeat;
+
height:30px;
width:100%
@@ -383,7 +443,7 @@
.productChoice table
{
- height:72px;
+
border-bottom:solid 1px #F0F0F0;
margin-left:10px;
margin-right:10px;
@@ -422,12 +482,25 @@
{
display:none;
}
+.hideAndShift
+{
+ display:none;
+ padding-left:20px;
+}
.visible
{
display:block;
}
+.visibleAndShift
+{
+ display:block;
+ padding-left:20px;
+}
+
+
+
label.moreRoom
{
color:Navy;
@@ -443,7 +516,7 @@
font-size:8pt;
display:block;
position:absolute;
- top:50%; left:50%;
+ top:45%; left:45%;
color:#000;
text-align: center;
@@ -473,13 +546,13 @@
width:100%;
background-image:url("../pictures/backgrounds/toolbar.png");
+ border-bottom:solid 1px #999999;
-
}
.list
{
- height:215px;
+ height:285px;
overflow-y:scroll;
overflow-x: hidden;
width:100%;
@@ -509,7 +582,7 @@
height:24px ;
padding:0px ;
background-color:#F0F0F0;
-
+ border-top:solid 1px #999999
}
@@ -528,15 +601,41 @@
width:100%;
border-bottom: #818181 1px solid;
}
-
-.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
+
+ .tooltip
+ {
+ width:200px;
+ display:none;
+ position:absolute;
+ z-index:1;
+ background-color:#ffffd0;
+ padding:2px;
+ margin:2px;
+ left:0px;
+ top:0px;
+ font-family:Verdana;
+ font-size:8pt;
+ cursor:default;
+ }
+
+ #error_frame {
+ background-color : #FFD0D0;
+ padding : 0;
+ margin : 0;
+ border-style : solid;
+ border-color: red;
+ border-width : 1px;
+ text-align : left;
+ vertical-align : middle;
+ }
+
+ #error_title {
+ font-family : Verdana,Arial,Helvetica;
+ font-size : 12px;
+ font-weight : bold;
+ color : black;
+ padding : 0;
+ margin : 0;
+ text-align : left;
+ vertical-align : top;
+ }
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sh...@us...> - 2006-12-22 10:01:23
|
Revision: 119
http://svn.sourceforge.net/hw4mdl/?rev=119&view=rev
Author: shazan
Date: 2006-12-22 02:01:20 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
Modified Paths:
--------------
trunk/moodle/mod/liveclassroom/api.php
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/welcome.php
Modified: trunk/moodle/mod/liveclassroom/api.php
===================================================================
--- trunk/moodle/mod/liveclassroom/api.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/api.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -40,7 +40,7 @@
* @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');
Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -52,17 +52,16 @@
$courseid = $params['enc_course_id'];
-
+ $userid = liveclassroom_api_get_teacher_user_id($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);
+ //$userid = liveclassroom_api_get_student_user_id($courseid);
$isteacher = 0;
-
}
if (!liveclassroom_init_session($params)) {
@@ -94,7 +93,7 @@
$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', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchNew('generateSettings.php','Management','new','LiveClassroom','MainLecture')", ''));
$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', ''));
$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", ''));
$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()',''));
@@ -135,7 +134,7 @@
// PRODUCTS CONTENT
- $products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
+ $products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher));
$elementParameters->append_child($products);
Modified: trunk/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -28,26 +28,27 @@
******************************************************************************/
/* $Id$ */
-
/// This page is to generate the settings of a room or archive
-
- require_once("../../config.php");
+ // require_once($CFG->dirroot.'/config.php');
+ require_once("../../config.php");
require_once("lib.php");
require_once("api.php");
-
// Variables needed
global $CFG;
if (version_compare(PHP_VERSION,'5','>=')) {
require_once($CFG->libdir.'/cas/domxml-php4-php5.php');
}
-
+
$courseid = $_GET['enc_course_id'];
$signature = $_GET['signature'];
$action = $_GET['action'];
-
- if (!liveclassroom_init_session($_GET)) {
+ $MAINLECTURE = 'MainLecture';
+ $DISCUSSIONROOM = 'Discussion';
+ $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom';
+
+ if (!liveclassroom_init_session($_GET)) {
error("ExpiredSessionException");
}
@@ -66,18 +67,20 @@
$room_info = array();
}
$contextDisplay='all';
+
+ $xmldoc = domxml_new_doc("1.0");
- $xmldoc = domxml_new_doc("1.0");//new DomDocument();
+ $root = $xmldoc->create_element('root');
- $root = $xmldoc->create_element('root');
-
$root->append_child(liveclassroom_get_session_params($xmldoc,$_GET));
+
$windows = $xmldoc->create_element('windows');
-
- // HEADER BAR
-
+
+ //HEADER BAR
$windows->append_child(liveclassroom_create_headerbar($xmldoc));
+
+
// CONTEXT BAR
$contextbar = $xmldoc->create_element('windowsElement');
@@ -128,7 +131,11 @@
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
-
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -138,7 +145,7 @@
$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);
@@ -161,7 +168,7 @@
$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);
@@ -178,6 +185,10 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -203,7 +214,7 @@
$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);
@@ -221,6 +232,9 @@
if(($room_info['archive']!=1) || ($roomId == "")) {
// THIRD LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(""));
$panelLine->append_child($panelLineStyle);
@@ -229,6 +243,7 @@
$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);
@@ -239,7 +254,7 @@
$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\")") ;
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
if(($action=="update") && ($isLectureRoom==true))
{
$_SESSION['led']='instructor';
@@ -266,12 +281,12 @@
$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));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters));
$panelLine->append_child($linepart);
- $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"mainLectureRoom\")") ;
+ $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "discussionRoom","input", $parameters));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters));
$panelLine->append_child($linepart);
@@ -290,6 +305,10 @@
// FOURTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -299,6 +318,7 @@
$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);
@@ -314,6 +334,7 @@
$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);
@@ -321,24 +342,25 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ;
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"mainLectureRoom","input", $parameters));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters));
$panelLine->append_child($linepart);
- $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"discussionRoom\")") ;
+ $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ;
if(($action=="update") && ($isLectureRoom==false))
{
$_SESSION['led']='student';
$parameters['checked']=true;
+
}
else
{
$parameters['checked']=true;
}
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"discussionRoom","input", $parameters));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters));
$panelLine->append_child($linepart);
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) ));
@@ -357,14 +379,13 @@
$panelsSettings->append_child($panelSettings);
+
-
-
// ----------------- MEDIA ------------------
$panelSettingsM = $xmldoc->create_element('panelSettings');
// MEDIA PANEL INFO
- $panelSettingsM->append_child(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
+ $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none'));
// MEDIA CONTENT
$panelContentM = $xmldoc->create_element('panelContent');
@@ -372,6 +393,10 @@
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -403,14 +428,19 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
+
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
+
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
-
+
$colspan = $xmldoc->create_element('colspan');
$colspan->append_child($xmldoc->create_text_node("0"));
$linepart->append_child($colspan);
@@ -447,14 +477,17 @@
// THIRD LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
-
+
$colspan = $xmldoc->create_element('colspan');
$colspan->append_child($xmldoc->create_text_node("0"));
$linepart->append_child($colspan);
@@ -484,6 +517,9 @@
//FOURTh LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -491,7 +527,7 @@
$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);
@@ -520,17 +556,19 @@
// HIDE LINE
$panelLine = $xmldoc->create_element('panelLine');
+
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node("hide"));
$panelLine->append_child($panelLineStyle);
$panelLineId = $xmldoc->create_element('id');
$panelLineId->append_child($xmldoc->create_text_node("roomId_row"));
$panelLine->append_child($panelLineId);
+
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
-
+
$colspan = $xmldoc->create_element('colspan');
$colspan->append_child($xmldoc->create_text_node("0"));
$linepart->append_child($colspan);
@@ -556,6 +594,9 @@
//FIFTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -563,6 +604,7 @@
$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"));
@@ -592,7 +634,7 @@
$panelSettings = $xmldoc->create_element('panelSettings');
// FEATURES PANEL INFO
- $panelSettings->append_child(create_panel_info($xmldoc, 'mainLectureRoom-discussionRoom', 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none'));
@@ -601,6 +643,9 @@
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -608,6 +653,7 @@
$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);
@@ -628,6 +674,9 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -635,6 +684,7 @@
$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);
@@ -647,15 +697,18 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'mainLecture', "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'mainLecture',"label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAIN","label", $parameters=array("value" => "Enable Students to use AppShare tool") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
// THIRD LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -675,20 +728,23 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable Archiving") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Archiving") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
// FOURTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
- $style = $xmldoc->create_element('style');
+ $style = $xmldoc->create_element('style');
$style->append_child($xmldoc->create_text_node(""));
$linepart->append_child($style);
$colspan = $xmldoc->create_element('colspan');
@@ -703,15 +759,18 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable Appshare") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable Appshare") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
// FIFTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -731,9 +790,9 @@
}
else $parameters['checked']=true;
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion', "input", $parameters) );
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION", "input", $parameters) );
$panelLine->append_child($linepart);
- $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,'discussion',"label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
+ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSION","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
@@ -746,13 +805,16 @@
// ------------------ CHAT --------------------
// CHAT PANEL INFO
$panelSettings = $xmldoc->create_element('panelSettings');
- $panelSettings->append_child(create_panel_info($xmldoc, 'mainLectureRoom', 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none'));
+ $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none'));
// CHAT CONTENT
$panelContent = $xmldoc->create_element('panelContent');
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -780,8 +842,11 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
@@ -807,8 +872,11 @@
// THIRD LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
- $panelLineStyle->append_child($xmldoc->create_text_node(" "));
+ $panelLineStyle->append_child($xmldoc->create_text_node("subOption"));
$panelLine->append_child($panelLineStyle);
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
@@ -833,6 +901,9 @@
// FOURTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -866,6 +937,9 @@
// FIRST LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -893,6 +967,9 @@
// SECOND LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -900,6 +977,7 @@
$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);
@@ -912,6 +990,9 @@
// THIRD LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -954,6 +1035,9 @@
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(" "));
$panelLine->append_child($panelLineStyle);
@@ -1003,6 +1087,9 @@
// FIFTH LINE
$panelLine = $xmldoc->create_element('panelLine');
+ $plid = $xmldoc->create_element('id');
+ $plid->append_child($xmldoc->create_text_node(""));
+ $panelLine->append_child($plid);
$panelLineStyle = $xmldoc->create_element('style');
$panelLineStyle->append_child($xmldoc->create_text_node(""));
$panelLine->append_child($panelLineStyle);
@@ -1016,34 +1103,36 @@
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
$linepart->append_child($align);
- $parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAccess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ;
+ $parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAcess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ;
if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){
$parameters['checked']=true;
}
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) );
$panelLine->append_child($linepart);
+
$linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enabled guest access") ));
$panelLine->append_child($linepart);
$panelContent->append_child($panelLine);
- // SIXTH LINE
+ // SIXTH LINE - HIDE
+
$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("launcher_link_row"));
- $panelLine->append_child($panelLineId);
+ $panelLine->append_child($panelLineId);
-
$linepart = $xmldoc->create_element('panelLinePart');
$style = $xmldoc->create_element('style');
- $style->append_child($xmldoc->create_text_node(""));
+ $style->append_child($xmldoc->create_text_node(" "));
$linepart->append_child($style);
$colspan = $xmldoc->create_element('colspan');
- $colspan->append_child($xmldoc->create_text_node("0"));
+ $colspan->append_child($xmldoc->create_text_node("2"));
$linepart->append_child($colspan);
$align = $xmldoc->create_element('align');
$align->append_child($xmldoc->create_text_node(""));
@@ -1073,13 +1162,17 @@
$windows->append_child($settings);
//VALIDATION BAR
- $windows->append_child(liveclassroom_create_validationbar($xmldoc));
+ if($action == 'update') {
+ $windows->append_child(liveclassroom_create_validationbar($xmldoc, $roomId));
+ }
+ else $windows->append_child(liveclassroom_create_validationbar($xmldoc, ""));
$root->append_child($windows);
$xmldoc->append_child($root);
+ $xmldoc->dump_file("choice.xml", false, true);
$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string
$finalstring = str_replace("\n", '', $xmlstring);
Modified: trunk/moodle/mod/liveclassroom/index.php
===================================================================
--- trunk/moodle/mod/liveclassroom/index.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/index.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -30,8 +30,8 @@
/* $Id$ */
/// This page lists all the instances of liveclassroom in a particular course
-error_reporting(E_ALL);
+
require_once("../../config.php");
require_once("lib.php");
Modified: trunk/moodle/mod/liveclassroom/lib.php
===================================================================
--- trunk/moodle/mod/liveclassroom/lib.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -37,7 +37,7 @@
$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"; //file use to the logs
/**
* Validate the data in passed in the configuration page
* @param $config - the information from the form mod.html
@@ -45,12 +45,9 @@
*/
function liveclassroom_process_options ($config) {
global $CFG;
- global $LIVECLASSROOM_LOGS;
- $timenow = time();
-
if(empty($config->servername)){
- add_to_log("", "liveclassroom", "URL", "$LIVECLASSROOM_LOGS?type=errorUrlUnavailable&time=$timenow", "URL unavailable");
+ add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable");
error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'));
}
else if (!liveclassroom_api_authenticate($config->servername,
@@ -73,22 +70,19 @@
/// (defined by the form in mod.html) this function
/// 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 #
$roomname = liveclassroom_api_get_room_name($liveclassroom->type);
-
- $timenow = time();
-
-
+
if($result = insert_record("liveclassroom", $liveclassroom)) {
- add_to_log($liveclassroom->course, "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_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added");
+
}
else
{
- 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");
+ add_to_log($liveclassroom->course, "liveclassroom", "Add activity", liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added");
$result=false;
}
@@ -101,12 +95,10 @@
/// (defined by the form in mod.html) this function
/// will update an existing instance with new data.
- global $LIVECLASSROOM_LOGS;
-
$liveclassroom->timemodified = time();
$liveclassroom->id = $liveclassroom->instance;
$roomname = liveclassroom_api_get_room_name($liveclassroom->type);
- $timenow = time();
+
// Need to update the section
@@ -133,7 +125,7 @@
error("Could not update the course module with the correct section");
}
- 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");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success");
return update_record("liveclassroom", $liveclassroom);
/*
@@ -153,23 +145,20 @@
/// Given an ID of an instance of this module,
/// this function will permanently delete the instance
/// 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($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." deletion failed");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed");
$result = false;
}
- add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been deleted with success");
+ add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success");
return $result;
}
@@ -284,8 +273,9 @@
*/
function liveclassroom_create_rooms ($course) {
- //teacher is the lead of the presentation
- liveclassroom_create_room($course->id, "Main classroom", true, liveclassroom_api_give_lectureroom_attributes());
+ //teacher is the lead of the presentation
+
+ liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes());
//teachers and students have the same rights
liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes());
@@ -494,12 +484,11 @@
/// Given an ID of an instance of this module,
/// this function will permanently delete the instance
/// and any data that depends on it.
- global $LIVECLASSROOM_LOGS;
$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){
@@ -508,18 +497,18 @@
error("Course Module ID was incorrect");
}
if (! delete_course_module($cm->id)) {
- 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)");
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)");
$result = false;
//Delete a course module and any associated data at the course level (events)
// notify("Could not delete the $cm->id (coursemodule)");
}
if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) {
- add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_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");
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database");
$result = false;
}
//delete in the course section too
if (! delete_mod_from_section($cm->id, "$cm->section")) {
- add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_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");
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section");
$result = false;
//notify("Could not delete the $mod->modulename from that section");
}
@@ -527,7 +516,7 @@
}
}
- 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");
+ add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success");
return $result;
}
@@ -647,7 +636,7 @@
$validationelement = $xmldoc->create_element("validationElement");
$vtype = $xmldoc->create_element("type");
$vtype->append_child($xmldoc->create_text_node("validationButton"));
- $validationelement->append_child($vtype);
+ $validationelement->append_child($vtype);
$vparameters = $xmldoc->create_element("parameters");
@@ -691,7 +680,7 @@
* Uses liveclassroom_create_validation_comment and liveclassroom_create_validation_button
* Return a DOM document element which represent the validation bar
**/
-function liveclassroom_create_validationbar($xmldoc){
+function liveclassroom_create_validationbar($xmldoc,$roomId){
$headerbar = $xmldoc->create_element('windowsElement');
@@ -722,7 +711,7 @@
}
$parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName");
- $actionParameters = array("manageRoomAction.php", "$submit");
+ $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId");
$validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters));
@@ -871,9 +860,7 @@
* return a string with all the parameters if the signature is ok, false if not (HACKING)
*/
function liveclassroom_init_session($request){
-
- global $LIVECLASSROOM_LOGS;
-
+
if(time() <= ($request['time']+1800)) {
$enc_params = array();
@@ -891,7 +878,7 @@
}
if(strcmp(md5($signature), $request['signature'])!=0) {
- add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize.");
+ add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize.");
error("Signature is not recognize.");
return false;
@@ -900,7 +887,7 @@
return true;
}
else {
- add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSessionTimeOut", "Init session", "Session has timed out due to inactivity.");
+ add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity.");
error("The session has timed out due to inactivity. Please reload the page to reconnect.");
return false;
@@ -916,11 +903,15 @@
function liveclassroom_get_url_params($courseid) {
global $USER;
-
+/*
+ //For moodle 1.7
+ if(strstr($CFG->release,"1.6")) // 1.6.* version
+ else if(strstr($CFG->release,"1.7")) // 1.7.* version
+*/
if (isstudent($courseid)) {
$role='Student';
}
- else if (isteacher($courseid, $USER->id)) {
+ else if (isteacher($courseid, $USER->id) || isteacheredit($courseid)) {
$role='Instructor';
}
$signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role);
@@ -960,6 +951,8 @@
}
$lcServerUrl = $xmldoc->create_element("lcServerUrl");
$lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername));
+ $vtServerUrl = $xmldoc->create_element("vtServerUrl");
+ $vtServerUrl->append_child($xmldoc->create_text_node(""));
$signature = $xmldoc->create_element("signature");
$signature->append_child($xmldoc->create_text_node($sessionParams['signature']));
@@ -971,6 +964,7 @@
$information->append_child($courseId);
$information->append_child($authToken);
$information->append_child($lcServerUrl);
+ $information->append_child($vtServerUrl);
$information->append_child($signature);
return $information;
@@ -1068,4 +1062,22 @@
return $return;
}
+/*
+* Send info to the logs system
+* @param $type : type of the log
+* @param $parameters : string with the parameters needed
+* return a string which is the link to the logs file
+*/
+function liveclassroom_send_logs($type,$parameters) {
+
+ global $LIVECLASSROOM_LOGS;
+
+
+ $link = $LIVECLASSROOM_LOGS."?type=$type";
+ $link .= "&$parameters";
+ $link .= "&time=".time();
+
+ return $link;
+}
+
?>
Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php
===================================================================
--- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -52,6 +52,8 @@
session_start(); // to get the previous type of the room
+ add_to_log($COURSE->id, "liveclassroom", "Modify Room", "gaga", $_GET['id']);
+
if(!empty($_POST)) {
while (list($key, $val) = each($_POST)) {
$list_attributes[$key] = $val;
@@ -78,6 +80,7 @@
}
else if($_GET['action']=='updateRoom') {
//Available
+
if (!isset($list_attributes['preview'])) $list_attributes['preview']=1;
//Test if the type of room has been changed
@@ -113,6 +116,7 @@
if (! liveclassroom_delete_all_instance_of_room($_GET['id'])) {
notify("Could not delete the instances of the room");
}
+
//delete the room on the server
liveclassroom_api_delete_room($_GET['id']);
Modified: trunk/moodle/mod/liveclassroom/mod.html
===================================================================
--- trunk/moodle/mod/liveclassroom/mod.html 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/mod.html 2006-12-22 10:01:20 UTC (rev 119)
@@ -2,9 +2,13 @@
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<?php
-//error_reporting(E_ALL);
+
require_once($CFG->dirroot.'/calendar/lib.php');
include_once($CFG->dirroot.'/mod/liveclassroom/lib.php');
+ require_once($CFG->dirroot.'/version.php');
+
+
+
$id = optional_param('id', 0, PARAM_INT);
require_once("../config.php");
@@ -12,7 +16,7 @@
require_login($course->id);
if (!isteacher($course->id, $USER->id)) { //to Be sure
- error("You need to be a teacher in this course to c reate an instance");
+ error("You need to be a teacher in this course to create an instance");
}
// Check if the rooms exist on the server
@@ -166,7 +170,7 @@
</tr>
<tr valign="top">
- <td align="right"><font color="red">*</font><font class="fontCurrent"><?php print_string("name") ?> :</font></td>
+ <td align="right"><font color="red">*</font><font class="fontCurrent"><?php print_string('name', 'liveclassroom') ?> :</font></td>
<td align="left">
<input type="text" name="name" size="30" <?php if(isset($action) && $action=="update") echo "value=$liveclassroom->name"; ?> >
@@ -239,8 +243,8 @@
if (!$thissection = get_record('course_sections', 'course',$course->id, 'section', $section)) {
notify('Error getting course_sections!');
}
- $desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id);
- $descTxt = txt($desc);
+ $desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id);
+ $descTxt = txt($desc);
$minidesc = substr($descTxt, 0, 20);
if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) ) {
Modified: trunk/moodle/mod/liveclassroom/welcome.php
===================================================================
--- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-21 10:16:12 UTC (rev 118)
+++ trunk/moodle/mod/liveclassroom/welcome.php 2006-12-22 10:01:20 UTC (rev 119)
@@ -29,7 +29,7 @@
/* $Id$ */
-/// This page is to display the widget - Rooms and archives list
+/// This page is to display the tyes - Rooms and archives list
@@ -39,7 +39,7 @@
$id = optional_param('id', 0, PARAM_INT);
$course = optional_param('course', 0, PARAM_INT);
- $roomname = optional_param('idroomname', 0, PARAM_TEXT);
+// $roomname = optional_param('idroomname', 0, PARAM_TEXT);
global $CFG;
@@ -83,7 +83,7 @@
<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script>
- <script language="javascript" src="js/Ajax.js"></script>
+ <script language="javascript" src="js/ajax.js"></script>
<script language="javascript" src="js/xmldom.js"></script>
<script language="javascript" src="js/verifForm.js"></script>
<script language="javascript" src="js/constants.js"></script>
@@ -102,7 +102,7 @@
if(currentId!="") {
- if( (typeSelect=="mainLectureRoom") || (typeSelect == "discussionRoom") ) {
+ if( (typeSelect=="MainLecture") || (typeSelect == "Discussion") ) {
var complete_url=url+'?roomId='+currentId+'&id=<?php p($id) ?>§ion=0&sesskey=<?php echo sesskey(); ?>&'+param;
window.open(complete_url,"_top");
@@ -127,14 +127,14 @@
if(currentId!="")
{
- if (confirm("Are you sure you want to delete this room")) {
- if (confirm("Are you really sure you want to delete this room")) {
+
+ if (confirm("Are you really sure you want to delete this room ?")) {
var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ;
location.href = complete_url
//var w = window.open(complete_url, '_top');
// w.focus();
}
- }
+
}
@@ -174,7 +174,7 @@
{
?>
- DisplayFirstPage();
+ DisplayFirstPage("generateListRooms.php");
<?php
}
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:16:13
|
Revision: 118
http://svn.sourceforge.net/hw4mdl/?rev=118&view=rev
Author: shazan
Date: 2006-12-21 02:16:12 -0800 (Thu, 21 Dec 2006)
Log Message:
-----------
Removed Paths:
-------------
trunk/moodle/lang/en_utf8/block_next_liveclassroom.php
Deleted: trunk/moodle/lang/en_utf8/block_next_liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/block_next_liveclassroom.php 2006-12-21 10:14:52 UTC (rev 117)
+++ trunk/moodle/lang/en_utf8/block_next_liveclassroom.php 2006-12-21 10:16:12 UTC (rev 118)
@@ -1,8 +0,0 @@
-<?php // $Id$
-
-$string['blocktitle'] = 'Next Live Classroom';
-$string['globalnumbers'] = 'Number of Next Live Classroom display in the global section :';
-$string['coursenumbers'] = 'Number of Next Live Classroom display for each course :';
-$string['jumptocurrentweek'] = 'Jump to current week';
-$string['weeks'] = 'Weeks';
-?>
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:14:54
|
Revision: 117
http://svn.sourceforge.net/hw4mdl/?rev=117&view=rev
Author: shazan
Date: 2006-12-21 02:14:52 -0800 (Thu, 21 Dec 2006)
Log Message:
-----------
block lang file
Modified Paths:
--------------
trunk/moodle/lang/en_utf8/liveclassroom.php
Added Paths:
-----------
trunk/moodle/lang/en_utf8/block_bliveclassroom.php
Added: trunk/moodle/lang/en_utf8/block_bliveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/block_bliveclassroom.php (rev 0)
+++ trunk/moodle/lang/en_utf8/block_bliveclassroom.php 2006-12-21 10:14:52 UTC (rev 117)
@@ -0,0 +1,8 @@
+<?php // $Id$
+
+$string['blocktitle'] = 'Live Classrooms';
+$string['globalnumbers'] = 'Number of Next Live Classroom display in the global section :';
+$string['coursenumbers'] = 'Number of Next Live Classroom display for each course :';
+$string['jumptocurrentweek'] = 'Jump to current week';
+$string['weeks'] = 'Weeks';
+?>
Property changes on: trunk/moodle/lang/en_utf8/block_bliveclassroom.php
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author Id
Name: svn:eol-style
+ native
Modified: trunk/moodle/lang/en_utf8/liveclassroom.php
===================================================================
--- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-21 10:10:57 UTC (rev 116)
+++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-21 10:14:52 UTC (rev 117)
@@ -27,21 +27,34 @@
******************************************************************************/
/* $Id$ */
-
+// Configuration
$string['modulename'] = 'Live Classroom';
$string['modulenameplural'] = 'Live Classrooms';
$string['serverconfiguration'] = 'Live Classroom Server Configuration';
$string['explainserverconfiguration'] = 'This is the Live Classroom Server Configuration.';
-$string['servername'] = 'Server Name';
-$string['configservername'] = 'Enter the server name in the form http://AAA.BBB.CCC.DDD/';
+$string['servername'] = 'Live Classroom Server Name';
+$string['configservername'] = 'Enter the server name in the form http://AAA.BBB.CCC.DDD';
$string['adminusername'] = 'Admin User Name';
$string['configadminusername'] = 'Enter the admin username';
$string['adminpassword'] = 'Admin Password';
$string['configadminpassword'] = 'Enter the admin password';
$string['settinguniqueid'] = 'Unique Prefix ID';
$string['configsettinguniqueid'] = 'A unique prefix id so that multiple moodle instances can share one Live Classroom Server without collision.';
+$string['lcversion'] = 'Live Classroom Version';
+$string['lcversionnumber'] = '4.3.1';
+$string['integrationversion'] = 'Integration Version';
+$string['integrationversionnumber'] = '1.0';
+
+//Add activity form
+$string['name'] = 'Name';
$string['liveclassroomtype'] = 'Room associated';
+$string['topicformat'] = 'Topic for this activity';
+$string['weeksformat'] = 'Week for this activity';
+$string['requiredfields'] = 'Required Fields';
+$string['topicdisplay'] = 'Topic';
+$string['firstsection'] = 'Section 0';
+
$string['linksfor'] = 'Access Live Classrooms for ';
$string['accessroomsteacher'] = 'Access To Live Classroom and Archives - Clik here if the popup didn\'t start';
$string['accessroomsstudent'] = 'Access To Live Classroom - Clik here if the popup didn\'t start';
@@ -49,10 +62,9 @@
$string['labelcreateroom'] = 'New Room Name: ';
$string['buttoncreateroom'] = 'Create Room';
$string['roomcreated'] = 'Room was successfully created';
-$string['requiredfields'] = 'Required Fields';
-$string['topicformat'] = 'Topic for this activity';
-$string['weeksformat'] = 'Week for this activity';
+
+
$string['wizard.text.1'] = 'Note: The first time that you enter the Live Classroom you will need to run the';
$string['wizard.text.2'] = 'setup wizard';
$string['wizard.text.3'] = 'in order to make sure your computer is ready.';
@@ -63,7 +75,16 @@
$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';
+
+
+$string['wrongconfigurationURLunavailable'] = 'Wrong server configuration, URL unavailable, please see the logs to fix the error';
+$string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error';
+
+//First Time Use - not use yet
+$string['firstRoom'] = 'Main classroom';
+$string['secondRoom'] = 'Group 1';
+$string['thirdRoom'] = 'Group 2';
+$string['fourthRoom'] = 'Group 3';
+
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|