hw4mdl-svn Mailing List for Wimba Moodle Integration (Page 3)
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: <tro...@us...> - 2008-01-15 14:34:18
|
Revision: 217 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=217&view=rev Author: trollinger Date: 2008-01-15 06:34:13 -0800 (Tue, 15 Jan 2008) Log Message: ----------- change the svn structure Added Paths: ----------- trunk/moodle/mod/ Removed Paths: ------------- trunk/mod/ Copied: trunk/moodle/mod (from rev 216, trunk/mod) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-15 14:33:14
|
Revision: 216 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=216&view=rev Author: trollinger Date: 2008-01-15 06:33:13 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Change the svn strcuture Added Paths: ----------- trunk/integrations_common/ trunk/moodle/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-15 13:28:40
|
Revision: 215 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=215&view=rev Author: trollinger Date: 2008-01-15 05:28:37 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Continue the refactoring: -clean some not used code -review the management of the $POST and $GET variable -add pictures Modified Paths: -------------- branches/team/Thomas/moodle/mod/liveclassroom/config.html branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css branches/team/Thomas/moodle/mod/liveclassroom/doAction.php branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php branches/team/Thomas/moodle/mod/liveclassroom/index.php branches/team/Thomas/moodle/mod/liveclassroom/lang/en/liveclassroom.php branches/team/Thomas/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaUI.php branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php branches/team/Thomas/moodle/mod/liveclassroom/lib.php branches/team/Thomas/moodle/mod/liveclassroom/mod.html branches/team/Thomas/moodle/mod/liveclassroom/view.php branches/team/Thomas/moodle/mod/liveclassroom/welcome.php Added Paths: ----------- branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window-left.png branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window-middle.png branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window-right.png branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window200_left.png branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window200_middle.png branches/team/Thomas/moodle/mod/liveclassroom/pictures/items/window200_right.png Modified: branches/team/Thomas/moodle/mod/liveclassroom/config.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-01-15 13:28:37 UTC (rev 215) @@ -7,12 +7,6 @@ $config = $lcApi->lcapi_get_status(); ?> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <title>Live Classroom Server Configuration </title> -</head> - <style> .label_settings { @@ -38,7 +32,7 @@ } </style> -<body> + <form method="post" action="module.php" name="form"> <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> <input type="hidden" name="module" value="liveclassroom"> Modified: branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css 2008-01-15 13:28:37 UTC (rev 215) @@ -9,12 +9,8 @@ font-size:8px; } -* -{ - margin:0; - padding:0; -} + /*general html element*/ input { Modified: branches/team/Thomas/moodle/mod/liveclassroom/doAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-15 13:28:37 UTC (rev 215) @@ -82,7 +82,9 @@ $messageProduct = "room"; break; case "update" : - $roomId = required_param('id', PARAM_SAFEDIR); + $roomId = required_param('id', PARAM_SAFEDIR); + + $id = $api->createRoom($roomId, "true"); $messageAction = "updated"; $messageProduct = "room"; Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-15 13:28:37 UTC (rev 215) @@ -31,7 +31,7 @@ /// This page is to generate the list of rooms and archives - +error_reporting(E_ERROR); require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-15 13:28:37 UTC (rev 215) @@ -28,7 +28,7 @@ /* $Id: generateSettings.php 197 2007-08-29 14:30:36Z trollinger $ */ /// This page is to generate the settings of a room or archive - +error_reporting(E_ERROR); require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); @@ -60,6 +60,7 @@ $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword,$CFG->dataroot); $roomId = required_param('id', PARAM_SAFEDIR ); + $room_info = $api->getRoom($roomId); if($room_info!=false){ Modified: branches/team/Thomas/moodle/mod/liveclassroom/index.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-15 13:28:37 UTC (rev 215) @@ -30,14 +30,13 @@ /// This page lists all the instances of liveclassroom in a particular course - +error_reporting(E_ERROR); require_once("../../config.php"); - require_once("lib.php"); - require_once("lib/common/WimbaCommons.php"); require_once("lib/common/WimbaLib.php"); + $id = optional_param('id', 0, PARAM_INT); $roomname = optional_param('idroomname', 0, PARAM_TEXT); @@ -67,9 +66,7 @@ } $breadcrumb = implode(' -> ', $urls); -print_header("$course->shortname", "$course->fullname", -"$breadcrumb", -"", "", true, "",""); +print_header("$course->shortname", "$course->fullname","$breadcrumb", "", "", true, "",""); /// Get all the appropriate data $url =get_url_params($course->id); Modified: branches/team/Thomas/moodle/mod/liveclassroom/lang/en/liveclassroom.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lang/en/liveclassroom.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lang/en/liveclassroom.php 2008-01-15 13:28:37 UTC (rev 215) @@ -54,11 +54,11 @@ $string['trailingHttp'] = 'The Live Classroom Server Name doesn\'t start with \'http://\'. Please add it and submit the configuration again.'; //Add activity form $string["activity_name"]="Activity Name:"; -$string["duration_calendar"]="Duration"; -$string['name'] = 'Activity Name'; -$string['liveclassroomtype'] = 'Associated Room'; -$string['topicformat'] = 'Topic'; -$string['weeksformat'] = 'Week'; +$string["duration_calendar"]="Duration:"; +$string['name'] = 'Activity Name:'; +$string['liveclassroomtype'] = 'Associated Room:'; +$string['topicformat'] = 'Topic:'; +$string['weeksformat'] = 'Week:'; $string['required_fields'] = 'Required Fields'; $string['topicdisplay'] = 'Topic'; $string['firstsection'] = 'Section 0'; Modified: branches/team/Thomas/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php 2008-01-15 13:28:37 UTC (rev 215) @@ -54,11 +54,11 @@ $string['trailingHttp'] = 'The Live Classroom Server Name doesn\'t start with \'http://\'. Please add it and submit the configuration again.'; //Add activity form $string["activity_name"]="Activity Name:"; -$string["duration_calendar"]="Duration"; -$string['name'] = 'Activity Name'; -$string['liveclassroomtype'] = 'Associated Room'; -$string['topicformat'] = 'Topic'; -$string['weeksformat'] = 'Week'; +$string["duration_calendar"]="Duration:"; +$string['name'] = 'Activity Name:'; +$string['liveclassroomtype'] = 'Associated Room:'; +$string['topicformat'] = 'Topic:'; +$string['weeksformat'] = 'Week:'; $string['required_fields'] = 'Required Fields'; $string['topicdisplay'] = 'Topic'; $string['firstsection'] = 'Section 0'; Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php 2008-01-15 13:28:37 UTC (rev 215) @@ -29,24 +29,90 @@ array("value"=>"longname","type"=>PARAM_CLEAN,"default_value"=>null), array("value"=>"description","type"=>PARAM_CLEAN,"default_value"=>null), array("value"=>"led","type"=>PARAM_ALPHA,"default_value"=>"instructor"), - array("value"=>"hms_two_way_enabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"enable_student_video_on_startup","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"hms_simulcast_restricted","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"video_bandwidth","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"status_appear","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"enabled_breakoutrooms","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"archiveEnabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"appshareEnabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"pptEnabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"chatEnabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"accessAvailable","type"=>PARAM_BOOL,"default_value"=>0), - array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"hms_two_way_enabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"enable_student_video_on_startup","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"hms_simulcast_restricted","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"video_bandwidth","type"=>PARAM_CLEAN,"default_value"=>"medium"), + array("value"=>"status_appear","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"enabled_breakoutrooms","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"archiveEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"appshareEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"pptEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"chatEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"accessAvailable","type"=>PARAM_BOOL,"default_value"=>"0"), + array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>"0"), array("value"=>"userlimit","type"=>PARAM_INT,"default_value"=>-1) ) ; } +function getListOfWeeks($course,$current){ + + $i=1; + $weekdate = $course->startdate; // this should be 0:00 Monday of that week + $weekdate += 7200; // Add two hours to avoid possible DST problems + + $weekofseconds = 604800; + $course->enddate = $course->startdate + ($weekofseconds * $course->numsections); + $string= '<OPTION selected value=0>Week 0 : Introduction section</OPTION>'; + + while ($weekdate < $course->enddate) { + $nextweekdate = $weekdate + ($weekofseconds); + $weekday = userdate($weekdate, '%d %b') ; + $endweekday = userdate($weekdate+518400, '%d %b'); + if($current==$i) + { + $string.= '<OPTION selected value='.$i.'>'."Week ".$i." : ".$weekday.' - '.$endweekday.'</OPTION>'; + } + else + { + $string .= '<OPTION value='.$i.'>'."Week ".$i." : ".$weekday.' - '.$endweekday.'</OPTION>'; + } + $i++; + $weekdate = $nextweekdate; + } + return $string; +} + +function getListOfTopics($course,$current){ + $section = 0; + while ($section <= $course->numsections) { + 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); + $minidesc = substr($descTxt, 0, 20); + + if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) ) { + $minidesc .= "..."; + } + else if ($thissection->summary == NULL){ + $minidesc = "Topic"; + } + if($current==$section) + { + echo '<OPTION selected value='.$section.'>'.$section.". ".$minidesc.'</OPTION>'; + } + else + { + echo '<OPTION value='.$section.'>'.$section.". ".$minidesc.'</OPTION>'; + } + $section++; + } + + + +} + +function txt($string){ + $result = str_replace("<br />", "" ,$string); + $result = str_replace("<p>", "" ,$result); + $result = str_replace("</p>", "" ,$result); + return $result; +} + function isSwitch(){ global $USER; Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaUI.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaUI.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaUI.php 2008-01-15 13:28:37 UTC (rev 215) @@ -37,7 +37,7 @@ $this->currentObject = $object; if($this->currentObject == null) - $this->id=$this->prefix.$this->session->getCourseId() . rand(); + $this->id=$this->session->getCourseId() . rand(); if ($product == "liveclassroom") { if ($this->currentObject != null && $this->currentObject->isArchive()) { @@ -410,24 +410,24 @@ $preview = $room->isPreview(); if ($room->isArchive() == 1) { - $archive = new XmlArchive($this->prefix.$id, $name, $preview, "doAction.php", $this->session->url_params . "&time=" . time() . "&action=launch"); + $archive = new XmlArchive($id, $name, $preview, "doAction.php", $this->session->url_params . "&time=" . time() . "&action=launch"); $archive->setTooltipAvailability(get_string("tooltipLC_".$preview."_student","liveclassroom")); $archive->setTooltipDial(get_string("tooltip_dial","liveclassroom")); list ($roomId, $other) = split('_', $id); - $archives[$this->prefix.$roomId][] = $archive; + $archives[$roomId][] = $archive; } else { if ($this->session->isInstructor() || !$this->session->isInstructor() && !$preview == 1) { - $xmlRoom = new XmlRoom($this->prefix.$id, $name, true, $preview, null, "doAction.php", $this->session->url_params . "&time=" . time() . "&action=launch"); + $xmlRoom = new XmlRoom($id, $name, true, $preview, null, "doAction.php", $this->session->url_params . "&time=" . time() . "&action=launch"); $xmlRoom->setTooltipAvailability(get_string("tooltipLC_".$preview."_student","liveclassroom")); $xmlRoom->setTooltipDial(get_string("tooltip_dial","liveclassroom")); - $liveclassroom[$this->prefix.$id] = $xmlRoom; + $liveclassroom[$id] = $xmlRoom; } } } @@ -651,7 +651,7 @@ $parameters = array ( "type" => "checkbox", "name" => "hms_simulcast_restricted", - "value" => "true", + "value" => "25", "id" => "hms_simulcast_restricted" ); if ($this->lectureRoom == "hiddenSetting") Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php 2008-01-15 13:28:37 UTC (rev 215) @@ -107,91 +107,41 @@ $room->setBORCarouselsPublic("0"); $room->setBORShowRoomCarousels("0"); - //discussion features - //if (isset ($this->session->request["archiveEnabled"])) - $room->setArchiveEnabled($this->session->request["archiveEnabled"]); - // else - // $room->setArchiveEnabled("0"); - - //if (isset ($this->session->request["appshareEnabled"])) - $room->setLiveShareEnabled($this->session->request["appshareEnabled"]); - // else - // $room->setLiveShareEnabled("0"); - - - //if (isset ($this->session->request["pptEnabled"])) - $room->setPptImportEnabled($this->session->request["pptEnabled"]); - //else - //$room->setPptImportEnabled("0"); + + $room->setArchiveEnabled($this->session->request["archiveEnabled"]); + $room->setLiveShareEnabled($this->session->request["appshareEnabled"]); + $room->setPptImportEnabled($this->session->request["pptEnabled"]); + } else { //media - //if (isset ($this->session->request["hms_two_way_enabled"])) { - $room->setHmsTwoWayEnabled($this->session->request["hms_two_way_enabled"]); - //} else { - //$room->setHmsTwoWayEnabled("0"); - // } - //if (isset ($this->session->request["enable_student_video_on_startup"])) - $room->setStudentVideoOnStartupEnabled($this->session->request["enable_student_video_on_startup"]); - //else - //$room->setStudentVideoOnStartupEnabled("0"); - //if (isset ($this->session->request["hms_simulcast_restricted"])) - $room->setHmsSimulcastRestricted($this->session->request["hms_simulcast_restricted"]); - //else - //$room->setHmsSimulcastRestricted("1"); - + + $room->setHmsTwoWayEnabled($this->session->request["hms_two_way_enabled"]); + $room->setStudentVideoOnStartupEnabled($this->session->request["enable_student_video_on_startup"]); + if($this->session->request["hms_simulcast_restricted"]=="0") + $room->setHmsSimulcastRestricted("1"); + else + $room->setHmsSimulcastRestricted("0"); $room->setVideoBandwidth($this->session->request["video_bandwidth"]); //Chat - // if (isset ($this->session->request["chatEnabled"])) - - $room->setChatEnabled($this->session->request["chatEnabled"]); - //else - //$room->setChatEnabled("0"); + + $room->setChatEnabled($this->session->request["chatEnabled"]); + $room->setPrivateChatEnabled($this->session->request["privateChatEnabled"]); -// if (isset ($this->session->request["privateChatEnabled"])) - $room->setPrivateChatEnabled($this->session->request["privateChatEnabled"]); - // else - // $room->setPrivateChatEnabled("0"); - - //eBoard - //if (isset ($this->session->request["enabled_student_eboard"])) - $room->setStudentWhiteboardEnabled($this->session->request["enabled_student_eboard"]); - // else - //$room->setStudentWhiteboardEnabled("0"); - - //if (isset ($this->session->request["enabled_breakoutrooms"])) - $room->setBOREnabled($this->session->request["enabled_breakoutrooms"]); - //else - //$room->setBOREnabled("0"); - - //if (isset ($this->session->request["enabled_students_breakoutrooms"])) - $room->setBORCarouselsPublic($this->session->request["enabled_students_breakoutrooms"]); - // else - //$room->setBORCarouselsPublic("0"); - - //if (isset ($this->session->request["enabled_students_mainrooms"])) - $room->setBORShowRoomCarousels($this->session->request["enabled_students_mainrooms"]); - //else - // $room->setBORShowRoomCarousels("0"); - - //default features + $room->setStudentWhiteboardEnabled($this->session->request["enabled_student_eboard"]); + + $room->setBOREnabled($this->session->request["enabled_breakoutrooms"]); + $room->setBORCarouselsPublic($this->session->request["enabled_students_breakoutrooms"]); + $room->setBORShowRoomCarousels($this->session->request["enabled_students_mainrooms"]); + $room->setArchiveEnabled("1"); $room->setLiveShareEnabled("1"); $room->setPptImportEnabled("1"); } //common features - //if (isset ($this->session->request["enabled_status"])) - $room->setUserstatusEnabled($this->session->request["enabled_status"]); - //else - //$room->setUserstatusEnabled("0"); - //if (isset ($this->session->request["status_appear"])) - $room->setSendUserstatusUpdates($this->session->request["status_appear"]); - //else - // $room->setSendUserstatusUpdates("0"); - - // $rooms->SEtP - + $room->setUserstatusEnabled($this->session->request["enabled_status"]); + $room->setSendUserstatusUpdates($this->session->request["status_appear"]); //Maximum Users if ($this->session->request["userlimit"] == "true") @@ -224,9 +174,9 @@ } } else { - + $this->api->lcapi_create_class($roomId, $room->getLongname(), $room->getAttributes()); - + if ($this->session->request["led"] == "student") //student have same rights than teacher $this->api->lcapi_add_user_role($roomId, $user_Student->getUserId(), "Instructor"); else Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php 2008-01-15 13:28:37 UTC (rev 215) @@ -160,27 +160,9 @@ global $_lcapi_errno; return $_lcapi_errno; } + + /** - * Initializes the lcapi package - * @param $server = a string containing the url to the LC server - * @param $login = the LC user ID of an administrator account - * @param $password = the password for the $login account - * @param $tmppath = a writeable, temporary folder - * @return nothing - */ - function lcapi_init($server, $login, $password, $tmppath = "") { - global $_lcapi_config; - if ( LCAPI_DEBUG) { - error_log(__FUNCTION__ . " Initializing with ($server, $login, $password, $tmppath)"); - } - $_lcapi_config->server = $server; - $_lcapi_config->login = $login; - $_lcapi_config->password = $password; - $_lcapi_config->tmppath = $tmppath; - - return; - } - /** * Creates a CURL session with the Live Classroom server. Upon success, it * returns a CURL Handle authenticated and ready for use. It returns false * otherwise. @@ -407,7 +389,7 @@ } } - $params = "&target=".$roomid . "&longname=$roomname" . $params; + $params = "&target=".$this->prefix.$roomid . "&longname=$roomname" . $params; $enc_params = str_replace(" ", "+", $params); $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_CLASS, $enc_params); @@ -439,7 +421,7 @@ if($userid!="Guest"){ $userid=$this->prefix.$userid; } - $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_ROLE, "&target=".$roomid."&user_id=".$userid."&role_id=$role"); + $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_ROLE, "&target=".$this->prefix.$roomid."&user_id=".$userid."&role_id=$role"); preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { @@ -463,7 +445,7 @@ if($userid!="Guest"){ $userid=$this->prefix.$userid; } - $response = $this->lcapi_send_query( LCAPI_FUNCTION_DELETE_ROLE, "&target=".$roomid."&user_id=".$userid."&role_id=$role"); + $response = $this->lcapi_send_query( LCAPI_FUNCTION_DELETE_ROLE, "&target=".$this->prefix.$roomid."&user_id=".$userid."&role_id=$role"); preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { @@ -784,7 +766,7 @@ * and the value as the value of the attribute */ function lcapi_get_room_info($roomid) { - $params = "&filter00=" . LCAPI_ATTR_CLASSID . "&filter00value=".$roomid."&attribute=" . LCAPI_ATTR_ARCHIVE . "&attribute=" . LCAPI_ATTR_CANARCH . "&attribute=" . LCAPI_ATTR_CANEBRD . "&attribute=" . LCAPI_ATTR_CANAPPSHR . "&attribute=" . LCAPI_ATTR_CANPPTIMPRT . "&attribute=" . LCAPI_ATTR_CHTNBL . "&attribute=" . LCAPI_ATTR_PRVTCHTNBL . "&attribute=" . LCAPI_ATTR_DESCR . "&attribute=" . LCAPI_ATTR_HMSSIMCAST . "&attribute=" . LCAPI_ATTR_HMSSIMCAST_RSTRD . "&attribute=" . LCAPI_ATTR_HMS_2WYENBLD . "&attribute=" . LCAPI_ATTR_MEDIATYPE . "&attribute=" . LCAPI_ATTR_PREVIEW . "&attribute=" . LCAPI_ATTR_STDNT_WBENBLD . "&attribute=" . LCAPI_ATTR_STDNT_WBLVAPP . "&attribute=" . LCAPI_ATTR_USRLIMT . "&attribute=" . LCAPI_ATTR_LONGNAME. "&attribute=" . LCAPI_ATTR_VIDEO_BANDWIDTH. "&attribute=" .LCAPI_ATTR_ENABLE_STUDENT_VIDEO_ON_STARTUP. "&attribute=" .LCAPI_ATTR_USERSTATUS_ENABLED. "&attribute=" .LCAPI_ATTR_SEND_USERSTATUS_UPDATES. "&attribute=" .LCAPI_ATTR_ENABLED. "&attribute=" .LCAPI_ATTR_CAROUSELS_PUBLIC. "&attribute=" .LCAPI_ATTR_SHOW_ROOM_CAROUSELS. "&attribute=" .LCAPI_ATTR_PARTICIPANT_PIN."&attribute=" .LCAPI_ATTR_PRESENTER_PIN; + $params = "&filter00=" . LCAPI_ATTR_CLASSID . "&filter00value=".$this->prefix.$roomid."&attribute=" . LCAPI_ATTR_ARCHIVE . "&attribute=" . LCAPI_ATTR_CANARCH . "&attribute=" . LCAPI_ATTR_CANEBRD . "&attribute=" . LCAPI_ATTR_CANAPPSHR . "&attribute=" . LCAPI_ATTR_CANPPTIMPRT . "&attribute=" . LCAPI_ATTR_CHTNBL . "&attribute=" . LCAPI_ATTR_PRVTCHTNBL . "&attribute=" . LCAPI_ATTR_DESCR . "&attribute=" . LCAPI_ATTR_HMSSIMCAST . "&attribute=" . LCAPI_ATTR_HMSSIMCAST_RSTRD . "&attribute=" . LCAPI_ATTR_HMS_2WYENBLD . "&attribute=" . LCAPI_ATTR_MEDIATYPE . "&attribute=" . LCAPI_ATTR_PREVIEW . "&attribute=" . LCAPI_ATTR_STDNT_WBENBLD . "&attribute=" . LCAPI_ATTR_STDNT_WBLVAPP . "&attribute=" . LCAPI_ATTR_USRLIMT . "&attribute=" . LCAPI_ATTR_LONGNAME. "&attribute=" . LCAPI_ATTR_VIDEO_BANDWIDTH. "&attribute=" .LCAPI_ATTR_ENABLE_STUDENT_VIDEO_ON_STARTUP. "&attribute=" .LCAPI_ATTR_USERSTATUS_ENABLED. "&attribute=" .LCAPI_ATTR_SEND_USERSTATUS_UPDATES. "&attribute=" .LCAPI_ATTR_ENABLED. "&attribute=" .LCAPI_ATTR_CAROUSELS_PUBLIC. "&attribute=" .LCAPI_ATTR_SHOW_ROOM_CAROUSELS. "&attribute=" .LCAPI_ATTR_PARTICIPANT_PIN."&attribute=" .LCAPI_ATTR_PRESENTER_PIN; $response = $this->lcapi_send_query( LCAPI_FUNCTION_GET_ROOM_LIST, $params); preg_match("(\d*)", $response, $matches); Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-15 13:28:37 UTC (rev 215) @@ -38,20 +38,10 @@ define("LIVECLASSROOM_MODULE_VERSION", "3.1.2"); -//define("LIVECLASSROOM_MOODLE_PREFIX", liveclassroom_get_prefix()); -//Suffixes used when creting the profiles account on the LC server -//Teachers will use LIVECLASSROOM_MOODLE_PREFIX + $course->id + LIVECLASSROOM_TEACHER_SUFFIX -define ("LIVECLASSROOM_TEACHER_SUFFIX", "_T"); -//Students will use LIVECLASSROOM_MOODLE_PREFIX + $course->id + LIVECLASSROOM_STUDENT_SUFFIX -define ("LIVECLASSROOM_STUDENT_SUFFIX", "_S"); - - $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 @@ -88,11 +78,6 @@ $api=new LCApi($config->servername, $config->adminusername, $config->adminpassword); - $api->lcapi_init($config->servername, - $config->adminusername, - $config->adminpassword, - $CFG->dataroot); - if (! $api->lcapi_authenticate()) { error(get_string('wrongadminpass', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); @@ -202,7 +187,7 @@ /// Given an ID of an instance of this module, /// this function will permanently delete the instance /// and any data that depends on it. - $api=new LCApi($CFG->liveclassroom_servername, + $api=new LCApi($CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword); @@ -387,27 +372,6 @@ return $event; } - -/** - * Creates the profiles account for a given course. - */ -function liveclassroom_create_profiles ($course) { - $enc_coursename = str_replace(" ", "_", $course->shortname); - - $userid = liveclassroom_get_teacher_userid($course->id); - if (! $api->lcapi_create_user ($userid, $enc_coursename, 'Teacher')) { - //error("Cannot Create Teacher profile"); - return false; - } - - $userid = liveclassroom_get_student_userid($course->id); - if (! $api->lcapi_create_user ($userid, $enc_coursename, 'Student')) { - //error("Cannot Create Student profile"); - return false; - } - return true; -} - /* * Give the shortname for a courseid given * @param $courseid : the id of the course @@ -501,29 +465,6 @@ -/** - * list the element of the pictures directory - * @param $name : the name of a folder to look into - * @param &$s : a reference to the string to fill up - * @return a String wich contains the pictures separated by a comma (',') - */ -function liveclassroom_list_dir($name, &$s) { - - if ($dir = opendir($name)) { - - while($file = readdir($dir)) { - if(is_dir($name."/".$file) && $file[0] != ".") { - liveclassroom_list_dir($name."/".$file,$s); - } - else if($file[0] != ".") { - $s .= $name."/".$file.";"; - } - } - closedir($dir); - } -} - - /* * Send info to the logs system * @param $type : type of the log Modified: branches/team/Thomas/moodle/mod/liveclassroom/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-01-11 16:47:18 UTC (rev 214) +++ branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-01-15 13:28:37 UTC (rev 215) @@ -34,66 +34,47 @@ require_once($CFG->dirroot.'/calendar/lib.php'); include_once($CFG->dirroot.'/mod/liveclassroom/lib.php'); include_once($CFG->dirroot.'/mod/liveclassroom/lib/lc/LCAction.php'); +include_once($CFG->dirroot.'/mod/liveclassroom/lib/common/WimbaLib.php'); require_once($CFG->dirroot.'/version.php'); - - -$id = optional_param('id', 0, PARAM_INT); -$roomId = optional_param('roomId',null, PARAM_RAW); -$update = optional_param('update', false, PARAM_INT); -require_login($course->id); - -function txt($string){ - $result = str_replace("<br />", "" ,$string); - $result = str_replace("<p>", "" ,$result); - $result = str_replace("</p>", "" ,$result); - return $result; -} - +//test if the current user can see this page +require_login($course->id); if (!isteacher($course->id, $USER->id)) { //to Be sure error("You need to be a teacher in this course to create an instance"); } +//get the required parameters +$id = optional_param('id', 0, PARAM_INT); +$roomId = optional_param('roomId',null, PARAM_RAW); +$update = optional_param('update', null, PARAM_INT); +$sectionId = optional_param('section', null, PARAM_INT); +$lcApi=new LCAction(null,$CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword, $CFG->dataroot,$id); /// First we check that form variables have been initialised if (!isset($form->name)) { $form->name = ''; } if (!isset($form->type)) { - $form->type = ''; + $form->type = ''; } if (!isset($form->intro)) { - $form->intro = ''; + $form->intro = ''; } if (!isset($form->descrption)) { - $form->descrption = ''; + $form->descrption = ''; } if (!isset($form->section)) { $form->section = ''; } -if (empty($form->timeopen)) { - $form->timeopen = ""; - $form->timerestrict = 0; -} else { - $form->timerestrict = 1; -} - -//get the number of the section -if ($update!=false) { // update instance - -} -else -{ - $sectionId = optional_param('section', 0, PARAM_INT); -} - - $event=false; $description=""; +$stringDate=""; //check if a calendar event exist -if($update!=false){ //update +if(isset($update)){ //update //get the information of the activity if (! $cmLiveclass = get_record("course_modules", "id", $update)) { @@ -104,88 +85,39 @@ $sectionId=$activity->section; $action = "update"; - $id=$cmLiveclass->course; + $id=$cmLiveclass->course;//get the id of the course - $event=liveclassroom_get_event_calendar($activity->id) ; + $event=liveclassroom_get_event_calendar($activity->id); - if(empty($event) || $event==false)//no event + if( $event==true)//no event { - $checked= ""; - if($course->format == "social" || $course->format == "topics" || $sectionId != 0){ - $disableAllElements="disabled"; - $disabledCheckbox=""; - }else{ - $disabledCheckbox="disabled"; - $disableAllElements="disabled"; - } - - } - else - {//there is a event $checked ="checked"; - if($course->format == "social" || $course->format == "topics" || $sectionId != 0){ - $disabledCheckbox=""; - $disableAllElements=""; - } - else - { - $disabledCheckbox="disabled"; - $disableAllElements="disabled"; - } list($description,$link)=split("<br>",$event->description); - } - + $stringDate=date('m',$event->timestart)."/".date('d',$event->timestart)."/".date('Y',$event->timestart); + + } $name= $activity->name; //get the name - } else {//new $checked ="checked"; - if($course->format == "social" || $course->format == "topics" || $sectionId != 0){ - $disabledCheckbox=""; - $disableAllElements=""; - } - else - { - $disabledCheckbox="disabled"; - $disableAllElements="disabled"; - } + $name=""; } - - - -$weekdate = $course->startdate; // this should be 0:00 Monday of that week -$weekdate += 7200; // Add two hours to avoid possible DST problems - $section = 0; -// $sectionmenu = array(); -$weekofseconds = 604800; -$course->enddate = $course->startdate + ($weekofseconds * $course->numsections); -$list_weeks[0]= "Introduction section"; //For first section -$k=1; -while ($weekdate < $course->enddate) { - $nextweekdate = $weekdate + ($weekofseconds); - $weekday = userdate($weekdate, '%d %b') ; - $endweekday = userdate($weekdate+518400, '%d %b'); - $list_weeks[$k] = $weekday.' - '.$endweekday; - $k++; - $section++; - $weekdate = $nextweekdate; -} - -$stringDate=""; -if($course->format == "topics" || $course->format == "social"){ - +//manage the state of the calendar form +//it is disabled for the Introduction section (week 0) of a weekly course +if($course->format == "week" && $sectionId != 0){ + $disabledCheckbox="disabled"; + $disableAllElements="disabled"; + $eventDate=mktime(0,0,0,1,date('z',$course->startdate)+($sectionId-1)*7+1,date('y',$course->startdate)) ; + $stringDate=date('m',$eventDate)."/".date('d',$eventDate)."/".date('Y',$eventDate); } -else if(isset($event) && $event!=false) +else { - $stringDate=date('m',$event->timestart)."/".date('d',$event->timestart)."/".date('Y',$event->timestart); -} -else if($sectionId != 0) -{ - $eventDate=mktime(0,0,0,1,date('z',$course->startdate)+($sectionId-1)*7+1,date('y',$course->startdate)) ; - $stringDate=date('m',$eventDate)."/".date('d',$eventDate)."/".date('Y',$eventDate); -} + $disabledCheckbox=""; + $disableAllElements=""; +} + // Visible to students or not if ($form->coursemodule) { @@ -204,220 +136,18 @@ if ($hiddensection) { $visible = false; } - -$lcApi=new LCAction(null,$CFG->liveclassroom_servername, - $CFG->liveclassroom_adminusername, - $CFG->liveclassroom_adminpassword, $CFG->dataroot,$id); ?> +<link rel="STYLESHEET" href="<?php p($CFG->wwwroot) ?>/mod/liveclassroom/css/StyleSheet.css"" type="text/css" /> <style> - -#headerBar table -{ - width: 700px; - background:white url( "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/headerbar.png" ) repeat-x bottom left; - height: 32px; - border-bottom: solid 1px Black; +body{ + font-size:14px; } - - -/*contextBar*/ -#contextBar table -{ - height: 40px; - background: url( "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/backgrounds/toolbar.png" ); - border-bottom: solid 1px #C7D3E1; -} - -.contextBarRight -{ - font-family: Verdana; - font-size: 12px; -} - -.roomNameForSettings -{ - font-family: Verdana; - font-weight: bold; - font-size: 12px; -} - -.fontCurrent -{ - font-family:Verdana; - font-size:10px; - -} -.nameElement { - font-family: Verdana; - font-weight: bold; - font-size: 12px; -} -.nameTools { - font-family: Verdana; - - font-size: 12px; -} - .content { - margin:-5px; + margin:-5px; } - -a.list -{ - - font-family:Verdana; - font-size:10px; - color : #0000FF ; - text-decoration : underline ; -} -a.list:hover -{ - color : #0000FF ; - text-decoration : none ; -} -a.list:visited -{ - color : #0000FF ; - text-decoration : underline ; -} -a.list:active -{ - color : #0000FF ; - text-decoration : none ; -} - -.opac -{ - width: 100%; - z-index:5; - filter:alpha(opacity=33);-moz-opacity:.33;opacity:.33; - height:100%; - left: 0px; - top: 0px; - position:absolute; - background-color:black; - display:none; -} - -.opac iframe -{ - display:none;/*sorry for IE5*/ - display/**/:block;/*sorry for IE5*/ - position:absolute;/*must have*/ - top:0;/*must have*/ - left:0;/*must have*/ - z-index:5;/*must have*/ - filter:mask();/*must have*/ - width: 100%;/*must have for any big value*/ - height: 100%;/*must have for any big value*/; -} - -div.Table_01 { - position:absolute; - left:0px; - top:0px; - width:350px; - height:150px; - z-index: 50; - font-family:Verdana; - padding: 2px; - margin: 2px; - left: 40%; - top: 30%; - font-size:9px; - display:none; -} - -div.window-left { - position:absolute; - left:0px; - top:0px; - width:10px; - height:150px; - background-image: url( "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/window-left.png" ); - background-repeat:none; -} - -div.window-middle { - position:absolute; - left:10px; - top:0px; - width:330px; - height:150px; - background-image: url( "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/window-middle.png" ); - -} - -div.window-right { - position:absolute; - left:340px; - top:0px; - width:10px; - height:150px; - background-image: url( "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/window-right.png" ); - background-repeat:none; -} - -.popupText -{ - font-size:12px; - font-family: helvetica; -} - -.popupTitle -{ - font-size:14px; - font-weight:bold; - text-decoration:underline; - font-family: helvetica; -} - -.label_settings -{ - - text-align:right; -} - -.page_title -{ - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size:18px; - font-weight:bold; - color:#3c4b5b; - vertical-align: middle; -} -#calendar -{ - padding-left:25px; -} -td.action, input.action -{ - background-image: url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/buttons/general-empty.png"); - background-repeat: no-repeat; - - background-position: center; - text-decoration: none; - color: Black; - text-align: center; - cursor: pointer; - width:75px; -} -td.action:hover, input.action:hover -{ - background-image: url("<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/buttons/general-empty-over.png"); -} - -.action label -{ - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size:12px; - cursor: pointer; -} - </style> - <script type="text/javascript"> function validate(){ @@ -578,7 +308,8 @@ if(document.getElementById("section").value == 0){ hideCalendarEvent("disabled"); document.getElementById("calendar_event").disabled="disabled"; - document.getElementById("comment_date").innerHTML=""; + if(document.getElementById("comment_date")!=null) + document.getElementById("comment_date").innerHTML=""; }else{ document.getElementById("calendar_event").disabled=""; if(document.getElementById("calendar_event").checked==false) @@ -679,361 +410,322 @@ FillForm(); } - window.onload=loadPage; </script> -<title>Wimba</title> -</head> - <body> - <div class="content" id=content width="700px" align=center> - <form id="form" name="form" method="post" action="mod.php"> - <input type="hidden" value="" name="type"> - <div id="headerBar" width="700px" align=center> - <table cellspacing="0" cellpadding="0" width="700px" align=center> - <tr> - <td class="headerBarLeft" align="left"> - <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"> - </td> +<div class="content" id=content width="700px" align=center> + <form id="form" name="form" method="post" action="mod.php"> + <input type="hidden" value="" name="type"> + <div id="headerBar" width="700px" align=center> + <table cellspacing="0" cellpadding="0" width="700px" align=center> + <tr> + <td class="headerBarLeft" align="left"> + <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/headerbar-logo.png"> + </td> - <td align="right" class="headerBarRight"> - </td> - </tr> - </table> - </div> - <div id="contextBar" width="700px" align=center> - <table width="700px" align=center> - <tbody> - <tr> - <td class="contextBarLeft" align="left"><label class="nameElement"><?php print_string('addactivity', 'liveclassroom') ?></label> - <label class="nameTools">: Live Classroom <?php echo print_string('in', 'liveclassroom').' '.$course->fullname; ?></label> - </td> - <td class="contextBarRight" align="right">Live Classroom</td> - </tr> - </tbody> - </table> - </div> - <div id="activity" width="700px" align=center> - <table border="0" width="700px" align=center cellpadding="5" cellspacing="0"> - <tr valign="top"> - <td align="right"> - <font color="red">*</font> <font class="fontCurrent"><?php print_string('activity_name', 'liveclassroom') ?></font> - </td> - <td align="left"> - <input type="text" id="name" name="name" size="25" value="<?php echo $name ?>"> - </td> - <td colspan="2"> - <font color="red">*</font><font class="fontCurrent"><?php print_string('required_fields', 'liveclassroom')?></font> - </td> - </tr> + <td align="right" class="headerBarRight"> + </td> + </tr> + </table> + </div> + <div id="contextBar" width="700px" align=center> + <table width="700px" align=center> + <tbody> + <tr> + <td class="contextBarLeft" align="left"><label class="nameElement"><?php print_string('addactivity', 'liveclassroom') ?></label> + <label class="nameTools">: Live Classroom <?php echo print_string('in', 'liveclassroom').' '.$course->fullname; ?></label> + </td> + <td class="contextBarRight" align="right">Live Classroom</td> + </tr> + </tbody> + </table> + </div> + <div id="activity" width="700px" align=center> + <table border="0" width="700px" align=center cellpadding="5" cellspacing="0"> + <tr valign="top"> + <td align="right"> + <font color="red">*</font> <font class="fontCurrent"><?php print_string('activity_name', 'liveclassroom') ?></font> + </td> + <td align="left"> + <input type="text" id="name" name="name" size="25" value="<?php echo $name ?>"> + </td> + <td colspan="2"> + <font color="red">*</font><font class="fontCurrent"><?php print_string('required_fields', 'liveclassroom')?></font> + </td> + </tr> + + <tr valign="top"> + <?php + if($course->format == "weeks" || $course->format == "weekscss"){ + ?> + <td align="right"> + <font class="fontCurrent"><?php print_string('weeksformat', 'liveclassroom')?></font> + </td> + <td align="left"> + <select name="section" id="section" onchange="change()"> + <?php + echo getListOfWeeks($course,$sectionId); + ?> + </select> + </td> + </tr> + <?php + }else if($course->format == "topics" ){ + + ?> + <tr valign="top"> + <td align="right"> + <font class="fontCurrent"><?php print_string('topicformat', 'liveclassroom') ?></font> + </td> - <tr valign="top"> - <?php - if($course->format == "weeks" || $course->format == "weekscss"){ + <td colspan="2" align="left"> + <select name="section" id="section"> + <?php + echo getListOfTopics($course,$sectionId); ?> - <td align="right"> - <font class="fontCurrent"><?php print_string('weeksformat', 'liveclassroom')?></font> - </td> - <td align="left"> - <select name="section" id="section" onchange="change()"> - <?php - for($l=0;$l<sizeof($list_weeks);$l++){ - if($sectionId==$l) - { - echo '<OPTION selected value='.$l.'>'."Week ".$l." : ".$list_weeks[$l].'</OPTION>'; - } - else - { - echo '<OPTION value='.$l.'>'."Week ".$l." : ".$list_weeks[$l].'</OPTION>'; - } + </select> + </td> + </tr> + <?php } ?> + </tr> + <tr valign="top"> + <td align="right"> + <font color="red">*</font><font class="fontCurrent"><?php print_string('liveclassroomtype', 'liveclassroom')?></font> + </td> + <td align="left"> + <SELECT name="type" id="type"> + <option value="empty">Select... </option> + <?php + foreach($rooms as $room) { + if($room->isArchive()==false){ + $name=(strlen($room->getLongname())>25)?substr($room->getLongname(),0,25)."...":$room->getLongname(); + if( ($roomId==$lcApi->getPrefix().$room->getRoomId()) || ($update!=false && $lcApi->getPrefix().$room->getRoomId()==$activity->type)) + { + echo "<OPTION selected VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; } - ?> - </select> - </td> - </tr> + else + { + echo "<OPTION VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; + } + } + } + ?> + </SELECT> + </td> + <td width="50px"><font class="fontCurrent"><?php print_string('or', 'liveclassroom')?></font></td> + <td> + <input type="button" value="<?php print_string('new', 'liveclassroom')?>" onclick="javascript:LaunchCreateWorkflow()"> + </td> + </tr> + <tr valign="top" > + <td align="right"> + <font class="fontCurrent"><?php echo get_string('visibletostudents','liveclassroom'); ?></font> + </td> + <td align="left" > <?php - }else if($course->format == "topics" ){ - + unset($choices); + $choices[1] = get_string('show'); + $choices[0] = get_string('hide'); + choose_from_menu($choices, 'visible', $visible, '', '', 0, false, $hiddensection); ?> - <tr valign="top"> - <td align="right"> - <font class="fontCurrent"><?php print_string('topicformat', 'liveclassroom') ?></font> - </td> - - <td colspan="2" align="left"> - <select name="section" id="section"> - <?php - $section = 0; - while ($section <= $course->numsections) { - 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); - $minidesc = substr($descTxt, 0, 20); - - if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) ) { - $minidesc .= "..."; - } - else if ($thissection->summary == NULL){ - $minidesc = "Topic"; - } - if($sectionId==$section) - { - echo '<OPTION selected value='.$section.'>'.$section.". ".$minidesc.'</OPTION>'; - } - else - { - echo '<OPTION value='.$section.'>'.$section.". ".$minidesc.'</OPTION>'; - } - $section++; - } - ?> - </select> - </td> - </tr> - <?php } ?> - </tr> - <tr valign="top"> - <td align="right"> - <font color="red">*</font><font class="fontCurrent"><?php print_string('liveclassroomtype', 'liveclassroom')?></font> - </td> - <td align="left"> - <SELECT name="type" id="type"> - <option value="empty">Select... </option> - <?php - foreach($rooms as $room) { - if($room->isArchive()==false){ - $name=(strlen($room->getLongname())>25)?substr($room->getLongname(),0,25)."...":$room->getLongname(); - if( ($roomId==$lcApi->getPrefix().$room->getRoomId()) || ($update!=false && $lcApi->getPrefix().$room->getRoomId()==$activity->type)) - { - echo "<OPTION selected VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; - } - else - { - echo "<OPTION VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; - } - } - } - ?> - </SELECT> - </td> - <td width="50px"><font class="fontCurrent"><?php print_string('or', 'liveclassroom')?></font></td> - <td> - <input type="button" value="<?php print_string('new', 'liveclassroom')?>" onclick="javascript:LaunchCreateWorkflow()"> - </td> - </tr> - <tr valign="top" > - <td align="right"> - <font class="fontCurrent"><?php echo get_string('visibletostudents','liveclassroom'); ?></font> - </td> - <td align="left" > - <?php - unset($choices); - $choices[1] = get_string('show'); - $choices[0] = get_string('hide'); - choose_from_menu($choices, 'visible', $visible, '', '', 0, false, $hiddensection); - ?> - </td> - </tr> - <tr> - <td height="30px"></td> - </tr> - <tr> - <td align="right" colspan="2" width="500px"> - <div id="calendar"> - <table cellpadding=5 cellspacing="5" width="100%"> - <tr> - <td align=left colspan=2> - <input type="checkbox" value="true" id="calendar_event" name="calendar_event" onclick=hideCalendarEvent("check") <?php echo $checked." ".$disabledCheckbox ?>> - <font class="fontCurrent"><?php echo get_string ('add_calendar', 'liveclassroom') ?></font> - </td> - </tr> - - <tr> - <td align=right style="width:220px"> - <?php - if($course->format == "weeks" || $course->format == "weekscss"){?> - <select style="float:left" id="start_day" name= "start_day" onchange="change()" <?php echo $disableAllElements ?>> - <?php - for($i=0;$i<7;$i++){ - if($event==false && $i==0 || $event!=false && date('w',$event->timestart)==date('w',$i*86400+$course->startdate)) - echo "<option value=".($i*86400)." selected>".get_string("day".date('w',$i*86400+$course->startdate),"liveclassroom")."</option>"; - else - echo "<option value=".($i*86400).">".get_string("day".date('w',(($i*86400)+$course->startdate)),"liveclassroom")."</option>"; - } - ?> - </select> - <label id="comment_date"><?php echo $stringDate;?></label> - <? - }else if($course->format == "topics" || $course->format == "social" || $course->format == "site"){?> - <select id="start_month" name="start_month" <?php echo $disableAllElements ?>> - <?php - for($i=1;$i<=12;$i++){ - if($event==false && $i==date('m') || $event!=false && date('m',$event->timestart)==$i) - echo "<option value=".$i." selected>".get_string("month".$i,"liveclassroom")."</option>"; - else - echo "<option value=".$i.">".get_string("month".$i,"liveclassroom")."</option>"; - } - ?> - </select> - <select id="start_day" name="start_day" <?php echo $disableAllElements ?>> - <?php - for($i=1;$i<=31;$i++){ - if($event==false && $i==date('d') || $event!=false && date('d',$event->timestart)==$i) - echo "<option value=".$i." selected>".$i."</option>"; - else - echo "<option value=".$i.">".$i."</option>"; - } - ?> - </select> - <select id="start_year" name="start_year" <?php echo $disableAllElements ?>> - <?php - for($i=date('Y');$i<=date('Y')+10;$i++){ - if($event==false && $i==date('Y') || $event!=false && date('Y',$event->timestart)==$i) - echo "<option value=".$i." selected>".$i."</option>"; - else - echo "<option value=".$i.">".$i."</option>"; - } - ?> - </select> - <? }?> - - </td> - <td align=left > - <select id="start_hr" name="start_hr" <?php echo $disableAllElements ?>> + </td> + </tr> + <tr> + <td height="30px"></td> + </tr> + <tr> + <td align="right" colspan="2" width="500px"> + <div id="calendar"> + <table cellpadding=5 cellspacing="5" width="100%"> + <tr> + <td align=left colspan=2> + <input type="checkbox" value="true" id="calendar_event" name="calendar_event" onclick=hideCalendarEvent("check") <?php echo $checked." ".$disabledCheckbox ?>> + <font class="fontCurrent"><?php echo get_string ('add_calendar', 'liveclassroom') ?></font> + </td> + </tr> + + <tr> + <td align=right style="width:220px"> + <?php + if($course->format == "weeks" || $course->format == "weekscss"){?> + <select style="float:left" id="start_day" name= "start_day" onchange="change()" <?php echo $disableAllElements ?>> <?php - for($i=1;$i<=24;$i++){ - if($event==false && $i==8 || $event!=false && date('G',$event->timestart)==$i) - echo "<option value=".$i." selected>".date("h A",mktime($i, 1, 1, 1, 1,2007))."</option>"; - else - echo "<option value=".$i.">".date("h A",mktime($i, 1, 1, 1, 1,2007))."</option>"; - } - ?> - </select> - <select id="start_min" name="start_min" <?php echo $disableAllElements ?>> + for($i=0;$i<7;$i++){ + if($event==false && $i==0 || $event!=false && date('w',$event->timestart)==date('w',$i*86400+$course->startdate)) + echo "<option value=".($i*86400)." selected>".get_string("day".date('w',$i*86400+$course->startdate),"liveclassroom")."</option>"; + else + echo "<option value=".($i*86400).">".get_string("day".date('w',(($i*86400)+$course->startdate)),"liveclassroom")."</option>"; + } + ?> + </select> + <label id="comment_date"><?php echo $stringDate;?></label> + <? + }else if($course->format == "topics" || $course->format == "social" || $course->format == "site"){?> + <select id="start_month" name="start_month" <?php echo $disableAllElements ?>> <?php - for($i=0;$i<60;$i=$i+5){ - if($event!=false && date('i',$event->timestart)==$i) - echo "<option value=".$i." selected>".$i."</option>"; - else - echo "<option value=".$i.">".$i."</option>"; - } + for($i=1;$i<=12;$i++){ + if($event==false && $i==date('m') || $event!=false && date('m',$event->timestart)==$i) + echo "<option value=".$i." selected>".get_string("month".$i,"liveclassroom")."</option>"; + else + echo "<option value=".$i.">".get_string("month".$i,"liveclassroom")."</option>"; + } + ?> + </select> + <select id="start_day" name="start_day" <?php echo $disableAllElements ?>> + <?php + for($i=1;$i<=31;$i++){ + if($event==false && $i==date('d') || $event!=false && date('d',$event->timestart)==$i) + echo "<option value=".$i." selected>".$i."</option>"; + else + echo "<option value=".$i.">".$i."</option>"; + } + ?> + </select> + <select id="start_year" name="start_year" <?php echo $disableAllElements ?>> + <?php + for($i=date('Y');$i<=date('Y')+10;$i++){ + if($event==false && $i==date('Y') || $event!=false && date('Y',$event->timestart)==$i) + echo "<option value=".$i." selected>".$i."</option>"; + else + echo "<option value=".$i.">".$i."</option>"; + } ?> - </select> - </td> - </tr> - <tr> - <td align="right"> - <font class="fontCurrent"><?echo get_string('duration_calendar','liveclassroom')?></font> - </td> - <td align=left > - <select id="duration_hr" name="duration_hr" <?php echo $disableAllElements ?>> - <?php - for($i=0;$i<=24;$i++){ - if($event!=false && intval(abs($event->timeduration/3600))==$i) - echo "<option value=".$i." selected>".$i."</option>"; - else - echo "<option value=".$i.">".$i."</option>"; - } - ?> - </select> - <font class="fontCurrent">hr</font> - <select id="duration_min" name="duration_min" <?php echo $disableAllElements ?>> - <?php - for($i=0;$i<=60;$i=$i+10){ - if($event!=false && (($event->timeduration%3600)/60)==$i) - echo "<option value=".$i." selected>".$i."</option>"; - else - echo "<option value=".$i.">".$i."</option>"; - } - ?> - </select> - <font class="fontCurrent">min</font> - </td> - </tr> - <tr> - <td align="right"> - <font class="fontCurrent"><? echo get_string('description_calendar', 'liveclassroom')?></font> - </td> - <td align=left > - <textarea id="description" name="description" <?php echo $disableAllElements ?> rows="4" cols="30"><?php echo $description; ?></textarea> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> - </div> - <div width="700px" align=center> - <table width="700px" align=center cellpadding="5" > - <tr style="border-top:1px solid; background-color:#F0F0F0;"> - <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif" ><a class="list" href="<?php echo $CFG->wwwroot;... [truncated message content] |
From: <tro...@us...> - 2008-01-11 16:47:22
|
Revision: 214 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=214&view=rev Author: trollinger Date: 2008-01-11 08:47:18 -0800 (Fri, 11 Jan 2008) Log Message: ----------- add a file to group the common function Added Paths: ----------- branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php Added: branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php (rev 0) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaLib.php 2008-01-11 16:47:18 UTC (rev 214) @@ -0,0 +1,281 @@ +<?php +/** + * Returns the keys of the general parameters passed by GET or POST + */ +function getKeysOfGeneralParameters(){ + + return array( + array("value"=>"enc_courseId","type"=>PARAM_INT,"default_value"=>null), + array("value"=>"enc_email","type"=>PARAM_CLEAN,"default_value"=>null), + array("value"=>"enc_firstname","type"=>PARAM_ALPHANUM,"default_value"=>null), + array("value"=>"enc_lastname","type"=>PARAM_ALPHANUM,"default_value"=>null), + array("value"=>"enc_role","type"=>PARAM_ALPHA,"default_value"=>null), + array("value"=>"time","type"=>PARAM_INT,"default_value"=>null), + array("value"=>"signature","type"=>PARAM_ALPHANUM,"default_value"=>null), + array("value"=>"product","type"=>PARAM_ALPHA,"default_value"=>null), + array("value"=>"type","type"=>PARAM_ALPHA,"default_value"=>null), + array("value"=>"studentView","type"=>PARAM_BOOL,"default_value"=>null), + array("value"=>"createWorkflow","type"=>PARAM_BOOL,"default_value"=>null), + + ); + +} + + +function getKeyWimbaClassroomForm(){ + + + return array ( + array("value"=>"longname","type"=>PARAM_CLEAN,"default_value"=>null), + array("value"=>"description","type"=>PARAM_CLEAN,"default_value"=>null), + array("value"=>"led","type"=>PARAM_ALPHA,"default_value"=>"instructor"), + array("value"=>"hms_two_way_enabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"enable_student_video_on_startup","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"hms_simulcast_restricted","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"video_bandwidth","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"status_appear","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"enabled_breakoutrooms","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"archiveEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"appshareEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"pptEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"chatEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"accessAvailable","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"privateChatEnabled","type"=>PARAM_BOOL,"default_value"=>0), + array("value"=>"userlimit","type"=>PARAM_INT,"default_value"=>-1) + ) ; +} + + +function isSwitch(){ + global $USER; + + if((isset($USER->studentview) && $USER->studentview==1) || (!empty($USER->switchrole)) ) { + return true; + } + return false; + + +} +function getRoleForWimbaTools($courseId,$userId){ + global $CFG; + global $USER; + $role=""; + if(strstr($CFG->release,"1.7")) { + $context = get_context_instance(CONTEXT_COURSE, $courseId) ; + } + + //the role of the current user is switched + //the role of the current user is switched + if((isset($USER->studentview) && $USER->studentview==1)||(isset($context) && isset($USER->switchrole) && !empty($USER->switchrole) && $USER->switchrole[$context->id]>3)) { + $role='StudentBis'; + } else{ + + + 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'; + } + } + + } + + return $role; +} + +/* +* Give the parameters with the signature md5 to give to the frame +* @param $courseid : the id of the current course +* return a string with all the parameters to give to the url +*/ +function get_url_params($courseid) { + + global $USER; + global $CFG; + + $role=getRoleForWimbaTools($courseid,$USER->id); + $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role); + $url_params = "enc_courseId=".rawurlencode($courseid). + "&enc_email=".rawurlencode($USER->email). + "&enc_firstname=".rawurlencode($USER->firstname). + "&enc_lastname=".rawurlencode($USER->lastname). + "&enc_role=".rawurlencode($role). + "&signature=".rawurlencode($signature); + return $url_params; +} + + +/* list the element of the pictures directory +* return a String wich contains the pictures separated by a , +*/ +function list_dir($name,&$s) { + + if ($dir = opendir($name)) { + + while($file = readdir($dir)) { + + + if(is_dir($name."/".$file) && !in_array($file, array(".",".."))) { + + list_dir($name."/".$file,$s); + } + else if($file!="." && $file !="..") { + $s.=$file.";"; + } + + } + + closedir($dir); + } + + +} + +function storeResource($rid,$courseId,$type,$name,$params=NULL){ + $voicetools->rid=$rid; + $voicetools->course= $courseId; + $voicetools->name= $name; + $voicetools->type=$type; + if($params!=null){ + + if(isset($params["accessAvailable"])) + { + $voicetools->availability=1; + } + else + { + $voicetools->availability=0; + } + if(isset($params["start_date"]) && $params["start_date"]=="true"){ + if($params["start_hr"]=="--") + { + $start_hr=0; + } + else + { + $start_hr=intval($params["start_hr"]); + } + if($params["start_min"]=="--") + { + $start_min=0; + } + else + { + $start_min=intval($params["start_min"]); + } + $voicetools->start_date= mktime($start_hr, $start_min,0, intval($params["start_month"]),intval($params["start_day"]), intval($params["start_year"])); + + + + + } + else + { + $voicetools->start_date=-1; + } + if(isset($params["end_date"]) && $params["end_date"]=="true"){ + if($params["end_hr"]=="--") + { + $end_hr=0; + } + else + { + $end_hr=intval($params["end_hr"]); + } + if($params["end_min"]=="--") + { + $end_min=0; + } + else + { + $end_min=intval($params["start_min"]); + } + + $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]),intval( $params["end_day"]), intval($params["end_year"])); + } + else + { + $voicetools->end_date="-1"; + } + } + + return voicetools_store_new_element($voicetools); + +} +function updateResource($rid,$courseId,$type,$params){ + + $voicetools->rid=$rid; + $voicetools->course= $courseId; + $voicetools->type=$type; + if(isset($params["accessAvailable"])) + { + $voicetools->availability=1; + } + else + { + $voicetools->availability=0; + } + + if(isset($params["start_date"]) && $params["start_date"]=="true"){ + + if($params["start_hr"]=="--") + { + $start_hr=0; + }else + { + $start_hr=intval($params["start_hr"]); + } + if($params["start_min"]=="--") + { + $start_min=0; + } + else + { + $start_min=intval($params["start_min"]); + } + $voicetools->start_date=mktime($start_hr, $start_min,0, intval($params["start_month"]), intval($params["start_day"]), intval($params["start_year"])); + } + else + { + $voicetools->start_date=-1; + } + if(isset($params["end_date"]) && $params["end_date"]=="true"){ + if($params["end_hr"]=="--") + { + $end_hr=0; + } + else + { + $end_hr=intval($params["end_hr"]); + } + if($params["end_min"]=="--") + { + $end_min=0; + } + else + { + $end_min=intval($params["start_min"]); + } + $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]), intval($params["end_day"]), intval($params["end_year"])); + } + else + { + $voicetools->end_date="-1"; + } + // $voicetools->id=$id; + + return voicetools_update_element($voicetools); + +} + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-11 16:45:46
|
Revision: 213 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=213&view=rev Author: trollinger Date: 2008-01-11 08:45:39 -0800 (Fri, 11 Jan 2008) Log Message: ----------- start cleaning/refactoring Modified Paths: -------------- branches/team/Thomas/moodle/mod/liveclassroom/config.html branches/team/Thomas/moodle/mod/liveclassroom/doAction.php branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaCommons.php branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php branches/team/Thomas/moodle/mod/liveclassroom/lib.php branches/team/Thomas/moodle/mod/liveclassroom/mod.html branches/team/Thomas/moodle/mod/liveclassroom/version.php branches/team/Thomas/moodle/mod/liveclassroom/view.php branches/team/Thomas/moodle/mod/liveclassroom/welcome.php Modified: branches/team/Thomas/moodle/mod/liveclassroom/config.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-01-11 16:45:39 UTC (rev 213) @@ -10,22 +10,24 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <title>Voice Tools Server Configuration </title> - + <title>Live Classroom Server Configuration </title> </head> + <style> - .label_settings +.label_settings { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:right; } - .comment + +.comment { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:right; } + .page_title { font-family: Verdana, Arial, Helvetica, sans-serif; @@ -35,6 +37,7 @@ vertical-align: middle; } </style> + <body> <form method="post" action="module.php" name="form"> <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> Modified: branches/team/Thomas/moodle/mod/liveclassroom/doAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-11 16:45:39 UTC (rev 213) @@ -35,6 +35,7 @@ require_once ("lib.php"); require_once ("lib/lc/LCAction.php"); require_once ("lib/common/WimbaCommons.php"); +require_once ("lib/common/WimbaLib.php"); require_once ("lib/common/WimbaUI.php"); require_once ("lib/common/XmlRoom.php"); require_once ("lib/common/WimbaXml.php"); @@ -42,20 +43,19 @@ require_once ('lib/common/domxml-php4-php5.php'); } -$courseid = optional_param('enc_course_id', 0, PARAM_INT); -$action = required_param('action', PARAM_ALPHA); -$time = required_param('time', PARAM_INT); +$keys=array_merge(getKeysOfGeneralParameters(),getKeyWimbaClassroomForm()); -if (!empty ($_POST)) { - while (list ($key, $val) = each($_POST)) { - $list_attributes[$key] = $val; - } +$params=array(); +foreach($keys as $param){ + $value=optional_param($param["value"],$param["default_value"],$param["type"]); + $params[$param["value"]] = $value; } -while (list ($key, $val) = each($_GET)) { - $list_attributes[$key] = $val; -} -$session = new WimbaMoodleSession($list_attributes, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); +$courseid = $params["enc_courseId"]; +require_login($courseid); +$action = required_param('action', PARAM_ALPHA); + +$session = new WimbaMoodleSession($params, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); $xml = new WimbaXml(); if ($session->error == false && $session != NULL) { @@ -67,11 +67,12 @@ case "launch" : $roomId = required_param('id', PARAM_SAFEDIR); - if ($list_attributes["studentView"] == "true") { + + if ($params["studentView"] == "true") { $authToken = $api->getAuthokenNormal($session->getCourseId() . "_S", $session->getFirstname(), $session->getLastname()); } else { $authToken = $api->getAuthoken(); - } + } header('Location:' . $CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?channel=' . $roomId . '&hzA=' . $authToken); exit; break; @@ -128,7 +129,7 @@ $roomId = required_param('id', PARAM_SAFEDIR); $select_room = $api->getRoom($roomId); - if ($list_attributes["studentView"] == "true" || $session->isInstructor() == false) + if ($params["studentView"] == "true" || $session->isInstructor() == false) $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), null, $select_room->getParticipantPin(), $api->getPhoneNumbers()); else $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), $select_room->getPresenterPin(), $select_room->getParticipantPin(), $api->getPhoneNumbers()); @@ -142,13 +143,12 @@ $id = $api->createRoom($roomId, "true"); break; } - if ($action == "saveSettings") { echo "good"; exit (); } - if (isset ($list_attributes["createWorkflow"]) && $list_attributes["createWorkflow"] == "true") { + if (isset ($params["createWorkflow"]) && $params["createWorkflow"] == "true") { ?> <script> parent.location.href="<?php echo $CFG->wwwroot . '/course/mod.php?section=0&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom&roomId=' . $api->getPrefix().$id ?>" @@ -156,9 +156,9 @@ <? } else if ($action != "getDialInformation") { - header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction . '&messageProduct=' . $messageProduct); - } + header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction . '&messageProduct=' . $messageProduct); + } } else { - header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session'); +// header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session'); } ?> \ No newline at end of file Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-11 16:45:39 UTC (rev 213) @@ -31,7 +31,7 @@ /// This page is to generate the list of rooms and archives -error_reporting(E_ERROR); + require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); @@ -41,25 +41,20 @@ require_once("lib/common/XmlOrphanedArchive.php"); require_once("lib/common/XmlRoom.php"); require_once("lib/common/WimbaXml.php"); +require_once("lib/common/WimbaLib.php"); if (version_compare(PHP_VERSION,'5','>=')) { require_once('lib/common/domxml-php4-php5.php'); } -//TODO: Change this to be using (required|optional)_param -if (!empty ($_POST) ) { - while (list ($key, $val) = each($_POST)) { - $params[$key] = $val; - } +foreach(getKeysOfGeneralParameters() as $param){ + $value=optional_param($param["value"],$param["default_value"],$param["type"]); + if($value!=null) + $params[$param["value"]] = $value; } -if (!empty ($_GET) ) { - while (list ($key, $val) = each($_GET)) { - $params[$key] = $val; - } - -} +require_login($params["en_course_id"]); if(isset($params["error"])){ $display=$uiManager->setError(get_string ($params["error"], 'liveclassroon')); Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-11 16:45:39 UTC (rev 213) @@ -28,36 +28,30 @@ /* $Id: generateSettings.php 197 2007-08-29 14:30:36Z trollinger $ */ /// This page is to generate the settings of a room or archive -error_reporting(E_ERROR); + require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); require_once("lib/common/WimbaXml.php"); require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaLib.php"); require_once("lib/common/WimbaUI.php"); if (version_compare(PHP_VERSION,'5','>=')) { require_once('lib/common/domxml-php4-php5.php'); } -$action = optional_param('action', PARAM_ALPHA); - - $currentIdtab= optional_param('idtab', '',PARAM_ALPHA); - $params = array (); -if (!empty ($_POST) ) { - while (list ($key, $val) = each($_POST)) { - $params[$key] = $val; - } - +foreach(getKeysOfGeneralParameters() as $param){ + $value=optional_param($param["value"],$param["default_value"],$param["type"]); + if($value!=null) + $params[$param["value"]] = $value; } -if (!empty ($_GET) ) { - while (list ($key, $val) = each($_GET)) { - $params[$key] = $val; - } - -} +require_login($params["enc_courseId"]); +$action = optional_param('action', PARAM_ALPHA); +$currentIdtab = optional_param('idtab', null, PARAM_ALPHA); + $session=new WimbaMoodleSession($params); if($session->error==false)//good { Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaCommons.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaCommons.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/common/WimbaCommons.php 2008-01-11 16:45:39 UTC (rev 213) @@ -50,8 +50,6 @@ ksort($parameters); foreach ($parameters as $key => $value) { - - if (strstr($key, 'enc_'))//param use to signature { //put this params in a map to use after more easily and to sort @@ -169,242 +167,8 @@ } } -function isSwitch(){ - global $USER; - - if((isset($USER->studentview) && $USER->studentview==1) || (!empty($USER->switchrole)) ) { - return true; - } - return false; - -} -function getRoleForWimbaTools($courseId,$userId){ - global $CFG; - global $USER; - $role=""; - if(strstr($CFG->release,"1.7")) { - $context = get_context_instance(CONTEXT_COURSE, $courseId) ; - } - - //the role of the current user is switched - //the role of the current user is switched - if((isset($USER->studentview) && $USER->studentview==1)||(isset($context) && isset($USER->switchrole) && !empty($USER->switchrole) && $USER->switchrole[$context->id]>3)) { - $role='StudentBis'; - } else{ - - 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'; - } - } - - } - - return $role; -} - -/* -* Give the parameters with the signature md5 to give to the frame -* @param $courseid : the id of the current course -* return a string with all the parameters to give to the url -*/ -function get_url_params($courseid) { - - global $USER; - global $CFG; - - $role=getRoleForWimbaTools($courseid,$USER->id); - $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role); - $url_params = "enc_courseId=".rawurlencode($courseid). - "&enc_email=".rawurlencode($USER->email). - "&enc_firstname=".rawurlencode($USER->firstname). - "&enc_lastname=".rawurlencode($USER->lastname). - "&enc_role=".rawurlencode($role). - "&signature=".rawurlencode($signature); - return $url_params; -} - - -/* list the element of the pictures directory -* return a String wich contains the pictures separated by a , -*/ -function list_dir($name,&$s) { - - if ($dir = opendir($name)) { - - while($file = readdir($dir)) { - - - if(is_dir($name."/".$file) && !in_array($file, array(".",".."))) { - - list_dir($name."/".$file,$s); - } - else if($file!="." && $file !="..") { - $s.=$file.";"; - } - - } - - closedir($dir); - } - - -} - -function storeResource($rid,$courseId,$type,$name,$params=NULL){ - $voicetools->rid=$rid; - $voicetools->course= $courseId; - $voicetools->name= $name; - $voicetools->type=$type; - if($params!=null){ - - if(isset($params["accessAvailable"])) - { - $voicetools->availability=1; - } - else - { - $voicetools->availability=0; - } - if(isset($params["start_date"]) && $params["start_date"]=="true"){ - if($params["start_hr"]=="--") - { - $start_hr=0; - } - else - { - $start_hr=intval($params["start_hr"]); - } - if($params["start_min"]=="--") - { - $start_min=0; - } - else - { - $start_min=intval($params["start_min"]); - } - $voicetools->start_date= mktime($start_hr, $start_min,0, intval($params["start_month"]),intval($params["start_day"]), intval($params["start_year"])); - - - - - } - else - { - $voicetools->start_date=-1; - } - if(isset($params["end_date"]) && $params["end_date"]=="true"){ - if($params["end_hr"]=="--") - { - $end_hr=0; - } - else - { - $end_hr=intval($params["end_hr"]); - } - if($params["end_min"]=="--") - { - $end_min=0; - } - else - { - $end_min=intval($params["start_min"]); - } - - $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]),intval( $params["end_day"]), intval($params["end_year"])); - } - else - { - $voicetools->end_date="-1"; - } - } - - return voicetools_store_new_element($voicetools); - -} -function updateResource($rid,$courseId,$type,$params){ - - $voicetools->rid=$rid; - $voicetools->course= $courseId; - $voicetools->type=$type; - if(isset($params["accessAvailable"])) - { - $voicetools->availability=1; - } - else - { - $voicetools->availability=0; - } - - if(isset($params["start_date"]) && $params["start_date"]=="true"){ - - if($params["start_hr"]=="--") - { - $start_hr=0; - }else - { - $start_hr=intval($params["start_hr"]); - } - if($params["start_min"]=="--") - { - $start_min=0; - } - else - { - $start_min=intval($params["start_min"]); - } - $voicetools->start_date=mktime($start_hr, $start_min,0, intval($params["start_month"]), intval($params["start_day"]), intval($params["start_year"])); - } - else - { - $voicetools->start_date=-1; - } - if(isset($params["end_date"]) && $params["end_date"]=="true"){ - if($params["end_hr"]=="--") - { - $end_hr=0; - } - else - { - $end_hr=intval($params["end_hr"]); - } - if($params["end_min"]=="--") - { - $end_min=0; - } - else - { - $end_min=intval($params["start_min"]); - } - $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]), intval($params["end_day"]), intval($params["end_year"])); - } - else - { - $voicetools->end_date="-1"; - } - // $voicetools->id=$id; - - return voicetools_update_element($voicetools); - -} - - - - - - class vtAction{ var $params; @@ -888,8 +652,9 @@ return voicetools_api_create_session ($user->getUser(),$resource->getResource(),$rights->getRights()) ; } +} -} + ?> \ No newline at end of file Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/LCAction.php 2008-01-11 16:45:39 UTC (rev 213) @@ -108,69 +108,70 @@ $room->setBORShowRoomCarousels("0"); //discussion features - if (isset ($this->session->request["archiveEnabled"])) - $room->setArchiveEnabled("1"); - else - $room->setArchiveEnabled("0"); + //if (isset ($this->session->request["archiveEnabled"])) + $room->setArchiveEnabled($this->session->request["archiveEnabled"]); + // else + // $room->setArchiveEnabled("0"); - if (isset ($this->session->request["appshareEnabled"])) - $room->setLiveShareEnabled("1"); - else - $room->setLiveShareEnabled("0"); + //if (isset ($this->session->request["appshareEnabled"])) + $room->setLiveShareEnabled($this->session->request["appshareEnabled"]); + // else + // $room->setLiveShareEnabled("0"); - - if (isset ($this->session->request["pptEnabled"])) - $room->setPptImportEnabled("1"); - else - $room->setPptImportEnabled("0"); + + //if (isset ($this->session->request["pptEnabled"])) + $room->setPptImportEnabled($this->session->request["pptEnabled"]); + //else + //$room->setPptImportEnabled("0"); } else { //media - if (isset ($this->session->request["hms_two_way_enabled"])) { - $room->setHmsTwoWayEnabled("1"); - } else { - $room->setHmsTwoWayEnabled("0"); - } - if (isset ($this->session->request["enable_student_video_on_startup"])) - $room->setStudentVideoOnStartupEnabled("1"); - else - $room->setStudentVideoOnStartupEnabled("0"); - if (isset ($this->session->request["hms_simulcast_restricted"])) - $room->setHmsSimulcastRestricted("0"); - else - $room->setHmsSimulcastRestricted("1"); + //if (isset ($this->session->request["hms_two_way_enabled"])) { + $room->setHmsTwoWayEnabled($this->session->request["hms_two_way_enabled"]); + //} else { + //$room->setHmsTwoWayEnabled("0"); + // } + //if (isset ($this->session->request["enable_student_video_on_startup"])) + $room->setStudentVideoOnStartupEnabled($this->session->request["enable_student_video_on_startup"]); + //else + //$room->setStudentVideoOnStartupEnabled("0"); + //if (isset ($this->session->request["hms_simulcast_restricted"])) + $room->setHmsSimulcastRestricted($this->session->request["hms_simulcast_restricted"]); + //else + //$room->setHmsSimulcastRestricted("1"); $room->setVideoBandwidth($this->session->request["video_bandwidth"]); //Chat - if (isset ($this->session->request["chatEnabled"])) - $room->setChatEnabled("1"); - else - $room->setChatEnabled("0"); + // if (isset ($this->session->request["chatEnabled"])) + + $room->setChatEnabled($this->session->request["chatEnabled"]); + //else + //$room->setChatEnabled("0"); - if (isset ($this->session->request["privateChatEnabled"])) - $room->setPrivateChatEnabled("1"); - else - $room->setPrivateChatEnabled("0"); +// if (isset ($this->session->request["privateChatEnabled"])) + $room->setPrivateChatEnabled($this->session->request["privateChatEnabled"]); + // else + // $room->setPrivateChatEnabled("0"); //eBoard - if (isset ($this->session->request["enabled_student_eboard"])) - $room->setStudentWhiteboardEnabled("1"); - else - $room->setStudentWhiteboardEnabled("0"); + //if (isset ($this->session->request["enabled_student_eboard"])) + $room->setStudentWhiteboardEnabled($this->session->request["enabled_student_eboard"]); + // else + //$room->setStudentWhiteboardEnabled("0"); - if (isset ($this->session->request["enabled_breakoutrooms"])) - $room->setBOREnabled("1"); - else - $room->setBOREnabled("0"); + //if (isset ($this->session->request["enabled_breakoutrooms"])) + $room->setBOREnabled($this->session->request["enabled_breakoutrooms"]); + //else + //$room->setBOREnabled("0"); - if (isset ($this->session->request["enabled_students_breakoutrooms"])) - $room->setBORCarouselsPublic("1"); - else - $room->setBORCarouselsPublic("0"); + //if (isset ($this->session->request["enabled_students_breakoutrooms"])) + $room->setBORCarouselsPublic($this->session->request["enabled_students_breakoutrooms"]); + // else + //$room->setBORCarouselsPublic("0"); - if (isset ($this->session->request["enabled_students_mainrooms"])) - $room->setBORShowRoomCarousels("1"); - else - $room->setBORShowRoomCarousels("0"); + //if (isset ($this->session->request["enabled_students_mainrooms"])) + $room->setBORShowRoomCarousels($this->session->request["enabled_students_mainrooms"]); + //else + // $room->setBORShowRoomCarousels("0"); //default features $room->setArchiveEnabled("1"); @@ -179,15 +180,15 @@ } //common features - if (isset ($this->session->request["enabled_status"])) - $room->setUserstatusEnabled("1"); - else - $room->setUserstatusEnabled("0"); + //if (isset ($this->session->request["enabled_status"])) + $room->setUserstatusEnabled($this->session->request["enabled_status"]); + //else + //$room->setUserstatusEnabled("0"); - if (isset ($this->session->request["status_appear"])) - $room->setSendUserstatusUpdates("1"); - else - $room->setSendUserstatusUpdates("0"); + //if (isset ($this->session->request["status_appear"])) + $room->setSendUserstatusUpdates($this->session->request["status_appear"]); + //else + // $room->setSendUserstatusUpdates("0"); // $rooms->SEtP @@ -250,7 +251,7 @@ function createSimpleRoom($longname, $lecture, $courseId) { //room - $id = $courseId . rand(); + $id = $this->prefix.$courseId . rand(); $room = new LCRoom(); $room->setArguments($id, null, $longname, null, "0", "0"); Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib/lc/lcapi.php 2008-01-11 16:45:39 UTC (rev 213) @@ -407,7 +407,7 @@ } } - $params = "&target=".$this->prefix.$roomid . "&longname=$roomname" . $params; + $params = "&target=".$roomid . "&longname=$roomname" . $params; $enc_params = str_replace(" ", "+", $params); $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_CLASS, $enc_params); @@ -439,7 +439,7 @@ if($userid!="Guest"){ $userid=$this->prefix.$userid; } - $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_ROLE, "&target=".$this->prefix.$roomid."&user_id=".$userid."&role_id=$role"); + $response = $this->lcapi_send_query( LCAPI_FUNCTION_CREATE_ROLE, "&target=".$roomid."&user_id=".$userid."&role_id=$role"); preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { @@ -463,12 +463,12 @@ if($userid!="Guest"){ $userid=$this->prefix.$userid; } - $response = $this->lcapi_send_query( LCAPI_FUNCTION_DELETE_ROLE, "&target=".$this->prefix.$roomid."&user_id=".$userid."&role_id=$role"); + $response = $this->lcapi_send_query( LCAPI_FUNCTION_DELETE_ROLE, "&target=".$roomid."&user_id=".$userid."&role_id=$role"); preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { $this->lcapi_error( LCAPI_ECRUD); - error_log(__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:".$this->prefix.$roomid); + error_log(__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:".$roomid); return false; } if ( LCAPI_DEBUG) { Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-11 16:45:39 UTC (rev 213) @@ -408,105 +408,6 @@ return true; } -/** - * Returns the LC userID of the student profile in the for this course - * - * @param $courseid - the id of the course - * @return string - the LC user id of the student profile - */ -function liveclassroom_get_student_userid ($courseid) { - $course = get_record("course", "id", $courseid); - - if (empty($course)) { - error(__FUNCTION__ . ": course not found."); - } - - $enc_coursename = str_replace(" ", "_", $course->shortname); - - return LIVECLASSROOM_MOODLE_PREFIX . $enc_coursename . LIVECLASSROOM_STUDENT_SUFFIX; -} - - -/** - * Returns the LC userID of the teacher profile in the for this course - * - * @param $courseid - the id of the course - * @return string - the LC user id of the student profile - */ -function liveclassroom_get_teacher_userid ($courseid){ - $course = get_record("course", "id", $courseid); - - if (empty($course)) { - // error(__FUNCTION__ . ": course id empty"); - } - - $enc_coursename = str_replace(" ", "_", $course->shortname); - - return LIVECLASSROOM_MOODLE_PREFIX . $enc_coursename . LIVECLASSROOM_TEACHER_SUFFIX; -} - - - -/** - * Create the different kind of room on this course - * call the function create_room for each type of room available for the course given - * @param $course : object course - */ -function liveclassroom_create_rooms ($course) { - - liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_lectureroom_attributes()); - liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_discussionroom_attributes()); - liveclassroom_create_room($course->id, "Group 2", false, liveclassroom_discussionroom_attributes()); - liveclassroom_create_room($course->id, "Group 3", false, liveclassroom_discussionroom_attributes()); - - return true; -} - -function liveclassroom_create_session ($course, $isteacher) { - global $USER; -$api=new LCApi(); - if($isteacher) { - $userid = liveclassroom_get_teacher_userid($course->id); - } - else { - $userid = liveclassroom_get_student_userid($course->id); - } - - $nickname = fullname($USER); - - return $api->lcapi_get_session ($userid, $nickname); -} - - -/** - * Return the id of liveclassroom activities in this course - * @param string the courseid - * @return array the activity ids of classrooms links available for this course - */ - function liveclassroom_ids($courseid) { - return array (); - } - -/** - * Counts the number of rooms available for this course - * @param string the courseid - * @return string the number of classrooms available for this course - */ - function liveclassroom_count_rooms($courseid) { - return '0'; - } - - -/** - * Counts the number of archives available for this course - * @param string the courseid - * @return string the number of archives available for this course - */ - function liveclassroom_count_archives($courseid) { - return '0'; - } - - /* * Give the shortname for a courseid given * @param $courseid : the id of the course Modified: branches/team/Thomas/moodle/mod/liveclassroom/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-01-11 16:45:39 UTC (rev 213) @@ -437,8 +437,7 @@ } function TestNoRoom() { - <?php - $teacherid = liveclassroom_get_teacher_userid($course->id); + <?php $rooms = $lcApi->getRooms($course->id."_T"); if($rooms==false){ ?> @@ -842,7 +841,7 @@ <tr> <td align="right" colspan="2" width="500px"> <div id="calendar"> - <table cellpadding=5 cellspacing="5" width="100%" > + <table cellpadding=5 cellspacing="5" width="100%"> <tr> <td align=left colspan=2> <input type="checkbox" value="true" id="calendar_event" name="calendar_event" onclick=hideCalendarEvent("check") <?php echo $checked." ".$disabledCheckbox ?>> @@ -851,7 +850,7 @@ </tr> <tr> - <td align=right style="width:200px"> + <td align=right style="width:220px"> <?php if($course->format == "weeks" || $course->format == "weekscss"){?> <select style="float:left" id="start_day" name= "start_day" onchange="change()" <?php echo $disableAllElements ?>> Modified: branches/team/Thomas/moodle/mod/liveclassroom/version.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/version.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/version.php 2008-01-11 16:45:39 UTC (rev 213) @@ -33,7 +33,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2006041500; // The current module version (Date: YYYYMMDDXX) +$module->version = 2008011800; // The current module version (Date: YYYYMMDDXX) $module->cron = 0; // Period for cron to check this module (secs) ?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/view.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-01-11 16:45:39 UTC (rev 213) @@ -33,24 +33,24 @@ require_once("../../config.php"); require_once("lib/lc/LCAction.php"); require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaLib.php"); require_once("lib.php"); -$id = optional_param('id', 0, PARAM_INT); -$a = optional_param('a', 0, PARAM_INT);// liveclassroom ID - -if ((isset($_GET["action"]) && $_GET["action"]!="launchCalendar" ) && $id || !isset($_GET["action"]) ) { +$id = optional_param('id', 0, PARAM_INT);//instance id + +if ((isset($_GET["action"]) && $_GET["action"]!="launchCalendar" && $id) || !isset($_GET["action"]) ) { if (! $cm = get_record("course_modules", "id", $id)) { - error("Course Module ID was incorrect 1 "); + error("Course Module ID was incorrect"); } 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"); + error("This Live Classroom instance doesn't exist"); } } else { if (! $liveclassroom = get_record("liveclassroom", "id", $id)) { - error("Course module is incorrect2"); + error("This Live Classroom instance doesn't exist"); } if (! $course = get_record("course", "id", $liveclassroom->course)) { error("Course is misconfigured"); @@ -73,15 +73,17 @@ $classid = $liveclassroom->type; +//get the room $room=$api->getRoom($classid); $strliveclassrooms = get_string("modulenameplural", "liveclassroom"); $strliveclassroom = get_string("modulename", "liveclassroom"); -$strname = $liveclassroom->name; - +$strname = $liveclassroom->name; + +//create the breadcrump $navigation = array(); - if ($course->id != SITEID) { - $navigation[$course->shortname] = "$CFG->wwwroot/course/view.php?id=$course->id"; +if ($course->id != SITEID) { + $navigation[$course->shortname] = "$CFG->wwwroot/course/view.php?id=$course->id"; } $navigation[$strliveclassrooms] = "$CFG->wwwroot/mod/liveclassroom/index.php?id=$course->id"; $navigation[$strname] = ''; @@ -96,27 +98,11 @@ } $breadcrumb = implode(' -> ', $urls); -print_header("$course->shortname: liveclassroom->name", "$course->fullname", -"$breadcrumb", -"", "", true, update_module_button($cm->id, $course->id, $strliveclassroom), -navmenu($course, $cm)); +//print the header of the page (breadcrump + update button) +print_header("$course->shortname: liveclassroom->name", $course->fullname, +$breadcrumb, "", "", true, update_module_button($cm->id, $course->id, $strliveclassroom), navmenu($course, $cm)); ?> - -<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script> -<script type="text/javascript"> - -function startLiveClassroom(){ - startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($authToken)?>'); - - -} - - -</script> - - - <style> a.list { @@ -203,8 +189,15 @@ } </style> +<script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script> +<script type="text/javascript"> + +function startLiveClassroom(){ + startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($authToken)?>'); +} +</script> - <div style="border:solid 1px #808080;width:690px;height:400px;margin-left:20%;margin-top:5%"> +<div style="border:solid 1px #808080;width:690px;height:400px;margin-left:20%;margin-top:5%"> <div class="headerBar" id="headerBar"> <table cellpadding="0" cellspacing="0" width=100%> <tbody> @@ -229,7 +222,7 @@ </tbody> </table> </div> - <div > + <div> <table width=100% class="middle_panel"> <tbody> <tr valign=middle align=center> @@ -251,10 +244,9 @@ </tbody> </table> </div> - <div> - <table width=100% > - - <tr style="border-top:1px solid; background-color:#F0F0F0;"> + <div> + <table width=100% > + <tr style="border-top:1px solid; background-color:#F0F0F0;"> <td align=left > <img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif" /><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $cm->course;?>"> @@ -266,12 +258,11 @@ ?></a> </td> - </td> - - </table> + </tr> + </table> </div> </div> <? -/// Finish the page -print_footer($course); + /// Finish the page + rint_footer($course); ?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/welcome.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-01-10 17:23:50 UTC (rev 212) +++ branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-01-11 16:45:39 UTC (rev 213) @@ -29,30 +29,25 @@ /* $Id: welcome.php 197 2007-08-29 14:30:36Z trollinger $ */ error_reporting(E_ERROR); -/// This page is to display the tyes - Rooms and archives list require_once("../../config.php"); require_once("lib.php"); +global $CFG; + $id = optional_param('id', 0, PARAM_INT); -// $roomname = optional_param('idroomname', 0, PARAM_TEXT); - -global $CFG; - if (! $course = get_record("course", "id", $id)) { error("Course ID is incorrect"); } require_login($course->id); - - ?> <html> <head> <title>Live ClassRooms</title> </head> - <link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" /> +<link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" /> <script language="javascript" src="js/dojo/dojo.js"></script> <script language="javascript" src="js/ajax.js"></script> <script language="javascript" src="js/verifForm.js"></script> @@ -64,10 +59,9 @@ <script src="js/ajaxslt/dom.js" type="text/javascript"></script> <script src="js/ajaxslt/xpath.js" type="text/javascript"></script> <script src="js/hwCommons.js" type="text/javascript"></script> - <script src="js/xmldom.js" type="text/javascript"></script> +<script src="js/xmldom.js" type="text/javascript"></script> - - <script type="text/javascript"> +<script type="text/javascript"> function doOpenAddActivity(url,param){ if(currentId!="") { @@ -103,9 +97,9 @@ return display; } +//set the current product +currentProduct="liveclassroom"; - - </script> @@ -113,21 +107,14 @@ if(isset($_GET["createWorkflow"])){ $firstPage= "generateSettings.php"; $createWorkflow="true"; - ?> - <script> - currentProduct="liveclassroom"; - </script> - <?php }else{ $firstPage="generateListRooms.php"; $createWorkflow="false"; } ?> <body onLoad="javascript:DisplayFirstPage('<?php echo $firstPage ;?>','all','','','<?php echo $createWorkflow;?>');"> - - - <div id="all" style="display:block;border:solid 1px #808080;width:700px;height:400px;"></div> - <div id="dialInfo" style="display:none;"></div> +<div id="all" style="display:block;border:solid 1px #808080;width:700px;height:400px;"></div> +<div id="dialInfo" style="display:none;"></div> <div id="loading" style="display:none;border:solid 1px #808080;width:700px;height:400px"> <div class="headerBar" id="headerBar"> <table cellpadding="0" cellspacing="0" width=100%> @@ -162,9 +149,9 @@ </div> </div> -<div class="tooltip" id="Tip" > ToolTip</div> -<div style="display:none" id="pictures" >picture</div> -<div id="hiddenDiv" class="opac"></div> +<div class="tooltip" id="Tip">ToolTip</div> +<div style="display:none" id="pictures">picture</div> +<div id="hiddenDiv" class="opac"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-10 17:24:01
|
Revision: 212 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=212&view=rev Author: trollinger Date: 2008-01-10 09:23:50 -0800 (Thu, 10 Jan 2008) Log Message: ----------- delete old files Modified Paths: -------------- branches/team/Thomas/moodle/mod/liveclassroom/index.php Removed Paths: ------------- branches/team/Thomas/moodle/mod/liveclassroom/api.php branches/team/Thomas/moodle/mod/liveclassroom/manageRoomAction.php Deleted: branches/team/Thomas/moodle/mod/liveclassroom/api.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/api.php 2008-01-10 08:29:35 UTC (rev 211) +++ branches/team/Thomas/moodle/mod/liveclassroom/api.php 2008-01-10 17:23:50 UTC (rev 212) @@ -1,1569 +0,0 @@ -<?PHP -/****************************************************************************** - * * - * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Horizon Wimba. * - * You can redistribute it and/or modify it under the terms of * - * the GNU General Public License as published by the * - * Free Software Foundation. * - * * - * WARRANTIES: * - * This software is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with the Horizon Wimba Moodle Integration; * - * if not, write to the Free Software Foundation, Inc., * - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - * * - * Author: Hugues Pisapia * - * * - * Date: 15th April 2006 * - * * - ******************************************************************************/ - -/* $Id: api.php 180 2007-01-11 21:55:02Z hugues $ */ - -/** - * api.php - Sets up sessions, connects to LC server and so on - * - * This is the API to authenticate and perform transactions with the Live cLassroom server - * All functions here should start with liveclassroom_api_ - * - * Normally this is only called by liveclassroom *lib.php files - * @author Hugues Pisapia - * @version $Revision: 180 $ - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package liveclassroom - */ - -require_once('lib.php'); - -define("LIVECLASSROOM_MOODLE_PREFIX", liveclassroom_api_get_prefix()); - -define("LIVECLASSROOM_API_ADMIN","/admin/api/api.pl?"); -define("LIVECLASSROOM_API_FUNCTION_NOOP","function=NOOP"); -define("LIVECLASSROOM_API_FUNCTION_CREATE_USER","function=createUser"); -define("LIVECLASSROOM_API_FUNCTION_MODIFY_USER","function=modifyUser"); -define("LIVECLASSROOM_API_FUNCTION_LIST_USER","function=listUser"); -define("LIVECLASSROOM_API_FUNCTION_GET_TOKEN","function=getAuthToken"); -define("LIVECLASSROOM_API_FUNCTION_CREATE_CLASS","function=createClass"); -define("LIVECLASSROOM_API_FUNCTION_DELETE_ROOM","function=deleteClass"); -define("LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM","function=modifyClass"); -define("LIVECLASSROOM_API_FUNCTION_CREATE_ROLE","function=createRole"); -define("LIVECLASSROOM_API_FUNCTION_DELETE_ROLE","function=deleteRole"); -define("LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST","function=listClass"); -define("LIVECLASSROOM_API_FUNCTION_LIST_ROLE","function=listRole"); -define("LIVECLASSROOM_API_FUNCTION_CREATE_GROUP","function=createGroup"); -define("LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP","function=modifyGroup"); -define("LIVECLASSROOM_API_FUNCTION_STATUS","function=statusServer"); - -define("LIVECLASSROOM_API_RECORD_SEPERATOR","=END RECORD"); - - -/* -* Get the prefix to use for creating rooms and users. -* -* return $prefix : a string which is the prefix to use -*/ -function liveclassroom_api_get_prefix() { - global $CFG; - - //get the admin user name - $aun = $CFG->liveclassroom_adminusername; - if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix - $prefix = $aun; - - } - else { - $prefix = ''; - - } - return $prefix; - -} - -/** - * Creates a CURL session with the Live Classroom server. Upon success, it - * returns a CURL Handle authenticated and ready for use. It returns false - * otherwise. - * - * If the $servername param is the empty string, the function will collect - * the data from $CFG->liveclassroom_* - * - * @param string $servername - * @param string $login - * @param string $password - * @return object - a CURL Handle authenticated and ready for use, false otherwise - * @uses CFG, LIVECLASSROOM_API_ADMIN, LIVECLASSROOM_API_FUNCTION_NOOP - */ -function liveclassroom_api_authenticate ($servername='', $login='', $passwd='') { - global $CFG; - global $COURSE; - - if (empty($servername)) { // feed them with $CFG - $servername = $CFG->liveclassroom_servername; - $login = $CFG->liveclassroom_adminusername; - $passwd = $CFG->liveclassroom_adminpassword; - } - - $url = $servername. - LIVECLASSROOM_API_ADMIN. - LIVECLASSROOM_API_FUNCTION_NOOP. - "&AuthType=AuthCookieHandler". - "&AuthName=Horizon". - "&credential_0=". $login. - "&credential_1=". $passwd; - - $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path - $cook = fopen($CFG->dataroot.'/tmp.txt', "w+"); //temporary file to check the date - fputs($cook,time()); // Add the current time into the file = last authenticate time - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL,$url); - - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 4); - curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - $data = curl_exec($ch); - - if (curl_errno($ch)) { - add_to_log($COURSE->id, "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable","courseId=".$COURSE->id), "URL incorrect"); - // print curl_error($ch); - return false; - } - preg_match("(\d*)", $data, $matches); - $resp_code = $matches[0]; - - if ( $resp_code == 204 ) { - 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"); - return $ch; - -} - - /** - * Send a query to the server with the given function and the given attributes - * Check if the session cookie exist and get the cookie creation date. - * If it's less than 30 minutes, the cookie is got for the request, if not a new authenticate is done. - * @param $const : function called - * @param $attribute : different list of attributes for the function called - * return $data : result query - */ - function liveclassroom_api_send_query($const,$attribute) { - global $CFG; - - $cook = $CFG->dataroot.'/tmp.txt'; //Open the temp file to check the last modification date - $cookie_file_path = $CFG->dataroot.'/cookie.txt'; // Cookie File path - - if(file_exists($cook)) { - $fileContent = file_get_contents($cook); - - } - else { - $lastModifTime = 0; - } - //1800 seconds = 30 minutes - $modif = $fileContent+1800; - - if( (!file_exists($cookie_file_path)) || ((file_exists($cook)) && (time()>$modif)) ){ - if (!$ch = liveclassroom_api_authenticate()) { - return false; - } - } - - - $url = $CFG->liveclassroom_servername. - LIVECLASSROOM_API_ADMIN. - $const. - $attribute; - - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL,$url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 4); - curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); - curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - - $data = curl_exec($ch); - - if (curl_errno($ch)) { - print curl_error($ch); - return false; - } - - return $data; - } - - - - -/** - * Create the Live Classroom User $user with the role $rolename. This function - * actually creates profiles that will further be used for teacher/student - * roles. - * - * @uses CFG, LIVECLASSROOM_API_ADMIN, LIVECLASSROOM_API_FUNCTION_CREATE_USER - * @param $userid string - LC login for this profile - * @param $coursename string - LC first name for this profile. We use the couse name - * @param $rolename string - LC lastname of this profile. Usually 'Teacher' or 'Student' - * @return bool - true if the user is successfuly created, false otherwise - */ -function liveclassroom_api_create_user ($userid, $coursename, $rolename) { - global $CFG; - global $COURSE; - - $final_list = "&target=$userid&first_name=$rolename&last_name=$coursename"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_USER, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; -/* - if ( $respcode == 302) { - error( "Creation user failed, malformed exist"); - return false; - } - */ - - - if ( $respcode != 100 && $respcode != 301) { - add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("errorCreateUser","userId=$userid&respcode=$respcode&courseId=".$COURSE->id), "User Creation Failed"); - // error( "Response: Account ($userId) Creation Failed: $resp_code"); - return false; - } - add_to_log($COURSE->id, "liveclassroom", "Create User", liveclassroom_send_logs("createUser","userId=$userid&courseId=".$COURSE->id), "User Creation succeeded"); - return true; - -} - -/* -* Create a group on the LC server -* @param $groupid : id of the group created -* -*/ -function liveclassroom_api_create_group($groupid) { - - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_GROUP, "&target=$groupid"); - - if ( $respcode == 301) { - error( "Response: Authentication Failed: $resp_code"); - return false; - } - if ( $respcode != 100 && $respcode != 301) { - error( "Response: Cannot Create group with id:$groupid"); - return false; - } - - - return true; - - -} - -/** - * Returns a session id (hzA) to be inserted in URLs to access the LC server - * @uses CFG, USER - * @uses LIVECLASSROOM_API_ADMIN, LIVECLASSROOM_API_FUNCTION_GET_TOKEN - * @param $userid string - the userid/login of the profile to be used - * @param $nickname string - the name of the user that will be displayed in the LC - * @return string - the session token (hzA) if the request was successful, - * false otherwise. - */ -function liveclassroom_api_get_session ($userid, $nickname) { - global $CFG; - global $USER; - global $COURSE; - - - $final_list = "&target=$userid&nickname=$nickname"; - $enc_list = str_replace(" ", "+", $final_list); - - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_TOKEN, $enc_list); - - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - - add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("errorCreateSession","respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id), "Cannot Create Session."); - return false; - } - - $currentline = strtok($data,"\n"); - while (!empty($currentline) && !preg_match("/authToken=/", $currentline, $matches)) { - $currentline = strtok("\n"); - } - - if (empty($currentline)) { - //error ("Did not find authToken, data=<pre>$data</pre>"); - return false; - } - - - $authtoken= substr($currentline, 10); - - //DEBUG - - - if (empty($authtoken)) { - //error ("Token empty, data=<pre>$data</pre>"); - return false; - } - add_to_log($COURSE->id, "liveclassroom", "Create Session", liveclassroom_send_logs("createSession","nickname=$nickname&courseId=".$COURSE->id), "Creating Session for $nickname"); - - return $authtoken; -} - -/* -* Create a room on the LC server -* @param $roomid : id of the room created -* @param $roomname : name of the room created -* return true if the room is created on the server, false otherwise -*/ -function liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes) { - global $CFG; - global $COURSE; - - $list_attributes = ''; - - unset($attributes['longname']); - unset($attributes['led']); - - while (list($key, $val) = each($attributes)) { - if(($key!='class_id')&&(isset($val))&&($val!="")){ - $list_attributes .= "&".$key."=".$val; - } - } - - $final_list = "&target=$roomid"."&longname=$roomname".$list_attributes; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode == 301) { - error( "Class $roomname already exist"); - return false; - } - if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("errorCreateClass","roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id), "Cannot Create Class with id : $roomid, and name : $roomname."); - return false; - } - - add_to_log($COURSE->id, "liveclassroom", "Create Room", liveclassroom_send_logs("createClass","roomname=$roomname&courseId=".$COURSE->id), "$roomname create with success"); - return true; -} - -/* -* Add a role to a user for a room given -* @param $roomid : id of the room on the server -* @param $userid : id of the user on the server -* @param $role : role of the user for the room -* return true if the role is added, false otherwise -*/ -function liveclassroom_api_add_user_role ($roomid, $userid, $role) { - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_CREATE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role"); - - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - //error( "Response: Cannot Create Class with id:$roomid, and name: $roomname."); - return false; - } - - return true; -} - -/* -* Remove a role to a user for a room given -* @param $roomid : id of the room on the server -* @param $userid : id of the user on the server -* @param $role : role of the user for the room -* return true if the role is removed, false otherwise -*/ -function liveclassroom_api_remove_user_role ($roomid, $userid, $role) { - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$userid&role_id=$role"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - //error( "Response: Cannot Create Class with id:$roomid, and name: $roomname."); - return false; - } - return true; -} - -function liveclassroom_api_remove_group_role ($roomid, $groupid, $role) { - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROLE, "&target=$roomid&user_id=$groupid&role_id=$role"); - - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - //error( "Response: Cannot Create Class with id:$roomid, and name: $roomname."); - return false; - } - return true; -} - - - - -/** -* Check if a room exist on the server -* @param roomname -* return true if the room exist, false otherwise -*/ - - function liveclassroom_api_room_exist($roomname) { - global $CFG; - - $final_list = "&filter00=longname&filter00value=$roomname"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - if(sizeof($tok1)>1){ - - return true; - } - else { - return false; - } - } - - - - -/** -* -* return a string delimited by the pattern and the end of line -*/ -function liveclassroom_parse_line($line,$pattern) { - - $response = split($pattern,$line); - //$result = substr($response[1],0,-1); - - - return $response[1]; - -} - -/** -* Get the room id from a roomname -* @param $roomname -* return the room_id from the server -*/ - -function liveclassroom_api_get_roomid($roomname) { - global $CFG; - - $final_list = "&filter00=longname&filter00value=$roomname"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - $result = liveclassroom_parse_line($tok1[0],"class_id="); - - //Remove le " " at the end of the line - $response = substr($result,0,-1); - - return $response; -} - - - - - /** - * delete Room from the server - * - * @param roomid : id of the to delete - * return true if the room is deleted, false otherwise - */ - function liveclassroom_api_delete_room($roomid) { - global $CFG; - global $COURSE; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid"); - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode == 302) { - add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); - // error( "Target not found"); - return false; - } - else if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); - return false; - } - - add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("deleteRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been deleted with success"); - return true; - } - - /** - * Open Room on the LC server - * - * @param roomid : id of the room to open - * return true if the room has being opened, false otherwise - */ - function liveclassroom_api_open_room($roomid) { - global $CFG; - global $COURSE; - - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0"); - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode == 302) { - add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed"); - return false; - } - if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("errorOpenRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid opening failed"); - return false; - } - add_to_log($COURSE->id, "liveclassroom", "Open Room", liveclassroom_send_logs("openRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been opened with success"); - return true; - } - - /** - * Close Room on the LC server - * - * @param roomid : id of the room to close - * return true if the room has being closed, false otherwise - */ -function liveclassroom_api_close_room($roomid) { - global $CFG; - global $COURSE; - - liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=1"); - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode == 302) { - add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed"); - - return false; - } - if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("errorCloseRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid closing failed"); - return false; - } - add_to_log($COURSE->id, "liveclassroom", "Close Room", liveclassroom_send_logs("closeRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been closed with success"); - return true; -} - - -/* -* Modify the settings of a room -* @param $roomid : the id of the room -* return true if the room has being modified, false otherwise -* return true if the room has being modified, false otherwise -*/ -function liveclassroom_api_modify_room($roomid,$table_attributes) { - global $CFG; - global $COURSE; - - $list_attributes = ""; - - 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); - -//DEBUG: -//error($enc_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("errorModifyRoom100","roomId=$roomid&courseId=".$COURSE->id), "Room modification failed"); - return false; - } - - add_to_log($COURSE->id, "liveclassroom", "Modify Room", liveclassroom_send_logs("modifyRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been modified with success"); - return true; -} - - - - -/* -* List all the archive room associated with the room given -* -* @param $roomid : the id of the room -* @param $userid : the id of the user -* return an array with all the archive room id -*/ -function liveclassroom_api_get_archive_list_for_a_room($roomid,$userid) { - global $CFG; - - $final_list = "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - //print $data; - - - $line = explode ("\n",$data); - - $j=0; - - for($i=1;$i<sizeof($line)-3;$i=$i+4) { - $test = strstr($line[$i+1],$roomid); - if($test!=false) { - $list_return[$j][0]= liveclassroom_parse_line($line[$i],"preview="); - $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id="); - $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname="); - $j++; - } - } - - return $list_return; -} - -/* -* List all the open archive room associated with the room given -* -* @param $roomid : the id of the room -* @param $userid : the id of the user -* return an array with all the archive room id -*/ -function liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid) { - global $CFG; - - $final_list = "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - //print $data; - - - $line = explode ("\n",$data); - - $j=0; - - for($i=1;$i<sizeof($line)-3;$i=$i+4) { - $test = strstr($line[$i+1],$roomid); - if($test!=false) { - if(liveclassroom_parse_line($line[$i],"preview=")==0) { - $list_return[$j][1]= liveclassroom_parse_line($line[$i+1],"class_id="); - $list_return[$j][2] = liveclassroom_parse_line($line[$i+2],"longname="); - $j++; - } - } - } - - - return $list_return; - -} - -/* -* List all the archive room (used for the orphaned archives) -* -* @param $roomid : the id of the room -* return an array with all the archive room id -*/ -function liveclassroom_api_get_archive_list($userid) { - global $CFG; - - $final_list = "&attribute=preview&attribute=class_id&attribute=longname&filter01=archive&filter01value=1&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - //print $data; - - - $line = explode ("\n",$data); - - $j=0; - - for($i=1;$i<sizeof($line)-3;$i=$i+4) { - $id = liveclassroom_parse_line($line[$i+1],"class_id="); - $list_return[$id][0]= liveclassroom_parse_line($line[$i],"preview="); - $list_return[$id][1]= $id; - $list_return[$id][2] = liveclassroom_parse_line($line[$i+2],"longname="); - $j++; - - } - - - return $list_return; -} - -/* -* Check if a user exist in the course given -* link : user last name = course shortname -* @param $course : an instance of a course -* Return boolean : true if the user exist, false if not! -*/ - -function liveclassroom_api_user_exist($course) { - global $CFG; - - $name = $course->shortname; - $enc_name = str_replace(" ", "_", $name); - - $final_list = "&filter00=last_name&filter00value=$enc_name"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - if(sizeof($tok1)>1){ - return true; - } - else { - return false; - } -} - -/* -* Give the rights for a lecture room to the room given -* @param $roomid : the id of the room to modifiy the settings -* -*/ - -function liveclassroom_api_give_lectureroom_attributes() { - global $CFG; - - - $attributes = array('media_type'=>'two-way-audio','preview' =>'0','archive'=>'0','can_archive'=>'1','hms_simulcast'=>'public','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1'); - - /* - $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - return true; - */ - return $attributes; -} - -/* -* Give the rights for a breackout room to the room given -* @param $roomid : the id of the room to modifiy the settings -* -*/ -function liveclassroom_api_give_discussionroom_attributes() { - global $CFG; - - - $attributes = array('media_type'=>'two-way-audio','hms_simulcast'=>'public','archive'=>'0','preview'=>'0','chatenable'=>'1','privatechatenable'=>'1','hms_two_way_enabled'=>'1','userlimit'=>'-1','can_archive'=>'1','can_liveshare'=>'1','can_ppt_import'=>'1'); - - - - /* - $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid&media_type=two-way-audio&hms_simulcast=public&chatenable=1&privatechatenable=1&hms_two_way_enabled=1&userlimit=-1&can_archive=1&can_liveshare=1&can_ppt_import=1"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - return true; - */ - return $attributes; -} - - -/* -* Give the role of the user on a room given -* -* @param $roomid : the id of the room -* @param $userid : the id of the user -* -* return a string : the role of the user -*/ -function liveclassroom_api_role_user_room($roomid, $userid) { - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_ROLE, "&attribute=role_id&filter01=user_id&filter01value=$userid&filter02=object_id&filter02value=$roomid"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - $result = liveclassroom_parse_line($tok1[0],"role_id="); - //Remove le " " at the end of the line - $response = substr($result,0,-1); - return $response; - -} - -/* -* Give the user id for a room -- because of the link between the course->shortname and the user last_name -* -* @param $lastname : string user last_name -* return a string : the id of the student user for a course -*/ -function liveclassroom_api_get_student_user_id ($courseid){ - global $CFG; - - $course = get_record("course", "id", $courseid); - - if (empty($course)) { - error(_FUNCTION_." empty course"); - } - $enc_coursename = str_replace(" ", "_", $course->shortname); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter01=last_name&filter01value=$enc_coursename&filter02=first_name&filter02value=Student"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $line = explode("\n",$data); - - $result = liveclassroom_parse_line($line[1],"user_id="); - - return $result; - - -} - - - - -/* Check if the room is open or not (preview=0 => room is open) -* @param $roomid : the id of the room -* return a boolean : true if the room is open, false if it's closed -*/ -function liveclassroom_api_room_is_preview ($roomid){ - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter01=class_id&filter01value=$roomid&filter02=preview&filter02value=0"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - if(sizeof($tok1)>1){ - return true; - } - else { - return false; - } -} - -/* Check if the room is an archive -* @param $roomid : the id of the room -* return a boolean : true if the room is an archive, false if it's closed -*/ -function liveclassroom_api_room_is_archive ($roomid){ - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=archive&filter01=class_id&filter01value=$roomid"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - $test = strstr($tok1[0],"archive="); - - //$tok2 = split("class_id=",$tok1[0]); - $result = liveclassroom_parse_line($test,"archive="); - //Remove le " " at the end of the line - $response = substr($result,0,-1); - - if($response==1) { - return true; - } - else return false; - -} - - -/* -* Give the name of the room given -* @param $roomid : the id of the room -* return a String :name of the room -*/ -function liveclassroom_api_get_room_name($roomid){ - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=longname&filter00=class_id&filter00value=$roomid"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - $test = strstr($tok1[0],"longname="); - - //$tok2 = split("class_id=",$tok1[0]); - $result = liveclassroom_parse_line($test,"longname="); - //Remove le " " at the end of the line - $response = substr($result,0,-1); - - return $response; - -} - -/* -* Give the media type of the room given -* @param $roomid : the id of the room -* return a String :media type of the room -*/ -function liveclassroom_api_get_media_type($roomid){ - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=media_type&filter00=class_id&filter00value=$roomid"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - //print $url; - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - $test = strstr($tok1[0],"media_type="); - - //$tok2 = split("class_id=",$tok1[0]); - $result = liveclassroom_parse_line($test,"media_type="); - //Remove le " " at the end of the line - $response = substr($result,0,-1); - - return $response; - -} - - - -/* -* Get the number of user limit of the room given -* @param $roomid : the id of the room -* return a int : number of user limit -*/ -function liveclassroom_api_room_get_user_limit($roomid){ - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&attribute=userlimit&filter00=class_id&filter00value=$roomid"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - //print $url; - $tok = split("100 OK",$data); - $tok1 = split(LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - - $test = strstr($tok1[0],"userlimit="); - - //$tok2 = split("class_id=",$tok1[0]); - $result = liveclassroom_parse_line($test,"userlimit="); - //Remove le " " at the end of the line - $response = substr($result,0,-1); - return $response; - -} - - -/* -* Give the information about a room given -* @param $roomid : the id of the room -* return an array with the key as the name of the attribute -* and the value as the value of the attribute -*/ -function liveclassroom_api_get_infos_room($roomid) { - global $CFG; - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, "&filter00=class_id&filter00value=$roomid&attribute=archive&attribute=can_archive&attribute=can_eboard&attribute=can_liveshare&attribute=can_ppt_import&attribute=chatenable&attribute=privatechatenable&attribute=description&attribute=hms_simulcast&attribute=hms_simulcast_restricted&attribute=hms_two_way_enabled&attribute=media_type&attribute=preview&attribute=student_wb_enabled&attribute=student_wb_liveapp&attribute=userlimit&attribute=longname"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - $tok = split("100 OK",$data); - $line = explode("\n",$tok[1]); - - foreach ($line as $line_value) { - $result = explode("=",$line_value); - $room_table[$result[0]]=$result[1]; - } - - return $room_table; -} - - -/* -* Give the user id for a room -- because of the link between the course->shortname and the user last_name -* -* @param $lastname : string user last_name -* return a string : the id of the student user for a course -*/ -function liveclassroom_api_get_teacher_user_id ($courseid){ - global $CFG; - - $course = get_record("course", "id", $courseid); - - $enc_coursename = str_replace(" ", "_", $course->shortname); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_LIST_USER, "&filter00=last_name&filter00value=$enc_coursename&filter01=first_name&filter01value=Teacher"); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - $line = explode("\n",$data); - -// $tok = split("100 OK",$data); - // $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); -// $result = liveclassroom_parse_line($tok1[0],"user_id="); - $result = liveclassroom_parse_line($line[1],"user_id="); - //Remove le " " at the end of the line - //$response = substr($result,0,-1); - - return $result; - -} - -/** - * Enroll the given user into the group. - * - * @param userid - * @param groupid - *//* -function liveclassroom_api_add_user_in_group($userid, $groupid) { - - global $CFG; - global $LIVECLASSROOM_API_ADMIN; - global $LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP; - - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&add_user=$user"); - - if ( $respcode != 100 && $respcode != 301) { - error( "Can't add user from group"); - return false; - } - - return true; - -}*/ - - /** - * Remove the given user from the group. - * - * @param userif - * @param groupif - *//* -function liveclassroom_api_remove_user_from_group($userid, $groupid) { - global $CFG; - global $LIVECLASSROOM_API_ADMIN; - global $LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP; - - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_GROUP, "&target=$groupid&delete_user=$user"); - - if ( $respcode != 100 && $respcode != 301) { - error( "Can't remove user from group"); - return false; - } - - return true; - -}*/ - -function liveclassroom_api_get_room_list($userid,$course) { - - global $CFG; - - $final_list = "&attribute=class_id&attribute=longname&filter00=archive&filter00value=0&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - $line = explode("\n",$data); - $rooms=array(); - - for($i=1;$i<sizeof($line)-2;$i=$i+3){ - $room[0] = liveclassroom_parse_line($line[$i],"class_id="); //class_id - $room[1]= liveclassroom_parse_line($line[$i+1],"longname="); //longname - array_push($rooms,$room); - } - return $rooms; -} - -function inputRightPlace($array, $value){ - - $return = array(); - foreach($array as $room){ - if(strcmp($room[0],$value[0])<0) array_push($return,$room); - else array_push($return,$value); - } - return $return; -} - -/* -* List all the rooms and their archives associed + the orphaned archives list -* -* @param $userid : the user id of the current user -* @param $course : the current course -* -* Return a table composed of 3 parts: -* - a table who list all the lecture rooms and their archives associed -* - a table who list all the breakout rooms and their archives associed -* - a table who list all the orphaned archives -**/ -function liveclassroom_api_get_roomandarchive_list($userid,$course) { - - global $CFG; - - $final_list = "&attribute=class_id&attribute=preview&attribute=longname&attribute=archive&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - $studentuserid = liveclassroom_api_get_student_user_id($course->id); - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $line = explode("\n",$data); - - $tabarchive = array(); - $orphanedarchives = array(); - $rooms=array(); //lecture rooms table - $rooms1=array();//breakout rooms table - - for($i=1;$i<sizeof($line)-4;$i=$i+5){ - - if((liveclassroom_parse_line($line[$i+3],"archive=")!=1)){ // it is a room - - $room[0] = liveclassroom_parse_line($line[$i+1],"class_id="); //class_id - $room[1]= liveclassroom_parse_line($line[$i+2],"longname="); //longname - $room[2]= liveclassroom_parse_line($line[$i],"preview="); //preview - $room[3]= array(); - - if(liveclassroom_api_role_user_room($room[0], $studentuserid)=='Student') { //lecture room - - $rooms[$room[0]]=$room; - } - else { //Breakout room - - $rooms1[$room[0]]=$room; - } - - } - else { // it is an archive - - $archiveid=liveclassroom_parse_line($line[$i+1],"class_id=");// larchive id - $roomid = substr($archiveid,0,strlen($archiveid)-18);//room id - - $archive=array(); - $archive[0]=$archiveid; - $archive[1]=liveclassroom_parse_line($line[$i+2],"longname="); //longname - $archive[2]=liveclassroom_parse_line($line[$i],"preview="); - $archive[3]=$roomid; //preview - array_push($tabarchive,$archive); - - } - } - foreach($tabarchive as $value) { - if (array_key_exists($value[3],$rooms)) { //lecture room table - array_push($rooms[$value[3]][3],$value); - } - else if (array_key_exists($value[3],$rooms1)) { //breakout room table - array_push($rooms1[$value[3]][3],$value); - } - else { //orphaned archive - array_push($orphanedarchives,$value); - } - } - - $table_result[0]=$rooms; - $table_result[1]=$rooms1; - $table_result[2]=$orphanedarchives; - - return $table_result; - -} - - -/* -* List all the rooms and their archives associed + the orphaned archives list -* -* @param $xmldoc : the DOM document to add the list -* @param $userid : the user id of the current user -* @param $course : the current course -* @param $isteacher : 1 if the user is a teacher, 0 else -* -* Return a DOM document element who list all the rooms and their archives associed -**/ -function liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher) { - - global $CFG; - - - $final_list = "&attribute=class_id&attribute=preview&attribute=longname&filter01=archive&filter01value=0&AccessUser=$userid"; - $enc_list = str_replace(" ", "+", $final_list); - - $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST, $enc_list); - - $studentuserid = liveclassroom_api_get_student_user_id($courseid); - - preg_match("(\d*)", $data, $matches); - $respcode = $matches[0]; - - if ( $respcode != 100) { - return false; - } - - $listElements = $xmldoc->create_element('listElements'); - //$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent'); - - $line = explode("\n",$data); - - $tabarchive = array(); - $orphanedArchives = liveclassroom_api_get_archive_list($userid); - - add_to_log($COURSE->id, "liveclassroom", "archive", "action", sizeof($orphanedArchives)); - $nbrClosedArchive = 0; - - for($i=1;$i<sizeof($line)-3;$i=$i+4){ - - $roomid= liveclassroom_parse_line($line[$i+1],"class_id="); //class_id - $roomname= liveclassroom_parse_line($line[$i+2],"longname="); //longname - - $roompreview= liveclassroom_parse_line($line[$i],"preview="); //preview - - $element = $xmldoc->create_element('listElement'); - - - $roomParameters = $xmldoc->create_element('listElementParameters'); - - if ($isteacher=="1") - { - $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid); - add_to_log($COURSE->id, "liveclassroom", "archiveteacher", "action", sizeof($tabarchive)); - foreach ($tabarchive as $tabarchive_value) { - unset($orphanedArchives[$tabarchive_value[1]]) ; - } - } - else //just the open archive - { - $tabarchive = liveclassroom_api_get_open_archive_list_for_a_room($roomid,$userid); - add_to_log($COURSE->id, "liveclassroom", "archivestudent", "action", sizeof($tabarchive)); - $tabarchiveall = $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid); - foreach ($tabarchiveall as $tabarchiveall_value) { - unset($orphanedArchives[$tabarchiveall_value[1]]) ; - } - } - - if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { //lecture room - $type = $xmldoc->create_element('typeOfElement'); - $type->append_child($xmldoc->create_text_node("MainLecture")); - $positionValue = 1; - } - else{ - $type = $xmldoc->create_element('typeOfElement'); - $type->append_child($xmldoc->create_text_node("Discussion")); - $positionValue = 2; - } - - - $position = $xmldoc->create_element('position'); - $position->append_child($xmldoc->create_text_node("$positionValue")); - $id = $xmldoc->create_element('id'); - $id->append_child($xmldoc->create_text_node("$roomid")); - $longname = $xmldoc->create_element('nameDisplay'); - $longname->append_child($xmldoc->create_text_node("$roomname")); - $preview = $xmldoc->create_element('preview'); - if ($roompreview=="1") - { - $preview->append_child($xmldoc->create_text_node("unavailable")); - } - else - { - $preview->append_child($xmldoc->create_text_node("available")); - } - - - $roomParameters->append_child($type); - $roomParameters->append_child($position); - $roomParameters->append_child($id); - $roomParameters->append_child($longname); - $roomParameters->append_child($preview); - $element->append_child($roomParameters); - - // $tabarchive = liveclassroom_api_get_archive_list_for_a_room($roomid,$userid); - - if(sizeof($tabarchive)>0){ //archives - - $nbrClosedArchive = 0; - - $archives = $xmldoc->create_element('archives'); - - foreach ($tabarchive as $tabarchive_value) { - $archive = $xmldoc->create_element('archive'); - - $archiveid = $xmldoc->create_element('id'); - $archiveid->append_child($xmldoc->create_text_node("$tabarchive_value[1]")); - $archivename = $xmldoc->create_element('nameDisplay'); - $archivename->append_child($xmldoc->create_text_node("$tabarchive_value[2]")); - $archivepreview = $xmldoc->create_element('preview'); - - - if($tabarchive_value[0]=="1") { - $archivepreview->append_child($xmldoc->create_text_node("unavailable")); - $nbrClosedArchive++; - } - else { - $archivepreview->append_child($xmldoc->create_text_node("available")); - } - $archive->append_child($archiveid); - $archive->append_child($archivename); - $archive->append_child($archivepreview); - $archives->append_child($archive); - - /* - if ( ($roompreview==1) && ($tabarchive_value[0]==0)) - { - - $id_orphanedArchiveForStudent = $xmldoc->createElement("id"); - $id_orphanedArchiveForStudent->appendChild($xmldoc->createTextNode("$tabarchive_value[1]")); - - $longname_orphanedArchiveForStudent = $xmldoc->createElement("longname"); - $longname_orphanedArchiveForStudent->appendChild($xmldoc->createTextNode("$tabarchive_value[2]")); - - $preview_orphanedArchiveForStudent = $xmldoc->createElement("preview"); - - $preview_orphanedArchiveForStudent->appendChild($xmldoc->createTextNode("available")); - - $xmlOrphanedArchiveForStudent->appendChild($id_orphanedArchiveForStudent); - $xmlOrphanedArchiveForStudent->appendChild($longname_orphanedArchiveForStudent); - $xmlOrphanedArchiveForStudent->appendChild($preview_orphanedArchiveForStudent); - - $orphanedArchivesForStudent->appendChild(xmlOrphanedArchiveForStudent); - } - */ - } - $roomParameters->append_child($archives); - - - - } - $closedArchive = $xmldoc->create_element("closedArchive"); - if (sizeof($tabarchive) == $nbrClosedArchive) - { - $closedArchive->append_child($xmldoc->create_text_node("true")); - - } - else - { - $closedArchive->append_child($xmldoc->create_text_node("false")); - } - $roomParameters->append_child($closedArchive); - - $element->append_child($roomParameters); - - - $listElements->append_child($element); - } - add_to_log($COURSE->id, "liveclassroom", "orphaned", "action", sizeof($orphanedArchives)); - foreach ($orphanedArchives as $orphanedArchive) - { - $xmlOrphanedArchive = $xmldoc->create_element("listElement"); - - $parametersOrphaned = $xmldoc->create_element("listElementParameters"); - - $typeOrphaned = $xmldoc->create_element("typeOfElement"); - $typeOrphaned->append_child($xmldoc->create_text_node("orphanedArchive")); - $parametersOrphaned->append_child($typeOrphaned); - - - $pos = $xmldoc->create_element("position"); - $pos->append_child($xmldoc->create_text_node("3")); - $parametersOrphaned->append_child($pos); - - - $typeOrphanedArchive = $xmldoc->create_element("type"); - if(liveclassroom_api_role_user_room($orphanedArchive[1], $studentuserid)=='Student') { //lecture room - $typeOrphanedArchive->append_child($xmldoc->create_text_node("MainLecture")); - } - else{ - $typeOrphanedArchive->append_child($xmldoc->create_text_node("Discussion")); - } - $parametersOrphaned->append_child($typeOrphanedArchive); - - $idOrphanedArchive = $xmldoc->create_element("id"); - $idOrphanedArchive->append_child($xmldoc->create_text_node($orphanedArchive[1])); - $parametersOrphaned->append_child($idOrphanedArchive); - - $longnameOrphanedArchive = $xmldoc->create_element("nameDisplay"); - $longnameOrphanedArchive->append_child($xmldoc->create_text_node($orphanedArchive[2])); - $parametersOrphaned->append_child($longnameOrphanedArchive); - - $previewOrphanedArchive = $xmldoc->create_element("preview"); - - if ($orphanedArchive[$j][0]==1) - { - $previewOrphanedArchive->append_child($xmldoc->create_text_node("unavailable")); - } - else - { - $previewOrphanedArchive->append_child($xmldoc->create_text_node("available")); - } - $parametersOrphaned->append_child($previewOrphanedArchive); - - - $xmlOrphanedArchive->append_child($parametersOrphaned); - - $listElements->append_child($xmlOrphanedArchive); - } - - - $xmldoc->append_child($listElements); - - - return $listElements; - - -} - -?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/index.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-10 08:29:35 UTC (rev 211) +++ branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-10 17:23:50 UTC (rev 212) @@ -37,7 +37,7 @@ require_once("lib.php"); require_once("lib/common/WimbaCommons.php"); - +require_once("lib/common/WimbaLib.php"); $id = optional_param('id', 0, PARAM_INT); $roomname = optional_param('idroomname', 0, PARAM_TEXT); Deleted: branches/team/Thomas/moodle/mod/liveclassroom/manageRoomAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/manageRoomAction.php 2008-01-10 08:29:35 UTC (rev 211) +++ branches/team/Thomas/moodle/mod/liveclassroom/manageRoomAction.php 2008-01-10 17:23:50 UTC (rev 212) @@ -1,154 +0,0 @@ -<?php -/****************************************************************************** - * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Horizon Wimba. * - * You can redistribute it and/or modify it under the terms of * - * the GNU General Public License as published by the * - * Free Software Foundation. * - * * - * WARRANTIES: * - * This software is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with the Horizon Wimba Moodle Integration; * - * if not, write to the Free Software Foundation, Inc., * - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - * * - * Author: Samy Hazan * - * * - * Date: September 2006 * - * * - ******************************************************************************/ - -/* $Id: manageRoomAction.php 188 2007-04-13 13:23:01Z hugues $ */ - -/* This page manage the action create, update, delete for a room */ -require_once('../../config.php'); -require_once('lib.php'); - -$courseid = optional_param('enc_course_id', 0, PARAM_INT); -$action = required_param('action', PARAM_ALPHA); -$time = required_param('time', PARAM_INT); - -require_login($courseid, false); - -$course = get_record("course", "id", $courseid); -if (isguest()) { - error("Guests are not allowed to create rooms", $_SERVER["HTTP_REFERER"]); -} - -if (isstudent($courseid)) { - error("Students are not allowed to create rooms", $_SERVER["HTTP_REFERER"]); -} - -if (!liveclassroom_init_session($_GET)) { - error("ExpiredSessionException"); -} - -$url = liveclassroom_get_url_params($courseid); - -session_start(); // to get the previous type of the room - - -if(!empty($_POST)) { - while (list($key, $val) = each($_POST)) { - $list_attributes[$key] = $val; - } -} - - -if(isteacher($courseid)) { - - $instructor_led = ($list_attributes['led']=='instructor'); - - if($action=='createRoom') { - - if($list_attributes['led']=='instructor'){ - if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0"; - if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0"; - if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1; - } - else { - if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0"; - if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0"; - if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0"; - } - - //Available - if (!isset($list_attributes['preview'])) $list_attributes['preview']=1; - if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0"; - //user limit - if (isset($list_attributes['userlimit']) && $list_attributes['userlimit']==0) $list_attributes['userlimit']=$list_attributes['userlimitvalue']; - - if (!liveclassroom_create_room ($courseid, $list_attributes['longname'], $instructor_led, $list_attributes)) { - notice(get_string("roomcreationfailed", "liveclassroom"), $_SERVER["HTTP_REFERER"]); - exit; - } - $messageType = 'roomCreated'; - } - else if($action=='updateRoom') { - - if($instructor_led){ - if (!isset($list_attributes['student_wb_liveapp'])) $list_attributes['student_wb_liveapp']="0"; - if (!isset($list_attributes['hms_two_way_enabled'])) $list_attributes['hms_two_way_enabled']="0"; - if (!isset($list_attributes['hms_simulcast_restricted'])) $list_attributes['hms_simulcast_restricted']=1; - } - else { - if (!isset($list_attributes['can_archive'])) $list_attributes['can_archive']="0"; - if (!isset($list_attributes['can_liveshare'])) $list_attributes['can_liveshare']="0"; - if (!isset($list_attributes['can_ppt_import'])) $list_attributes['can_ppt_import']="0"; - } - - //Available - if (!isset($list_attributes['preview'])) $list_attributes['preview']=1; - if (!isset($list_attributes['student_wb_enabled'])) $list_attributes['student_wb_enabled']="0"; - - if (isset($list_attributes['userlimit']) && $list_attributes['userlimit']==0) $list_attributes... [truncated message content] |
From: <tro...@us...> - 2008-01-10 08:29:36
|
Revision: 211 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=211&view=rev Author: trollinger Date: 2008-01-10 00:29:35 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Create a branche to do refactoring Added Paths: ----------- branches/team/Thomas/moodle/ Copied: branches/team/Thomas/moodle (from rev 209, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-10 08:28:10
|
Revision: 210 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=210&view=rev Author: trollinger Date: 2008-01-10 00:28:08 -0800 (Thu, 10 Jan 2008) Log Message: ----------- the branche is bad Removed Paths: ------------- branches/team/Thomas/moodle/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-10 08:22:36
|
Revision: 209 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=209&view=rev Author: trollinger Date: 2008-01-10 00:22:35 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Create a branche to do refactoring Added Paths: ----------- branches/team/Thomas/moodle/ Copied: branches/team/Thomas/moodle (from rev 204, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-10 08:18:27
|
Revision: 208 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=208&view=rev Author: trollinger Date: 2008-01-10 00:18:26 -0800 (Thu, 10 Jan 2008) Log Message: ----------- remove the branche Removed Paths: ------------- branches/team/Thomas/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-10 08:17:12
|
Revision: 207 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=207&view=rev Author: trollinger Date: 2008-01-10 00:17:10 -0800 (Thu, 10 Jan 2008) Log Message: ----------- tag moodle 3.1.2 Added Paths: ----------- tags/moodle_3_1_2/ Copied: tags/moodle_3_1_2 (from rev 206, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 18:12:00
|
Revision: 206 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=206&view=rev Author: trollinger Date: 2008-01-09 10:11:30 -0800 (Wed, 09 Jan 2008) Log Message: ----------- remove the not usefull directory Added Paths: ----------- trunk/INSTALL.txt trunk/LICENSE.txt trunk/README.txt trunk/blocks/ trunk/blocks/bliveclassroom/ trunk/blocks/bliveclassroom/block_bliveclassroom.php trunk/blocks/bliveclassroom/config_global.html trunk/blocks/bvoicerecorder/ trunk/blocks/bvoicerecorder/block_bvoicerecorder.php trunk/blocks/bvoicerecorder/config_global.html trunk/mod/ trunk/mod/liveclassroom/ trunk/mod/liveclassroom/api.php trunk/mod/liveclassroom/backuplib.php trunk/mod/liveclassroom/config.html trunk/mod/liveclassroom/css/ trunk/mod/liveclassroom/css/StyleSheet.css trunk/mod/liveclassroom/db/ trunk/mod/liveclassroom/db/install.xml trunk/mod/liveclassroom/db/migrate2utf8.php trunk/mod/liveclassroom/db/migrate2utf8.xml trunk/mod/liveclassroom/db/mysql.php trunk/mod/liveclassroom/db/mysql.sql trunk/mod/liveclassroom/db/postgres7.php trunk/mod/liveclassroom/db/postgres7.sql trunk/mod/liveclassroom/doAction.php trunk/mod/liveclassroom/generateListRooms.php trunk/mod/liveclassroom/generateSettings.php trunk/mod/liveclassroom/icon.gif trunk/mod/liveclassroom/index.php trunk/mod/liveclassroom/js/ trunk/mod/liveclassroom/js/ajax.js trunk/mod/liveclassroom/js/ajaxslt/ trunk/mod/liveclassroom/js/ajaxslt/AUTHORS trunk/mod/liveclassroom/js/ajaxslt/COPYING trunk/mod/liveclassroom/js/ajaxslt/README trunk/mod/liveclassroom/js/ajaxslt/dom.js trunk/mod/liveclassroom/js/ajaxslt/util.js trunk/mod/liveclassroom/js/ajaxslt/xmltoken.js trunk/mod/liveclassroom/js/ajaxslt/xpath.js trunk/mod/liveclassroom/js/ajaxslt/xslt.js trunk/mod/liveclassroom/js/constants.js trunk/mod/liveclassroom/js/dojo/ trunk/mod/liveclassroom/js/dojo/LICENSE trunk/mod/liveclassroom/js/dojo/README trunk/mod/liveclassroom/js/dojo/build.txt trunk/mod/liveclassroom/js/dojo/dojo.js trunk/mod/liveclassroom/js/dojo/iframe_history.html trunk/mod/liveclassroom/js/dojo/src/ trunk/mod/liveclassroom/js/dojo/src/io/ trunk/mod/liveclassroom/js/dojo/src/io/BrowserIO.js trunk/mod/liveclassroom/js/dojo/src/io/IframeIO.js trunk/mod/liveclassroom/js/dojo/src/io/RepubsubIO.js trunk/mod/liveclassroom/js/dojo/src/io/RhinoIO.js trunk/mod/liveclassroom/js/dojo/src/io/ScriptSrcIO.js trunk/mod/liveclassroom/js/dojo/src/io/XhrIframeProxy.js trunk/mod/liveclassroom/js/dojo/src/io/__package__.js trunk/mod/liveclassroom/js/dojo/src/io/cometd.js trunk/mod/liveclassroom/js/dojo/src/io/common.js trunk/mod/liveclassroom/js/dojo/src/io/cookie.js trunk/mod/liveclassroom/js/dojo/src/io/xip_client.html trunk/mod/liveclassroom/js/dojo/src/io/xip_server.html trunk/mod/liveclassroom/js/hwCommons.js trunk/mod/liveclassroom/js/manageXml.js trunk/mod/liveclassroom/js/pngfix.js trunk/mod/liveclassroom/js/verifForm.js trunk/mod/liveclassroom/js/xmldom.js trunk/mod/liveclassroom/js/xsl/ trunk/mod/liveclassroom/js/xsl/wimba.xsl trunk/mod/liveclassroom/lang/ trunk/mod/liveclassroom/lang/en/ trunk/mod/liveclassroom/lang/en/help/ trunk/mod/liveclassroom/lang/en/help/liveclassroom/ trunk/mod/liveclassroom/lang/en/help/liveclassroom/mods.html trunk/mod/liveclassroom/lang/en/liveclassroom.php trunk/mod/liveclassroom/lang/en_utf8/ trunk/mod/liveclassroom/lang/en_utf8/block_bliveclassroom.php trunk/mod/liveclassroom/lang/en_utf8/help/ trunk/mod/liveclassroom/lang/en_utf8/help/liveclassroom/ trunk/mod/liveclassroom/lang/en_utf8/help/liveclassroom/mods.html trunk/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/mod/liveclassroom/lang/fr/ trunk/mod/liveclassroom/lang/fr/help/ trunk/mod/liveclassroom/lang/fr/help/liveclassroom/ trunk/mod/liveclassroom/lang/fr/help/liveclassroom/mods.html trunk/mod/liveclassroom/lang/fr/liveclassroom.php trunk/mod/liveclassroom/lang/fr_utf8/ trunk/mod/liveclassroom/lang/fr_utf8/help/ trunk/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/ trunk/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/mods.html trunk/mod/liveclassroom/lang/fr_utf8/liveclassroom.php trunk/mod/liveclassroom/lib/ trunk/mod/liveclassroom/lib/common/ trunk/mod/liveclassroom/lib/common/WimbaCommons.php trunk/mod/liveclassroom/lib/common/WimbaUI.php trunk/mod/liveclassroom/lib/common/WimbaXml.php trunk/mod/liveclassroom/lib/common/XmlArchive.php trunk/mod/liveclassroom/lib/common/XmlOrphanedArchive.php trunk/mod/liveclassroom/lib/common/XmlResource.php trunk/mod/liveclassroom/lib/common/XmlRoom.php trunk/mod/liveclassroom/lib/common/domxml-php4-php5.php trunk/mod/liveclassroom/lib/lc/ trunk/mod/liveclassroom/lib/lc/LCAction.php trunk/mod/liveclassroom/lib/lc/LCRoom.php trunk/mod/liveclassroom/lib/lc/LCUser.php trunk/mod/liveclassroom/lib/lc/PrefixUtil.php trunk/mod/liveclassroom/lib/lc/lcapi.php trunk/mod/liveclassroom/lib.php trunk/mod/liveclassroom/logs.php trunk/mod/liveclassroom/manageRoomAction.php trunk/mod/liveclassroom/mod.html trunk/mod/liveclassroom/pictures/ trunk/mod/liveclassroom/pictures/backgrounds/ trunk/mod/liveclassroom/pictures/backgrounds/filterbar.png trunk/mod/liveclassroom/pictures/backgrounds/headerbar.png trunk/mod/liveclassroom/pictures/backgrounds/toolbar.png trunk/mod/liveclassroom/pictures/buttons/ trunk/mod/liveclassroom/pictures/buttons/angel.gif trunk/mod/liveclassroom/pictures/buttons/general-cancel.png trunk/mod/liveclassroom/pictures/buttons/general-create.png trunk/mod/liveclassroom/pictures/buttons/general-empty-over.png trunk/mod/liveclassroom/pictures/buttons/general-empty.png trunk/mod/liveclassroom/pictures/buttons/general-saveall.png trunk/mod/liveclassroom/pictures/buttons/headerbar-logo.png trunk/mod/liveclassroom/pictures/buttons/listitem-available.png trunk/mod/liveclassroom/pictures/buttons/listitem-hide.png trunk/mod/liveclassroom/pictures/buttons/listitem-information-16_12.png trunk/mod/liveclassroom/pictures/buttons/listitem-show.png trunk/mod/liveclassroom/pictures/buttons/listitem-unavailable.png trunk/mod/liveclassroom/pictures/buttons/new-createpodcaster.png trunk/mod/liveclassroom/pictures/buttons/new-createroom.png trunk/mod/liveclassroom/pictures/buttons/new-createvoiceboard.png trunk/mod/liveclassroom/pictures/buttons/new-createvoicepresentation.png trunk/mod/liveclassroom/pictures/buttons/searchfield.gif trunk/mod/liveclassroom/pictures/buttons/tab.gif trunk/mod/liveclassroom/pictures/buttons/tab_disabled.gif trunk/mod/liveclassroom/pictures/buttons/tab_over.gif trunk/mod/liveclassroom/pictures/buttons/tab_select.gif trunk/mod/liveclassroom/pictures/buttons/titlebar-edit.png trunk/mod/liveclassroom/pictures/buttons/titlebar-save.png trunk/mod/liveclassroom/pictures/buttons/toolbar-activities-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-activities-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-activities.png trunk/mod/liveclassroom/pictures/buttons/toolbar-availability-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-availability.png trunk/mod/liveclassroom/pictures/buttons/toolbar-content-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-content-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-content.png trunk/mod/liveclassroom/pictures/buttons/toolbar-delete-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-delete-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-delete.png trunk/mod/liveclassroom/pictures/buttons/toolbar-launch-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-launch-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-launch.png trunk/mod/liveclassroom/pictures/buttons/toolbar-new-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-new.png trunk/mod/liveclassroom/pictures/buttons/toolbar-newboard-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-newboard.png trunk/mod/liveclassroom/pictures/buttons/toolbar-newroom-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-poll-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-poll-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-poll.png trunk/mod/liveclassroom/pictures/buttons/toolbar-schedule-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-schedule-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-schedule.png trunk/mod/liveclassroom/pictures/buttons/toolbar-settings-disabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-settings-enabled.png trunk/mod/liveclassroom/pictures/buttons/toolbar-settings.png trunk/mod/liveclassroom/pictures/buttons/x_round-16_14.png trunk/mod/liveclassroom/pictures/buttons/x_squared.png trunk/mod/liveclassroom/pictures/items/ trunk/mod/liveclassroom/pictures/items/category-collapsed.png trunk/mod/liveclassroom/pictures/items/category-expanded.png trunk/mod/liveclassroom/pictures/items/filter-enabled-left.png trunk/mod/liveclassroom/pictures/items/filter-enabled-middle.png trunk/mod/liveclassroom/pictures/items/filter-enabled-right.png trunk/mod/liveclassroom/pictures/items/filter-rollover-left.png trunk/mod/liveclassroom/pictures/items/filter-rollover-middle.png trunk/mod/liveclassroom/pictures/items/filter-rollover-right.png trunk/mod/liveclassroom/pictures/items/filterbar-separator.png trunk/mod/liveclassroom/pictures/items/filterbar_example.html trunk/mod/liveclassroom/pictures/items/headerbar-logo.png trunk/mod/liveclassroom/pictures/items/headerbar-searchfield-left.png trunk/mod/liveclassroom/pictures/items/headerbar-searchfield-middl.png trunk/mod/liveclassroom/pictures/items/headerbar-searchfield-middle.png trunk/mod/liveclassroom/pictures/items/headerbar-searchfield-right.png trunk/mod/liveclassroom/pictures/items/headerbar-voice_recorder_ic.png trunk/mod/liveclassroom/pictures/items/headerbar-voice_recorder_icon.png trunk/mod/liveclassroom/pictures/items/headerbar-wimba_podcaster_i.png trunk/mod/liveclassroom/pictures/items/headerbar-wimba_podcaster_icon.png trunk/mod/liveclassroom/pictures/items/headerbar-wimbapodcaster.png trunk/mod/liveclassroom/pictures/items/listitem-Podcastericon.png trunk/mod/liveclassroom/pictures/items/listitem-VoiceBoardicon.png trunk/mod/liveclassroom/pictures/items/listitem-VoicePresentationicon.png trunk/mod/liveclassroom/pictures/items/listitem-archiveicon-selected.jpg trunk/mod/liveclassroom/pictures/items/listitem-archiveicon.jpg trunk/mod/liveclassroom/pictures/items/listitem-available.jpg trunk/mod/liveclassroom/pictures/items/listitem-available.png trunk/mod/liveclassroom/pictures/items/listitem-boardicon.png trunk/mod/liveclassroom/pictures/items/listitem-hide.png trunk/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif trunk/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.jpg trunk/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.png trunk/mod/liveclassroom/pictures/items/listitem-orphanedarchiveicon.png trunk/mod/liveclassroom/pictures/items/listitem-pcicon.png trunk/mod/liveclassroom/pictures/items/listitem-presentationicon.png trunk/mod/liveclassroom/pictures/items/listitem-show.png trunk/mod/liveclassroom/pictures/items/listitem-subitem-selected.jpg trunk/mod/liveclassroom/pictures/items/listitem-subitem.jpg trunk/mod/liveclassroom/pictures/items/listitem-subitem.png trunk/mod/liveclassroom/pictures/items/listitem-unavailable.jpg trunk/mod/liveclassroom/pictures/items/listitem-unavailable.png trunk/mod/liveclassroom/pictures/items/listitem-voicerecordericon.png trunk/mod/liveclassroom/pictures/items/listitem-voicetoolsicon.gif trunk/mod/liveclassroom/pictures/items/listitem-wimbapodcaster.png trunk/mod/liveclassroom/pictures/items/liveclassroom.png trunk/mod/liveclassroom/pictures/items/messagelabel-info.png trunk/mod/liveclassroom/pictures/items/more-link.png trunk/mod/liveclassroom/pictures/items/phone_60.png trunk/mod/liveclassroom/pictures/items/space-16px.png trunk/mod/liveclassroom/pictures/items/space-16x16px.png trunk/mod/liveclassroom/pictures/items/space-18px.png trunk/mod/liveclassroom/pictures/items/space-24px.png trunk/mod/liveclassroom/pictures/items/space-32px.png trunk/mod/liveclassroom/pictures/items/space-44px.png trunk/mod/liveclassroom/pictures/items/tab-selected.gif trunk/mod/liveclassroom/pictures/items/tab-unselected.gif trunk/mod/liveclassroom/pictures/items/toolbar-separator.png trunk/mod/liveclassroom/pictures/items/warning.png trunk/mod/liveclassroom/pictures/items/wheel-03.gif trunk/mod/liveclassroom/pictures/items/wheel.gif trunk/mod/liveclassroom/pictures/items/x_normal.gif trunk/mod/liveclassroom/pictures/items/x_normal.png trunk/mod/liveclassroom/pictures/items/x_over.gif trunk/mod/liveclassroom/pictures/items/x_over.png trunk/mod/liveclassroom/reports.php trunk/mod/liveclassroom/version.php trunk/mod/liveclassroom/view.php trunk/mod/liveclassroom/welcome.php trunk/mod/voicetools/ trunk/mod/voicetools/config.html trunk/mod/voicetools/css/ trunk/mod/voicetools/css/StyleSheet.css trunk/mod/voicetools/db/ trunk/mod/voicetools/db/install.xml trunk/mod/voicetools/db/mysql.php trunk/mod/voicetools/db/mysql.sql trunk/mod/voicetools/db/postgres7.php trunk/mod/voicetools/db/postgres7.sql trunk/mod/voicetools/error.php trunk/mod/voicetools/getXmlChoicePage.php trunk/mod/voicetools/getXmlListPanel.php trunk/mod/voicetools/getXmlNewPanel.php trunk/mod/voicetools/icon.gif trunk/mod/voicetools/index.php trunk/mod/voicetools/js/ trunk/mod/voicetools/js/ajax.js trunk/mod/voicetools/js/ajaxslt/ trunk/mod/voicetools/js/ajaxslt/AUTHORS trunk/mod/voicetools/js/ajaxslt/COPYING trunk/mod/voicetools/js/ajaxslt/README trunk/mod/voicetools/js/ajaxslt/dom.js trunk/mod/voicetools/js/ajaxslt/util.js trunk/mod/voicetools/js/ajaxslt/xmltoken.js trunk/mod/voicetools/js/ajaxslt/xpath.js trunk/mod/voicetools/js/ajaxslt/xslt.js trunk/mod/voicetools/js/constants.js trunk/mod/voicetools/js/dojo/ trunk/mod/voicetools/js/dojo/LICENSE trunk/mod/voicetools/js/dojo/README trunk/mod/voicetools/js/dojo/build.txt trunk/mod/voicetools/js/dojo/dojo.js trunk/mod/voicetools/js/dojo/iframe_history.html trunk/mod/voicetools/js/dojo/src/ trunk/mod/voicetools/js/dojo/src/io/ trunk/mod/voicetools/js/dojo/src/io/BrowserIO.js trunk/mod/voicetools/js/dojo/src/io/IframeIO.js trunk/mod/voicetools/js/dojo/src/io/RepubsubIO.js trunk/mod/voicetools/js/dojo/src/io/RhinoIO.js trunk/mod/voicetools/js/dojo/src/io/ScriptSrcIO.js trunk/mod/voicetools/js/dojo/src/io/XhrIframeProxy.js trunk/mod/voicetools/js/dojo/src/io/__package__.js trunk/mod/voicetools/js/dojo/src/io/cometd.js trunk/mod/voicetools/js/dojo/src/io/common.js trunk/mod/voicetools/js/dojo/src/io/cookie.js trunk/mod/voicetools/js/dojo/src/io/xip_client.html trunk/mod/voicetools/js/dojo/src/io/xip_server.html trunk/mod/voicetools/js/hwCommons.js trunk/mod/voicetools/js/hw_calendar.aspx trunk/mod/voicetools/js/manageXml.js trunk/mod/voicetools/js/md5.inc trunk/mod/voicetools/js/pngfix.js trunk/mod/voicetools/js/verifForm.js trunk/mod/voicetools/js/xmldom.js trunk/mod/voicetools/js/xsl/ trunk/mod/voicetools/js/xsl/wimba.xsl trunk/mod/voicetools/lang/ trunk/mod/voicetools/lang/en/ trunk/mod/voicetools/lang/en/help/ trunk/mod/voicetools/lang/en/help/voicetools/ trunk/mod/voicetools/lang/en/help/voicetools/mods.html trunk/mod/voicetools/lang/en/voicetools.php trunk/mod/voicetools/lang/en_utf8/ trunk/mod/voicetools/lang/en_utf8/help/ trunk/mod/voicetools/lang/en_utf8/help/voicetools/ trunk/mod/voicetools/lang/en_utf8/help/voicetools/mods.html trunk/mod/voicetools/lang/en_utf8/voicetools.php trunk/mod/voicetools/lang/fr/ trunk/mod/voicetools/lang/fr/help/ trunk/mod/voicetools/lang/fr/voicetools.php trunk/mod/voicetools/lang/fr_utf8/ trunk/mod/voicetools/lang/fr_utf8/help/ trunk/mod/voicetools/lang/fr_utf8/voicetools.php trunk/mod/voicetools/lib/ trunk/mod/voicetools/lib/common/ trunk/mod/voicetools/lib/common/WimbaCommons.php trunk/mod/voicetools/lib/common/WimbaUI.php trunk/mod/voicetools/lib/common/WimbaXml.php trunk/mod/voicetools/lib/common/XmlArchive.php trunk/mod/voicetools/lib/common/XmlOrphanedArchive.php trunk/mod/voicetools/lib/common/XmlResource.php trunk/mod/voicetools/lib/common/XmlRoom.php trunk/mod/voicetools/lib/common/domxml-php4-php5.php trunk/mod/voicetools/lib/vt/ trunk/mod/voicetools/lib/vt/WimbaVoicetools.php trunk/mod/voicetools/lib/vt/WimbaVoicetoolsAPI.php trunk/mod/voicetools/lib.php trunk/mod/voicetools/logs.php trunk/mod/voicetools/manageAction.php trunk/mod/voicetools/manageActionBlock.php trunk/mod/voicetools/mod.html trunk/mod/voicetools/pictures/ trunk/mod/voicetools/pictures/backgrounds/ trunk/mod/voicetools/pictures/backgrounds/filterbar.png trunk/mod/voicetools/pictures/backgrounds/headerbar.png trunk/mod/voicetools/pictures/backgrounds/toolbar.png trunk/mod/voicetools/pictures/buttons/ trunk/mod/voicetools/pictures/buttons/general-cancel.png trunk/mod/voicetools/pictures/buttons/general-create.png trunk/mod/voicetools/pictures/buttons/general-empty-over.png trunk/mod/voicetools/pictures/buttons/general-empty.png trunk/mod/voicetools/pictures/buttons/general-saveall.png trunk/mod/voicetools/pictures/buttons/listitem-available.png trunk/mod/voicetools/pictures/buttons/listitem-hide.png trunk/mod/voicetools/pictures/buttons/listitem-information-16_12.png trunk/mod/voicetools/pictures/buttons/listitem-show.png trunk/mod/voicetools/pictures/buttons/listitem-unavailable.png trunk/mod/voicetools/pictures/buttons/new-createpodcaster.png trunk/mod/voicetools/pictures/buttons/new-createroom.png trunk/mod/voicetools/pictures/buttons/new-createvoiceboard.png trunk/mod/voicetools/pictures/buttons/new-createvoicepresentation.png trunk/mod/voicetools/pictures/buttons/titlebar-edit.png trunk/mod/voicetools/pictures/buttons/titlebar-save.png trunk/mod/voicetools/pictures/buttons/toolbar-activities-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-activities-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-activities.png trunk/mod/voicetools/pictures/buttons/toolbar-content-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-content-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-content.png trunk/mod/voicetools/pictures/buttons/toolbar-delete-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-delete-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-delete.png trunk/mod/voicetools/pictures/buttons/toolbar-launch-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-launch-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-launch.png trunk/mod/voicetools/pictures/buttons/toolbar-new-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-new.png trunk/mod/voicetools/pictures/buttons/toolbar-newboard-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-newboard.png trunk/mod/voicetools/pictures/buttons/toolbar-newroom-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-poll-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-poll-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-poll.png trunk/mod/voicetools/pictures/buttons/toolbar-schedule-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-schedule-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-schedule.png trunk/mod/voicetools/pictures/buttons/toolbar-settings-disabled.png trunk/mod/voicetools/pictures/buttons/toolbar-settings-enabled.png trunk/mod/voicetools/pictures/buttons/toolbar-settings.png trunk/mod/voicetools/pictures/buttons/x_round-16_14.png trunk/mod/voicetools/pictures/buttons/x_squared.png trunk/mod/voicetools/pictures/items/ trunk/mod/voicetools/pictures/items/category-collapsed.png trunk/mod/voicetools/pictures/items/category-expanded.png trunk/mod/voicetools/pictures/items/filter-enabled-left.png trunk/mod/voicetools/pictures/items/filter-enabled-middle.png trunk/mod/voicetools/pictures/items/filter-enabled-right.png trunk/mod/voicetools/pictures/items/filter-rollover-left.png trunk/mod/voicetools/pictures/items/filter-rollover-middle.png trunk/mod/voicetools/pictures/items/filter-rollover-right.png trunk/mod/voicetools/pictures/items/filterbar-separator.png trunk/mod/voicetools/pictures/items/filterbar_example.html trunk/mod/voicetools/pictures/items/headerbar-logo.png trunk/mod/voicetools/pictures/items/headerbar-searchfield-left.png trunk/mod/voicetools/pictures/items/headerbar-searchfield-middl.png trunk/mod/voicetools/pictures/items/headerbar-searchfield-middle.png trunk/mod/voicetools/pictures/items/headerbar-searchfield-right.png trunk/mod/voicetools/pictures/items/headerbar-voice_recorder_ic.png trunk/mod/voicetools/pictures/items/headerbar-voice_recorder_icon.png trunk/mod/voicetools/pictures/items/headerbar-wimba_podcaster_i.png trunk/mod/voicetools/pictures/items/headerbar-wimba_podcaster_icon.png trunk/mod/voicetools/pictures/items/headerbar-wimbapodcaster.png trunk/mod/voicetools/pictures/items/listitem-Podcastericon.png trunk/mod/voicetools/pictures/items/listitem-VoiceBoardicon.png trunk/mod/voicetools/pictures/items/listitem-VoicePresentationicon.png trunk/mod/voicetools/pictures/items/listitem-archiveicon-selected.jpg trunk/mod/voicetools/pictures/items/listitem-archiveicon.jpg trunk/mod/voicetools/pictures/items/listitem-available.jpg trunk/mod/voicetools/pictures/items/listitem-available.png trunk/mod/voicetools/pictures/items/listitem-boardicon.png trunk/mod/voicetools/pictures/items/listitem-hide.png trunk/mod/voicetools/pictures/items/listitem-liveclassroomicon.gif trunk/mod/voicetools/pictures/items/listitem-liveclassroomicon.jpg trunk/mod/voicetools/pictures/items/listitem-liveclassroomicon.png trunk/mod/voicetools/pictures/items/listitem-orphanedarchiveicon.png trunk/mod/voicetools/pictures/items/listitem-pcicon.png trunk/mod/voicetools/pictures/items/listitem-presentationicon.png trunk/mod/voicetools/pictures/items/listitem-show.png trunk/mod/voicetools/pictures/items/listitem-subitem-selected.jpg trunk/mod/voicetools/pictures/items/listitem-subitem.jpg trunk/mod/voicetools/pictures/items/listitem-subitem.png trunk/mod/voicetools/pictures/items/listitem-unavailable.jpg trunk/mod/voicetools/pictures/items/listitem-unavailable.png trunk/mod/voicetools/pictures/items/listitem-voicerecordericon.png trunk/mod/voicetools/pictures/items/listitem-voicetoolsicon.gif trunk/mod/voicetools/pictures/items/listitem-wimbapodcaster.png trunk/mod/voicetools/pictures/items/liveclassroom.png trunk/mod/voicetools/pictures/items/messagelabel-info.png trunk/mod/voicetools/pictures/items/more-link.png trunk/mod/voicetools/pictures/items/phone_60.png trunk/mod/voicetools/pictures/items/space-16px.png trunk/mod/voicetools/pictures/items/space-16x16px.png trunk/mod/voicetools/pictures/items/space-18px.png trunk/mod/voicetools/pictures/items/space-24px.png trunk/mod/voicetools/pictures/items/space-32px.png trunk/mod/voicetools/pictures/items/space-44px.png trunk/mod/voicetools/pictures/items/tab-selected.gif trunk/mod/voicetools/pictures/items/tab-unselected.gif trunk/mod/voicetools/pictures/items/toolbar-separator.png trunk/mod/voicetools/pictures/items/voice_tools.png trunk/mod/voicetools/pictures/items/warning.png trunk/mod/voicetools/pictures/items/wheel-03.gif trunk/mod/voicetools/pictures/items/wheel.gif trunk/mod/voicetools/pictures/items/window-left.png trunk/mod/voicetools/pictures/items/window-middle.png trunk/mod/voicetools/pictures/items/window-right.png trunk/mod/voicetools/pictures/items/window200_left.png trunk/mod/voicetools/pictures/items/window200_middle.png trunk/mod/voicetools/pictures/items/window200_right.png trunk/mod/voicetools/pictures/items/x_round-16_14.png trunk/mod/voicetools/pictures/items/yes-60.png trunk/mod/voicetools/version.php trunk/mod/voicetools/view.php trunk/mod/voicetools/voicerecorder.php trunk/mod/voicetools/welcome.php Removed Paths: ------------- trunk/moodle/ Added: trunk/INSTALL.txt =================================================================== --- trunk/INSTALL.txt (rev 0) +++ trunk/INSTALL.txt 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,5 @@ +The Wimba Modules Installation and Configuration Guide is available within a bundled, downloadable package from Wimba. + +These Modules require that a Wimba Live Classroom and/or Voice Tools server is in place to integrate with Moodle. + +For more information, please visit http://www.wimba.com or contact sa...@wi... \ No newline at end of file Added: trunk/LICENSE.txt =================================================================== --- trunk/LICENSE.txt (rev 0) +++ trunk/LICENSE.txt 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: trunk/README.txt =================================================================== --- trunk/README.txt (rev 0) +++ trunk/README.txt 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,18 @@ +Wimba Modules enable institutions to easily enhance their Moodle courses by allowing seamless access to complementary applications. Wimba Modules allow instructors and students to access up to five tools from within the Moodle environment: + + * Live Classroom: a live virtual classroom supporting multi-way audio, video, application sharing, polling and content display + * Voice Board: a threaded, voice-based discussion board that can also be used for one to one vocal exercises + * Voice Presentation: a presentation consisting of web content alongside voice messages + * Voice Recorder: a recorded message that a user can play back anytime, usually accompanying content within a web page (available only via the Wimba Voice Recorder Block) + * Wimba Podcaster: a tool that allows for the creation and subscription of podcasts + +Wimba Modules include the following features: + + * Single Sign On: students and instructors seamlessly access Wimba Live Classroom and Voice Tools within Moodle. They do not need to log in again or type a URL. + * Integrated creation and management of Wimba tools: Instructors can easily create and manage Wimba tools using the Moodle interface. There is no need to access and learn a new administration interface. + * Consistent look and feel and navigation: Wimba tools look like, and can be used as, any other Moodle tool. Consequently, there is almost no learning curve to use it. + + +These Modules require that a Wimba Live Classroom and/or Voice Tools server is in place to integrate with Moodle. + +For more information, please visit http://www.wimba.com or contact sa...@wi... Added: trunk/blocks/bliveclassroom/block_bliveclassroom.php =================================================================== --- trunk/blocks/bliveclassroom/block_bliveclassroom.php (rev 0) +++ trunk/blocks/bliveclassroom/block_bliveclassroom.php 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,273 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); +require_once($CFG->dirroot.'/mod/liveclassroom/api.php'); + +?> + +<style> +table.fontCurrent +{ + font-family:Verdana; + font-size:12px; + +} + +a.list:link +{ + + color : #0000FF ; + text-decoration : underline ; +} +a.list:hover +{ + color : #0000FF ; + text-decoration : none ; +} +a.list:visited +{ + color : #0000FF ; + text-decoration : underline ; +} +a.list:active +{ + color : #0000FF ; + text-decoration : none ; +} +</style> + +<?php + +class block_bliveclassroom extends block_base { + + function init() { + $this->title = get_string('blocktitle', 'block_bliveclassroom'); + $this->version = 2004111200; + } + + function applicable_formats() { + //return array('site' => true, 'course-view' => true, 'course-view-social' => false, 'course-view-topics' => true, 'course-view-weeks' => true); + return array('all' => true); + + + } + + function get_content() { + + global $CFG, $USER, $COURSE; + if ($this->content !== NULL) { + return $this->content; + } + + //guest and not logged user can't have access to the liveclassroom block + if(isguest() || !isloggedin()){ + die; + } + + // Return a string in text format + function txt($string){ + $result = str_replace("<br />", "" ,$string); + $result = str_replace("<p>", "" ,$result); + $result = str_replace("</p>", "" ,$result); + return $result; + } + + $this->content = new stdClass; + + $this->content->text = ''; + $this->content->footer = ''; + + if(isset($CFG->block_bliveclassroom_globalnumber)){ + $gnumber = 5; + } + else $gnumber = $CFG->block_bliveclassroom_globalnumber; + + if(isset($CFG->block_bliveclassroom_coursenumber)){ + $cnumber = 3; + } + else $cnumber = $CFG->block_bliveclassroom_coursenumber; + + + + //liveclassroom module + if(!$lc = get_record("modules", "name", "liveclassroom")) { + error("module liveclassroom not exist"); + } + + if (($COURSE->format == 'site')) { // Global block : displays the 5 next Live Classroom through any course the user is enrolled in (or a teacher for) + + //table with the course module id + $result = array(); + //table with the activities id + $result1 = array(); + $full = false; + + $allcourses = get_my_courses($USER->id); + + $sectionnumber = 1; + + while($full!=true && $sectionnumber<=10){ + + foreach($allcourses as $cours) { + $sections[$cours->id] = get_record("course_sections", "course", "$cours->id", "section", $sectionnumber); + + } + foreach($sections as $section){ + + if ($full==true) {break;} + else{ + if(($section->section!=0) && ($section->sequence!=null)){ + $lines = explode(",",$section->sequence); + foreach($lines as $line) { + // print $line; + + $cm = get_record("course_modules", "id", "$line"); + if($cm->module==$lc->id) { + if(sizeof($result)>=$gnumber) { + $full=true; + + break; + } + else{ + + $block_instance = array(); + + $course = get_record("course", "id", "$cm->course"); + $block_instance['course'] =$course->fullname; + $block_instance['summary'] = $section->summary; + $block_instance['cm_id'] = $line; //$cm id + $liveclassroom = get_record("liveclassroom", "id", "$cm->instance"); + $block_instance['lc_name'] = $liveclassroom->name; + $block_instance['roomId'] = $liveclassroom->type; + $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type); + array_push($result,$block_instance); + } + } + } + } + } + } + $sectionnumber++; + } + $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">'; + //Display the list + + foreach ($result as $block) { + + $this->content->text .= '<tr><td>'; + $this->content->text .= '<table>'; + $this->content->text .= '<tr><td style="padding-left:5px;">'; + $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'">'; + if($block['summary'] !=null) { + $this->content->text .= $block['summary'].': '; + } + $this->content->text .= $block['lc_name'].'</a>'; + $this->content->text .= '</td></tr>'; + $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">'; + $this->content->text .= 'Room : '.$block['roomname']; + $this->content->text .= '</td></tr>'; + $this->content->text .= '<tr><td style="padding-left:5px;">'; + $this->content->text .= $block['course']; + $this->content->text .= '</tr></td>'; + + $this->content->text .= '</table>'; + $this->content->text .= '</td></tr>'; + } + + $this->content->text .= '</table>'; + + + } + else{ // Course Block display the 3 next Live Classroom + //table with the course module id + $result = array(); + //table with the activities id + $result1 = array(); + $full = false; + //all section in course + $sections = get_records_sql("SELECT * + FROM {$CFG->prefix}course_sections cs + WHERE cs.course = '$COURSE->id' + ORDER BY cs.section asc"); + + foreach($sections as $section){ + if ($full==true) break; + else{ + if(($section->section!=0) && ($section->sequence!=null)){ + $lines = explode(",",$section->sequence); + + foreach($lines as $line) { + //Look just the liveclasssroom instance + $cm = get_record("course_modules", "id", "$line"); + if($cm->module==$lc->id) { + if(sizeof($result)>=$cnumber){ + $full=true; + } + else { + $block_instance = array(); + + $block_instance['course'] =$COURSE->fullname; + $block_instance['summary'] = $section->summary; + $block_instance['cm_id'] = $line; //$cm id + $liveclassroom = get_record("liveclassroom", "id", "$cm->instance"); + $block_instance['lc_name'] = $liveclassroom->name; + $block_instance['roomId'] = $liveclassroom->type; + $block_instance['roomname'] = liveclassroom_api_get_room_name($liveclassroom->type); + array_push($result,$block_instance); + } + } + } + } + } + } + $this->content->text .= '<table class="fontCurrent" width="100%" border="1" style="margin:-5px;">'; + //Display the list + + foreach ($result as $block) { + $this->content->text .= '<tr><td>'; + $this->content->text .= '<table>'; + $this->content->text .= '<tr><td style="padding-left:5px;">'; + $this->content->text .= '<a class="list" href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$block['cm_id'].'" >'.$block['lc_name'].'</a>'; + $this->content->text .= '</tr></td>'; + $this->content->text .= '<tr style="color: #969696;"><td style="padding-left:5px;">'; + $this->content->text .= 'Room : '.$block['roomname']; + $this->content->text .= '</tr></td>'; + if($block['summary'] !=null) { + //$desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id); + $descTxt = txt($block['summary']); + $minidesc = substr($descTxt, 0, 20); + + if (strlen($descTxt)>20) { + $minidesc .= "..."; + } + $this->content->text .= '<tr><td style="padding-left:5px;">'; + $this->content->text .= $minidesc; + $this->content->text .= '</td></tr>'; + } + + $this->content->text .= '</table>'; + $this->content->text .= '</td></tr>'; + } + + $this->content->text .= '<tr style="background-color:#F0F0F0;"><td align="center">'; + $this->content->text .= '<img src='.$CFG->wwwroot.'/mod/liveclassroom/icon.gif> '; + $this->content->text .= '<a class="list" href='.$CFG->wwwroot.'/mod/liveclassroom/index.php?id='.$COURSE->id.'>All Live Classrooms...</a>'; + $this->content->text .= '</td></tr>'; + + $this->content->text .= '</table>'; + } + + + return $this->content; + } + + function has_config() { + return true; + } + + + +} + + +?> \ No newline at end of file Added: trunk/blocks/bliveclassroom/config_global.html =================================================================== --- trunk/blocks/bliveclassroom/config_global.html (rev 0) +++ trunk/blocks/bliveclassroom/config_global.html 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,33 @@ + <table cellpadding="9" cellspacing="0"> +<tr valign="top"> + <td align="right"><?php print_string('coursenumbers', 'block_bliveclassroom') ?></td> + <td> + <input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" /> + <input name="block_bliveclassroom_coursenumber" type="text" size="5" value="<?php + if(isset($CFG->block_bliveclassroom_coursenumber)) { + p($CFG->block_bliveclassroom_coursenumber); + } else { + p(3); + } ?>" /> + </td> + +</tr> +<tr> +<tr valign="top"> + <td align="right"><?php print_string('globalnumbers', 'block_bliveclassroom') ?></td> + + <td> + <input name="block_bliveclassroom_globalnumber" type="text" size="5" value="<?php + if(isset($CFG->block_bliveclassroom_globalnumber)) { + p($CFG->block_bliveclassroom_globalnumber); + } else { + p(5); + } ?>" /> + </td> + +</tr> + + <td colspan="2" align="center"> + <input type="submit" value="<?php print_string('savechanges') ?>" /></td> +</tr> +</table> Added: trunk/blocks/bvoicerecorder/block_bvoicerecorder.php =================================================================== --- trunk/blocks/bvoicerecorder/block_bvoicerecorder.php (rev 0) +++ trunk/blocks/bvoicerecorder/block_bvoicerecorder.php 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,109 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); + + + +?> + +<style> +table.fontCurrent +{ + font-family:Verdana; + font-size:12px; + +} + +a.list:link +{ + + color : #0000FF ; + text-decoration : underline ; +} +a.list:hover +{ + color : #0000FF ; + text-decoration : none ; +} +a.list:visited +{ + color : #0000FF ; + text-decoration : underline ; +} +a.list:active +{ + color : #0000FF ; + text-decoration : none ; +} +</style> + +<?php + + + + + +class block_bvoicerecorder extends block_base { + + function init() { + $this->title = "Voice Recorder"; + $this->version = 2004111200; + } + + function preferred_width() { + return 220; + } + + function applicable_formats() { + + return array('site-index' => false, + 'course-view' => true + ); + + } + + + function get_content() { + + global $CFG, $USER, $COURSE; + if ($this->content !== NULL) { + return $this->content; + } + + + + $this->content = new stdClass; + + $this->content->text = ''; + $this->content->footer = ''; + + $this->content->text .= '<table>'; + + + $this->content->text .= '<tr><td align="center">'; + + $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voicetools/voicerecorder.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="220px"></iframe>'; + $this->content->text .= '</td></tr>'; + + $this->content->text .= '</table>'; + + + + return $this->content; + } + function instance_allow_multiple() { + return true; + } + + + function instance_allow_config() { + return true; + } + function has_config() { + return true; + } + +} + + +?> \ No newline at end of file Added: trunk/blocks/bvoicerecorder/config_global.html =================================================================== --- trunk/blocks/bvoicerecorder/config_global.html (rev 0) +++ trunk/blocks/bvoicerecorder/config_global.html 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,33 @@ + <table cellpadding="9" cellspacing="0"> +<tr valign="top"> + <td align="right"><?php print_string('coursenumbers', 'block_bliveclassroom') ?></td> + <td> + <input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" /> + <input name="block_bliveclassroom_coursenumber" type="text" size="5" value="<?php + if(isset($CFG->block_bliveclassroom_coursenumber)) { + p($CFG->block_bliveclassroom_coursenumber); + } else { + p(3); + } ?>" /> + </td> + +</tr> +<tr> +<tr valign="top"> + <td align="right"><?php print_string('globalnumbers', 'block_bliveclassroom') ?></td> + + <td> + <input name="block_bliveclassroom_globalnumber" type="text" size="5" value="<?php + if(isset($CFG->block_bliveclassroom_globalnumber)) { + p($CFG->block_bliveclassroom_globalnumber); + } else { + p(5); + } ?>" /> + </td> + +</tr> + + <td colspan="2" align="center"> + <input type="submit" value="<?php print_string('savechanges') ?>" /></td> +</tr> +</table> Added: trunk/mod/liveclassroom/api.php =================================================================== --- trunk/mod/liveclassroom/api.php (rev 0) +++ trunk/mod/liveclassroom/api.php 2008-01-09 18:11:30 UTC (rev 206) @@ -0,0 +1,1569 @@ +<?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * ... [truncated message content] |
From: <tro...@us...> - 2008-01-09 18:08:24
|
Revision: 205 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=205&view=rev Author: trollinger Date: 2008-01-09 10:08:22 -0800 (Wed, 09 Jan 2008) Log Message: ----------- delete the tag 3.1.2 Removed Paths: ------------- tags/moodle_3_1_2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 17:58:21
|
Revision: 204 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=204&view=rev Author: trollinger Date: 2008-01-09 09:58:20 -0800 (Wed, 09 Jan 2008) Log Message: ----------- branche trunk to do some refactoring Added Paths: ----------- branches/team/Thomas/trunk/ Copied: branches/team/Thomas/trunk (from rev 203, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 17:56:58
|
Revision: 203 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=203&view=rev Author: trollinger Date: 2008-01-09 09:56:57 -0800 (Wed, 09 Jan 2008) Log Message: ----------- add the branche structure Added Paths: ----------- branches/team/ branches/team/Thomas/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 14:05:24
|
Revision: 202 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=202&view=rev Author: trollinger Date: 2008-01-09 06:05:23 -0800 (Wed, 09 Jan 2008) Log Message: ----------- tags 3.1.2 Added Paths: ----------- tags/moodle_3_1_2/ Copied: tags/moodle_3_1_2 (from rev 201, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 14:01:26
|
Revision: 201 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=201&view=rev Author: trollinger Date: 2008-01-09 06:01:24 -0800 (Wed, 09 Jan 2008) Log Message: ----------- remove not used pictures Removed Paths: ------------- trunk/moodle/mod/liveclassroom/pictures/backgrounds/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/items/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/minus.gif trunk/moodle/mod/liveclassroom/pictures/plus.gif trunk/moodle/mod/voicetools/pictures/backgrounds/Thumbs.db trunk/moodle/mod/voicetools/pictures/buttons/Thumbs.db trunk/moodle/mod/voicetools/pictures/items/Thumbs.db Deleted: trunk/moodle/mod/liveclassroom/pictures/backgrounds/Thumbs.db =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/liveclassroom/pictures/buttons/Thumbs.db =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/liveclassroom/pictures/items/Thumbs.db =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/liveclassroom/pictures/minus.gif =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/liveclassroom/pictures/plus.gif =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/voicetools/pictures/backgrounds/Thumbs.db =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/voicetools/pictures/buttons/Thumbs.db =================================================================== (Binary files differ) Deleted: trunk/moodle/mod/voicetools/pictures/items/Thumbs.db =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-01-09 11:42:27
|
Revision: 200 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=200&view=rev Author: trollinger Date: 2008-01-09 03:37:50 -0800 (Wed, 09 Jan 2008) Log Message: ----------- update the repository after the 3.1.2 release Modified Paths: -------------- trunk/moodle/mod/liveclassroom/doAction.php trunk/moodle/mod/liveclassroom/js/ajax.js trunk/moodle/mod/liveclassroom/js/constants.js trunk/moodle/mod/liveclassroom/js/hwCommons.js trunk/moodle/mod/liveclassroom/js/pngfix.js trunk/moodle/mod/liveclassroom/js/xsl/wimba.xsl trunk/moodle/mod/liveclassroom/lib/common/WimbaCommons.php trunk/moodle/mod/liveclassroom/lib/common/WimbaUI.php trunk/moodle/mod/liveclassroom/lib/common/XmlArchive.php trunk/moodle/mod/liveclassroom/lib/lc/LCAction.php trunk/moodle/mod/liveclassroom/lib/lc/lcapi.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/pictures/backgrounds/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/items/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/items/filter-enabled-right.png trunk/moodle/mod/liveclassroom/pictures/items/filter-rollover-right.png trunk/moodle/mod/voicetools/css/StyleSheet.css trunk/moodle/mod/voicetools/error.php trunk/moodle/mod/voicetools/js/ajax.js trunk/moodle/mod/voicetools/js/constants.js trunk/moodle/mod/voicetools/js/hwCommons.js trunk/moodle/mod/voicetools/js/pngfix.js trunk/moodle/mod/voicetools/js/xsl/wimba.xsl trunk/moodle/mod/voicetools/lang/en/voicetools.php trunk/moodle/mod/voicetools/lang/en_utf8/voicetools.php trunk/moodle/mod/voicetools/lib/common/WimbaCommons.php trunk/moodle/mod/voicetools/lib/common/WimbaUI.php trunk/moodle/mod/voicetools/lib/common/XmlArchive.php trunk/moodle/mod/voicetools/lib/vt/WimbaVoicetools.php trunk/moodle/mod/voicetools/lib.php trunk/moodle/mod/voicetools/mod.html trunk/moodle/mod/voicetools/pictures/backgrounds/Thumbs.db trunk/moodle/mod/voicetools/pictures/buttons/Thumbs.db trunk/moodle/mod/voicetools/pictures/items/Thumbs.db trunk/moodle/mod/voicetools/pictures/items/filter-enabled-right.png trunk/moodle/mod/voicetools/pictures/items/filter-rollover-right.png trunk/moodle/mod/voicetools/voicerecorder.php Modified: trunk/moodle/mod/liveclassroom/doAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/doAction.php 2008-01-09 10:36:38 UTC (rev 199) +++ trunk/moodle/mod/liveclassroom/doAction.php 2008-01-09 11:37:50 UTC (rev 200) @@ -27,7 +27,7 @@ * * ******************************************************************************/ -/* $Id: doAction.php 52708 2007-08-20 19:53:23Z thomasr $ */ +/* $Id: doAction.php 55986 2007-11-13 21:51:00Z thomasr $ */ /* This page manage the action create, update, delete for a room */ error_reporting(E_ERROR); @@ -76,7 +76,7 @@ exit; break; case "create" : - $id = $api->createRoom($session->getCourseId() . rand(), "false"); + $id = $api->createRoom(required_param('id', PARAM_SAFEDIR), "false"); $messageAction = "created"; $messageProduct = "room"; break; Modified: trunk/moodle/mod/liveclassroom/js/ajax.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/ajax.js 2008-01-09 10:36:38 UTC (rev 199) +++ trunk/moodle/mod/liveclassroom/js/ajax.js 2008-01-09 11:37:50 UTC (rev 200) @@ -1,476 +1,546 @@ -/****************************************************************************** - * * - * Copyright (c) 1999-2007 Wimba, All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Wimba. * - * It cannot be copied, used, or modified without obtaining an * - * authorization from the authors or a mandated member of Wimba. * - * If such an authorization is provided, any modified version * - * or copy of the software has to contain this header. * - * * - * WARRANTIES: * - * This software is made available by the authors in the hope * - * that it will be useful, but without any warranty. * - * Wimba is not liable for any consequence related to * - * the use of the provided software. * - * * - * Class: ajax.js * - * * - * Author: Thomas Rollinger * - * * - * Date: May 2007 * - * * - ******************************************************************************/ - -/* $Id$ */ - -function getURLParametersTab() { - var sURL = window.document.URL; - - var params = new Array(); - if (sURL.indexOf("?") > 0) { - var arrParams = sURL.split("?"); - var arrURLParams = arrParams[1].split("&"); - var i = 0; - for (i = 0; i < arrURLParams.length; i = i + 1) { - var param = arrURLParams[i].split("="); - params[param[0]] = param[1]; - } - } - return params; -} - - -function getURLParameters() { - var sURL = window.document.URL.toString(); - var params = ""; - if (sURL.indexOf("?") > 0) - { - var arrParams = sURL.split("?"); - - var arrURLParams = arrParams[1].split("&"); - - var arrParamNames = new Array(arrURLParams.length); - var arrParamValues = new Array(arrURLParams.length); - - var i = 0; - for (i = 0; i < arrURLParams.length; i ++ ) - { - var sParam = arrURLParams[i]; - arrParamNames[i] = sParam[0]; - if (sParam[1] != "") - params += "&" + unescape(sParam); - - } - params = params.substring(1, params.length) - } - return params; -} -function getSessionParameters() { - var params = new Array(); - params["signature"] = session["signature"]; - params["enc_courseId"] = session["courseId"]; - params["enc_email"] = session["email"]; - params["enc_firstname"] = session["firstName"]; - params["enc_lastname"] = session["lastName"]; - params["enc_role"] = session["role"]; - params["time"] = session["timeOfLoad"]; - if (currentProduct != "") { - params["product"] = currentProduct; - } - if (typeSelect != "") { - params["type"] = typeSelect; - } - if (currentId != "") { - params["id"] = currentId; - } - if (currentIdtab != "") { - params["idtab"] = currentIdtab; - } - if (currentCourseTab != "") { - params["tab"] = currentCourseTab; - } - params["studentView"] = studentView; - - return params; -} - -function getUrlParameters() { - var url = ""; - url += "signature=" + session["signature"]; - url += "&enc_courseId=" + session["courseId"]; - url += "&enc_email=" + session["email"]; - url += "&enc_firstname=" + session["firstName"]; - url += "&enc_lastname=" + session["lastName"]; - url += "&enc_role=" + session["role"]; - url += "&time=" + session["timeOfLoad"]; - if (currentProduct != "") { - url += "&product=" + currentProduct; - } - if (typeSelect != "") { - url += "&type=" + typeSelect; - } - - if (currentId != "") { - url += "&id=" + currentId; - } - - if (currentIdtab != "") { - url += "&idtab=" + currentIdtab; - } - if (currentCourseTab != "") { - url += "&tab = " + currentCourseTab; - } - url += "&studentView=" + studentView; - - return url; -} -function DisplayFirstPage(url, div, action, nextAction) { - if (div == "all") { - showPopup(); - } - if (action != null) { - url += "?action=" + action; - } - - - transform(url,"js/xsl/wimba.xsl","first",div,nextAction) -} - -function launchAjaxRequest(url, action, init, div,createWorkflow) { - //display the loading page - if (div == "all") { - showPopup(); - } - if (lcPopup != null) { - lcPopup.close(); - } - var parameters = ""; - if (action != "") { - url += "?action=" + action; - } - if (createWorkflow != "" && action!="") { - url += "&createWorkflow=" + createWorkflow; - } - isFilter = false; - transform(url,"js/xsl/wimba.xsl","",div) - if (init == true) { - - currentId = ""; - currentIdtab = "Info"; - advancedSettings = false; - } - -} - -/* -* Function used to dispaly the rss feed into the podcaster nugget -*/ -function launchSimpleAjaxRequest(url, action, init, div) { - //display the loading page - var xml; - var parameters = ""; - if (action != "") { - url += "?action=" + action; - } - - var xmlSource; - dojo.io.bind({ - url:url, mimetype:"text/plain", - load:function (type, data, evt) { - if (data.match("error") == "error") { - dom = xmlParse(data); - xmlSource = dom; - if (xslData == null) { //get the stylesheet - dojo.io.bind({ - url:"js/xsl/wimba.xsl", - mimetype:"application/xml", - load:function (type, data, evt) { - xslData = data; - var xml = xsltProcess(xmlSource, xslData); - hidePopup(); - document.getElementById(div).innerHTML = xml; - }, - error:BadResult, - content:null, - method:"POST"}); - } else { - transform(xml, xslData, 'all'); - } - } else { - displayRssFeed(data, div); - } - }, - error:BadResult, - content:getSessionParameters(), - method:"POST"}); -} - -function getRss(url, id, tab) { - if(id!=""){ - document.getElementById("rss").innerHTML = document.getElementById("loadingPopup").innerHTML; - currentId = id; - currentCourseTab = tab; - launchSimpleAjaxRequest(url, "getRss", true, "rss"); - } -} - -function transform(urlXml, stylesheet,TypeParams, div,nextAction) { - - if(window.ActiveXObject){//ie - - if(TypeParams=="first") - params=getURLParameters(); - else - params=getUrlParameters(); - - var sourceDoc = new ActiveXObject("Microsoft.XMLDOM") - sourceDoc.async = false - if(urlXml.substr((urlXml.length-1),urlXml.length)=="?") - sourceDoc.load(urlXml +params) - else if( urlXml.substr((urlXml.length-1),urlXml.length)=="&") - sourceDoc.load(urlXml+params) - else if( urlXml.indexOf("?") == -1) - sourceDoc.load(urlXml+"?"+params) - else - sourceDoc.load(urlXml+"&"+params) - - if (div == "all" && sourceDoc.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { - createSessionByXmlDocument(sourceDoc); - } - - var xslDoc = new ActiveXObject("Microsoft.XMLDOM") - xslDoc.async = false - xslDoc.load("js/xsl/wimba.xsl"); - - xsltTransformation(sourceDoc,xslDoc,div,nextAction); - - }else if (window.XSLTProcessor){//firefox - if(TypeParams=="first") - params=getURLParametersTab(); - else - params=getSessionParameters(); - - dojo.io.bind({url:urlXml, mimetype:"application/xml", load:function (type, data, evt) { - - if (div == "all" && data.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { - createSessionByXmlDocument(data); - } - - xmlSource = data; - //get the stylesheet - dojo.io.bind({ - url:stylesheet, - mimetype:"application/xml", - load:function (type, data, evt) { - //do the xslt transformatio - xsltTransformation(xmlSource,data,div,nextAction) - - }, - error:BadResult, - content:null, - method:"GET"}); - - }, - error:BadResult, - content:params, - method:"POST"}); - - }else{ - if(TypeParams=="first") - params=getURLParametersTab(); - else - params=getSessionParameters(); - var xmlSource; - dojo.io.bind({url:urlXml, mimetype:"text/plain", load:function (type, data, evt) { - if (div == "all" && data.match("error") != "error") { - createSession(data); - } - dom = xmlParse(data); - xmlSource = dom; - - dojo.io.bind({ - url:"js/xsl/wimba.xsl", - mimetype:"application/xml", - load:function (type, data, evt) { - //do the xslt transformatio - xsltTransformation(xmlSource,xslData,div,nextAction) - - }, - error:BadResult, - content:null, - method:"GET"}); - - - }, - error:BadResult, - content:params, - method:"POST"}); - - } - -} - -function xsltTransformation(xml,xsl,div,nextAction){ - - if(window.ActiveXObject)//ie - { - var result = xml.transformNode(xsl); - - if (div == "all") { - document.getElementById(div).innerHTML = result; - hidePopup(); - gestionDisplay(); - var text=new String(document.getElementById("all").innerHTML); - - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - document.getElementById(div).innerHTML = result; - document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); - opendDialInformations(); - } - if(nextAction!="") - eval(nextAction); - }else if (window.XSLTProcessor){//firefox - - var processor = new XSLTProcessor(); - processor.importStylesheet(xsl); - document.getElementById(div).innerHTML=""; - var resultDocument = processor.transformToFragment(xml, document); - - if (div == "all") { - hidePopup(); - document.getElementById(div).appendChild(resultDocument); - gestionDisplay(); - - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - - document.getElementById(div).appendChild(resultDocument); - document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); - opendDialInformations(); - } - - if(nextAction!="") - eval(nextAction); - - }else{ - - var xml = xsltProcess(xml, xsl); - - //hide the loading page - if (div == "all") { - hidePopup(); - document.getElementById(div).innerHTML = xml; - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - xml = xml.replace("myform", "myFormPopup"); - document.getElementById(div).innerHTML = xml; - opendDialInformations(); - } - gestionDisplay(); - if(nextAction!="") - eval(nextAction); - } - //manage the display of the accent - var content=new String(document.getElementById("all").innerHTML); - content=content.replace(/&/g,"&"); - document.getElementById("all").innerHTML=content; - var content=new String(document.getElementById("popupDial").innerHTML); - content=content.replace(/&/g,"&"); - document.getElementById("popupDial").innerHTML=content; - -} - - -function Management() -{ - -} - - -function BadResult(type, error) { - -} - -function loadSettings(url, action, div) { - launchAjaxRequest(url, action, false, div); -} - -function loadNewSettings(url, action, product, type, div,createWorkflow) { - currentProduct = product; - typeSelect = type; - launchAjaxRequest(url, action, false, div,createWorkflow); -} - -function saveDatabase(url, title, comment) { - var url = url + "?action=updateRecorder&title=" + title + "&comment=" + comment; - var xml; - dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { - if (data == "bad") { - alert("problem to save"); - } - }, error:BadResult,content:getURLParametersTab(), method:"POST"}); - -} - -function showInformation(url, id, product) { - currentId = id; - currentProduct = product; - displayBackground(); - launchAjaxRequest(url, "getDialInformation", "false", "dialInfo"); -} - -function saveSettings(url, id) { - - url = url + "?action=saveSettings&id=" + id; - var returnValue = true; - var xml; - dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { - if (data == "bad") { - alert("problem to save the new Settings"); - returnValue = false; - } - - }, error:BadResult, content:getForm(window.document.myform), method:"POST"}); - return returnValue; -} - -function getForm(obj) { - - var params = getSessionParameters(); - inputForm = obj.getElementsByTagName("input"); - var i=0; - for (i = 0; i < inputForm.length; i++) { - if (inputForm[i].type == "text") { - params[inputForm[i].name] = inputForm[i].value; - } - if (inputForm[i].type == "checkbox") { - if (inputForm[i].checked) { - params[inputForm[i].name] = inputForm[i].value; - } else { - params[inputForm[i].name] = "false"; - } - } - if (inputForm[i].type == "radio") { - if (inputForm[i].checked) { - params[inputForm[i].name] = inputForm[i].value; - } - } - } - inputForm = obj.getElementsByTagName("select"); - for (i = 0; i < inputForm.length; i++) { - var sel = inputForm[i]; - params[sel.name] = sel.options[sel.selectedIndex].value; - } - inputForm = obj.getElementsByTagName("textarea"); - for (i = 0; i < inputForm.length; i++) { - params[inputForm[i].name] = inputForm[i].value; - } - return params; -} - +/****************************************************************************** + * * + * Copyright (c) 1999-2007 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Wimba. * + * It cannot be copied, used, or modified without obtaining an * + * authorization from the authors or a mandated member of Wimba. * + * If such an authorization is provided, any modified version * + * or copy of the software has to contain this header. * + * * + * WARRANTIES: * + * This software is made available by the authors in the hope * + * that it will be useful, but without any warranty. * + * Wimba is not liable for any consequence related to * + * the use of the provided software. * + * * + * Class: ajax.js * + * * + * Author: Thomas Rollinger * + * * + * Date: May 2007 * + * * + ******************************************************************************/ + + +/* + * Get the parameters passed with the GET Method and put them into a + * javascript array + */ +function getURLParametersTab() { + var sURL = window.document.URL; + + var params = new Array(); + if (sURL.indexOf("?") > 0) { + var arrParams = sURL.split("?"); + var arrURLParams = arrParams[1].split("&"); + var i = 0; + for (i = 0; i < arrURLParams.length; i = i + 1) { + var param = arrURLParams[i].split("="); + params[param[0]] = unescape(param[1].replace(/\+/g,"%20")); + } + } + return params; +} + +/* + * Get the parameters passed with the GET Method and + * create a string with them. + */ +function getURLParameters() { + var sURL = window.document.URL.toString(); + var params = ""; + if (sURL.indexOf("?") > 0) + { + var arrParams = sURL.split("?"); + + var arrURLParams = arrParams[1].split("&"); + + var arrParamNames = new Array(arrURLParams.length); + var arrParamValues = new Array(arrURLParams.length); + + var i = 0; + for (i = 0; i < arrURLParams.length; i ++ ) + { + var sParam = arrURLParams[i]; + arrParamNames[i] = sParam[0]; + if (sParam[1] != "") + params += "&" + unescape(sParam); + + } + params = params.substring(1, params.length) + } + return params; +} + +/* + * Create an array which contains different informations + * about the component status and session variable + */ +function getSessionParameters() { + var params = new Array(); + params["signature"] = session["signature"]; + params["enc_courseId"] = session["courseId"]; + params["enc_email"] = session["email"]; + params["enc_firstname"] = session["firstName"]; + params["enc_lastname"] = session["lastName"]; + params["enc_role"] = session["role"]; + params["time"] = session["timeOfLoad"]; + if (currentProduct != "") { + params["product"] = currentProduct; + } + if (typeSelect != "") { + params["type"] = typeSelect; + } + if (currentId != "") { + params["id"] = currentId; + } + if (currentIdtab != "") { + params["idtab"] = currentIdtab; + } + if (currentCourseTab != "") { + params["tab"] = currentCourseTab; + } + params["studentView"] = studentView; + + return params; +} +/* + * Create a string which contains different informations + * about the component status and session variable to be passed + * as a GET parameters + */ +function getUrlParameters() { + var url = ""; + url += "signature=" + session["signature"]; + url += "&enc_courseId=" + session["courseId"]; + url += "&enc_email=" + session["email"]; + url += "&enc_firstname=" + session["firstName"]; + url += "&enc_lastname=" + session["lastName"]; + url += "&enc_role=" + session["role"]; + url += "&time=" + session["timeOfLoad"]; + if (currentProduct != "") { + url += "&product=" + currentProduct; + } + if (typeSelect != "") { + url += "&type=" + typeSelect; + } + + if (currentId != "") { + url += "&id=" + currentId; + } + + if (currentIdtab != "") { + url += "&idtab=" + currentIdtab; + } + if (currentCourseTab != "") { + url += "&tab = " + currentCourseTab; + } + url += "&studentView=" + studentView; + + return url; +} + +/* + * Display the principal page of the component + * url : file which generate the xml + * div : id of the div where the html will be + * action : + * nextAction : + */ +function DisplayFirstPage(url, div, action, nextAction) { + if (div == "all") { + showPopup(); + } + if (action != null) { + url += "?action=" + action; + } + + + transform(url,"js/xsl/wimba.xsl","first",div,nextAction) +} + + +/* + * Create the context of the Ajax request and execute it + * + */ +function launchAjaxRequest(url, action, init, div,createWorkflow) { + //display the loading page + if(currentId == "" && action=="update") { + return false; + } + if (div == "all") { + showPopup(); + } + if (lcPopup != null) { + lcPopup.close(); + } + var parameters = ""; + if (action != "") { + url += "?action=" + action; + } + if (createWorkflow != "" && action!="") { + url += "&createWorkflow=" + createWorkflow; + } + isFilter = false; + transform(url,"js/xsl/wimba.xsl","",div) + if (init == true) { + + currentId = ""; + currentIdtab = "Info"; + advancedSettings = false; + } +} + +/* +* Function used to display the rss feed into the podcaster nugget +*/ +function launchSimpleAjaxRequest(url, action, init, div) { + //display the loading page + var xml; + var parameters = ""; + if (action != "") { + url += "?action=" + action; + } + + var xmlSource; + dojo.io.bind({ + url:url, mimetype:"text/plain", + load:function (type, data, evt) { + //error management + if (data.match("error") == "error") { + dom = xmlParse(data); + xmlSource = dom; + if (xslData == null) { //get the stylesheet + dojo.io.bind({ + url:"js/xsl/wimba.xsl", + mimetype:"application/xml", + load:function (type, data, evt) { + xslData = data; + var xml = xsltProcess(xmlSource, xslData); + hidePopup(); + document.getElementById(div).innerHTML = xml; + }, + error:BadResult, + content:null, + method:"POST"}); + } else { + transform(xml, xslData, 'all'); + } + } else { + //launch the generation of the display + displayRssFeed(data, div); + } + }, + error:BadResult, + content:getSessionParameters(), + method:"POST"}); +} + +/* + * Create the context of the Ajax request and execute it + */ +function getRss(url, id, tab) { + if(id!=""){ + document.getElementById("rss").innerHTML = document.getElementById("loadingPopup").innerHTML; + currentId = id; + currentCourseTab = tab; + launchSimpleAjaxRequest(url, "getRss", true, "rss"); + } +} + +/* + * This function execute the ajax request to get the approppriate xml and + * the xsl. Then, It execute the xslt transformation to generate the html + * + * For IE: we used the native javascript function to get the xml,xsl by Ajax and + * excecute the xslt transformation + * + * For Firefox : we used the dojo framework to get the xml,xsl by Ajax and the native + * function to execute the xslt transformation + * + * For Safari: we used he dojo framework to get the xml,xsl by Ajax and the google library + * (Google AJAXSLT) to execute the xslt transformation because it is not supported natively + */ +function transform(urlXml, stylesheet,TypeParams, div,nextAction) { + + if(window.ActiveXObject){//ie + + if(TypeParams=="first") + params=getURLParameters(); + else + params=getUrlParameters(); + + var sourceDoc = new ActiveXObject("Microsoft.XMLDOM") + sourceDoc.async = false + if(urlXml.substr((urlXml.length-1),urlXml.length)=="?") + sourceDoc.load(urlXml +params) + else if( urlXml.substr((urlXml.length-1),urlXml.length)=="&") + sourceDoc.load(urlXml+params) + else if( urlXml.indexOf("?") == -1) + sourceDoc.load(urlXml+"?"+params) + else + sourceDoc.load(urlXml+"&"+params) + + if (div == "all" && sourceDoc.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { + createSessionByXmlDocument(sourceDoc); + } + + var xslDoc = new ActiveXObject("Microsoft.XMLDOM") + xslDoc.async = false + xslDoc.load("js/xsl/wimba.xsl"); + + xsltTransformation(sourceDoc,xslDoc,div,nextAction); + + }else if (window.XSLTProcessor){//firefox + if(TypeParams=="first") + params=getURLParametersTab(); + else + params=getSessionParameters(); + + dojo.io.bind({url:urlXml, mimetype:"application/xml", load:function (type, data, evt) { + + if (div == "all" && data.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { + createSessionByXmlDocument(data); + } + + xmlSource = data; + //get the stylesheet + dojo.io.bind({ + url:stylesheet, + mimetype:"application/xml", + load:function (type, data, evt) { + //do the xslt transformatio + xsltTransformation(xmlSource,data,div,nextAction) + + }, + error:BadResult, + content:null, + method:"GET"}); + + }, + error:BadResult, + content:params, + method:"POST"}); + + }else{ + if(TypeParams=="first") + params=getURLParametersTab(); + else + params=getSessionParameters(); + var xmlSource; + dojo.io.bind({url:urlXml, mimetype:"text/plain", load:function (type, data, evt) { + if (div == "all" && data.match("error") != "error") { + createSession(data); + } + dom = xmlParse(data); + xmlSource = dom; + + dojo.io.bind({ + url:"js/xsl/wimba.xsl", + mimetype:"application/xml", + load:function (type, data, evt) { + //do the xslt transformatio + xsltTransformation(xmlSource,data,div,nextAction) + }, + error:BadResult, + content:null, + method:"GET"}); + + + }, + error:BadResult, + content:params, + method:"POST"}); + + } + +} + +/* + * Call the appropriate function to execute the xslt transformation + * and add the html into the page + */ +function xsltTransformation(xml,xsl,div,nextAction){ + + if(window.ActiveXObject)//ie + { + var result = xml.transformNode(xsl); + if (div == "all") { + document.getElementById(div).innerHTML = result; + hidePopup(); + gestionDisplay(); + var text=new String(document.getElementById("all").innerHTML); + + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + document.getElementById(div).innerHTML = result; + document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); + opendDialInformations(); + } + if(nextAction!="") + eval(nextAction); + }else if (window.XSLTProcessor){//firefox + + var processor = new XSLTProcessor(); + processor.importStylesheet(xsl); + document.getElementById(div).innerHTML=""; + var resultDocument = processor.transformToFragment(xml, document); + + if (div == "all") { + hidePopup(); + document.getElementById(div).appendChild(resultDocument); + gestionDisplay(); + + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + + document.getElementById(div).appendChild(resultDocument); + document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); + opendDialInformations(); + } + + if(nextAction!="") + eval(nextAction); + + }else{ + + var xml = xsltProcess(xml, xsl); + + //hide the loading page + if (div == "all") { + hidePopup(); + document.getElementById(div).innerHTML = xml; + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + xml = xml.replace("myform", "myFormPopup"); + document.getElementById(div).innerHTML = xml; + opendDialInformations(); + } + gestionDisplay(); + if(nextAction!="") + eval(nextAction); + } + //manage the display of the accent + var content=new String(document.getElementById("all").innerHTML); + content=content.replace(/&/g,"&"); + document.getElementById("all").innerHTML=content; + var content=new String(document.getElementById("popupDial").innerHTML); + content=content.replace(/&/g,"&"); + document.getElementById("popupDial").innerHTML=content; + +} + + +function Management() +{ + +} + + +function BadResult(type, error) { + +} + +/* + * load the setting of the Lc or Vt + */ +function loadSettings(url, action, div) { + launchAjaxRequest(url, action, false, div); +} + +/* + * Load the settings of a existing element(room or voice tools) + */ +function loadNewSettings(url, action, product, type, div,createWorkflow) { + currentProduct = product; + typeSelect = type; + launchAjaxRequest(url, action, false, div,createWorkflow); +} + +/* + * Save the comment and the title of the voice recorder + */ + +function saveDatabase(url, title, comment) { + var url = url + "?action=updateRecorder&title=" + title + "&comment=" + comment; + var xml; + dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { + if (data == "bad") { + alert("problem to save"); + } + }, error:BadResult,content:getURLParametersTab(), method:"POST"}); + +} + +/* + * Get the dial-in informations fo a specific room + */ +function showInformation(url, id, product) { + currentId = id; + currentProduct = product; + displayBackground(); + launchAjaxRequest(url, "getDialInformation", "false", "dialInfo"); +} + +/* + * Save the settings of a existing room. It used to save the room settings before + * launch the advanced settings + */ +function saveSettings(url, id) { + + url = url + "?action=saveSettings&id=" + id; + var returnValue = true; + var xml; + dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { + if (data == "bad") { + alert("problem to save the new Settings"); + returnValue = false; + } + + }, error:BadResult, content:getForm(window.document.myform), method:"POST"}); + return returnValue; +} + +/* + * get the value of all the input elements of the form + */ +function getForm(obj) { + + var params = getSessionParameters(); + inputForm = obj.getElementsByTagName("input"); + var i=0; + for (i = 0; i < inputForm.length; i++) { + if (inputForm[i].type == "text") { + params[inputForm[i].name] = inputForm[i].value; + } + if (inputForm[i].type == "checkbox") { + if (inputForm[i].checked) { + params[inputForm[i].name] = inputForm[i].value; + } else { + params[inputForm[i].name] = "false"; + } + } + if (inputForm[i].type == "radio") { + if (inputForm[i].checked) { + params[inputForm[i].name] = inputForm[i].value; + } + } + } + inputForm = obj.getElementsByTagName("select"); + for (i = 0; i < inputForm.length; i++) { + var sel = inputForm[i]; + params[sel.name] = sel.options[sel.selectedIndex].value; + } + inputForm = obj.getElementsByTagName("textarea"); + for (i = 0; i < inputForm.length; i++) { + params[inputForm[i].name] = inputForm[i].value; + } + return params; +} + Modified: trunk/moodle/mod/liveclassroom/js/constants.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/constants.js 2008-01-09 10:36:38 UTC (rev 199) +++ trunk/moodle/mod/liveclassroom/js/constants.js 2008-01-09 11:37:50 UTC (rev 200) @@ -57,4 +57,5 @@ var xmlDoc; var xslData=null; var lcPopup=null; +var expandState=0; Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2008-01-09 10:36:38 UTC (rev 199) +++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2008-01-09 11:37:50 UTC (rev 200) @@ -1,4 +1,4 @@ -/****************************************************************************** +/****************************************************************************** * * * Copyright (c) 1999-2007 Wimba, All Rights Reserved. * * * @@ -30,6 +30,7 @@ } return false; } + function isIE6() { var userAgent = navigator.userAgent; var start = userAgent.indexOf("(", 0); @@ -49,75 +50,123 @@ return false; } } +/* + * Manage the search of a specific element. This function is called every time + * when the user type a letter into the search field + */ function searchResource(searchValue) { activateFilter("all") var display = "table-row"; if (isInternetExplorer()) { display = "block"; - } - //manage the button - if (currentId != "") { + } + if (currentId != "") {//deselect the current element document.getElementById(currentId).style.backgroundColor = "white"; } - currentId = ""; + + searchValueLength=searchValue.length-1; + if(searchValue.indexOf("\"")==0 && searchValue.lastIndexOf("\"")==searchValueLength && searchValue.length>1) { + searchValue=searchValue.substr(1,(searchValueLength-1)); + } + + currentId = "";//init the current id because no element is selected var match = false; - var list = document.getElementById("list"); - var product = list.getElementsByTagName("div"); + var list = document.getElementById("list");//get the part which contains the global list + var product = list.getElementsByTagName("div");//get the products for (var i = 0; i < product.length; i++) { - var elements = product[i].getElementsByTagName("tr"); + var elements = product[i].getElementsByTagName("tr");//get the elements of this product var numMatch = 0; for (var x = 0; x < elements.length; x++) { - if (elements[x].getAttribute("typeProduct") != null && elements[x].getAttribute("stateStudentView") != "ignore") {//list element - + //if the current element is available for search + if (elements[x].getAttribute("typeProduct") != null && elements[x].getAttribute("stateStudentView") != "ignore") { if (searchValue == "") {//init elements[x].style.backgroundColor = "white"; - if (elements[x].getAttribute("typeProduct") == "archive" && elements[x - 1].getAttribute("preview") != "unavalaible") { - elements[x].className = "archiveHide"; - var pictureId = elements[x - 1].id + "_ExpandPicture"; - changePicture(pictureId, "pictures/items/listitem-show.png"); + if (elements[x + 1]!=null && elements[x + 1].getAttribute("typeProduct") == "archive") { + var roomLinked=x; + var archiveMatched=0; + while (elements[x + 1].getAttribute("typeProduct") == "archive" ) { + if(elements[x+1].getAttribute("stateStudentView") != "ignore"){ + elements[x + 1].className = "archiveHide"; + archiveMatched++ + } + x++; + } + + if(archiveMatched>0){//change the pciture + var pictureId = elements[roomLinked].id + "_ExpandPicture"; + changePicture(pictureId, "pictures/items/listitem-show.png"); + } + elements[roomLinked].setAttribute("stateSearch", "");//change the status of the element to manage the display + elements[roomLinked].style.display = display; } else { - if (studentView == true && elements[x].getAttribute("typeProduct") == "orphanedarchivestudent") { - elements[x].style.display = display; - elements[x].setAttribute("stateSearch", ""); - } else { - if (elements[x].getAttribute("stateStudentView") != "ignore" && elements[x].getAttribute("typeProduct") != "orphanedarchivestudent") { + if (studentView == true && elements[x].getAttribute("typeProduct") == "orphanedarchivestudent") { elements[x].style.display = display; elements[x].setAttribute("stateSearch", ""); - } - } + } else { + if (elements[x].getAttribute("stateStudentView") != "ignore" && elements[x].getAttribute("typeProduct") != "orphanedarchivestudent") { + elements[x].style.display = display; + elements[x].setAttribute("stateSearch", ""); + } + } } } else { + //if the element match if (elements[x].getAttribute("name")!=null && elements[x].getAttribute("name").toLowerCase().match(searchValue.toLowerCase())) { numMatch++; - if (numMatch == 1 && match != true) { + if (numMatch == 1 && match != true) {//first of the list will be selected elements[x].style.backgroundColor = "#c3dbf7"; currentId = elements[x].id; match = true; } elements[x].style.display = display; - elements[x].setAttribute("stateSearch", ""); + elements[x].setAttribute("stateSearch", "");//this element is match by the search var pictureId = elements[x].id + "_ExpandPicture"; - if (document.getElementById(pictureId) != null) { - changePicture(pictureId, "pictures/items/listitem-hide.png"); + if (document.getElementById(pictureId) != null) {//if archive available + var roomLinked=x; + var archiveMatched=0; while (elements[x + 1].getAttribute("typeProduct") == "archive") { - elements[x + 1].className = "archive"; - elements[x + 1].setAttribute("stateSearch", ""); - x++; + if(elements[x + 1].getAttribute("name").toLowerCase().match(searchValue.toLowerCase()) && elements[x+1].getAttribute("stateStudentView") != "ignore" ){ + elements[x + 1].className = "archive"; + elements[x + 1].setAttribute("stateSearch", ""); + archiveMatched++; + } + x++; } + //management of the picture to expand the archives + if(archiveMatched>0){ + var pictureId = elements[roomLinked].id + "_ExpandPicture"; + changePicture(pictureId, "pictures/items/listitem-hide.png"); + }else{ + var pictureId = elements[roomLinked].id + "_ExpandPicture"; + changePicture(pictureId, "pictures/items/space-16px.png"); + } } } else { - if (elements[x + 1] != null && elements[x + 1].getAttribute("name")!=null && elements[x + 1].getAttribute("name").match(searchValue) && elements[x + 1].getAttribute("typeProduct") == "archive") { - elements[x].style.display = display; - elements[x].setAttribute("stateSearch", ""); - var pictureId = elements[x].id + "_ExpandPicture"; - changePicture(pictureId, "pictures/items/listitem-hide.png"); - while (elements[x + 1].getAttribute("typeProduct") == "archive") { - elements[x + 1].className = "archive"; - elements[x + 1].setAttribute("stateSearch", ""); - x++; + //if a archive of the element matches the search + //the room will be displayed and the archive expanded + if (elements[x + 1] != null && elements[x + 1].getAttribute("name")!=null && elements[x + 1].getAttribute("typeProduct") == "archive") { + var archiveMatched=0; + var roomLinked=x; + while (elements[x + 1].getAttribute("typeProduct") == "archive") { + if(elements[x + 1].getAttribute("name").toLowerCase().match(searchValue.toLowerCase())&& elements[x+1].getAttribute("stateStudentView") != "ignore"){ + elements[x + 1].className = "archive"; + elements[x + 1].setAttribute("stateSearch", ""); + archiveMatched++; + } + x++; } + if(archiveMatched>0){ + elements[roomLinked].style.display = display; + elements[roomLinked].setAttribute("stateSearch", ""); + var pictureId = elements[roomLinked].id + "_ExpandPicture"; + changePicture(pictureId, "pictures/items/listitem-hide.png"); + }else{ + elements[roomLinked].style.display = "none"; + elements[roomLinked].setAttribute("stateSearch", "ignore"); + } } else { + //if the archive doesn't match, the archive will be hide if (elements[x].getAttribute("typeProduct") == "archive") { elements[x].className = "archiveHide"; } else { @@ -132,6 +181,7 @@ } gestionDisplay(); } + /* * Function called when the user click on a list elements */ @@ -151,7 +201,7 @@ } } - + //update the current context currentId = id; currentProduct = product; typeSelect = type; @@ -159,29 +209,47 @@ EnabledToolBar(); } } + +/* + * Manage the expand/collapse of the archive list + * + */ function hideArchive(id) { var archiveAvailable=false; var div = document.getElementById("div_" + LC_PRODUCT); + var name = "div_" + LC_PRODUCT; + var nameMore = "div_" + LC_PRODUCT +"_More"; var listRoomsArchives = div.getElementsByTagName("tr"); + var numHide=0; for (var i = 0; i < listRoomsArchives.length; i++) { if (listRoomsArchives[i].getAttribute("typeProduct") == "archive" && listRoomsArchives[i].getAttribute("id").match(id)) { + //test if the current is available : not displayed yet and not ignored by the switched to student view if (listRoomsArchives[i].className == "archiveHide" && listRoomsArchives[i].getAttribute("stateStudentView")!="ignore") { - listRoomsArchives[i].className = "archive"; - + listRoomsArchives[i].className = "archive"; //make this archive visible archiveAvailable=true; } else { listRoomsArchives[i].className = "archiveHide"; + numHide=1+numHide; } } } if(archiveAvailable==true){ changePicture(id + "_ExpandPicture", "pictures/items/listitem-hide.png"); div.style.height=""; - } + document.getElementById(nameMore).innerHTML = "<label class='moreRoom' onclick='RemoveAllDiv(\"" + name + "\",\"" + nameMore + "\",\"" + (listRoomsArchives.length-numHide) + "\")'>Show Top 5...</label>"; + expandState=1; + } else{ changePicture(id + "_ExpandPicture", "pictures/items/listitem-show.png"); - - } + if(expandState!=1) + document.getElementById(nameMore).innerHTML = "<label class='moreRoom' onclick='displayAllDiv(\"" + name + "\",\"" + nameMore + "\",\"" + (listRoomsArchives.length-numHide) + "\")'>"+(listRoomsArchives.length-numHide-5)+" more...</label>"; + else + document.getElementById(nameMore).innerHTML = "<label class='moreRoom' onclick='RemoveAllDiv(\"" + name + "\",\"" + nameMore + "\",\"" + (listRoomsArchives.length-numHide) + "\")'>Show Top 5...</label>"; + } + if (currentId != "") { + document.getElementById(currentId).style.backgroundColor = "white"; + } + currentId = ""; } /* * This function changes the state of the button when the user click on an element @@ -193,9 +261,8 @@ for (var x = 0; x < td.length; x++) { if (td[x].getAttribute("context") == "all" || document.getElementById("view")!=null && document.getElementById("view").value == "normal" || (td[x].getAttribute("context") != "instructor" && document.getElementById("view")!=null && document.getElementById("view").value == "student")) { if (td[x].getAttribute("type") == "button") { - + //test if this button has to be displayed for the current tools selected if (td[x].getAttribute("product") == "all" || td[x].getAttribute("product") == currentProduct) { - td[x].innerHTML = td[x].innerHTML.replace("disabled.png", "enabled.png"); td[x].className = "button_enabled"; } else { @@ -206,8 +273,10 @@ } } } + /* -* This function initializes the toolbar +* This function initializes the toolbar : +* It disables the */ function InitToolBar() { var toolBar = document.getElementById("toolBar"); @@ -223,7 +292,7 @@ } /* * This function manage the studentView : -* Remove the buttons not available for the student and remove the unavaible elements +* Remove the buttons not available for the student and remove the unavailable elements */ function switchView() { var display = "table-row"; @@ -269,17 +338,14 @@ for (var i = 0; i < elements.length; i++) { //show the element not match by search elements[i].setAttribute("stateSearch", ""); - if (elements[i].getAttribute("preview") == "unavailable" && document.getElementById("view").value == "student") { - if (elements[i].getAttribute("typeProduct") == "archive" && elements[i + 1] != null && elements[i + 1].getAttribute("typeProduct") != "archive") { - var pictureId = elements[i - 1].id + "_ExpandPicture"; - changePicture(pictureId, "pictures/items/space-16px.png"); - } else {//room - elements[i].setAttribute("stateStudentView", "ignore"); + // the unavailable elements are not displayed for the student + if (document.getElementById("view").value == "student") { + if(elements[i].getAttribute("preview") == "unavailable"){ + elements[i].setAttribute("stateStudentView", "ignore");//change the status of this element for the search elements[i].style.display = "none"; - var pictureId = elements[i].id + "_ExpandPicture"; - changePicture(pictureId, "pictures/items/listitem-show.png"); - if (elements[i + 1] != null && elements[i + 1].getAttribute("typeProduct") == "archive") { - + if(elements[i + 1] != null && elements[i + 1].getAttribute("typeProduct") == "archive"){//this room contains archives + document.getElementById(elements[linkedRoom].id + "_ExpandPicture").style.visibility="visible"; + changePicture(document.getElementById(elements[linkedRoom].id + "_ExpandPicture"), "pictures/items/listitem-show.png"); while (elements[i + 1].getAttribute("typeProduct") == "archive") { elements[i + 1].className = "archiveHide"; elements[i + 1].setAttribute("stateStudentView", "ignore"); @@ -287,63 +353,64 @@ } } - } - } else { - if ((elements[i].getAttribute("typeProduct") == "orphanedarchivestudent" && document.getElementById("view").value == "student")) { + }else if(elements[i].getAttribute("typeProduct") == "orphanedarchivestudent"){ elements[i].style.display = display; - } else { - if (elements[i].getAttribute("typeProduct") == "orphanedarchivestudent" && document.getElementById("view").value == "normal") { - elements[i].style.display = "none"; - } else { - if (document.getElementById("view").value == "normal") { - elements[i].setAttribute("stateStudentView", ""); - if (elements[i].getAttribute("typeProduct") != "archive") { - var pictureId = elements[i].id + "_ExpandPicture"; - changePicture(pictureId, "pictures/items/listitem-show.png"); - elements[i].style.display = display; - } else { - elements[i].style.display = ""; + }else{ + if(elements[i + 1] != null && elements[i + 1].getAttribute("typeProduct") == "archive"){//this room contains archives + var linkedRoom=i; + var archiveMatched=0; + while (elements[i + 1].getAttribute("typeProduct") == "archive") { + if(elements[i+1].getAttribute("preview") == "unavailable"){ + elements[i + 1].className = "archiveHide"; + elements[i + 1].setAttribute("stateStudentView", "ignore"); + }else{ + archiveMatched++; } - }else{ - if (elements[i + 1] != null && elements[i + 1].getAttribute("typeProduct") == "archive") { - var isArchiveExist=false; - var pictureId = elements[i].id + "_ExpandPicture"; - while (elements[i + 1].getAttribute("typeProduct") == "archive") { - elements[i + 1].className = "archiveHide"; - if(elements[i + 1].getAttribute("preview")=="unavailable") { - - elements[i + 1].setAttribute("stateStudentView", "ignore"); - - }else{ - - isArchiveExist=true; - } - i++; - } - if(isArchiveExist==false){ - - changePicture(pictureId, "pictures/items/space-16px.png"); - }else{ - changePicture(pictureId, "pictures/items/listitem-show.png"); - } - } - } + i++ + } + if(archiveMatched==0){//hide the element which allow the expand/collapse + document.getElementById(elements[linkedRoom].id + "_ExpandPicture").style.visibility="hidden"; + changePicture(document.getElementById(elements[linkedRoom].id + "_ExpandPicture"), "pictures/items/listitem-show.png"); + + } } + } + } else {//normal view + //the available archives linked to a unavailable room are displayed(name orphanedArchiveForStudent) for the student + if (elements[i].getAttribute("typeProduct") == "orphanedarchivestudent" && document.getElementById("view").value == "normal") { + elements[i].style.display = "none"; + } else { + + elements[i].setAttribute("stateStudentView", "");//init the context + if (elements[i].getAttribute("typeProduct") != "archive") { + elements[i].style.display = display; + if(elements[i+1]!=null && elements[i+1].getAttribute("typeProduct") == "archive"){ + document.getElementById(elements[i].id + "_ExpandPicture").style.visibility="visible"; + changePicture(document.getElementById(elements[i].id + "_ExpandPicture"), "pictures/items/listitem-show.png"); + + } + } else { + elements[i].style.display = ""; + } + } } } } gestionDisplay(); } -function getIdParameters(id) { - var tabId = id.split("_"); - //0=type - //1=id - //2=status - return tabId; -} + function activateFilter(product) { var otherProduct = LC_PRODUCT; + if (currentId != "") { + document.getElementById(currentId).style.backgroundColor = "white"; + } + InitToolBar();//the toolbar has to be initialized + currentDiv = product; + currentId = ""; + currentNid = ""; + currentProduct = ""; + isFilter = true; changeFilterStatus(currentFilter, "disabled"); changeFilterStatus("filter_" + product, "enabled"); @@ -351,12 +418,7 @@ if (document.getElementById(currentId) != null) { document.getElementById(currentId).style.background = "white"; } - InitToolBar(); - currentDiv = product; - currentId = ""; - currentNid = ""; - currentProduct = ""; - isFilter = true; + //display only the selected product into the list var list = document.getElementById("list"); var innerList = list.getElementsByTagName("div"); for (var i = 0; i < innerList.length; i++) { @@ -376,6 +438,7 @@ } } } + /* * manage the rollover of the filter */ @@ -396,14 +459,13 @@ document.getElementById(id).className = "filter" + status; } } + function gestionDisplay(product) { var more = "more"; if (navigator.language == "fr") { more = "de plus"; - } - - - //manage the heigth + } + //manage the heigth for the choice panel var productChoice = document.getElementById("productChoice"); if (productChoice != null) { var products = productChoice.getElementsByTagName("tr"); @@ -415,24 +477,43 @@ products[i].className = style; } } + + + if(document.getElementById("collapsePictureliveclassroom")) { + changePicture("collapsePictureliveclassroom", "pictures/items/category-expanded.png"); + document.getElementById("div_liveclassroom").setAttribute("state", "expand"); + } + if(document.getElementById("collapsePictureboard")) { + changePicture("collapsePictureboard", "pictures/items/category-expanded.png"); + document.getElementById("div_board").setAttribute("state", "expand"); + } + if(document.getElementById("collapsePicturepresentation")) { + changePicture("collapsePicturepresentation", "pictures/items/category-expanded.png"); + document.getElementById("div_presentation").setAttribute("state", "expand"); + } + if(document.getElementById("collapsePicturepc")) { + changePicture("collapsePicturepc", "pictures/items/category-expanded.png"); + document.getElementById("div_pc").setAttribute("state", "expand"); + } + + //manage the display of the list var list = document.getElementById('list') if(list!=null){ var products=list.getElementsByTagName("div") for( var i = 0; i < products.length; i++ ) { if(products[i].getAttribute("typeElement")=="productList" && (product==products[i].getAttribute("product") || product==null)){ var divProductMore=document.getElementById('div_'+products[i].getAttribute("typeproduct")+'_More'); - var divProductNoElement=document.getElementById('div_'+products[i].getAttribute("typeproduct")+'_NoElement'); var tr=products[i].getElementsByTagName("tr"); var numElement=0; + //count the number of element available of the current product for(var j=0;j<tr.length;j++){ - if(tr[j].getAttribute("typeProduct")==products[i].getAttribute("typeProduct") || document.getElementById("view")!=null && document.getElementById("view").value == "student" && tr[j].getAttribute("typeProduct")=="orphanedarchivestudent" ) + if(tr[j].getAttribute("typeProduct")==products[i].getAttribute("typeProduct") || document.getElementById("view")!=null && document.getElementById("view").value == "student" && tr[j].getAttribute("typeProduct")=="orphanedarchivestudent" || (products[i].getAttribute("typeProduct") == LC_PRODUCT && tr[j].getAttribute("typeProduct")=="orphanedarchive") ) if(tr[j].getAttribute("stateSearch")!="ignore" && tr[j].getAttribute("stateStudentView")!="ignore") numElement++; } - //4 div per product - + //4 div per product if(numElement > 5 && product==null && products.length>4){ products[i].style.height = 5 * 19 + "px"; divProductMore.style.display = "block"; @@ -441,15 +522,13 @@ divProductNoElement.style.display = "none"; }else if(numElement == 0){ products[i].style.display = "none"; - - divProductNoElement.style.display = "block"; divProductMore.style.display = "none"; }else{ products[i].style.display = "block"; products[i].style.height = ""; divProductMore.style.display = "none"; - divProductNoElement.style.display = "none"; + divProductNoElement.style.display = "none"; } } } @@ -461,22 +540,35 @@ } } + +/* + * Called to display the complete list of element for a product + */ function displayAllDiv(name, nameMore, number) { if (currentId != "") { document.getElementById(currentId).style.backgroundColor = "white"; } currentId = ""; + expandState = 1; document.getElementById(name).style.height = ""; document.getElementById(nameMore).innerHTML = "<label class='moreRoom' onclick='RemoveAllDiv(\"" + name + "\",\"" + nameMore + "\",\"" + number + "\")'>Show Top 5...</label>"; } +/* + * Called to hide the complete list of element and display just 5 elements + */ function RemoveAllDiv(name, nameMore, number) { if (currentId != "") { document.getElementById(currentId).style.backgroundColor = "white"; } currentId = ""; + expandState = 0; document.getElementById(name).style.height = 5 * 19 + "px"; document.getElementById(nameMore).innerHTML = "<label class='moreRoom' onclick='displayAllDiv(\"" + name + "\",\"" + nameMore + "\",\"" + number + "\")'>" + (number - 5) + " more...</label>"; } + +/* + * Called to hide the complete list of elements + */ function collapseGroupElement(product, pictureId) { var divProduct = document.getElementById("div_" + product); var divProductMore = document.getElementById("div_" + product + "_More"); @@ -488,7 +580,11 @@ divProduct.setAttribute("state", "collapse"); } else { divProduct.style.display = "block"; - divProductMore.style.display = "block"; + if(currentFilter == "filter_all") { + divProductMore.style.display = "block"; + } else { + divProductMore.style.display = "none"; + } changePicture(pictureId, "pictures/items/category-expanded.png"); divProduct.setAttribute("state", "expand"); } @@ -504,10 +600,14 @@ } else { if (document.getElementById(id) != null) { document.getElementById(id).src = pictureUrl; - // alert( document.images[id].src); + } } } + +/* + * Filled the session array thanks to the xmlDocument + */ function createSessionByXmlDocument(data) { objDomTree = data.documentElement; @@ -598,8 +698,9 @@ } - -//element function +/* + * Manage the launch of an element switch the context + */ function LaunchElement(url) { if (currentProduct == LC_PRODUCT) { LaunchLiveClassroom(url); @@ -609,6 +710,9 @@ } } } +/* + * Launch the LiveClassroom into a popup + */ function LaunchLiveClassroom(url, params) { var result = true; if (session["role"] == "StudentBis" || (session["role"] == "Instructor" && studentView == true)) { @@ -619,8 +723,12 @@ window.open(complete_url, "lc_popup", "scrollbars=no,resizable=yes,width=700,height=500"); } } +/* + * Launch the VoiceTools into a popup + */ function LaunchVoiceTools(url, params) { var result = true; + //Student view if (session["role"] == "StudentBis" || (session["role"] == "Instructor" && studentView == true)) { result = window.confirm("You are in Student View.\nYou will not have access to instructor features."); } @@ -631,22 +739,23 @@ } -//settings function +/* + * function called when you click on a tab in the settings + */ function onTab(id, additionalfunction) { - if (advancedSettings == true) { + if (advancedSettings == true && document.getElementById("tab" + id).className != "tabDisabled") { advancedSettings = false; currentIdtab = id;... [truncated message content] |
From: <tro...@us...> - 2008-01-09 10:36:40
|
Revision: 199 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=199&view=rev Author: trollinger Date: 2008-01-09 02:36:38 -0800 (Wed, 09 Jan 2008) Log Message: ----------- Delete an old file Removed Paths: ------------- trunk/moodle/mod/liveclassroom/js/Ajax.js Deleted: trunk/moodle/mod/liveclassroom/js/Ajax.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/Ajax.js 2007-08-29 14:32:26 UTC (rev 198) +++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2008-01-09 10:36:38 UTC (rev 199) @@ -1,464 +0,0 @@ -/****************************************************************************** - * * - * Copyright (c) 1999-2007 Wimba, All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Wimba. * - * It cannot be copied, used, or modified without obtaining an * - * authorization from the authors or a mandated member of Wimba. * - * If such an authorization is provided, any modified version * - * or copy of the software has to contain this header. * - * * - * WARRANTIES: * - * This software is made available by the authors in the hope * - * that it will be useful, but without any warranty. * - * Wimba is not liable for any consequence related to * - * the use of the provided software. * - * * - * Class: ajax.js * - * * - * Author: Thomas Rollinger * - * * - * Date: May 2007 * - * * - ******************************************************************************/ - -/* $Id$ */ - -function getURLParametersTab() { - var sURL = window.document.URL; - - var params = new Array(); - if (sURL.indexOf("?") > 0) { - var arrParams = sURL.split("?"); - var arrURLParams = arrParams[1].split("&"); - var i = 0; - for (i = 0; i < arrURLParams.length; i = i + 1) { - var param = arrURLParams[i].split("="); - params[param[0]] = param[1]; - } - } - return params; -} - - -function getURLParameters() { - var sURL = window.document.URL.toString(); - var params = ""; - if (sURL.indexOf("?") > 0) - { - var arrParams = sURL.split("?"); - - var arrURLParams = arrParams[1].split("&"); - - var arrParamNames = new Array(arrURLParams.length); - var arrParamValues = new Array(arrURLParams.length); - - var i = 0; - for (i = 0; i < arrURLParams.length; i ++ ) - { - var sParam = arrURLParams[i]; - arrParamNames[i] = sParam[0]; - if (sParam[1] != "") - params += "&" + unescape(sParam); - - } - params = params.substring(1, params.length) - } - return params; -} -function getSessionParameters() { - var params = new Array(); - params["signature"] = session["signature"]; - params["enc_courseId"] = session["courseId"]; - params["enc_email"] = session["email"]; - params["enc_firstname"] = session["firstName"]; - params["enc_lastname"] = session["lastName"]; - params["enc_role"] = session["role"]; - params["time"] = session["timeOfLoad"]; - if (currentProduct != "") { - params["product"] = currentProduct; - } - if (typeSelect != "") { - params["type"] = typeSelect; - } - if (currentId != "") { - params["id"] = currentId; - } - if (currentIdtab != "") { - params["idtab"] = currentIdtab; - } - if (currentCourseTab != "") { - params["tab"] = currentCourseTab; - } - params["studentView"] = studentView; - - return params; -} - -function getUrlParameters() { - var url = ""; - url += "signature=" + session["signature"]; - url += "&enc_courseId=" + session["courseId"]; - url += "&enc_email=" + session["email"]; - url += "&enc_firstname=" + session["firstName"]; - url += "&enc_lastname=" + session["lastName"]; - url += "&enc_role=" + session["role"]; - url += "&time=" + session["timeOfLoad"]; - if (currentProduct != "") { - url += "&product=" + currentProduct; - } - if (typeSelect != "") { - url += "&type=" + typeSelect; - } - - if (currentId != "") { - url += "&id=" + currentId; - } - - if (currentIdtab != "") { - url += "&idtab=" + currentIdtab; - } - if (currentCourseTab != "") { - url += "&tab = " + currentCourseTab; - } - url += "&studentView=" + studentView; - - return url; -} -function DisplayFirstPage(url, div, action, nextAction) { - if (div == "all") { - showPopup(); - } - if (action != null) { - url += "?action=" + action; - } - - - transform(url,"js/xsl/wimba.xsl","first",div,nextAction) -} - -function launchAjaxRequest(url, action, init, div,createWorkflow) { - //display the loading page - if (div == "all") { - showPopup(); - } - if (lcPopup != null) { - lcPopup.close(); - } - var parameters = ""; - if (action != "") { - url += "?action=" + action; - } - if (createWorkflow != "" && action!="") { - url += "&createWorkflow=" + createWorkflow; - } - isFilter = false; - transform(url,"js/xsl/wimba.xsl","",div) - if (init == true) { - - currentId = ""; - currentIdtab = "Info"; - advancedSettings = false; - } - -} - -/* -* Function used to dispaly the rss feed into the podcaster nugget -*/ -function launchSimpleAjaxRequest(url, action, init, div) { - //display the loading page - var xml; - var parameters = ""; - if (action != "") { - url += "?action=" + action; - } - - var xmlSource; - dojo.io.bind({ - url:url, mimetype:"text/plain", - load:function (type, data, evt) { - if (data.match("error") == "error") { - dom = xmlParse(data); - xmlSource = dom; - if (xslData == null) { //get the stylesheet - dojo.io.bind({ - url:"js/xsl/wimba.xsl", - mimetype:"application/xml", - load:function (type, data, evt) { - xslData = data; - var xml = xsltProcess(xmlSource, xslData); - hidePopup(); - document.getElementById(div).innerHTML = xml; - }, - error:BadResult, - content:null, - method:"POST"}); - } else { - transform(xml, xslData, 'all'); - } - } else { - displayRssFeed(data, div); - } - }, - error:BadResult, - content:getSessionParameters(), - method:"POST"}); -} - -function getRss(url, id, tab) { - if(id!=""){ - document.getElementById("rss").innerHTML = document.getElementById("loadingPopup").innerHTML; - currentId = id; - currentCourseTab = tab; - launchSimpleAjaxRequest(url, "getRss", true, "rss"); - } -} - -function transform(urlXml, stylesheet,TypeParams, div,nextAction) { - - if(window.ActiveXObject){//ie - - if(TypeParams=="first") - params=getURLParameters(); - else - params=getUrlParameters(); - - var sourceDoc = new ActiveXObject("Microsoft.XMLDOM") - sourceDoc.async = false - if(urlXml.substr((urlXml.length-1),urlXml.length)=="?") - sourceDoc.load(urlXml +params) - else if( urlXml.substr((urlXml.length-1),urlXml.length)=="&") - sourceDoc.load(urlXml+params) - else if( urlXml.indexOf("?") == -1) - sourceDoc.load(urlXml+"?"+params) - else - sourceDoc.load(urlXml+"&"+params) - - if (div == "all" && sourceDoc.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { - createSessionByXmlDocument(sourceDoc); - } - - var xslDoc = new ActiveXObject("Microsoft.XMLDOM") - xslDoc.async = false - xslDoc.load("js/xsl/wimba.xsl"); - - xsltTransformation(sourceDoc,xslDoc,div,nextAction); - - }else if (window.XSLTProcessor){//firefox - if(TypeParams=="first") - params=getURLParametersTab(); - else - params=getSessionParameters(); - - dojo.io.bind({url:urlXml, mimetype:"application/xml", load:function (type, data, evt) { - - if (div == "all" && data.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { - createSessionByXmlDocument(data); - } - - xmlSource = data; - //get the stylesheet - dojo.io.bind({ - url:stylesheet, - mimetype:"application/xml", - load:function (type, data, evt) { - //do the xslt transformation - xsltTransformation(xmlSource,data,div,nextAction) - }, - error:BadResult, - content:null, - method:"GET"}); - - }, - error:BadResult, - content:params, - method:"POST"}); - - }else{ - if(TypeParams=="first") - params=getURLParametersTab(); - else - params=getSessionParameters(); - var xmlSource; - dojo.io.bind({url:urlXml, mimetype:"text/plain", load:function (type, data, evt) { - if (div == "all" && data.match("error") != "error") { - createSession(data); - } - dom = xmlParse(data); - xmlSource = dom; - - dojo.io.bind({ - url:"js/xsl/wimba.xsl", - mimetype:"application/xml", - load:function (type, data, evt) { - //do the xslt transformatio - xsltTransformation(xmlSource,xslData,div,nextAction) - - }, - error:BadResult, - content:null, - method:"GET"}); - - - }, - error:BadResult, - content:params, - method:"POST"}); - - } - -} - -function xsltTransformation(xml,xsl,div,nextAction){ - - if(window.ActiveXObject)//ie - { - var result = xml.transformNode(xsl); - - if (div == "all") { - document.getElementById(div).innerHTML = result; - hidePopup(); - gestionDisplay(); - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - document.getElementById(div).innerHTML = result; - document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); - opendDialInformations(); - } - if(nextAction!="") - eval(nextAction); - }else if (window.XSLTProcessor){//firefox - - var processor = new XSLTProcessor(); - processor.importStylesheet(xsl); - document.getElementById(div).innerHTML=""; - var resultDocument = processor.transformToFragment(xml, document); - - if (div == "all") { - hidePopup(); - document.getElementById(div).appendChild(resultDocument); - gestionDisplay(); - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - - document.getElementById(div).appendChild(resultDocument); - document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); - opendDialInformations(); - } - - if(nextAction!="") - eval(nextAction); - - }else{ - - var xml = xsltProcess(xml, xsl); - - //hide the loading page - if (div == "all") { - hidePopup(); - document.getElementById(div).innerHTML = xml; - } - if (div == "dialInfo") {//click on Info Button - document.getElementById(div).style.display = "block"; - xml = xml.replace("myform", "myFormPopup"); - document.getElementById(div).innerHTML = xml; - opendDialInformations(); - } - gestionDisplay(); - if(nextAction!="") - eval(nextAction); - } -} - - -function Management() -{ - -} - - -function BadResult(type, error) { - -} - -function loadSettings(url, action, div) { - launchAjaxRequest(url, action, false, div); -} - -function loadNewSettings(url, action, product, type, div,createWorkflow) { - currentProduct = product; - typeSelect = type; - launchAjaxRequest(url, action, false, div,createWorkflow); -} - -function saveDatabase(url, title, comment) { - var url = url + "?action=updateRecorder&title=" + title + "&comment=" + comment; - var xml; - dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { - if (data == "bad") { - alert("problem to save"); - } - }, error:BadResult,content:getURLParametersTab(), method:"POST"}); - -} - -function showInformation(url, id, product) { - currentId = id; - currentProduct = product; - displayBackground(); - launchAjaxRequest(url, "getDialInformation", "false", "dialInfo"); -} - -function saveSettings(url, id) { - - url = url + "?action=saveSettings&id=" + id; - var returnValue = true; - var xml; - dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { - if (data == "bad") { - alert("problem to save the new Settings"); - returnValue = false; - } - - }, error:BadResult, content:getForm(window.document.myform), method:"POST"}); - return returnValue; -} - -function getForm(obj) { - - var params = getSessionParameters(); - inputForm = obj.getElementsByTagName("input"); - var i=0; - for (i = 0; i < inputForm.length; i++) { - if (inputForm[i].type == "text") { - params[inputForm[i].name] = inputForm[i].value; - } - if (inputForm[i].type == "checkbox") { - if (inputForm[i].checked) { - params[inputForm[i].name] = inputForm[i].value; - } else { - params[inputForm[i].name] = "false"; - } - } - if (inputForm[i].type == "radio") { - if (inputForm[i].checked) { - params[inputForm[i].name] = inputForm[i].value; - } - } - } - inputForm = obj.getElementsByTagName("select"); - for (i = 0; i < inputForm.length; i++) { - var sel = inputForm[i]; - params[sel.name] = sel.options[sel.selectedIndex].value; - } - inputForm = obj.getElementsByTagName("textarea"); - for (i = 0; i < inputForm.length; i++) { - params[inputForm[i].name] = inputForm[i].value; - } - return params; -} - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2007-08-29 14:32:27
|
Revision: 198 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=198&view=rev Author: trollinger Date: 2007-08-29 07:32:26 -0700 (Wed, 29 Aug 2007) Log Message: ----------- taqg moodle 3.1.1 Added Paths: ----------- tags/moodle3_1_1/ Copied: tags/moodle3_1_1 (from rev 197, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2007-08-29 14:30:40
|
Revision: 197 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=197&view=rev Author: trollinger Date: 2007-08-29 07:30:36 -0700 (Wed, 29 Aug 2007) Log Message: ----------- update source after release 3.1.1 Modified Paths: -------------- trunk/moodle/mod/liveclassroom/config.html trunk/moodle/mod/liveclassroom/css/StyleSheet.css trunk/moodle/mod/liveclassroom/doAction.php trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/js/hwCommons.js trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/fr/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/fr_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/liveclassroom/welcome.php trunk/moodle/mod/voicetools/config.html trunk/moodle/mod/voicetools/css/StyleSheet.css trunk/moodle/mod/voicetools/getXmlChoicePage.php trunk/moodle/mod/voicetools/getXmlListPanel.php trunk/moodle/mod/voicetools/getXmlNewPanel.php trunk/moodle/mod/voicetools/index.php trunk/moodle/mod/voicetools/js/ajax.js trunk/moodle/mod/voicetools/js/hwCommons.js trunk/moodle/mod/voicetools/lang/en_utf8/voicetools.php trunk/moodle/mod/voicetools/lang/fr/voicetools.php trunk/moodle/mod/voicetools/lang/fr_utf8/voicetools.php trunk/moodle/mod/voicetools/lib.php trunk/moodle/mod/voicetools/manageAction.php trunk/moodle/mod/voicetools/mod.html trunk/moodle/mod/voicetools/view.php trunk/moodle/mod/voicetools/voicerecorder.php trunk/moodle/mod/voicetools/welcome.php Added Paths: ----------- trunk/moodle/mod/liveclassroom/js/ajax.js Modified: trunk/moodle/mod/liveclassroom/config.html =================================================================== --- trunk/moodle/mod/liveclassroom/config.html 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/config.html 2007-08-29 14:30:36 UTC (rev 197) @@ -1,10 +1,4 @@ -<form method="post" action="module.php" name="form"> -<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> -<input type="hidden" name="module" value="liveclassroom"> - - <?php - require_once("lib/lc/LCAction.php"); require_once("lib/lc/lcapi.php"); $lcApi=new LCApi($CFG->liveclassroom_servername, @@ -12,59 +6,115 @@ $CFG->liveclassroom_adminpassword, $CFG->dataroot); $config = $lcApi->lcapi_get_status(); - ?> - -<table cellpadding="9" cellspacing="0" > - -<tr valign="top"> - <td align="right"><?php print_string('servername', 'liveclassroom')?> :</td> - <td> - <input name="servername" type="text" size="30" value="<?php p($CFG->liveclassroom_servername) ?>" /> - </td> - <td> - <?php print_string("configservername", "liveclassroom") ?> - </td> -</tr> -<tr valign="top"> - <td align="right"><?php print_string('adminusername', 'liveclassroom')?> :</td> - <td> - <input name="adminusername" type="text" size="30" value="<?php p($CFG->liveclassroom_adminusername) ?>" /> - </td> - <td> - <?php print_string("configadminusername", "liveclassroom") ?> - </td> -</tr> -<tr valign="top"> - <td align="right"><?php print_string('adminpassword', 'liveclassroom')?> :</td> - <td> - <input name="adminpassword" type="text" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" /> - </td> - <td> - <?php print_string("configadminpassword", "liveclassroom") ?> - </td> -</tr> -<tr> -<td><br /></td> -</tr> - - -<tr valign="top"> - <td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td> - <td> - <?php echo $config["horizon_version"]; ?> - </td> -</tr> -<tr valign="top"> - <td align="right"><?php print_string('integrationversion', 'liveclassroom')?> :</td> - <td> - <?php echo LIVECLASSROOM_MODULE_VERSION ?> - </td> -</tr> -<tr> - <td colspan="3" align="center"> - <input type="submit" value="<?php print_string("savechanges") ?>" /></td> -</tr> -</table> - +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> + <title>Voice Tools Server Configuration </title> + +</head> +<style> + .label_settings +{ + font-family: Verdana, Arial, Helvetica, sans-serif; +font-size:12px; + text-align:right; +} + .comment +{ + font-family: Verdana, Arial, Helvetica, sans-serif; +font-size:10px; + text-align:right; +} +.page_title +{ +font-family: Verdana, Arial, Helvetica, sans-serif; +font-size:18px; +font-weight:bold; +color:#3c4b5b; +vertical-align: middle; +} +</style> +<body> +<form method="post" action="module.php" name="form"> +<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> +<input type="hidden" name="module" value="liveclassroom"> + <table cellpadding="9" cellspacing="0" width="800px"> + <tr> + <td width="2%"> + <img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/liveclassroom.png" border="0" /> + </td> + <td align="left" class="page_title"> + <?php print_string('serverconfiguration', 'liveclassroom')?> + </td> + </tr> + <tr> + <td height=15px></td> + </tr> + <tr> + <td align="center" colspan=2> + <table width="90%" bgcolor="#F1EEF1" cellspacing="3" cellpadding="6" style="border:1px solid #78879A "> + <tr valign="top"> + <td style="width: 35%" align="right"> + <label class="label_settings"><?php print_string('servername', 'liveclassroom')?> :</label> + </td> + <td> + <input name="servername" type="text" size="30" value="<?php p($CFG->liveclassroom_servername) ?>" /> + </td> + </tr> + <tr> + <td></td> + <td> + <label class="comment"><?php print_string('configservername', 'liveclassroom') ?></label> + </td> + </tr> + <tr> + <tr valign="top"> + <td style="width: 35%" align="right"> + <label class="label_settings"><?php print_string('adminusername', 'liveclassroom')?> :</label> + </td> + <td> + <input name="adminusername" type="text" size="30" value="<?php p($CFG->liveclassroom_adminusername) ?>" /> + </td> + </tr> + <tr valign="top"> + <td style="width: 35%" align="right"> + <label class="label_settings"><?php print_string('adminpassword', 'liveclassroom')?> :</label> + </td> + <td> + <input name="adminpassword" type="text" size="30" value="<?php p($CFG->liveclassroom_adminpassword) ?>" /> + </td> + + </tr> + </table> + </td> + </tr> + <tr> + <td align="center" colspan=2> + <table width="90%" bgcolor="#F1EEF1" cellspacing="3" cellpadding="6" style="border:1px solid #78879A "> + <tr valign="top"> + <td style="width: 35%" align="right"> + <label class="label_settings"><?php print_string('lcversion', 'liveclassroom')?> :</label> + </td> + <td> + <?php echo $config["horizon_version"]; ?> + </td> + </tr> + <tr valign="top"> + <td style="width: 35%" align="right"> + <label class="label_settings"><?php print_string('integrationversion', 'liveclassroom')?> :</label> + </td> + <td> + <?php echo LIVECLASSROOM_MODULE_VERSION ?> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="3" align="center"> + <input type="submit" value="<?php print_string("savechanges") ?>" /> + </td> + </tr> + </table> </form> Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css =================================================================== --- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-08-29 14:30:36 UTC (rev 197) @@ -51,6 +51,12 @@ font-size:11px; vertical-align:top; } +* html label +{ + font-family:Verdana, Arial, Helvetica, sans-serif; + font-size:11px; + vertical-align:baseline; +} label.labelEnabled { @@ -74,7 +80,11 @@ { font-style:italic; } - +.topLabel +{ + vertical-align:top; + +} .top { vertical-align:top; Modified: trunk/moodle/mod/liveclassroom/doAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/doAction.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/doAction.php 2007-08-29 14:30:36 UTC (rev 197) @@ -1,4 +1,5 @@ <?php + /****************************************************************************** * * * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * @@ -26,20 +27,20 @@ * * ******************************************************************************/ -/* $Id: doAction.php 51417 2007-07-17 15:06:10Z thomasr $ */ +/* $Id: doAction.php 52708 2007-08-20 19:53:23Z thomasr $ */ /* This page manage the action create, update, delete for a room */ -require_once("../../config.php"); -require_once("lib.php"); -require_once("lib/lc/LCAction.php"); -require_once("lib/common/WimbaCommons.php"); -require_once("lib/common/WimbaUI.php"); -require_once("lib/common/XmlRoom.php"); -require_once("lib/common/WimbaXml.php"); -if (version_compare(PHP_VERSION,'5','>=')) { - require_once('lib/common/domxml-php4-php5.php'); +error_reporting(E_ERROR); +require_once ("../../config.php"); +require_once ("lib.php"); +require_once ("lib/lc/LCAction.php"); +require_once ("lib/common/WimbaCommons.php"); +require_once ("lib/common/WimbaUI.php"); +require_once ("lib/common/XmlRoom.php"); +require_once ("lib/common/WimbaXml.php"); +if (version_compare(PHP_VERSION, '5', '>=')) { + require_once ('lib/common/domxml-php4-php5.php'); } - $courseid = optional_param('enc_course_id', 0, PARAM_INT); $action = required_param('action', PARAM_ALPHA); @@ -54,118 +55,110 @@ $list_attributes[$key] = $val; } - $session = new WimbaMoodleSession($list_attributes, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); $xml = new WimbaXml(); if ($session->error == false && $session != NULL) { $api = new LCAction($session, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); - $prefix=$api->getPrefix(); - + $prefix = $api->getPrefix(); + switch ($action) { case "launch" : $roomId = required_param('id', PARAM_SAFEDIR); if ($list_attributes["studentView"] == "true") { - $authToken = $api->getAuthokenNormal($session->getCourseId()."_S", $session->getFirstname() , $session->getLastname()); - }else{ + $authToken = $api->getAuthokenNormal($session->getCourseId() . "_S", $session->getFirstname(), $session->getLastname()); + } else { $authToken = $api->getAuthoken(); } header('Location:' . $CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?channel=' . $roomId . '&hzA=' . $authToken); exit; break; case "create" : - $id = $api->createRoom($session->getCourseId().rand(), "false"); + $id = $api->createRoom($session->getCourseId() . rand(), "false"); $messageAction = "created"; - $messageProduct = "room"; + $messageProduct = "room"; break; - case "update" : - $roomId = required_param('id', PARAM_SAFEDIR); + case "update" : + $roomId = required_param('id', PARAM_SAFEDIR); $id = $api->createRoom($roomId, "true"); $messageAction = "updated"; - $messageProduct = "room"; + $messageProduct = "room"; break; case "delete" : - if($api->getPrefix()!="") - $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + if ($api->getPrefix() != "") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR), $api->getPrefix()); else $roomId = required_param('id', PARAM_SAFEDIR); - + $id = $api->deleteRoom($roomId); //delte the activity linked to this room - if (! liveclassroom_delete_all_instance_of_room($roomId)) { - notify("Could not delete the activities for the room: $roomId"); + if (!liveclassroom_delete_all_instance_of_room($roomId)) { + notify("Could not delete the activities for the room: $roomId"); } $messageAction = "deleted"; - $messageProduct = "room"; + $messageProduct = "room"; break; case "openContent" : $roomId = required_param('id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); - header('Location:' . $CFG->liveclassroom_servername . '/admin/class/carousels.epl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); - exit(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/carousels.epl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1'); + exit (); break; case "openReport" : $roomId = required_param('id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); header('Location:reports.php?id=' . $roomId . '&hzA=' . $authToken); - exit(); + exit (); break; case "openAdvancedMedia" : $roomId = required_param('id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); - header('Location:' . $CFG->liveclassroom_servername . '/admin/class/media.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); - exit(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/media.pl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1'); + exit (); break; case "openAdvancedRoom" : $roomId = required_param('id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); - header('Location:' . $CFG->liveclassroom_servername . '/admin/class/properties.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); - exit(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/properties.pl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1'); + exit (); break; - case "getDialInformation" : - $roomId = required_param('id', PARAM_SAFEDIR); - $select_room = $api->getRoom($roomId); - - - if ($list_attributes["studentView"] == "true" || $session->isInstructor() == false) - $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), null, $select_room->getParticipantPin(), $api->getPhoneNumbers()); - else - $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), $select_room->getPresenterPin(), $select_room->getParticipantPin(), $api->getPhoneNumbers()); - echo $xml->getXml(); - break; - case "saveSettings": - if($api->getPrefix()!="") - $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + case "getDialInformation" : + $roomId = required_param('id', PARAM_SAFEDIR); + $select_room = $api->getRoom($roomId); + + if ($list_attributes["studentView"] == "true" || $session->isInstructor() == false) + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), null, $select_room->getParticipantPin(), $api->getPhoneNumbers()); else + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), $select_room->getPresenterPin(), $select_room->getParticipantPin(), $api->getPhoneNumbers()); + echo $xml->getXml(); + break; + case "saveSettings" : + if ($api->getPrefix() != "") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR), $api->getPrefix()); + else $roomId = required_param('id', PARAM_SAFEDIR); $id = $api->createRoom($roomId, "true"); - break; + break; } - - if ($action == "saveSettings") - { - echo "good"; - exit(); - } - + if ($action == "saveSettings") { + echo "good"; + exit (); + } + if (isset ($list_attributes["createWorkflow"]) && $list_attributes["createWorkflow"] == "true") { - -?> + ?> <script> - parent.location.href="<?php echo $CFG->wwwroot . '/course/mod.php?section=0&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom&roomId=' . $id ?>" + parent.location.href="<?php echo $CFG->wwwroot . '/course/mod.php?section=0&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom&roomId=' . $api->getPrefix().$id ?>" </script> <? - } - else{ - - - header('Location: welcome.php?id=' .$session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction. '&messageProduct=' . $messageProduct); - } -} -else { + } else if ($action != "getDialInformation") { + + header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction . '&messageProduct=' . $messageProduct); + } +} else { header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session'); } ?> \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-08-29 14:30:36 UTC (rev 197) @@ -31,8 +31,7 @@ /// This page is to generate the list of rooms and archives - - +error_reporting(E_ERROR); require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-08-29 14:30:36 UTC (rev 197) @@ -28,6 +28,7 @@ /* $Id$ */ /// This page is to generate the settings of a room or archive +error_reporting(E_ERROR); require_once("../../config.php"); require_once("lib.php"); require_once("lib/lc/LCAction.php"); @@ -100,6 +101,7 @@ else if($session->error=="signature") $display=$uiManager->setError(get_string ('error_signature', 'liveclassroon')); } + echo $display; Modified: trunk/moodle/mod/liveclassroom/index.php =================================================================== --- trunk/moodle/mod/liveclassroom/index.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/index.php 2007-08-29 14:30:36 UTC (rev 197) @@ -47,23 +47,29 @@ require_login($course->id); - - -/// Get all required strings - $strliveclassrooms = get_string("modulenameplural", "liveclassroom"); $strliveclassroom = get_string("modulename", "liveclassroom"); +$strname = $voicetool->name; + +$navigation = array(); + if ($course->id != SITEID) { + $navigation[$course->shortname] = "$CFG->wwwroot/course/view.php?id=$course->id"; +} +$navigation[$strliveclassrooms] = ""; - -/// Print the header - -if ($course->category) { - $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; +$urls = array(); +foreach($navigation as $text => $href) { + if (empty($href)) { + $urls[] = $text; + } else { + $urls[] = '<a href="'.$href.'">'.$text.'</a>'; + } } +$breadcrumb = implode(' -> ', $urls); -print_header("$course->shortname: $strliveclassrooms", "$course->fullname", - "$navigation $strliveclassrooms", "", "", true, "", navmenu($course)); - +print_header("$course->shortname", "$course->fullname", +"$breadcrumb", +"", "", true, "",""); /// Get all the appropriate data $url =get_url_params($course->id); Added: trunk/moodle/mod/liveclassroom/js/ajax.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/ajax.js (rev 0) +++ trunk/moodle/mod/liveclassroom/js/ajax.js 2007-08-29 14:30:36 UTC (rev 197) @@ -0,0 +1,476 @@ +/****************************************************************************** + * * + * Copyright (c) 1999-2007 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Wimba. * + * It cannot be copied, used, or modified without obtaining an * + * authorization from the authors or a mandated member of Wimba. * + * If such an authorization is provided, any modified version * + * or copy of the software has to contain this header. * + * * + * WARRANTIES: * + * This software is made available by the authors in the hope * + * that it will be useful, but without any warranty. * + * Wimba is not liable for any consequence related to * + * the use of the provided software. * + * * + * Class: ajax.js * + * * + * Author: Thomas Rollinger * + * * + * Date: May 2007 * + * * + ******************************************************************************/ + +/* $Id$ */ + +function getURLParametersTab() { + var sURL = window.document.URL; + + var params = new Array(); + if (sURL.indexOf("?") > 0) { + var arrParams = sURL.split("?"); + var arrURLParams = arrParams[1].split("&"); + var i = 0; + for (i = 0; i < arrURLParams.length; i = i + 1) { + var param = arrURLParams[i].split("="); + params[param[0]] = param[1]; + } + } + return params; +} + + +function getURLParameters() { + var sURL = window.document.URL.toString(); + var params = ""; + if (sURL.indexOf("?") > 0) + { + var arrParams = sURL.split("?"); + + var arrURLParams = arrParams[1].split("&"); + + var arrParamNames = new Array(arrURLParams.length); + var arrParamValues = new Array(arrURLParams.length); + + var i = 0; + for (i = 0; i < arrURLParams.length; i ++ ) + { + var sParam = arrURLParams[i]; + arrParamNames[i] = sParam[0]; + if (sParam[1] != "") + params += "&" + unescape(sParam); + + } + params = params.substring(1, params.length) + } + return params; +} +function getSessionParameters() { + var params = new Array(); + params["signature"] = session["signature"]; + params["enc_courseId"] = session["courseId"]; + params["enc_email"] = session["email"]; + params["enc_firstname"] = session["firstName"]; + params["enc_lastname"] = session["lastName"]; + params["enc_role"] = session["role"]; + params["time"] = session["timeOfLoad"]; + if (currentProduct != "") { + params["product"] = currentProduct; + } + if (typeSelect != "") { + params["type"] = typeSelect; + } + if (currentId != "") { + params["id"] = currentId; + } + if (currentIdtab != "") { + params["idtab"] = currentIdtab; + } + if (currentCourseTab != "") { + params["tab"] = currentCourseTab; + } + params["studentView"] = studentView; + + return params; +} + +function getUrlParameters() { + var url = ""; + url += "signature=" + session["signature"]; + url += "&enc_courseId=" + session["courseId"]; + url += "&enc_email=" + session["email"]; + url += "&enc_firstname=" + session["firstName"]; + url += "&enc_lastname=" + session["lastName"]; + url += "&enc_role=" + session["role"]; + url += "&time=" + session["timeOfLoad"]; + if (currentProduct != "") { + url += "&product=" + currentProduct; + } + if (typeSelect != "") { + url += "&type=" + typeSelect; + } + + if (currentId != "") { + url += "&id=" + currentId; + } + + if (currentIdtab != "") { + url += "&idtab=" + currentIdtab; + } + if (currentCourseTab != "") { + url += "&tab = " + currentCourseTab; + } + url += "&studentView=" + studentView; + + return url; +} +function DisplayFirstPage(url, div, action, nextAction) { + if (div == "all") { + showPopup(); + } + if (action != null) { + url += "?action=" + action; + } + + + transform(url,"js/xsl/wimba.xsl","first",div,nextAction) +} + +function launchAjaxRequest(url, action, init, div,createWorkflow) { + //display the loading page + if (div == "all") { + showPopup(); + } + if (lcPopup != null) { + lcPopup.close(); + } + var parameters = ""; + if (action != "") { + url += "?action=" + action; + } + if (createWorkflow != "" && action!="") { + url += "&createWorkflow=" + createWorkflow; + } + isFilter = false; + transform(url,"js/xsl/wimba.xsl","",div) + if (init == true) { + + currentId = ""; + currentIdtab = "Info"; + advancedSettings = false; + } + +} + +/* +* Function used to dispaly the rss feed into the podcaster nugget +*/ +function launchSimpleAjaxRequest(url, action, init, div) { + //display the loading page + var xml; + var parameters = ""; + if (action != "") { + url += "?action=" + action; + } + + var xmlSource; + dojo.io.bind({ + url:url, mimetype:"text/plain", + load:function (type, data, evt) { + if (data.match("error") == "error") { + dom = xmlParse(data); + xmlSource = dom; + if (xslData == null) { //get the stylesheet + dojo.io.bind({ + url:"js/xsl/wimba.xsl", + mimetype:"application/xml", + load:function (type, data, evt) { + xslData = data; + var xml = xsltProcess(xmlSource, xslData); + hidePopup(); + document.getElementById(div).innerHTML = xml; + }, + error:BadResult, + content:null, + method:"POST"}); + } else { + transform(xml, xslData, 'all'); + } + } else { + displayRssFeed(data, div); + } + }, + error:BadResult, + content:getSessionParameters(), + method:"POST"}); +} + +function getRss(url, id, tab) { + if(id!=""){ + document.getElementById("rss").innerHTML = document.getElementById("loadingPopup").innerHTML; + currentId = id; + currentCourseTab = tab; + launchSimpleAjaxRequest(url, "getRss", true, "rss"); + } +} + +function transform(urlXml, stylesheet,TypeParams, div,nextAction) { + + if(window.ActiveXObject){//ie + + if(TypeParams=="first") + params=getURLParameters(); + else + params=getUrlParameters(); + + var sourceDoc = new ActiveXObject("Microsoft.XMLDOM") + sourceDoc.async = false + if(urlXml.substr((urlXml.length-1),urlXml.length)=="?") + sourceDoc.load(urlXml +params) + else if( urlXml.substr((urlXml.length-1),urlXml.length)=="&") + sourceDoc.load(urlXml+params) + else if( urlXml.indexOf("?") == -1) + sourceDoc.load(urlXml+"?"+params) + else + sourceDoc.load(urlXml+"&"+params) + + if (div == "all" && sourceDoc.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { + createSessionByXmlDocument(sourceDoc); + } + + var xslDoc = new ActiveXObject("Microsoft.XMLDOM") + xslDoc.async = false + xslDoc.load("js/xsl/wimba.xsl"); + + xsltTransformation(sourceDoc,xslDoc,div,nextAction); + + }else if (window.XSLTProcessor){//firefox + if(TypeParams=="first") + params=getURLParametersTab(); + else + params=getSessionParameters(); + + dojo.io.bind({url:urlXml, mimetype:"application/xml", load:function (type, data, evt) { + + if (div == "all" && data.documentElement.getElementsByTagName("type")[0].childNodes[0].nodeValue!="error") { + createSessionByXmlDocument(data); + } + + xmlSource = data; + //get the stylesheet + dojo.io.bind({ + url:stylesheet, + mimetype:"application/xml", + load:function (type, data, evt) { + //do the xslt transformatio + xsltTransformation(xmlSource,data,div,nextAction) + + }, + error:BadResult, + content:null, + method:"GET"}); + + }, + error:BadResult, + content:params, + method:"POST"}); + + }else{ + if(TypeParams=="first") + params=getURLParametersTab(); + else + params=getSessionParameters(); + var xmlSource; + dojo.io.bind({url:urlXml, mimetype:"text/plain", load:function (type, data, evt) { + if (div == "all" && data.match("error") != "error") { + createSession(data); + } + dom = xmlParse(data); + xmlSource = dom; + + dojo.io.bind({ + url:"js/xsl/wimba.xsl", + mimetype:"application/xml", + load:function (type, data, evt) { + //do the xslt transformatio + xsltTransformation(xmlSource,xslData,div,nextAction) + + }, + error:BadResult, + content:null, + method:"GET"}); + + + }, + error:BadResult, + content:params, + method:"POST"}); + + } + +} + +function xsltTransformation(xml,xsl,div,nextAction){ + + if(window.ActiveXObject)//ie + { + var result = xml.transformNode(xsl); + + if (div == "all") { + document.getElementById(div).innerHTML = result; + hidePopup(); + gestionDisplay(); + var text=new String(document.getElementById("all").innerHTML); + + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + document.getElementById(div).innerHTML = result; + document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); + opendDialInformations(); + } + if(nextAction!="") + eval(nextAction); + }else if (window.XSLTProcessor){//firefox + + var processor = new XSLTProcessor(); + processor.importStylesheet(xsl); + document.getElementById(div).innerHTML=""; + var resultDocument = processor.transformToFragment(xml, document); + + if (div == "all") { + hidePopup(); + document.getElementById(div).appendChild(resultDocument); + gestionDisplay(); + + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + + document.getElementById(div).appendChild(resultDocument); + document.getElementById(div).innerHTML = document.getElementById(div).innerHTML.replace("myform", "myFormPopup"); + opendDialInformations(); + } + + if(nextAction!="") + eval(nextAction); + + }else{ + + var xml = xsltProcess(xml, xsl); + + //hide the loading page + if (div == "all") { + hidePopup(); + document.getElementById(div).innerHTML = xml; + } + if (div == "dialInfo") {//click on Info Button + document.getElementById(div).style.display = "block"; + xml = xml.replace("myform", "myFormPopup"); + document.getElementById(div).innerHTML = xml; + opendDialInformations(); + } + gestionDisplay(); + if(nextAction!="") + eval(nextAction); + } + //manage the display of the accent + var content=new String(document.getElementById("all").innerHTML); + content=content.replace(/&/g,"&"); + document.getElementById("all").innerHTML=content; + var content=new String(document.getElementById("popupDial").innerHTML); + content=content.replace(/&/g,"&"); + document.getElementById("popupDial").innerHTML=content; + +} + + +function Management() +{ + +} + + +function BadResult(type, error) { + +} + +function loadSettings(url, action, div) { + launchAjaxRequest(url, action, false, div); +} + +function loadNewSettings(url, action, product, type, div,createWorkflow) { + currentProduct = product; + typeSelect = type; + launchAjaxRequest(url, action, false, div,createWorkflow); +} + +function saveDatabase(url, title, comment) { + var url = url + "?action=updateRecorder&title=" + title + "&comment=" + comment; + var xml; + dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { + if (data == "bad") { + alert("problem to save"); + } + }, error:BadResult,content:getURLParametersTab(), method:"POST"}); + +} + +function showInformation(url, id, product) { + currentId = id; + currentProduct = product; + displayBackground(); + launchAjaxRequest(url, "getDialInformation", "false", "dialInfo"); +} + +function saveSettings(url, id) { + + url = url + "?action=saveSettings&id=" + id; + var returnValue = true; + var xml; + dojo.io.bind({url:url, mimetype:"text/plain", load:function (type, data, evt) { + if (data == "bad") { + alert("problem to save the new Settings"); + returnValue = false; + } + + }, error:BadResult, content:getForm(window.document.myform), method:"POST"}); + return returnValue; +} + +function getForm(obj) { + + var params = getSessionParameters(); + inputForm = obj.getElementsByTagName("input"); + var i=0; + for (i = 0; i < inputForm.length; i++) { + if (inputForm[i].type == "text") { + params[inputForm[i].name] = inputForm[i].value; + } + if (inputForm[i].type == "checkbox") { + if (inputForm[i].checked) { + params[inputForm[i].name] = inputForm[i].value; + } else { + params[inputForm[i].name] = "false"; + } + } + if (inputForm[i].type == "radio") { + if (inputForm[i].checked) { + params[inputForm[i].name] = inputForm[i].value; + } + } + } + inputForm = obj.getElementsByTagName("select"); + for (i = 0; i < inputForm.length; i++) { + var sel = inputForm[i]; + params[sel.name] = sel.options[sel.selectedIndex].value; + } + inputForm = obj.getElementsByTagName("textarea"); + for (i = 0; i < inputForm.length; i++) { + params[inputForm[i].name] = inputForm[i].value; + } + return params; +} + Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2007-08-29 14:30:36 UTC (rev 197) @@ -455,9 +455,11 @@ } } + if (isIE6()) { correctPNG(); } + } function displayAllDiv(name, nameMore, number) { if (currentId != "") { Modified: trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php =================================================================== --- trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php 2007-08-29 14:30:36 UTC (rev 197) @@ -25,7 +25,7 @@ * Date: 15th April 2006 * * * ******************************************************************************/ -/* $Id: liveclassroom.php 51230 2007-07-11 20:25:34Z thomasr $ */ +/* $Id: liveclassroom.php 51390 2007-07-16 21:10:08Z thomasr $ */ // Configuration $string['modulename'] = 'Live Classroom'; $string['modulenameplural'] = 'Live Classrooms'; @@ -82,6 +82,9 @@ $string["activity_tools_not_available"]="The Live Classroom linked to this activity is currently unavailable.<br>Please contact your instructor"; $string["activity_no_associated_tools"]="There are no Live Classroom associated with this course.<br> Click Ok to create one."; $string["activity_welcome_to_wimba"]="Welcome to Live Classroom!"; +$string['or'] = "or"; +$string['visibletostudents'] = "Visible to students:"; +$string['in'] = "in"; $string['new'] = 'New'; $string['content'] = 'Content'; @@ -203,7 +206,7 @@ $string['error_session'] = "The session has timed out due to inactivity. Please reload the page to reconnect."; $string['error_signature'] = "Invalid connection. Please contact your administrator for more information."; $string['error_board'] = "Invalid Voice Board parameters. Please contact your administrator for more information."; -$string['error_connection_vt'] = "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information."; +$string['error_connection_lc'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information."; $string['error_bdvt'] = "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information."; $string['error_roomNotFound'] = "The room has been deleted and is no longer available.\nPlease contact your instructor for more information"; $string['error_boardNotFound'] = "The ressource has been deleted and is no longer available.\nPlease contact your instructor for more information"; @@ -263,6 +266,7 @@ $string['settings_video_bandwidth_large'] = "Fast - most users have a T1/LAN connection "; $string['settings_video_bandwidth_medium'] = "Medium - most users have a DSL/cable modem"; $string['settings_video_bandwidth_small'] = "Slow - most users have a dial-up modem "; +$string['settings_video_bandwidth_custom'] = "Custom - for advanced video users"; $string['tab_tite_roomInfo'] = "Room Info"; $string['tab_title_chat'] = "Chat"; $string['tab_title_media'] = "Media"; @@ -397,4 +401,6 @@ $string['settings_advanced_comment_2'] = "You must click the 'Save' button in the new window to save your changes."; $string['settings_advanced_media_settings_button'] = "Advanced Media Settings..."; $string['settings_advanced_room_settings_button'] = "Advanced Room Settings..."; + +$string["activity_tools_not_available"]="The Live Classroom linked to this activity is currently unavailable.<br>Please contact your instructor"; ?> Modified: trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php 2007-08-29 14:30:36 UTC (rev 197) @@ -25,7 +25,7 @@ * Date: 15th April 2006 * * * ******************************************************************************/ -/* $Id: liveclassroom.php 51390 2007-07-16 21:10:08Z thomasr $ */ +/* $Id: liveclassroom.php 52898 2007-08-27 15:57:21Z thomasr $ */ // Configuration $string['modulename'] = 'Live Classroom'; $string['modulenameplural'] = 'Live Classrooms'; @@ -82,6 +82,9 @@ $string["activity_tools_not_available"]="The Live Classroom linked to this activity is currently unavailable.<br>Please contact your instructor"; $string["activity_no_associated_tools"]="There are no Live Classroom associated with this course.<br> Click Ok to create one."; $string["activity_welcome_to_wimba"]="Welcome to Live Classroom!"; +$string['or'] = "or"; +$string['visibletostudents'] = "Visible to students:"; +$string['in'] = "in"; $string['new'] = 'New'; $string['content'] = 'Content'; @@ -263,6 +266,7 @@ $string['settings_video_bandwidth_large'] = "Fast - most users have a T1/LAN connection "; $string['settings_video_bandwidth_medium'] = "Medium - most users have a DSL/cable modem"; $string['settings_video_bandwidth_small'] = "Slow - most users have a dial-up modem "; +$string['settings_video_bandwidth_custom'] = "Custom - for advanced video users"; $string['tab_tite_roomInfo'] = "Room Info"; $string['tab_title_chat'] = "Chat"; $string['tab_title_media'] = "Media"; Modified: trunk/moodle/mod/liveclassroom/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/mod/liveclassroom/lang/fr/liveclassroom.php 2007-08-01 14:36:16 UTC (rev 196) +++ trunk/moodle/mod/liveclassroom/lang/fr/liveclassroom.php 2007-08-29 14:30:36 UTC (rev 197) @@ -25,17 +25,14 @@ * Date: 15th April 2006 * * * ******************************************************************************/ - -/* $Id: liveclassroom.php 17 2006-05-25 21:50:08Z mgimpel $ */ - -//------ +/* $Id: liveclassroom.php 51390 2007-07-16 21:10:08Z thomasr $ */ // Configuration $string['modulename'] = 'Live Classroom'; $string['modulenameplural'] = 'Live Classrooms'; $string['serverconfiguration'] = 'Configuration du Serveur Live Classroom'; $string['explainserverconfiguration'] = 'Voici la configuration du serveur Live Classroom.'; $string['servername'] = 'URL du Serveur'; -$string['configservername'] = 'Entrez le nom du serveur sous la forme http://AAA.BBB.CCC.DDD'; +$string['configservername'] = 'Exemple: http:///myschool.wimba.com'; $string['adminusername'] = 'Nom d\'Utilisateur Administrateur'; $string['configadminusername'] = 'Entrez le nom d\'utilisateur de l\'administrateur'; $string['adminpassword'] = 'Mot de Passe Administrateur'; @@ -46,8 +43,7 @@ $string['integrationversion'] = 'Version du module d\'Integration'; $string['emptyAdminUsername'] = 'Nom d\'Utilisateur Administrateur vide'; $string['emptyAdminPassword'] = 'Mot de Passe Administrateur vide'; -$string['unlimited'] = 'Unlimited'; - +$string['unlimited'] = 'Unlimited'; $string['wrongconfigurationURLunavailable'] = 'Configuration incorrecte, l\'URL n\'est pas disponible. Plus d\'information est disponible dans les journaux d\'erreurs'; $string['wrongconfigurationURLincorrect'] = 'Configuration incorrecte, l\'URL est incorrecte. Plus d\'information est disponible dans les journaux d\'erreurs'; $string['wrongAdminPassword'] = 'Mot de Passe incorrect'; @@ -61,100 +57,36 @@ $string['weeksformat'] = 'Semaine de l\'activité'; $string['required_fields'] = 'Champs nécessaires'; $string['topicdisplay'] = 'Sujet'; -$string['firstsection'] = 'Section 0'; +$string['firstsection'] = 'Section 0'; +//Add activity form +$string["activity_name"]="Nom de l'activité:"; +$string["duration_calendar"]="Durée:"; +$string['name'] = "Nom de l'activité:"; +$string['liveclassroomtype'] = 'Room associée:'; +$string['topicformat'] = 'Sujet:'; +$string['weeksformat'] = 'Semaine:'; +$string['required_fields'] = 'Champs requis'; +$string['topicdisplay'] = 'Sujet'; +$string['visibletostudents']='Visible pour les étudiants'; -$string['linksfor'] = 'Acces Live Classrooms pour '; -$string['accessrooms'] = 'Acces aux Live Classrooms at aux Archives'; -$string['managerooms'] = 'Gestion des Salles et des Archives (Instructeurs)'; -$string['labelcreateroom'] = 'Nom de la Nouvelle Salle: '; -$string['buttoncreateroom'] = 'Créer la Salle'; -$string['roomcreated'] = 'La Salle a été créée avec succes.'; - - -$string['wizard.text.1'] = 'Note: La première fois que vous entrerez sur le serveur de Live Classroom vous devrez lancer'; -$string['wizard.text.2'] = 'l\'Assistant de Configuration'; -$string['wizard.text.3'] = 'pour être certain que votre ordinateur est prêt.'; - -$string['runwizard'] = 'Lancer l\'Assistant'; - -$string['wizard.text2.1'] = 'Lancer'; -$string['wizard.text2.2'] = 'l\'Assistant de Configuration'; -$string['wizard.text2.3'] = 'pour être certain que votre ordinateur est prêt à utiliser les Live Classrooms'; - -$string['launch'] = 'Lancer'; -$string['addactivity'] = 'Ajouter une Activité'; -$string['new'] = 'Nouv.'; -$string['content'] = 'Contenu'; -$string['reports'] = 'Rapports'; -$string['settings'] = 'Paramètres'; -$string['delete'] = 'Suppr.'; -$string['management'] = 'Gestion'; - -$string['studentview'] = 'Vue Étudiant'; -$string['instructorview'] = 'Vue Instructeur'; - $string['lcpopupshouldappear.1'] = 'La Live Classroom devrait maintenant apparaître.<br/> Dans le cas contraire, cliquez sur '; $string['lcpopupshouldappear.2'] = 'ce lien'; $string['lcpopupshouldappear.3'] = ' pour l\'ouvrir. '; +$string['addactivity'] = 'Ajouter une activité'; +$string['in'] = 'dans'; +$string['or'] = 'ou'; +$string['new'] = 'Nouveau...'; +$string["activity_manageTools"]="Gérer les Live Classrooms"; +$string["activity_tools_not_available"]="La Live Classroom liée à cette activité est actuellement indisponible.<br>Merci de contacter votre professeur"; +$string["activity_no_associated_tools"]="Il n'y pas de live classrom associée à ce cour.<br>Cliquer sur Ok pour en crée une."; +$string["activity_welcome_to_wimba"]="Bienvenue dans la Live Classroom!"; -$string['roomCreated'] = "Votre Live Classroom a été crée avec succès."; -$string['roomUpdated'] = "Votre Live Classroom a été mise à jour avec succès."; -$string['roomDeleted'] = "Votre Live Classroom a été supprimée jour avec succès."; -$string['archiveDeleted'] = "Votre Archive a été supprimée jour avec succès."; - -$string['notfind'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information."; -$string['room'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information."; -$string['connection'] = "Moodle ne peut se connecter au serveur de Live Classroom. Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information."; -$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. "; -$string['signature'] = "Connexion invalide à Live Classroom. Merci de contacter votre administrateur pour plus d'information."; - -$string['Settings'] = "Paramètres"; -$string['Live Classroom'] = "Live Classroom"; -$string['Room Info'] = "Informations"; -$string['Title: '] = "Titre : "; -$string['Description: '] = "Description : "; -$string['Type : '] = "Type : "; -$string['Lecture room'] = "Salle de Cours"; -$string['Lecture rooms'] = "Salles de Cours"; -$string['Instructors lead the presentation'] = "Les Instructeurs dirigent la présentation"; -$string['Discussion room'] = "Salle de Discussion"; -$string['Discussion rooms'] = "Salles de Discussion"; -$string['Students and Instructors have the same rigths'] = "Étudiants et Instructeurs ont les mêmes droits."; -$string['Media'] = "Média"; -$string['Audio'] = "Audio"; -$string['Enable Students to use the phone'] = "Permettre aux étudiants d'utiliser le téléphone"; -$string['Note: Instructors can always use the phone'] = "Note: Les Instructeurs peuvent toujours utiliser le téléphone"; -$string['Enable Student\'s microphones at presentation start'] = "Permettre aux étudiants d'utiliser le microphone au démarrage de la présentation."; -$string['One-way Video'] = "Vidéo mono-point"; -$string['Presenter uses RealProducer'] = "Les Presenter utilisent RealProducer"; -$string['Room Id: '] = "Room Id : "; -$string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif"; -$string['Features'] = "Fonctions"; -$string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>"; -$string['enableScreenGrab'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran."; -$string['Enable Archiving'] = "Autoriser l'Archivage"; -$string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>"; -$string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée"; -$string['Chat'] = "Chat"; -$string['Enable Students to use text chat'] = "Autoriser les étudiants à utiliser le chat textuel"; -$string['Enable Public and Private text chat'] = "Autoriser le chat Public et Privé"; -$string['Enable Public text chat only'] = "Autoriser le chat Public seulement"; -$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Les étudiants sont toujours capables de faire du chat avec les <i>Presenter</i> et/ou le support technique."; -$string['Access'] = "Accès"; -$string['Available'] = "Disponible"; -$string['Maximum users: '] = "Nombre d'utilisateurs maximum: "; -$string['Unlimited'] = "Illimité"; -$string['Limited: '] = "Limite : "; -$string['Enable guest access'] = "Autoriser l'accès Invité"; -$string['Room Id: '] = "Room Id : "; -$string['launcherLink'] = "Lien de lancement : "; - - //calendar $string['add_calendar']='Ajouter un évènement au calendrier'; -$string["launch_calendar"]="Lancer Live Classroom"; +$string["launch_calendar"]="Lancer Live Classroom"; +$string["description_calendar"] = "Description: "; //day $string['day1'] = 'Lundi'; $string['day2'] = 'Mardi'; @@ -162,29 +94,250 @@ $string['day4'] = 'Jeudi'; $string['day5'] = 'Vendredi'; $string['day6'] = 'Samedi'; -$string['day0'] = 'Dimanche'; - -$string['cannotretreivelistofrooms'] = "Impossible de retrouver la liste des salles"; - +$string['day0'] = 'Dimanche'; +$string['cannotretreivelistofrooms'] = "Impossible de recupérer la liste de classes;"; $string['month1'] = 'Janvier'; $string['month2'] = 'Février'; $string['month3'] = 'Mars'; $string['month4'] = 'Avril'; $string['month5'] = 'Mai'; $string['month6'] = 'Juin'; -$string['month7'] = 'Jullet'; -$string['month8'] = 'Août'; -$string['month9'] = 'Septembre'; -$string['month10'] = 'Octobre'; -$string['month11'] = 'Novembre'; -$string['month12'] = 'Decembre'; - - - +$string['month7'] = 'Juillet'; +$string['month8'] = 'Aout'; +$string['month9'] = 'Septembre'; +$string['month10'] = 'Octobre'; +$string['month11'] = 'Novembre'; +$string['month12'] = 'Décembre'; //First Time Use - not use yet $string['firstRoom'] = 'Main classroom'; $string['secondRoom'] = 'Group 1'; $string['thirdRoom'] = 'Group 2'; $string['fourthRoom'] = 'Group 3'; +$string['filterbar_all'] = "Tous"; +$string['filterbar_boards'] = "Boards"; +$string['filterbar_discussions'] = "Discussions"; +$string['filterbar_lectures'] = "Lectures"; +$string['filterbar_podcasters'] = "Podcasters"; +$string['filterbar_voicepresentation'] = "Presentations"; +$string['headerbar_instructor_view'] = "Vue Instructeur"; +$string['headerbar_student_view'] = "Vue Étudiant"; +$string['list_title_board'] = "Voice Board"; +$string['list_title_Discussion'] = "Discussions Rooms"; +$string['list_title_MainLecture'] = "Main Lectures Rooms"; +$string['list_title_pc'] = "Wimba Podcaster"; +$string['list_title_presentation'] = "Voice Presentation"; +$string['toolbar_content'] = "Contenu"; +$string['toolbar_schedule'] = 'Schedule' ; +$string['toolbar_delete'] = 'Suppr.' ; +$string['toolbar_activity'] = "Ajouter une Activité"; +$string['toolbar_launch'] = "Lancer"; +$string['toolbar_new'] = "Nouv."; +$string['toolbar_reports'] = "Rapports"; +$string['toolbar_settings'] = "Paramètres"; +$string['error_notfind'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information."; +$string['error_room'] = "Paramètres de Live Classroom invalides. Merci de contacter votre administrateur pour plus d'information."; +$string['error_connection'] = "Moodle ne peut se connecter \xE5 la base de données. Merci de contacter votre administrateur pour plus d'information."; +$string['error_bd'] = "Moodle ne peut se connecter \xE5 la base de données. Merci de contacter votre administrateur pour plus d'information."; +$string['error_session'] = "En raison d'une inactivitné, votre session a expiré.Veuillez recharger la page.."; +$string['error_signature'] = "Connexion invalide. Merci de contacter votre administrateur pour plus d'information."; +$string['error_board'] = "Paramètres des Voice Tools invalides. Merci de contacter votre administrateur pour plus d'information."; +$string['error_connection_lc'] = "Moodle ne peut se connecter au serveur de Live Classroom.. Merci de contacter votre administrateur pour plus d'information."; +$string['error_bdvt'] = "Moodle ne peut se connecter \xE5 la base de données. Merci de contacter votre administrateur pour plus d'information."; +$string['error_roomNotFound'] = "La classe a été supprimé ou n'est pas disponible. Merci de contacter votre administrateur pour plus d'information."; +$string['error_boardNotFound'] = "La ressource a été supprimé ou n'est pas disponible. Merci de contacter votre administrateur pour plus d'information."; +$string['error_xml'] = "Probl\xE8me pour afficher le composant. Merci de contacter votre administrateur pour plus d'information."; + +$string['choiceElement_description_board'] = "Créer un nouveau Voice Board"; +$string['choiceElement_description_podcaster'] = "Créer une nouveau Podcaster"; +$string['choiceElement_description_presentation'] = "Créer un nouveau Voice Presentation"; +$string['choiceElement_description_room'] = "Créer un nouveau Live Classroom"; +$string['choiceElement_new_board'] = "Nouveau Board"; +$string['choiceElement_new_podcaster'] = "Nouveau Podcaster"; +$string['choiceElement_new_presentation'] = "Nouveau Presentation"; +$string['choiceElement_new_room'] = "Nouveau Room"; +$string['contextbar_new_voicetools'] = "Nouveau Wimba tools"; +$string['contextbar_settings'] = ": Paramètres"; +$string['validationElement_cancel'] = "Annuler"; +$string['validationElement_create'] = "Crée"; +$string['validationElement_saveAll'] = "Sauver"; +$string['general_liveclassroom'] = "Live Classroom"; +$string['general_pc'] = "Wimba Podcaster"; +$string['general_presentation'] = "Voice Presentation"; +$string['settings_available'] = "Disponible"; +$string['settings_chat_enabled'] = "Autoriser les étudiants à utiliser le chat textuel "; +$string['settings_description'] = "Description :"; +$string['settings_discussion'] = "Discussion room"; +$string['settings_discussion_comment'] = "Les outils de présentation sont disponibles aux étudiants et aux professeurs."; +$string['settings_discussion_rooms'] = "Discussion rooms:"; +$string['settings_enable_student_video_on_startup'] = "Autoriser les étudiants à montrer leur vidéo par défaut "; +$string['settings_enabled_appshare'] = "Activer le partage d'écran"; +$string['settings_enabled_archiving'] = " Activer l'archivage"; +$string['settings_enabled_breakoutrooms'] = "Activer les groupes de travail (Breakout Rooms)"; +$string['settings_enabled_guest'] = "Autoriser l'accès public "; +$string['settings_enabled_guest_comment'] = "Note : Ce paramètre n'est effectif que lorsque l'accès public est activé sur le serveur de Live Classroom . +Veuillez contacter votre administrateur pour plus d'informations. "; +$string['settings_enabled_onfly_ppt'] = "Activer l'import à la volée de présentations Powerpoint"; +$string['settings_enabled_status'] = "Activer les icones de statut"; +$string['settings_presenter_console'] = "Console du présenteur:"; +$string['settings_eboard'] = "eBoard:"; +$string['settings_breakout'] = "Groupes de travail :"; +$string['settings_enabled_student_eboard'] = "Autoriser les étudiants à utiliser le eBoard par défaut"; +$string['settings_enabled_students_breakoutrooms'] = "Les étudiants peuvent voir le contenu créé par les autres groupes"; +$string['settings_enabled_students_mainrooms'] = "Les étudiants travaillant en groupe peuvent voir le contenu de la salle principale"; +$string['settings_hms_simulcast_restricted'] = "Autoriser les étudiants à utiliser le téléphone"; +$string['settings_hms_two_way_enabled'] = "Autoriser les étudiants à parler par défaut "; +$string['settings_lectures_rooms'] = "Lecture rooms:"; +$string['settings_mainLecture'] = "Lecture room"; +$string['settings_mainLecture_comment'] = "Les outils de présentation sont disponibles seulement aux professeurs."; +$string['settings_max_user'] = "Nombre d'utilisateurs maximal:"; +$string['settings_max_user_limited'] = "Limité:"; +$string['settings_max_user_unlimited'] = "Illimité "; +$string['settings_private_chat_enabled'] = "Autoriser les étudiants à discuter entre eux en chat privé"; +$string['settings_private_chat_enabled_comment'] = "Note : Les étudiants peuvent toujours discuter avec leurs professeurs"; +$string['settings_status_appear'] = "Les changements de statut apparaissent dans la fenêtre de chat"; +$string['settings_status_indicators'] = "Indicateurs de status:"; +$string['settings_student_privileges'] = "Priviléges des étudiants:"; +$string['settings_title'] = "Titre :"; +$string['settings_type'] = "Type :"; +$string['settings_video_bandwidth'] = "Bande passante vidéo: "; +$string['settings_video_bandwidth_large'] = " Rapide - la plupart utilisent une connexion T1/LAN"; +$string['settings_video_bandwidth_medium'] = "Moyenne - la plupart utilisent un modem ADSL/cable"; +$string['settings_video_bandwidth_small'] = "Lente - la plupart utilisent un modem dial-up"; +$string['settings_video_bandwidth_custom'] = "Custom - pour les utilisateurs avancés"; +$string['tab_tite_roomInfo'] = "Informations"; +$string['tab_title_chat'] = "Chat"; +$string['tab_title_media'] = "Média"; +$string['delay_0'] = "0 s"; +$string['delay_1'] = "1 min"; +$string['delay_10'] = "10 min"; +$string['delay_2'] = "2 min"; +$string['delay_20'] = "20 min"; +$string['delay_3'] = "3 min"; +$string['delay_30'] = "30 min"; +$string['delay_30'] = "60 min"; +$string['delay_5'] = "5 min"; +$string['filterbar_lc'] = "Live Classrooms"; +$string['filterbar_vt'] = "Voice Tools"; +$string['general_board'] = "Voice Board"; +$string['settings_audio'] = "Audio Quality :"; +$string['settings_audio_format_basic'] = "Basic Quality (Telephone quality) - 8 kbit/s - Modem usage"; +$string['settings_audio_format_good'] = "Good Quality (FM Radio quality) - 20.8 kbit/s - Broadband"; +$string['settings_audio_format_standart'] = "Qualit Quality - 12.8 kbit/s - Modem usage"; +$string['settings_audio_format_superior'] = "Superior Quality - 29.6 kbit/s - Broadband usage"; +$string['settings_auto_publish_podcast'] = "Podcast auto-published after:"; +$string['settings_chrono_order'] = "Autoriser les é à répondre aux messages"; +$string['settings_comment_slide'] = "Autoriser les é à répondre aux messages"; +$string['settings_dial_in_informations'] = "Paramètres de Conférence"; +$string['settings_end_date'] = "Date de fin:"; +$string['settings_guest_access_comment'] = "Note : Ce paramètre n'est effectif que lorsque l'accès public est activé sur le serveur de Live Classroom. Veuillez contacter votre administrateur pour plus d'informations."; +$string['settings_max_message'] = "Durée max du message audio:"; +$string['settings_max_message_120'] = "2 min"; +$string['settings_max_message_1200'] = "20 min"; +$string['settings_max_message_15'] = "15 s"; +$string['settings_max_message_30'] = "30 s"; +$string['settings_max_message_300'] = "5 min"; +$string['settings_max_message_60'] = "1 min"; +$string['settings_max_message_600'] = "10 min"; +$string['setting... [truncated message content] |
From: <tro...@us...> - 2007-08-01 14:36:20
|
Revision: 196 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=196&view=rev Author: trollinger Date: 2007-08-01 07:36:16 -0700 (Wed, 01 Aug 2007) Log Message: ----------- tag release 3.1 Added Paths: ----------- tags/moodle3_1/ Copied: tags/moodle3_1 (from rev 195, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2007-08-01 14:11:56
|
Revision: 195 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=195&view=rev Author: trollinger Date: 2007-08-01 07:11:55 -0700 (Wed, 01 Aug 2007) Log Message: ----------- update vocie recorder block after release 3.1 remove not useful directory Modified Paths: -------------- trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php Removed Paths: ------------- trunk/moodle/bin/ trunk/moodle/lang/ Modified: trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php =================================================================== --- trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php 2007-08-01 14:10:39 UTC (rev 194) +++ trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php 2007-08-01 14:11:55 UTC (rev 195) @@ -51,7 +51,7 @@ } function preferred_width() { - return 210; + return 220; } function applicable_formats() { @@ -82,7 +82,7 @@ $this->content->text .= '<tr><td align="center">'; - $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voicetools/voicerecorder.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="210px" height="185px"></iframe>'; + $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voicetools/voicerecorder.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="220px"></iframe>'; $this->content->text .= '</td></tr>'; $this->content->text .= '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2007-08-01 14:10:41
|
Revision: 194 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=194&view=rev Author: trollinger Date: 2007-08-01 07:10:39 -0700 (Wed, 01 Aug 2007) Log Message: ----------- Update Voice tools module after release 3.1 Modified Paths: -------------- trunk/moodle/mod/voicetools/css/StyleSheet.css trunk/moodle/mod/voicetools/getXmlChoicePage.php trunk/moodle/mod/voicetools/getXmlListPanel.php trunk/moodle/mod/voicetools/getXmlNewPanel.php trunk/moodle/mod/voicetools/index.php trunk/moodle/mod/voicetools/js/ajax.js trunk/moodle/mod/voicetools/js/constants.js trunk/moodle/mod/voicetools/js/hwCommons.js trunk/moodle/mod/voicetools/js/verifForm.js trunk/moodle/mod/voicetools/lang/en/voicetools.php trunk/moodle/mod/voicetools/lang/en_utf8/voicetools.php trunk/moodle/mod/voicetools/lib/common/WimbaCommons.php trunk/moodle/mod/voicetools/lib/common/WimbaXml.php trunk/moodle/mod/voicetools/lib/vt/WimbaVoicetools.php trunk/moodle/mod/voicetools/lib/vt/WimbaVoicetoolsAPI.php trunk/moodle/mod/voicetools/lib.php trunk/moodle/mod/voicetools/manageAction.php trunk/moodle/mod/voicetools/manageActionBlock.php trunk/moodle/mod/voicetools/mod.html trunk/moodle/mod/voicetools/pictures/items/filter-enabled-right.png trunk/moodle/mod/voicetools/pictures/items/filter-rollover-right.png trunk/moodle/mod/voicetools/pictures/items/headerbar-logo.png trunk/moodle/mod/voicetools/pictures/items/listitem-VoiceBoardicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-VoicePresentationicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-liveclassroomicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-subitem.jpg trunk/moodle/mod/voicetools/pictures/items/listitem-voicerecordericon.png trunk/moodle/mod/voicetools/view.php trunk/moodle/mod/voicetools/voicerecorder.php trunk/moodle/mod/voicetools/welcome.php Added Paths: ----------- trunk/moodle/mod/voicetools/db/install.xml trunk/moodle/mod/voicetools/js/ajaxslt/ trunk/moodle/mod/voicetools/js/ajaxslt/AUTHORS trunk/moodle/mod/voicetools/js/ajaxslt/COPYING trunk/moodle/mod/voicetools/js/ajaxslt/README trunk/moodle/mod/voicetools/js/ajaxslt/dom.js trunk/moodle/mod/voicetools/js/ajaxslt/util.js trunk/moodle/mod/voicetools/js/ajaxslt/xmltoken.js trunk/moodle/mod/voicetools/js/ajaxslt/xpath.js trunk/moodle/mod/voicetools/js/ajaxslt/xslt.js trunk/moodle/mod/voicetools/js/dojo/ trunk/moodle/mod/voicetools/js/dojo/LICENSE trunk/moodle/mod/voicetools/js/dojo/README trunk/moodle/mod/voicetools/js/dojo/build.txt trunk/moodle/mod/voicetools/js/dojo/dojo.js trunk/moodle/mod/voicetools/js/dojo/iframe_history.html trunk/moodle/mod/voicetools/js/dojo/src/ trunk/moodle/mod/voicetools/js/dojo/src/io/ trunk/moodle/mod/voicetools/js/dojo/src/io/BrowserIO.js trunk/moodle/mod/voicetools/js/dojo/src/io/IframeIO.js trunk/moodle/mod/voicetools/js/dojo/src/io/RepubsubIO.js trunk/moodle/mod/voicetools/js/dojo/src/io/RhinoIO.js trunk/moodle/mod/voicetools/js/dojo/src/io/ScriptSrcIO.js trunk/moodle/mod/voicetools/js/dojo/src/io/XhrIframeProxy.js trunk/moodle/mod/voicetools/js/dojo/src/io/__package__.js trunk/moodle/mod/voicetools/js/dojo/src/io/cometd.js trunk/moodle/mod/voicetools/js/dojo/src/io/common.js trunk/moodle/mod/voicetools/js/dojo/src/io/cookie.js trunk/moodle/mod/voicetools/js/dojo/src/io/xip_client.html trunk/moodle/mod/voicetools/js/dojo/src/io/xip_server.html trunk/moodle/mod/voicetools/js/xsl/ trunk/moodle/mod/voicetools/js/xsl/wimba.xsl trunk/moodle/mod/voicetools/lang/en/help/ trunk/moodle/mod/voicetools/lang/en/help/voicetools/ trunk/moodle/mod/voicetools/lang/en/help/voicetools/mods.html trunk/moodle/mod/voicetools/lang/en_utf8/help/voicetools/ trunk/moodle/mod/voicetools/lang/en_utf8/help/voicetools/mods.html trunk/moodle/mod/voicetools/lib/common/WimbaUI.php trunk/moodle/mod/voicetools/lib/common/XmlArchive.php trunk/moodle/mod/voicetools/lib/common/XmlOrphanedArchive.php trunk/moodle/mod/voicetools/lib/common/XmlResource.php trunk/moodle/mod/voicetools/lib/common/XmlRoom.php trunk/moodle/mod/voicetools/lib/common/domxml-php4-php5.php trunk/moodle/mod/voicetools/pictures/backgrounds/Thumbs.db trunk/moodle/mod/voicetools/pictures/buttons/Thumbs.db trunk/moodle/mod/voicetools/pictures/buttons/listitem-information-16_12.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-activities-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-content-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-delete-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-launch-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-new-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-poll-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-schedule-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/toolbar-settings-enabled.png trunk/moodle/mod/voicetools/pictures/buttons/x_round-16_14.png trunk/moodle/mod/voicetools/pictures/buttons/x_squared.png trunk/moodle/mod/voicetools/pictures/items/Thumbs.db trunk/moodle/mod/voicetools/pictures/items/listitem-archiveicon-selected.jpg trunk/moodle/mod/voicetools/pictures/items/listitem-archiveicon.jpg trunk/moodle/mod/voicetools/pictures/items/listitem-boardicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-liveclassroomicon.gif trunk/moodle/mod/voicetools/pictures/items/listitem-orphanedarchiveicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-pcicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-presentationicon.png trunk/moodle/mod/voicetools/pictures/items/listitem-subitem-selected.jpg trunk/moodle/mod/voicetools/pictures/items/listitem-voicetoolsicon.gif trunk/moodle/mod/voicetools/pictures/items/liveclassroom.png trunk/moodle/mod/voicetools/pictures/items/phone_60.png trunk/moodle/mod/voicetools/pictures/items/voice_tools.png trunk/moodle/mod/voicetools/pictures/items/window-left.png trunk/moodle/mod/voicetools/pictures/items/window-middle.png trunk/moodle/mod/voicetools/pictures/items/window-right.png trunk/moodle/mod/voicetools/pictures/items/window200_left.png trunk/moodle/mod/voicetools/pictures/items/window200_middle.png trunk/moodle/mod/voicetools/pictures/items/window200_right.png trunk/moodle/mod/voicetools/pictures/items/x_round-16_14.png trunk/moodle/mod/voicetools/pictures/items/yes-60.png Modified: trunk/moodle/mod/voicetools/css/StyleSheet.css =================================================================== --- trunk/moodle/mod/voicetools/css/StyleSheet.css 2007-08-01 14:04:16 UTC (rev 193) +++ trunk/moodle/mod/voicetools/css/StyleSheet.css 2007-08-01 14:10:39 UTC (rev 194) @@ -1,712 +1,819 @@ -body -{ background-color:#ffffff; - margin-top:0px; - margin-bottom:0px; - margin-right:0px; - margin-left:0px; - font-family: Verdana,Arial,Helvetica,sans-serif; - font-size:70%; +body +{ + background-color: #ffffff; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:8px; } -/* size remaining text relative to baseline */ -/* some indiv classes and elements have different sizes, later in doc */ -body a, -body table, body td, body th, -body p, body div, body li, body li li, -body input, body textarea, body select, body option ,td textarea -{font-size:100%;} +* +{ + margin:0; + padding:0; +} -.page_title +/*general html element*/ +input { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size:14px; - font-weight:bold; - color:#3c4b5b; - vertical-align: middle; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.area_title -{ - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size:12px; - font-weight:bold; - color:#3c4b5b; - vertical-align: middle; - background-color:#c4cedc; - padding-left:2px; - vertical-align:middle; -} -.limitWidth +td{ + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; + } +textarea { - width:160px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.alignRight -{ +html{ + margin:0; + padding:0; + border:0; + height:100%; } -.shiftAvailability +select { + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; +} - padding-right:50px; +label +{ + font-family:Verdana, Arial, Helvetica, sans-serif; + font-size:11px; } - -* html div.tab +label.labelEnabled { - padding-top: 2%; - - - display: none; - height: 290px; - + color:#000; } - -div.tab +label.labelDisabled { - padding-top: 2%; - - - display: none; - - height:278px; -} - -.settingsPadding + color:#ccc; +} +option{ +margin-right: 5px; +} +/*general class*/ +.alert { - padding-left:120px; - padding-right:150px; + color: Red; } - - -.date_width{ - width:250px; - +.italic +{ + font-style:italic; } -.line{ - padding:0px 0px 0px 0px; +.top +{ + vertical-align:top; + } -.titlePodcaster +* html .top { - color:#305060; - font-size:14pt; - padding-left:10px; - font-family:Century Gothic, Verdana, Helvetica, Arial; - font-weight:bold; - font-style:italic; - vertical-align:top; - - + vertical-align:baseline; } - - -.podcaster +.comment { - padding-left:15px; + font-family: Verdana; + color: #555555; + font-style: italic; + font-size: 11px; + width:400px!important; + padding-left: 20px; } -.button_hide +.commentAdvanced { - - width:25px; - display:none; + font-family: Verdana; + color: #555555; + font-size: 11px; } -td.tabSelected +.subOption td { - background-image: url(../pictures/items/tab-selected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; - font-family: Verdana; - cursor:default; - border-bottom: solid 1px #FFFFFF; + padding-left: 20px; } -td.tabDisabled +.hide { - color: #CACACA; - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; - font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + display: none; } -td.tabNoSelected + +/*headerBar*/ +#headerBar table { - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; - font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + width: 100%; + + height: 32px; + border-bottom: solid 1px Black; + background:white url( "../pictures/backgrounds/headerbar.png" ) repeat-x bottom left; } -a { - text-decoration:none; - color:Black; +.headerBarRight +{ + padding-right:10px; } +.headerBarLeft +{ + padding-left:10px; +} -a:hover { - text-decoration:none; - color:Black; +/*contextBar*/ +#contextBar table +{ + background-image: url( "../pictures/backgrounds/toolbar.png" ); + height: 30px; + width: 100%; + border-bottom: solid 1px #F0F0F0; } -td.action,input.action{ - background-image:url(../pictures/buttons/general-empty.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer +.contextBarRight +{ + padding-right:10px; } -td.action:hover,input.action:hover{ - background-image:url(../pictures/buttons/general-empty-over.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer -} -.action label +.contextBarLeft { - cursor:pointer + padding-left:10px; } -.alert +.roomNameForSettings { - color:Red; + font-family: Verdana; + font-weight: bold; + font-size: 12px; } +/*filterBar*/ +#filterBar +{ + background-image: url( "../pictures/backgrounds/filterbar.png" ); + height: 24px; + font-weight: bold; + border-bottom: fine 1px #C7D3E1; + list-style-type:none; + + +} -a.room { color:#889EB3; +a.filterdisabled,.filterenabled,.filterrollover +{ + display:block;float:left; + color:#333333; + vertical-align:middle; + text-decoration:none; + white-space:nowrap; + padding-left:8px; + margin-left:10px; +} - text-decoration:none; - display:block; - width:100%; - cursor:help; +a.filterdisabled span,a.filterenabled span,a.filterrollover span +{ + display:block; + float:left; + padding-right:8px; + height:24px; + line-height:24px; + cursor:default; + vertical-align:middle; +} +a.filterenabled span +{ + background:url("../pictures/items/filter-enabled-right.png") no-repeat right top; + color:white; } -a.room:hover {color:#889EB3; +a.filterenabled +{ + background:url("../pictures/items/filter-enabled-left.png") no-repeat left top; +} +a.filterrollover +{ + background:url("../pictures/items/filter-rollover-left.png") no-repeat left top; +} - - text-decoration:none; - border: none; - - background-position: 3px 4px; - cursor:help; +a.filterrollover span +{ + background:url("../pictures/items/filter-rollover-right.png") no-repeat right top; } - -.info a{ - position:relative; /*this is the key*/ - z-index:24; - color:#000; - text-decoration:none +/*list*/ +* html #list +{ + padding-top:0px; + margin-top:0px; + height: 315px; + overflow-y: scroll; + overflow-x: hidden; + width: 100%; + vertical-align:top; } -.info a:hover{ - z-index:25;text-decoration:underline; +#list +{ + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 320px; + overflow: auto; + width: 100%; } +.listMinHeigth +{ + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 193px; + overflow: auto; + width: 100%; + +} -.info a span{ - display: none;font-size:8pt; +.productTitle +{ + background-color: #B0C1D5; + font-family: Verdana; + color: White; + font-size: 12px; + height: 16px; + font-weight: bold; + cursor: default; + } -.info a:hover span{ /*the span will display just on :hover state*/ - font-size:8pt; - display:block; - position:absolute; - top:1.5em; left:5em; width:28em; - border:1px solid #FFF99F; - background-color:#FFF99F; color:#000; - text-align: center +.productTitle label +{ + vertical-align:top; } +/*list column*/ - -.button_disabled { - - color:#666666; - font-family: Arial; - text-decoration:none; - font-size: 9px; - +.list_icon +{ + width:16px; + } - -.button_enabled a +.list_archive { - - color:black; - font-family: Arial; - width:30px; - font-size: 9px; - + width:16px; + border-bottom: solid 1px #F3F3F3; } -.separator_space +.list_information { - width:2px; + width:16px; + padding-right:20px; } -.empty_space +.list_availability { - width:50px; + width:16px; } - -.button_enabled a:hover{ color:black; - - font-family: Arial; - font-size: 9px; - - cursor:hand; +.list_name +{ + width:300px; + text-align:left; } - - - -tr.selectRoom{ - background-color:red; - cursor:hand; - text-decoration:none; -} -.divProduct +.list_noElement { - padding-top:3px; - padding-left:2px ; - + padding-left:32px; + font-style:italic; + } -.separateProduct +.moreRoom { - border-top:solid 1px #C7D3E1 + color: Navy; + text-decoration: underline; + padding-left: 20px; + font-weight: bold; } -.shortShift{ +/*List Elements*/ - padding-left:5px; +.liveclassroom td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -.room td{ - padding-left:0px ; - font-family:Verdana; - color:Black; - font-size:10; +.liveclassroomstudent +{ + display:none; +} - cursor:default; - text-decoration:none; +.liveclassroomstudent td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } +.liveclassroom label +{ + font-family: Verdana; + color: Black; +} -.room label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; - text-decoration:none; +.voicetools td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -tr.overRoom{ - font-family:Verdana; - color:Black; - font-size:11px; - border-bottom:solid 1px #F3F3F3; - background-color:#f0f3f5; - cursor:default; +.voicetools label +{ + font-family: Verdana; + color: Black; } -.archive td{ - padding-left:2px ; - font-family:Verdana; - color:#666666; - font-style:italic; - font-size:11px; - +.orphanedarchive td +{ + padding-left: 5px; + cursor: default; + text-decoration: none; + border-bottom: solid 1px #F3F3F3; } -.room td{ - padding-left:5px ; - font-family:Verdana; - color:Black; - font-size:10; - border-bottom:solid 1px #F3F3F3; - cursor:default; +.orphanedarchive label +{ + font-family: Verdana; + color: Black; + font-size: 8; + text-decoration: none; } -.archive label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; +.archiveHide +{ + display:none; } -.room label{ - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; +.archive td +{ + padding-left: 5px; + cursor: default; + display:table-cell; + border-bottom: solid 1px #F3F3F3; } +.archive label +{ + font-family: Verdana; + color: Black; + font-style: italic; + font-family: Verdana; + color: #666666; + +} - - -.filterBar table{ - - background-image:url("../pictures/backgrounds/filterbar.png"); - height:24px; - font-weight:bold ; - - border-bottom:fine 1px #C7D3E1 +.orphanedarchivestudent +{ + display:none; } - - -.filter_enabled +/*toolBar*/ +#toolBar table { - font-family :Verdana; - color:#333333; - height:24px; - text-align:center; - font-size:10px; - font-weight:bold ; + padding-left: 5px; + width: 100%; + height:40px; + background-image: url( "../pictures/backgrounds/toolbar.png" ); + border-bottom: solid 1px #999999; } -.filter_selected -{ font-weight:bold ; - font-family :Verdana; - color:#ffffff; - text-align:center; - height:24px; - font-size:10px; +.button_disabled { + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + font-size: 9px; + width:60px; +} +.button_disabled span{ + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + text-align:center; + font-size: 9px; + + } +.button_enabled span { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; +} +.button_enabled { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; + width:60px; +} -.filter_left_enabled +.separator_space { - background-image:url("../pictures/items/filter-enabled-left.png"); - background-repeat:no-repeat; + width: 2px; } -.filter_middle_enabled + +.empty_space { - 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 ; + z-index:0; + visibility:hidden; + width: 50px; } -.filter_right_enabled + +/*settings*/ + +/*tabs*/ +#tabs { - background-image:url("../pictures/items/filter-enabled-right.png"); - background-repeat:no-repeat; + background-image: url( "../pictures/backgrounds/toolbar.png" ); } -.filter_right_rollover + +td.tabSelected,td.tabDisabled,td.tabNoSelected { - background-image:url("../pictures/items/filter-rollover-right.png"); - background-repeat:no-repeat; + background-image: url(../pictures/items/tab-selected.gif); + background-repeat: no-repeat; + width: 78px; + font-size: 10px; + font-family: Verdana; + cursor:default; } -.noFilter + +td.tabDisabled { - background-image:none; - font-family :Verdana; - color:#333333; - text-align:center; - height:24px; - font-size:10px; - font-weight:bold ; + color: #CACACA; + z-index:-14; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; } -.filter_middle_rollover +td.tabNoSelected { - 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 ; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; +} + +/*tab content*/ +div.tabContent +{ + padding-left:5%; + padding-right:5%; + margin-top:7%; + + display: block; + height: 247px; } -.filter_left_rollover +* html div.tabContent { - background-image:url("../pictures/items/filter-rollover-left.png"); - background-repeat:no-repeat; + height: 245px; } -.filterSpace +div.tabContentcalendar /*use for the calendar event*/ { - padding-left:10px; + padding-left:3%; + padding-right:3%; + padding-top:4%; + position: relative; + display: block; + height: 230px; } -.contextBar table +/*choice panel*/ +#productChoice table { - padding-left:5px; - padding-right:5px; - background-image:url("../pictures/backgrounds/toolbar.png"); - - height:30px; - width:100% - + margin-left: 10px; + margin-right: 10px; + } -.tabBackground +.choiceAll td { - background-image:url("../pictures/backgrounds/toolbar.png"); - + height:102px; + border-bottom: solid 1px #F0F0F0; + padding-left:15px; } - -.productChoice table +*>html .choiceAll td { + height:102px; +} +.choiceVtonly td { + border-bottom: solid 1px #F0F0F0; + padding-left:15px; + height:103px; - - border-bottom:solid 1px #F0F0F0; - margin-left:10px; - margin-right:10px; - } - - -.comment{ - - font-family:Verdana; - color:#555555; - font-style:italic; - font-size:11px; - padding-left:20px; +*>html .choiceVtonly td { + height:103px; } -.subOption td { - - font-family:Verdana; - - font-size:11px; - padding-left:20px; - vertical-align:top; +product_choice_left +{ + width:130px; } - -.contextProduct +product_choice_right { - font-family:Verdana; - font-weight: bold; - font-size:12px; - - + padding-right:20px; } +/*validation bar*/ +#validationBar table +{ + width: 100%; + height: 22px; + padding: 0px; + background-color: #F0F0F0; + border-top: solid 1px #999999; +} -.hide +td.actionHide, input.action { - display:none; + display:none; } -.hideAndShift +td.action, input.action { - display:none; - padding-left:20px; + background-image: url(../pictures/buttons/general-empty.png); + background-repeat: no-repeat; + background-position: center; + text-decoration: none; + color: Black; + text-align: center; + cursor: pointer; + width:75px; } -.visible +td.action:hover, input.action:hover { - display:block; + background-image: url(../pictures/buttons/general-empty-over.png); } -.visibleAndShift +.action label { - display:block; - padding-left:20px; + cursor: pointer; } - -label.moreRoom +/*MessageBar*/ +#messageBar { - color:Navy; - text-decoration:underline; - padding-left:20px; - font-weight: bold; - cursor:default; + width:99%; } +.message +{ + background-color: #ffff99; + position:absolute; + bottom:4px; + left:1px; + right:1px; + height: 20px; + display: block; +} -#popup { +/*loading panel*/ +#loading +{ + display: none; + font-size: 8pt; + display: block; + position: absolute; + top: 0; + left: 0; + color: #000; + text-align: center; +} - display:none; - font-size:8pt; - display:block; - position:absolute; - top:45%; left:45%; - - color:#000; - text-align: center; +/*tooltip*/ +.tooltip +{ + 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; } - -.expand +/*Error Panel*/ +#error_frame { - background-color:Black; + + background-color: #FFD0D0; + padding: 0; + margin: 0; + border-style: solid; + border-color: red; + border-width: 1px; + text-align: left; + vertical-align: middle; } - -.headerBar table +#error_frame table { - padding-left:5px ; - width:100%; - padding-right:5px ; + height:254px; +} - background-image:url("../pictures/backgrounds/headerbar.png"); - height:32px; - border-bottom:solid 1px Black; - -} -.toolBar table +#error_title { - padding-left:5px ; - width:100%; - height:44px; - background-image:url("../pictures/backgrounds/toolbar.png"); - border-bottom:solid 1px #999999; - + font-family: Verdana,Arial,Helvetica; + font-size: 12px; + font-weight: bold; + color: black; + padding: 0; + margin: 0; + text-align: left; + vertical-align: top; } - - -.list -{ +/*popup*/ +/*background*/ +.opac +{ - height:317px; - overflow:auto; - overflow-x: hidden; - width:100%; + display:none; + z-index:2 !important; + position:absolute; + width:100%; + height:100%; + top:0px; + left:0px; + background-color:#000; + filter:alpha(opacity=33); + -moz-opacity:.33; + opacity:.33; + + +} +.nameElement { + font-family: Verdana; + font-weight: bold; + font-size: 12px; +} +div.advancedPopup { + position:absolute; + left:0px; + top:0px; + width:350px; + height:150px; + z-index: 50 !important;; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -.listMinHeigth{ - height:296px; - overflow-y:scroll; - overflow-x: hidden; - width:100%; +div.window-left { + position:absolute; + left:0px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-left.png" ); + background-repeat:none; +} +div.window-middle { + position:absolute; + left:10px; + top:0px; + width:330px; + height:150px; + background-image: url( "../pictures/items/window-middle.png" ); + } +div.window-right { + position:absolute; + left:340px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-right.png" ); + background-repeat:none; +} -.lineTitle{ - - padding-left:10px +div.window-leftBig { + position:absolute; + left:0px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_left.png" ); + background-repeat:none; } -.productTitle{ - background-color:#B0C1D5; - font-family:Verdana; - color:White; - font-size:12px; - height:16px; - font-weight:bold; - cursor:default; - - +div.window-middleBig { + position:absolute; + left:10px; + top:0px; + width:380px; + height:200px; + background-image: url( "../pictures/items/window200_middle.png" ); + } -.validationBar table -{ - width:100%; - height:24px ; - padding:0px ; - background-color:#F0F0F0; - border-top:solid 1px #999999 - +div.window-rightBig { + position:absolute; + left:390px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_right.png" ); + background-repeat:none; } -.panelSettings table -{ - border-bottom: #818181 1px solid; - height:300px; - display:none; - width:100% -} - -.part td -{ - - width:100%; - border-bottom: #818181 1px solid; +div.popupDialContainer { + height:130px; + width:270px; + padding-right:10px; + overflow:auto; } -.tooltip +.popupTitle { - width:240px; - 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; -} - .titleVoiceRecorder -{ - color:#305060; - font-size:14pt; - padding-left:5px; -font-family:Century Gothic, Verdana, Helvetica, Arial; + font-size:14px; font-weight:bold; - font-style:italic; - vertical-align:top; + text-decoration:underline; + font-family: helvetica; - } -#error_frame { - background-color : #FFD0D0; - padding : 0; - margin : 0; - border-style : solid; - border-color: red; - border-width : 1px; - text-align : left; - vertical-align : middle; + +.popupDial { + position:absolute; + left:0px; + top:0px; + width:400px; + height:200px; + z-index: 20; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -#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; +.popupDialContent { + margin-top:10px; + padding:10px 0; + font-size:0.9em; + background-color:#efefef; + border:1px solid #b8b8b8; } -.message{ - - background-color:#ffff99; +.picturePopup { + vertical-align:top; } -.choiceAll{ - height:168px; +/*Voice recorder*/ +.titleVoiceRecorder +{ + color:#305060; + font-size:14pt; + padding-left:5px; + font-family:Century Gothic, Verdana, Helvetica, Arial; + font-weight:bold; + font-style:italic; + vertical-align:top; } +.commentVoiceRecorder{ + + font-family:Verdana; + color:#555555; + font-style:italic; + font-size:10px; - -.choiceVtOnly{ - height:102px; } - div.tab +.frameRecorder { - padding-top: 2%; + height:75px; + padding-top:3px; +} - display: none; - -height:275px;# -} \ No newline at end of file Added: trunk/moodle/mod/voicetools/db/install.xml =================================================================== --- trunk/moodle/mod/voicetools/db/install.xml (rev 0) +++ trunk/moodle/mod/voicetools/db/install.xml 2007-08-01 14:10:39 UTC (rev 194) @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<XMLDB PATH="mod/voicetools/db" VERSION="20060812" COMMENT="XMLDB file for Moodle mod/voicetools"> + <TABLES> + <TABLE NAME="voicetools" COMMENT="Defines voicetools" NEXT="voicetools_resources"> + <FIELDS> + <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="rid"/> + <FIELD NAME="rid" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="course"/> + <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="rid" NEXT="name"/> + <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="type"/> + <FIELD NAME="type" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="section"/> + <FIELD NAME="section" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="type" 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 voicetools"/> + </KEYS> + <INDEXES> + <INDEX NAME="course" UNIQUE="false" FIELDS="course"/> + </INDEXES> + </TABLE> + <TABLE NAME="voicetools_resources" COMMENT="Defines voicetools resources" PREVIOUS="voicetools" NEXT="voicetools_recorder"> + <FIELDS> + <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="rid"/> + <FIELD NAME="rid" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="course"/> + <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="rid" NEXT="name"/> + <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="type"/> + <FIELD NAME="type" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="availability"/> + <FIELD NAME="availability" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0" ENUM="false" PREVIOUS="type" NEXT="start_date"/> + <FIELD NAME="start_date" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" DEFAULT="0" ENUM="false" PREVIOUS="availability" NEXT="end_date"/> + <FIELD NAME="end_date" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" DEFAULT="0" ENUM="false" PREVIOUS="start_date"/> + </FIELDS> + <KEYS> + <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for voicetools resource"/> + </KEYS> + <INDEXES> + <INDEX NAME="course" UNIQUE="false" FIELDS="course"/> + </INDEXES> + </TABLE> + + <TABLE NAME="voicetools_recorder" COMMENT="Defines voicetools recorder" PREVIOUS="voicetools_resources"> + <FIELDS> + <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="bid"/> + <FIELD NAME="bid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0" ENUM="false" PREVIOUS="id" NEXT="title"/> + <FIELD NAME="title" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="bid" NEXT="comment"/> + <FIELD NAME="comment" TYPE="char" LENGTH="160" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="title"/> + </FIELDS> + <KEYS> + <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for voicetools recorder"/> + </KEYS> + </TABLE> + </TABLES> + +</XMLDB> \ No newline at end of file Modified: trunk/moodle/mod/voicetools/getXmlChoicePage.php =================================================================== --- trunk/moodle/mod/voicetools/getXmlChoicePage.php 2007-08-01 14:04:16 UTC (rev 193) +++ trunk/moodle/mod/voicetools/getXmlChoicePage.php 2007-08-01 14:10:39 UTC (rev 194) @@ -27,7 +27,7 @@ * * ******************************************************************************/ -/* $Id: getXmlChoicePage.php 47210 2007-04-03 18:05:24Z thomasr $ */ +/* $Id: getXmlChoicePage.php 51316 2007-07-13 14:21:11Z thomasr $ */ error_reporting(E_ALL); require_once("../../config.php"); @@ -35,32 +35,45 @@ require_once("lib/common/WimbaXml.php"); require_once("lib/common/WimbaCommons.php"); if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } // Variables needed global $CFG; -if(empty($_POST)){ - $params = $_GET; +$params = array (); +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + } -else $params = $_POST; +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + +} $xml=new WimbaXml(); $session=new WimbaMoodleSession($params); if($session->error==false) { - if(isset($_POST["novoicetools"]) && $_POST["novoicetools"]==true) - $notool= "true"; + if(isset($params["createWorkflow"]) ) + $createWorkflow= $params["createWorkflow"]; else - $notool="false"; + $createWorkflow=false; + + + + /******** HEADER *********/ $xml->addHeaderElement("pictures/items/headerbar-logo.png"); /******** SESSION - *********/ $xml->CreateInformationElement($session->timeOfLoad,$session->hparams["firstname"],$session->hparams["lastname"],$session->hparams["email"],$session->hparams["role"],$session->hparams["course_id"],$session->signature,"","",$CFG->voicetools_servername,$pictures); + *********/ $xml->CreateInformationElement($session->timeOfLoad,$session->hparams["firstname"],$session->hparams["lastname"],$session->hparams["email"],$session->hparams["role"],$session->hparams["courseId"],$session->signature,"","",$CFG->voicetools_servername,$pictures); /************ INFORMATIONS @@ -70,17 +83,23 @@ /*************** PRODUCTS CHOICE ****************/ - $xml->addProductChoice("pictures/buttons/new-createvoiceboard.png",get_string('new_board', 'voicetools'),get_string('VoiceBoardDescription', 'voicetools'),"launchNew",array("getXmlNewPanel.php","Management","createBoard","VoiceTools","VoiceBoard",$notool)); + $xml->addProductChoice("pictures/buttons/new-createvoiceboard.png",get_string('new_board', 'voicetools'),get_string('VoiceBoardDescription', 'voicetools'),"javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','board','all','".$createWorkflow."')"); - $xml->addProductChoice("pictures/buttons/new-createvoicepresentation.png",get_string('new_presentation', 'voicetools'),get_string('VoicePresentationDescription', 'voicetools'),"launchNew",array("getXmlNewPanel.php","Management","createPresentation","VoiceTools","VoicePresentation",$notool)); - $xml->addProductChoice("pictures/buttons/new-createpodcaster.png",get_string('new_podcaster', 'voicetools'),get_string('PodcasterDescription', 'voicetools'),"launchNew",array("getXmlNewPanel.php","Management","createPodcaster","VoiceTools","Podcaster",$notool));//for 3.1 + $xml->addProductChoice("pictures/buttons/new-createvoicepresentation.png",get_string('new_presentation', 'voicetools'),get_string('VoicePresentationDescription', 'voicetools'),"javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','presentation','all','".$createWorkflow."')"); + $xml->addProductChoice("pictures/buttons/new-createpodcaster.png",get_string('new_podcaster', 'voicetools'),get_string('PodcasterDescription', 'voicetools'),"javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','pc','all','".$createWorkflow."')");//for 3.1 /*************** VALIDATION BAR ****************/ $actionParameters = array("value"=>get_string('cancel', 'voicetools'),"style"=>"action","action"=>"launchAjaxRequest"); - - $xml->createValidationButtonElement($actionParameters,array("getXmlListPanel.php", "Management","_", "true")); + + if($createWorkflow=="true") + $xml->createValidationButtonElement(get_string("validationElement_cancel", "voicetools"), "action", "javascript:redirectToActivity('manageAction.php','redirection','','".$createWorkflow."')", "setting_Cancel"); + else + $xml->createValidationButtonElement(get_string("validationElement_cancel", "voicetools"), "action", "javascript:launchAjaxRequest('getXmlListPanel.php','',true,'all')", "setting_Cancel"); + + + }else{ //bad session if($session->error=="session") Modified: trunk/moodle/mod/voicetools/getXmlListPanel.php =================================================================== --- trunk/moodle/mod/voicetools/getXmlListPanel.php 2007-08-01 14:04:16 UTC (rev 193) +++ trunk/moodle/mod/voicetools/getXmlListPanel.php 2007-08-01 14:10:39 UTC (rev 194) @@ -27,7 +27,7 @@ * * ******************************************************************************/ -/* $Id: getXmlListPanel.php 47278 2007-04-04 20:35:29Z thomasr $ */ +/* $Id: getXmlListPanel.php 51347 2007-07-13 18:47:31Z thomasr $ */ /// This page generates the xml of the principal window @@ -35,7 +35,9 @@ require_once("lib.php"); require_once("lib/common/WimbaXml.php"); -require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); +require_once("lib/common/XmlResource.php"); require_once('lib/vt/WimbaVoicetools.php'); require_once('lib/vt/WimbaVoicetoolsAPI.php'); @@ -46,346 +48,51 @@ // Variables needed global $CFG; -if(empty($_POST)){ - $params = $_GET; +$params = array (); +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + } -else $params = $_POST; +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + +} + if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } -$xml=new WimbaXml(); -if(isset($params["error"])){ - //$xml->addMessage(get_string($params["message"],'voicetools')); - $xml->setError(get_string ($params["error"], 'voicetools')); +if(isset($params["error"])){ + $display=$uiManager->setError(get_string ($params["error"], 'voicetools')); } else { - //Session Management + $session=new WimbaMoodleSession($params); + $uiManager=new WimbaUI($session); + $message=""; + if(isset($params["messageProduct"]) && isset($params["messageAction"])) + $message=get_string("message_" . $params["messageProduct"] . "_start", "voicetools")." ".get_string("message_" . $params["messageAction"] . "_end","voicetools"); - $session=new WimbaMoodleSession($params); - //$result=voicetools_api_create_session($session->getVtUser(),voicetools_api_get_resource("1111"),$session->getVtUserRigths()); - if($session->error==false)//good - { - - $vtAction=new vtAction(NULL); - - list_dir("pictures",$pictures);//list the directory - /******** - SESSION - *********/ $xml->CreateInformationElement($session->timeOfLoad,$session->hparams["firstname"],$session->hparams["lastname"],$session->hparams["email"],$session->hparams["role"],$session->hparams["course_id"],$session->signature,"","",$CFG->voicetools_servername,$pictures); - - /******** - HEADER - *********/ - $xml->addHeaderElement("pictures/items/headerbar-logo.png"); - - /******** - MENU - *********/ - - $xml->addMenuElement("button", "all", "all", "false", "pictures/buttons/toolbar-launch", get_string ('launch', 'voicetools'), "Launch",array('manageAction.php',"&time=".time()."&action=launch")); - $xml->addMenuElement("button", "instructor", "all", "false",'pictures/buttons/toolbar-activities', get_string ('activity', 'voicetools'), "doOpenAddActivity",array('../../course/mod.php','section=0&sesskey='.sesskey().'&add=voicetools')); - $xml->addMenuElement("button", "instructor", "all", "true", "pictures/buttons/toolbar-new",get_string ('new', 'voicetools'), "launchNew", array('getXmlChoicePage.php','Management','new','true')); - $xml->addMenuElement("fixSpace", "all", "all", "true"); - $xml->addMenuElement("fixSpace", "all", "all", "true"); - $xml->addMenuElement("button", "instructor", "all", "false", "pictures/buttons/toolbar-settings",get_string ('settings', 'voicetools'), "launchAjaxRequest", array('getXmlNewPanel.php','Management','update','false',"")); - $xml->addMenuElement("button", "instructor", "all", "false", "pictures/buttons/toolbar-delete", get_string ('delete', 'voicetools'), "doOpen",array('manageAction.php',"&time=".time()."&action=delete")); - $xml->addMenuElement("fixSpace", "all", "all", "true"); - $xml->addMenuElement("search", "all", "all", "true"); - - /******** - MESSAGE BAR - *********/ - if(isset($params["message"])){ - - $xml->addMessage(get_string($params["message"],'voicetools')); - - } - - /******** - LIST - *********/ - //get the list of the boards - $list=voicetools_get_voicetools_list($session->hparams["course_id"]); - - if(isset($list["board"])) { - $bdInformations=$list["board"]["all"]; - $vtResources=voicetools_api_get_resources($list["board"]["rid"]); - - - if($vtResources!=null){ - if(count($vtResources->resources)>0){ - - $boards=$vtResources->getResources(); - - $boardsInformations=array(); - //set the profile - $session->setCurrentVtUSer("board"); - - for($i=0;$i<count($bdInformations);$i++) - { - if(isset($boards["rid"][$bdInformations[$i]->rid])){ - $resource=$boards["rid"][$bdInformations[$i]->rid]; - - if($resource==NULL || $resource->error==true) { //problem to get the voice board - $xml->setError(get_string ('problem_vt', 'voicetools')); - echo $xml->getXml(); - exit(); - } - - $boardsInformations[$i]["type"]="VoiceBoard"; - $boardsInformations[$i]["parameters"]["rid"]=$resource->getRid(); - $boardsInformations[$i]["parameters"]["url"]="manageAction.php"; - $boardsInformations[$i]["parameters"]["param"]=$session->url_params."&time=".time()."&action=launch"; - - // $boardsInformations[$i]["parameters"]["nid"]=$sessionInfo->getNid(); - $boardsInformations[$i]["parameters"]["nameDisplay"]=$resource->getTitle(); - - //availability of the room - if($bdInformations[$i]->availability==1){//available - - if($bdInformations[$i]->start_date==-1 && $bdInformations[$i]->end_date==-1) { - $boardsInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $boardsInformations[$i]["parameters"]["popup"]=get_string("availablePopup","voicetools"); - } - else if($bdInformations[$i]->start_date==-1 && time()<=$bdInformations[$i]->end_date ) - { - $boardsInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $boardsInformations[$i]["parameters"]["popup"]=get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>".get_string("clickSettings","voicetools"); - } - else if($bdInformations[$i]->start_date<time() && $bdInformations[$i]->end_date==-1 ) - { - $boardsInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $boardsInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date)."<br>".get_string("clickSettings","voicetools"); - } - else if($bdInformations[$i]->start_date<time() && time()<$bdInformations[$i]->end_date) - { - $boardsInformations[$i]["parameters"]["preview"]="available"; - - if($session->hparams["role"]=="Instructor") - { - - $boardsInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date).", ".get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>".get_string("clickSettings","voicetools"); - } - } - else - { - $boardsInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor"){ - $start="";$end=""; - if($bdInformations[$i]->start_date!=-1){ - $start=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date).", "; - } - if($bdInformations[$i]->end_date!=-1){ - $end=get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date); - } - - $boardsInformations[$i]["parameters"]["popup"]=$start.$end."<br>".get_string("unavailablePopup","voicetools"); - } - } - } - else - { - $boardsInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor") - $boardsInformations[$i]["parameters"]["popup"]=get_string("unvalailablePopup","voicetools"); - } - } - } - } - $xml->addProduct(3, "productType",get_string('voiceboards','voicetools'),$boardsInformations); - } - else - { - $xml->setError(get_string ('problem_vt', 'voicetools')); - echo $xml->getXml(); - exit(); - } - //$presentations=voicetools_get_voicePresentation_list($session->hparams["course_id"]); + if($session->error==false)//good + { + $display=$uiManager->getVTPrincipalView($message); + } + else + { //bad session + if($session->error=="session") + $display=$uiManager->setError(get_string ('error_session', 'voicetools')); + else if($session->error=="signature") + $display=$uiManager->setError(get_string ('error_signature', 'voicetools')); + echo $display; + exit(); } - if(isset($list["presentation"])) { - $bdInformations=$list["presentation"]["all"]; - $vtResources=voicetools_api_get_resources($list["presentation"]["rid"]); +} +echo $display; - if($vtResources!=null){ - if(count($vtResources->resources)>0){ - - $presentations=$vtResources->getResources(); - - $voicePresentationInformations=array(); - //set the profile - $session->setCurrentVtUSer("presentation"); - - - for($i=0;$i<count($bdInformations);$i++) - { - if(isset($presentations["rid"][$bdInformations[$i]->rid])){ - $resource=$presentations["rid"][$bdInformations[$i]->rid]; - - if($resource==NULL || $resource->error==true) { - $xml->setError(get_string ('problem_vt', 'voicetools')); - echo $xml->getXml(); - exit(); - } - - $voicePresentationInformations[$i]["type"]="VoicePresentation"; - $voicePresentationInformations[$i]["parameters"]["rid"]=$resource->getRid(); - $voicePresentationInformations[$i]["parameters"]["url"]="manageAction.php"; - $voicePresentationInformations[$i]["parameters"]["param"]=$session->url_params."&time=".time()."&action=launch"; - - $voicePresentationInformations[$i]["parameters"]["nameDisplay"]=$resource->getTitle(); - - if($bdInformations[$i]->availability==1){ - if($bdInformations[$i]->start_date==-1 && $bdInformations[$i]->end_date==-1) { - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]="Available to the students.<br>Click Settings to change."; - $voicePresentationInformations[$i]["parameters"]["preview"]="available"; - - } - else if($bdInformations[$i]->start_date==-1 && time()<=$bdInformations[$i]->end_date ) - { - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]=et_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>Click Settings to change."; - $voicePresentationInformations[$i]["parameters"]["preview"]="available"; - } - else if($bdInformations[$i]->start_date<time() && $bdInformations[$i]->end_date==-1 ) - { - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date)."<br>Click Settings to change."; - $voicePresentationInformations[$i]["parameters"]["preview"]="available"; - } - else if($bdInformations[$i]->start_date<time() && time()<$bdInformations[$i]->end_date) - { - $voicePresentationInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date).", ".get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>Click Settings to change."; - } - else - { - $voicePresentationInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]="Unavailable to the students.<br>Click Settings to change."; - } - } - else - { - $voicePresentationInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor") - $voicePresentationInformations[$i]["parameters"]["popup"]="Unavailable to the students.<br>Click Settings to change."; - } - } - } - } - $xml->addProduct(4, "productType", get_string('voicepresentations','voicetools'),$voicePresentationInformations); - } - else - { - $xml->setError(get_string ('problem_vt', 'voicetools')); - echo $xml->getXml(); - exit(); - } - } - if(isset($list["pc"])) { - $bdInformations=$list["pc"]["all"]; - $vtResources=voicetools_api_get_resources($list["pc"]["rid"]); - if($vtResources!=null){ - if(count($vtResources->resources)>0){ - - $podcasters=$vtResources->getResources(); - - $session->setCurrentVtUSer("pc"); - - for($i=0;$i<count($bdInformations);$i++) - { - if(isset($podcasters["rid"][$bdInformations[$i]->rid])){ - $resource=$podcasters["rid"][$bdInformations[$i]->rid]; - - if($resource==NULL || $resource->error==true) { - $xml->setError(get_string ('problem_vt', 'present')); - echo $xml->getXml(); - exit(); - } - - $podcasterInformations[$i]["type"]="Podcaster"; - $podcasterInformations[$i]["parameters"]["rid"]=$resource->getRid(); - $podcasterInformations[$i]["parameters"]["url"]="manageAction.php"; - $podcasterInformations[$i]["parameters"]["param"]=$session->url_params."&time=".time()."&action=launch"; - - $podcasterInformations[$i]["parameters"]["nameDisplay"]=$resource->getTitle(); - - if($bdInformations[$i]->availability==1){ - if($bdInformations[$i]->start_date==-1 && $bdInformations[$i]->end_date==-1) { - $podcasterInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]="Available to the students.<br>Click Settings to change."; - - } - else if($bdInformations[$i]->start_date==-1 && time()<=$bdInformations[$i]->end_date ) - { - $podcasterInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]=get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>Click Settings to change."; - } - else if($bdInformations[$i]->start_date<time() && $bdInformations[$i]->end_date==-1 ) - { - $podcasterInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date)."<br>Click Settings to change."; - } - else if($bdInformations[$i]->start_date<time() && time()<$bdInformations[$i]->end_date) - { - - $podcasterInformations[$i]["parameters"]["preview"]="available"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]=get_string("starts","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->start_date).", ".get_string("ends","voicetools")." ".date("m/d/y ga",$bdInformations[$i]->end_date)."<br>Click Settings to change."; - } - else - { - $podcasterInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]="Unavailable to the students.<br>Click Settings to change."; - } - } - else - { - $podcasterInformations[$i]["parameters"]["preview"]="unavailable"; - if($session->hparams["role"]=="Instructor") - $podcasterInformations[$i]["parameters"]["popup"]="Unavailable to the students.<br>Click Settings to change."; - } - } - } - } - $xml->addProduct(5, "productType", get_string('podcaster','voicetools'),$podcasterInformations); - } - else - { - - $xml->setError(get_string ('problem_vt', 'voicetools')); - echo $xml->getXml(); - exit(); - } - } - - - } - else - { //bad session - - if($session->error=="session") - $xml->setError(get_string ('session', 'voicetools')); - else if($session->error=="signature") - $xml->setError(get_string ('signature', 'voicetools')); - echo $xml->getXml(); - exit(); - } - - } - echo $xml->getXml(); - ?> \ No newline at end of file Modified: trunk/moodle/mod/voicetools/getXmlNewPanel.php =================================================================== --- trunk/moodle/mod/voicetools/getXmlNewPanel.php 2007-08-01 14:04:16 UTC (rev 193) +++ trunk/moodle/mod/voicetools/getXmlNewPanel.php 2007-08-01 14:10:39 UTC (rev 194) @@ -27,7 +27,7 @@ * * ******************************************************************************/ -/* $Id: getXmlNewPanel.php 47210 2007-04-03 18:05:24Z thomasr $ */ +/* $Id: getXmlNewPanel.php 51347 2007-07-13 18:47:31Z thomasr $ */ /// This page is to generate the list of VT @@ -39,702 +39,71 @@ require_once("lib/vt/WimbaVoicetools.php"); require_once("lib/common/WimbaCommons.php"); require_once("lib/common/WimbaXml.php"); +require_once("lib/common/WimbaUI.php"); - set_time_limit(30); if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } -if(empty($_POST)){ - $params = $_GET; +$list_attributes = array (); +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $list_attributes[$key] = $val; + } + } -else $params = $_POST; - -$xml=new WimbaXml(); -$session=new WimbaMoodleSession($params); +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $list_attributes[$key] = $val; + } + +} +$session=new WimbaMoodleSession($list_attributes); +$uiManager=new WimbaUI($session); if($session->error==false) { - if(isset($_GET["novoicetools"]) && $_GET["novoicetools"]=="true") - $notools= "true"; + if(isset($_GET["createWorkflow"]) && $_GET["createWorkflow"]=="true") + $createWorkflow= "true"; else - $notools="false"; + $createWorkflow="false"; /******************* GET URL INFOR... [truncated message content] |
From: <tro...@us...> - 2007-08-01 14:04:18
|
Revision: 193 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=193&view=rev Author: trollinger Date: 2007-08-01 07:04:16 -0700 (Wed, 01 Aug 2007) Log Message: ----------- Update Live classroom module after release 3.1 Modified Paths: -------------- trunk/moodle/mod/liveclassroom/config.html trunk/moodle/mod/liveclassroom/css/StyleSheet.css trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/js/Ajax.js trunk/moodle/mod/liveclassroom/js/constants.js trunk/moodle/mod/liveclassroom/js/hwCommons.js trunk/moodle/mod/liveclassroom/js/verifForm.js trunk/moodle/mod/liveclassroom/lang/en/help/liveclassroom/mods.html trunk/moodle/mod/liveclassroom/lang/en/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/en_utf8/help/liveclassroom/mods.html trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/pictures/items/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/items/filter-enabled-right.png trunk/moodle/mod/liveclassroom/pictures/items/filter-rollover-right.png trunk/moodle/mod/liveclassroom/pictures/items/headerbar-logo.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-VoiceBoardicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-VoicePresentationicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-subitem.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-voicerecordericon.png trunk/moodle/mod/liveclassroom/reports.php trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/liveclassroom/welcome.php Added Paths: ----------- trunk/moodle/mod/liveclassroom/doAction.php trunk/moodle/mod/liveclassroom/js/ajaxslt/ trunk/moodle/mod/liveclassroom/js/ajaxslt/AUTHORS trunk/moodle/mod/liveclassroom/js/ajaxslt/COPYING trunk/moodle/mod/liveclassroom/js/ajaxslt/README trunk/moodle/mod/liveclassroom/js/ajaxslt/dom.js trunk/moodle/mod/liveclassroom/js/ajaxslt/util.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xmltoken.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xpath.js trunk/moodle/mod/liveclassroom/js/ajaxslt/xslt.js trunk/moodle/mod/liveclassroom/js/dojo/ trunk/moodle/mod/liveclassroom/js/dojo/LICENSE trunk/moodle/mod/liveclassroom/js/dojo/README trunk/moodle/mod/liveclassroom/js/dojo/build.txt trunk/moodle/mod/liveclassroom/js/dojo/dojo.js trunk/moodle/mod/liveclassroom/js/dojo/iframe_history.html trunk/moodle/mod/liveclassroom/js/dojo/src/ trunk/moodle/mod/liveclassroom/js/dojo/src/io/ trunk/moodle/mod/liveclassroom/js/dojo/src/io/BrowserIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/IframeIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/RepubsubIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/RhinoIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/ScriptSrcIO.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/XhrIframeProxy.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/__package__.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/cometd.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/common.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/cookie.js trunk/moodle/mod/liveclassroom/js/dojo/src/io/xip_client.html trunk/moodle/mod/liveclassroom/js/dojo/src/io/xip_server.html trunk/moodle/mod/liveclassroom/js/xsl/ trunk/moodle/mod/liveclassroom/js/xsl/wimba.xsl trunk/moodle/mod/liveclassroom/lib/common/ trunk/moodle/mod/liveclassroom/lib/common/WimbaCommons.php trunk/moodle/mod/liveclassroom/lib/common/WimbaUI.php trunk/moodle/mod/liveclassroom/lib/common/WimbaXml.php trunk/moodle/mod/liveclassroom/lib/common/XmlArchive.php trunk/moodle/mod/liveclassroom/lib/common/XmlOrphanedArchive.php trunk/moodle/mod/liveclassroom/lib/common/XmlResource.php trunk/moodle/mod/liveclassroom/lib/common/XmlRoom.php trunk/moodle/mod/liveclassroom/lib/common/domxml-php4-php5.php trunk/moodle/mod/liveclassroom/lib/lc/ trunk/moodle/mod/liveclassroom/lib/lc/LCAction.php trunk/moodle/mod/liveclassroom/lib/lc/LCRoom.php trunk/moodle/mod/liveclassroom/lib/lc/LCUser.php trunk/moodle/mod/liveclassroom/lib/lc/PrefixUtil.php trunk/moodle/mod/liveclassroom/lib/lc/lcapi.php trunk/moodle/mod/liveclassroom/pictures/backgrounds/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/Thumbs.db trunk/moodle/mod/liveclassroom/pictures/buttons/listitem-information-16_12.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-activities-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-content-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-delete-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-launch-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-new-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-poll-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-schedule-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/toolbar-settings-enabled.png trunk/moodle/mod/liveclassroom/pictures/buttons/x_round-16_14.png trunk/moodle/mod/liveclassroom/pictures/buttons/x_squared.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-archiveicon-selected.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-archiveicon.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-boardicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif trunk/moodle/mod/liveclassroom/pictures/items/listitem-orphanedarchiveicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-pcicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-presentationicon.png trunk/moodle/mod/liveclassroom/pictures/items/listitem-subitem-selected.jpg trunk/moodle/mod/liveclassroom/pictures/items/listitem-voicetoolsicon.gif trunk/moodle/mod/liveclassroom/pictures/items/liveclassroom.png trunk/moodle/mod/liveclassroom/pictures/items/phone_60.png Removed Paths: ------------- trunk/moodle/mod/liveclassroom/lib/lcapi.php Modified: trunk/moodle/mod/liveclassroom/config.html =================================================================== --- trunk/moodle/mod/liveclassroom/config.html 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/config.html 2007-08-01 14:04:16 UTC (rev 193) @@ -2,6 +2,19 @@ <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> <input type="hidden" name="module" value="liveclassroom"> + +<?php + +require_once("lib/lc/LCAction.php"); +require_once("lib/lc/lcapi.php"); +$lcApi=new LCApi($CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword, $CFG->dataroot); +$config = $lcApi->lcapi_get_status(); + + +?> + <table cellpadding="9" cellspacing="0" > <tr valign="top"> @@ -34,11 +47,12 @@ <tr> <td><br /></td> </tr> -<?php $config = lcapi_get_system_config(); ?> + + <tr valign="top"> <td align="right"><?php print_string('lcversion', 'liveclassroom')?> :</td> <td> - <?php echo $config[LCAPI_ATTR_SERVER_VERSION]; ?> + <?php echo $config["horizon_version"]; ?> </td> </tr> <tr valign="top"> Modified: trunk/moodle/mod/liveclassroom/css/StyleSheet.css =================================================================== --- trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/css/StyleSheet.css 2007-08-01 14:04:16 UTC (rev 193) @@ -1,677 +1,800 @@ -body -{ background-color:#ffffff; - margin-top:0px; - margin-bottom:0px; - margin-right:0px; - margin-left:0px; - font-family: Verdana,Arial,Helvetica,sans-serif; - font-size:70%; +body +{ + background-color: #ffffff; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:8px; } -/* size remaining text relative to baseline */ -/* some indiv classes and elements have different sizes, later in doc */ -body a, -body table, body td, body th, -body p, body div, body li, body li li, -body input, body textarea, body select, body option ,td textarea -{font-size:100%;} +* +{ + margin:0; + padding:0; +} -.page_title +/*general html element*/ +input { -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size:14px; -font-weight:bold; -color:#3c4b5b; -vertical-align: middle; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.area_title -{ -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size:12px; -font-weight:bold; -color:#3c4b5b; -vertical-align: middle; -background-color:#c4cedc; -padding-left:2px; -vertical-align:middle; -} -.limitWidth +td{ + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; + } +textarea { - width:160px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -.alignRight -{ - +html{ + margin:0; + padding:0; + border:0; + height:100%; + } -.shiftAvailability +select { - - padding-right:50px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size:11px; } -* html div.tab -{ - padding-top: 2%; +label +{ + font-family:Verdana, Arial, Helvetica, sans-serif; + font-size:11px; + vertical-align:top; +} - display: none; - height: 290px; - +label.labelEnabled +{ + color:#000; } - -div.tab +label.labelDisabled { - padding-top: 2%; + color:#ccc; +} +option{ +margin-right: 5px; +} +/*general class*/ +.alert +{ + color: Red; +} - - display: none; - - height:278px; -} -.settingsPadding +.italic { - padding-left:120px; - padding-right:150px; + font-style:italic; } -.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; - +.top +{ + vertical-align:top; - } - - - .podcaster - { - padding-left:15px; - } -.button_hide -{ - - width:25px; - display:none; } -div.current_tab +* html .top { - - position: relative; - display: block; - height:180px; - - + vertical-align:baseline; } -td.tabSelected +.comment { - background-image: url(../pictures/items/tab-selected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; font-family: Verdana; - cursor:default; + color: #555555; + font-style: italic; + font-size: 11px; + padding-left: 20px; } - -td.tabDisabled +.commentAdvanced { - color: #CACACA; - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + color: #555555; + font-size: 11px; } -td.tabNoSelected +.subOption td { - background-image: url(../pictures/items/tab-unselected.gif); - background-repeat: no-repeat; - width: 78px; - font-size: 10px; - font-family: Verdana; - border-bottom: solid 1px #818181; - cursor:default; + padding-left: 20px; } -a { -text-decoration:none; - color:Black; } +.hide +{ + display: none; +} -a:hover { - text-decoration:none; - color:Black; } +/*headerBar*/ +#headerBar table +{ + width: 100%; + background-image: url( "../pictures/backgrounds/headerbar.png" ); + height: 32px; + border-bottom: solid 1px Black; +} -td.action,input.action{ - background-image:url(../pictures/buttons/general-empty.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer +.headerBarRight +{ + padding-right:10px; } -td.action:hover,input.action:hover{ - background-image:url(../pictures/buttons/general-empty-over.png); - background-repeat :no-repeat; - background-position:center; - text-decoration:none; - color:Black; - text-align:center; - cursor:pointer +.headerBarLeft +{ + padding-left:10px; } -.action label + +/*contextBar*/ +#contextBar table { - cursor:pointer + background-image: url( "../pictures/backgrounds/toolbar.png" ); + height: 30px; + width: 100%; + border-bottom: solid 1px #F0F0F0; } -.alert +.contextBarRight { - color:Red; + padding-right:10px; } +.contextBarLeft +{ + padding-left:10px; +} +.roomNameForSettings +{ + font-family: Verdana; + font-weight: bold; + font-size: 12px; +} +/*filterBar*/ -a.room { color:#889EB3; - -text-decoration:none; -display:block; -width:100%; -cursor:help; - +#filterBar +{ + background-image: url( "../pictures/backgrounds/filterbar.png" ); + height: 24px; + font-weight: bold; + border-bottom: fine 1px #C7D3E1; + list-style-type:none; + + } -a.room:hover {color:#889EB3; - - +a.filterdisabled,.filterenabled,.filterrollover +{ + display:block;float:left; + color:#333333; + vertical-align:middle; text-decoration:none; - border: none; - - background-position: 3px 4px; - cursor:help; + white-space:nowrap; + padding-left:8px; + margin-left:10px; } +a.filterdisabled span,a.filterenabled span,a.filterrollover span +{ + display:block; + float:left; + padding-right:8px; + height:24px; + line-height:24px; + cursor:default; + vertical-align:middle; +} -.info a{ - position:relative; /*this is the key*/ - z-index:24; - color:#000; - text-decoration:none} +a.filterenabled span +{ + background:url("../pictures/items/filter-enabled-right.png") no-repeat right top; + color:white; +} -.info a:hover{z-index:25;text-decoration:underline;} +a.filterenabled +{ + background:url("../pictures/items/filter-enabled-left.png") no-repeat left top; +} +a.filterrollover +{ + background:url("../pictures/items/filter-rollover-left.png") no-repeat left top; +} -.info a span{display: none;font-size:8pt;} +a.filterrollover span +{ + background:url("../pictures/items/filter-rollover-right.png") no-repeat right top; +} -.info a:hover span{ /*the span will display just on :hover state*/ - font-size:8pt; - display:block; - position:absolute; - top:1.5em; left:5em; width:28em; - border:1px solid #FFF99F; - background-color:#FFF99F; color:#000; - text-align: center} - - - -.button_disabled { - - color:#666666; - font-family: Arial; - text-decoration:none; - font-size: 9px; - +/*list*/ +* html #list +{ + padding-top:0px; + margin-top:0px; + height: 315px; + overflow-y: scroll; + overflow-x: hidden; + width: 100%; + vertical-align:top; } - -.button_enabled a +#list { + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 315px; + overflow: auto; + width: 100%; +} +.listMinHeigth +{ + vertical-align:top; + padding-top:0px; + margin-top:0px; + height: 185px; + overflow: auto; + width: 100%; - color:black; - font-family: Arial; - width:30px; - font-size: 9px; - } -.separator_space +.productTitle { - width:2px; + background-color: #B0C1D5; + font-family: Verdana; + color: White; + font-size: 12px; + height: 16px; + font-weight: bold; + cursor: default; + } -.empty_space +.productTitle label { - width:50px; + vertical-align:top; } +/*list column*/ -.button_enabled a:hover{ color:black; +.list_icon +{ + width:16px; - font-family: Arial; - font-size: 9px; - - cursor:hand; } +.list_archive +{ + width:16px; + border-bottom: solid 1px #F3F3F3; +} +.list_information +{ + width:16px; + padding-right:20px; +} +.list_availability +{ + width:16px; +} -tr.selectRoom{ - background-color:red; - cursor:hand; - text-decoration:none; +.list_name +{ + width:300px; + text-align:left; } -.divProduct + +.list_noElement { - padding-top:3px; -padding-left:2px ; - + padding-left:32px; + font-style:italic; + } -.separateProduct +.moreRoom { - border-top:solid 1px #C7D3E1 + color: Navy; + text-decoration: underline; + padding-left: 20px; + font-weight: bold; } -.shortShift{ +/*List Elements*/ - padding-left:5px; +.liveclassroom td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -.room td{ - padding-left:0px ; - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; - text-decoration:none; +.liveclassroomstudent +{ + display:none; } -.room label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; - text-decoration:none; +.liveclassroomstudent td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -tr.overRoom{ - font-family:Verdana; - color:Black; - font-size:11px; - border-bottom:solid 1px #F3F3F3; - background-color:#f0f3f5; - - cursor:default; +.liveclassroom label +{ + font-family: Verdana; + color: Black; } -.archive td{ - padding-left: 5px; - font-family:Verdana; - color:#666666; - font-style:italic; - font-size:11px; - border-bottom:solid 1px #F3F3F3; +.voicetools td +{ + padding-left: 5px; + height:19px; + border-bottom: solid 1px #F3F3F3; + cursor: default; } -.room td{ - padding-left:5px ; - font-family:Verdana; - color:Black; - font-size:10; - border-bottom:solid 1px #F3F3F3; - cursor:default; +.voicetools label +{ + font-family: Verdana; + color: Black; } -.archive label{ - padding-left:5px ; - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; +.orphanedarchive td +{ + padding-left: 5px; + cursor: default; + text-decoration: none; + border-bottom: solid 1px #F3F3F3; } -.room label{ - - font-family:Verdana; - color:Black; - font-size:10; - - cursor:default; + +.orphanedarchive label +{ + font-family: Verdana; + color: Black; + font-size: 8; + text-decoration: none; } +.archiveHide +{ + display:none; +} +.archive td +{ + padding-left: 5px; + cursor: default; + display:table-cell; + border-bottom: solid 1px #F3F3F3; +} +.archive label +{ + font-family: Verdana; + color: Black; + font-style: italic; + font-family: Verdana; + color: #666666; + +} -.filterBar table{ - - background-image:url("../pictures/backgrounds/filterbar.png"); - height:24px; - font-weight:bold ; - - border-bottom:fine 1px #C7D3E1 +.orphanedarchivestudent +{ + display:none; } - - -.filter_enabled +/*toolBar*/ +#toolBar table { - font-family :Verdana; - color:#333333; - height:24px; - text-align:center; - font-size:10px; - font-weight:bold ; + padding-left: 5px; + width: 100%; + height:50px; + background-image: url( "../pictures/backgrounds/toolbar.png" ); + border-bottom: solid 1px #999999; } -.filter_selected -{ font-weight:bold ; - font-family :Verdana; - color:#ffffff; - text-align:center; - height:24px; - font-size:10px; - +.button_disabled { + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + font-size: 9px; + width:60px; } -.filter_left_enabled -{ - background-image:url("../pictures/items/filter-enabled-left.png"); - background-repeat:no-repeat; +.button_disabled span{ + cursor: default; + color: #666666; + font-family: Arial; + text-decoration: none; + text-align:center; + font-size: 9px; + + } -.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 ; +.button_enabled span { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; } -.filter_right_enabled +.button_enabled { + cursor: pointer; + color: black; + font-family: Arial; + text-align:center; + font-size: 9px; + width:60px; +} + +.separator_space { - background-image:url("../pictures/items/filter-enabled-right.png"); - background-repeat:no-repeat; + width: 2px; } -.filter_right_rollover + +.empty_space { - background-image:url("../pictures/items/filter-rollover-right.png"); - background-repeat:no-repeat; +heigth:10px; + z-index:0; + visibility:hidden; + width: 50px; } -.noFilter + +/*settings*/ + +/*tabs*/ +#tabs { - background-image:none; - font-family :Verdana; - color:#333333; - text-align:center; - height:24px; - font-size:10px; - font-weight:bold ; + background-image: url( "../pictures/backgrounds/toolbar.png" ); } -.filter_middle_rollover + +td.tabSelected,td.tabDisabled,td.tabNoSelected { - 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 ; - + background-image: url(../pictures/items/tab-selected.gif); + background-repeat: no-repeat; + width: 78px; + font-size: 10px; + font-family: Verdana; + cursor:default; } -.filter_left_rollover + +td.tabDisabled { - background-image:url("../pictures/items/filter-rollover-left.png"); - background-repeat:no-repeat; + color: #CACACA; + z-index:-14; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; } -.filterSpace +td.tabNoSelected { - padding-left:10px; + background-image: url(../pictures/items/tab-unselected.gif); + border-bottom: solid 1px #818181; } -.contextBar table + +/*tab content*/ +div.tabContent { - padding-left:5px; - padding-right:5px; - background-image:url("../pictures/backgrounds/toolbar.png"); - - height:30px; - width:100% - + padding-left:5%; + padding-right:5%; + margin-top:7%; + + display: block; + height: 247px; } - -.tabBackground +* html div.tabContent { - background-image:url("../pictures/backgrounds/toolbar.png"); - + height: 248px; } +div.tabContentcalendar /*use for the calendar event*/ +{ + padding-left:3%; + padding-right:3%; + padding-top:4%; + position: relative; + display: block; + height: 230px; +} -.productChoice table +/*choice panel*/ +#productChoice table { + margin-left: 10px; + margin-right: 10px; - - border-bottom:solid 1px #F0F0F0; - margin-left:10px; - margin-right:10px; - } - -.comment{ - - font-family:Verdana; - color:#555555; - font-style:italic; - font-size:11px; - padding-left:20px; +.choiceAll td +{ + height:102px; + border-bottom: solid 1px #F0F0F0; + padding-left:15px; } +*>html .choiceAll td { + height:102px; +} +.choiceVtonly td +{ + border-bottom: solid 1px #F0F0F0; + padding-left:15px; + height:103px; -.subOption td { - - font-family:Verdana; - - font-size:11px; - padding-left:20px; - vertical-align:top; } +*>html .choiceVtonly td { + height:103px; +} -.roomNameForSettings +product_choice_left { - font-family:Verdana; - font-weight: bold; - font-size:12px; - - + width:130px; } +product_choice_right +{ + padding-right:20px; +} +/*validation bar*/ +#validationBar table +{ + width: 100%; + height: 22px; + padding: 0px; + background-color: #F0F0F0; + border-top: solid 1px #999999; +} -.hide +td.actionHide, input.action { display:none; } -.hideAndShift +td.action, input.action { - display:none; - padding-left:20px; + background-image: url(../pictures/buttons/general-empty.png); + background-repeat: no-repeat; + background-position: center; + text-decoration: none; + color: Black; + text-align: center; + cursor: pointer; + width:75px; } -.visible +td.action:hover, input.action:hover { - display:block; + background-image: url(../pictures/buttons/general-empty-over.png); } -.visibleAndShift +.action label { - display:block; - padding-left:20px; + cursor: pointer; } - -label.moreRoom +/*MessageBar*/ +#messageBar { - color:Navy; - text-decoration:underline; - padding-left:20px; - font-weight: bold; - cursor:default; + width:99%; } +.message +{ + background-color: #ffff99; + position:absolute; + bottom:4px; + left:1px; + right:1px; + height: 20px; + display: block; +} -#popup { - -display:none; - font-size:8pt; - display:block; - position:absolute; - top:45%; left:45%; - - color:#000; +/*loading panel*/ +#loading +{ + display: none; + font-size: 8pt; + display: block; + position: absolute; + top: 0; + left: 0; + color: #000; text-align: center; } +/*tooltip*/ +.tooltip +{ + 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; +} -.expand +/*Error Panel*/ +#error_frame { - background-color:Black; + + background-color: #FFD0D0; + padding: 0; + margin: 0; + border-style: solid; + border-color: red; + border-width: 1px; + text-align: left; + vertical-align: middle; } +#error_frame table +{ + height:254px; +} -.headerBar table +#error_title { -padding-left:5px ; -width:100%; -padding-right:5px ; + font-family: Verdana,Arial,Helvetica; + font-size: 12px; + font-weight: bold; + color: black; + padding: 0; + margin: 0; + text-align: left; + vertical-align: top; +} -background-image:url("../pictures/backgrounds/headerbar.png"); -height:32px; -border-bottom:solid 1px Black; +/*popup*/ +/*background*/ +.opac +{ + + display:none; + z-index:2 !important; + position:absolute; + width:100%; + height:100%; + top:0px; + left:0px; + background-color:#000; + filter:alpha(opacity=33); + -moz-opacity:.33; + opacity:.33; + + +} +.nameElement { + font-family: Verdana; + font-weight: bold; + font-size: 12px; +} +div.advancedPopup { + position:absolute; + left:0px; + top:0px; + width:350px; + height:150px; + z-index: 50 !important;; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -.toolBar table -{ - padding-left:5px ; - width:100%; - - background-image:url("../pictures/backgrounds/toolbar.png"); - border-bottom:solid 1px #999999; +div.window-left { + position:absolute; + left:0px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-left.png" ); + background-repeat:none; } -.list -{ - - height:317px; - overflow:auto; - overflow-x: hidden; - width:100%; +div.window-middle { + position:absolute; + left:10px; + top:0px; + width:330px; + height:150px; + background-image: url( "../pictures/items/window-middle.png" ); + +} +div.window-right { + position:absolute; + left:340px; + top:0px; + width:10px; + height:150px; + background-image: url( "../pictures/items/window-right.png" ); + background-repeat:none; } -.listMinHeigth{ - height:296px; - overflow-y:scroll; - overflow-x: hidden; - width:100%; +div.window-leftBig { + position:absolute; + left:0px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_left.png" ); + background-repeat:none; +} +div.window-middleBig { + position:absolute; + left:10px; + top:0px; + width:380px; + height:200px; + background-image: url( "../pictures/items/window200_middle.png" ); + } -.lineTitle{ +div.window-rightBig { + position:absolute; + left:390px; + top:0px; + width:10px; + height:200px; + background-image: url( "../pictures/items/window200_right.png" ); + background-repeat:none; +} -padding-left:10px +div.popupDialContainer { + height:130px; + width:270px; + padding-right:10px; + overflow:auto; } -.productTitle{ - - background-color:#B0C1D5; - font-family:Verdana; - color:White; - font-size:12px; - height:16px; - font-weight:bold; - cursor:default; - - -} -.validationBar table + +.popupTitle { - width:100%; - height:24px ; - padding:0px ; - background-color:#F0F0F0; - border-top:solid 1px #999999 + font-size:14px; + font-weight:bold; + text-decoration:underline; + font-family: helvetica; +} +.popupDial { + position:absolute; + left:0px; + top:0px; + width:400px; + height:200px; + z-index: 20; + font-family:Verdana; + padding: 2px; + margin: 2px; + left: 15%; + top: 30%; + display:none; } -.panelSettings table -{ -border-bottom: #818181 1px solid; -height:220px; -display:none; -width:100% + +.popupDialContent { + margin-top:10px; + padding:10px 0; + background-color:#efefef; + border:1px solid #b8b8b8; } - - - .part td - { - - width:100%; - border-bottom: #818181 1px solid; - } - - .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; - } - - .message{ - - background-color:#ffff99; - } - div.tab -{ - padding-top: 2%; +.popupDialContent.nameElement { + font-size:10px; + font-family:Verdana; +} - display: none; - -height:275px;# -} \ No newline at end of file +.picturePopup { + vertical-align:top; +} + + + Added: trunk/moodle/mod/liveclassroom/doAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/doAction.php (rev 0) +++ trunk/moodle/mod/liveclassroom/doAction.php 2007-08-01 14:04:16 UTC (rev 193) @@ -0,0 +1,171 @@ +<?php +/****************************************************************************** + * * + * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Samy Hazan * + * * + * Date: September 2006 * + * * + ******************************************************************************/ + +/* $Id: doAction.php 51417 2007-07-17 15:06:10Z thomasr $ */ + +/* This page manage the action create, update, delete for a room */ +require_once("../../config.php"); +require_once("lib.php"); +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); +require_once("lib/common/XmlRoom.php"); +require_once("lib/common/WimbaXml.php"); +if (version_compare(PHP_VERSION,'5','>=')) { + require_once('lib/common/domxml-php4-php5.php'); +} + + +$courseid = optional_param('enc_course_id', 0, PARAM_INT); +$action = required_param('action', PARAM_ALPHA); +$time = required_param('time', PARAM_INT); + +if (!empty ($_POST)) { + while (list ($key, $val) = each($_POST)) { + $list_attributes[$key] = $val; + } +} +while (list ($key, $val) = each($_GET)) { + $list_attributes[$key] = $val; +} + + +$session = new WimbaMoodleSession($list_attributes, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); +$xml = new WimbaXml(); + +if ($session->error == false && $session != NULL) { + + $api = new LCAction($session, $CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); + $prefix=$api->getPrefix(); + + switch ($action) { + + case "launch" : + $roomId = required_param('id', PARAM_SAFEDIR); + if ($list_attributes["studentView"] == "true") { + $authToken = $api->getAuthokenNormal($session->getCourseId()."_S", $session->getFirstname() , $session->getLastname()); + }else{ + $authToken = $api->getAuthoken(); + } + header('Location:' . $CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?channel=' . $roomId . '&hzA=' . $authToken); + exit; + break; + case "create" : + $id = $api->createRoom($session->getCourseId().rand(), "false"); + $messageAction = "created"; + $messageProduct = "room"; + break; + case "update" : + $roomId = required_param('id', PARAM_SAFEDIR); + $id = $api->createRoom($roomId, "true"); + $messageAction = "updated"; + $messageProduct = "room"; + break; + case "delete" : + if($api->getPrefix()!="") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + else + $roomId = required_param('id', PARAM_SAFEDIR); + + $id = $api->deleteRoom($roomId); + //delte the activity linked to this room + if (! liveclassroom_delete_all_instance_of_room($roomId)) { + notify("Could not delete the activities for the room: $roomId"); + } + $messageAction = "deleted"; + $messageProduct = "room"; + break; + case "openContent" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/carousels.epl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "openReport" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:reports.php?id=' . $roomId . '&hzA=' . $authToken); + exit(); + break; + case "openAdvancedMedia" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/media.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "openAdvancedRoom" : + $roomId = required_param('id', PARAM_SAFEDIR); + $authToken = $api->getAuthoken(); + header('Location:' . $CFG->liveclassroom_servername . '/admin/class/properties.pl?class_id=' .$roomId . '&hzA=' . $authToken.'&no_sidebar=1'); + exit(); + break; + case "getDialInformation" : + $roomId = required_param('id', PARAM_SAFEDIR); + $select_room = $api->getRoom($roomId); + + + if ($list_attributes["studentView"] == "true" || $session->isInstructor() == false) + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), null, $select_room->getParticipantPin(), $api->getPhoneNumbers()); + else + $xml->createPopupDialElement(get_string("popup_dial_title", "liveclassroom"), get_string("popup_dial_numbers", "liveclassroom"), get_string("popup_dial_pin", "liveclassroom"), $select_room->getPresenterPin(), $select_room->getParticipantPin(), $api->getPhoneNumbers()); + echo $xml->getXml(); + break; + case "saveSettings": + if($api->getPrefix()!="") + $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR),$api->getPrefix()); + else + $roomId = required_param('id', PARAM_SAFEDIR); + $id = $api->createRoom($roomId, "true"); + break; + } + + + if ($action == "saveSettings") + { + echo "good"; + exit(); + } + + if (isset ($list_attributes["createWorkflow"]) && $list_attributes["createWorkflow"] == "true") { + +?> + <script> + parent.location.href="<?php echo $CFG->wwwroot . '/course/mod.php?section=0&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom&roomId=' . $id ?>" + </script> + <? + } + else{ + + + header('Location: welcome.php?id=' .$session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction. '&messageProduct=' . $messageProduct); + } +} +else { + header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session'); +} +?> \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2007-08-01 14:04:16 UTC (rev 193) @@ -21,9 +21,9 @@ * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * - * Author: Hazan Samy * + * Author: Hazan Samy * * * - * Date: October 2006 * + * Date: October 2006 * * * ******************************************************************************/ @@ -31,131 +31,61 @@ /// This page is to generate the list of rooms and archives + + require_once("../../config.php"); require_once("lib.php"); - - +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); +require_once("lib/common/XmlArchive.php"); +require_once("lib/common/XmlOrphanedArchive.php"); +require_once("lib/common/XmlRoom.php"); +require_once("lib/common/WimbaXml.php"); + if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } //TODO: Change this to be using (required|optional)_param -$params['time'] = required_param('time', PARAM_INT); -if(empty($_POST)){ - $params = $_GET; -} -else { - $params = $_POST; -} -$courseid = required_param('enc_course_id', PARAM_INT); -$userid = liveclassroom_get_teacher_userid($courseid); - - -if(isstudent($courseid)) { //Student - $isteacher = 0; +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + } -else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher - $isteacher = 1; +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + } -if(strstr($CFG->release,"1.7")) { // 1.7.* version - if (iscreator()) { // Course Creator - $isteacher = 1; - } - else if (!isteacheredit($courseid)) { // Non-editing Teacher - $isteacher = 0; - } -} - -if (!liveclassroom_init_session($params)) { - error("ExpiredSessionException"); +if(isset($params["error"])){ + $display=$uiManager->setError(get_string ($params["error"], 'liveclassroon')); } - -$xmldoc = domxml_new_doc("1.0"); - -$root = $xmldoc->create_element('root'); - -$root->append_child(liveclassroom_get_session_params($xmldoc,$params)); - -$windows = $xmldoc->create_element('windows'); - -//HEADER BAR -$windows->append_child(liveclassroom_create_headerbar($xmldoc)); - - -//TOOL BAR -$toolbar = $xmldoc->create_element('windowsElement'); -$tbtype = $xmldoc->create_element('type'); -$tbtype->append_child($xmldoc->create_text_node("toolBar")); -$toolbar->append_child($tbtype); - -$tbelementParameters = $xmldoc->create_element("windowsElementParameters"); - -$menubar = $xmldoc->create_element('menuElements'); - -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'all', 'all', 'pictures/buttons/toolbar-launch', 'Launch', 'Launch()', "")); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-activities', 'Add Activity', "doOpenAddActivity('../../course/mod.php','add=liveclassroom')",'')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'button', 'instructor', 'all', 'pictures/buttons/toolbar-new', 'New', "launchNew('generateSettings.php',Management,'new','LiveClassroom','MainLecture')", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-content', 'Content', "openContentWindows()", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-poll', 'Reports', 'doOpenReport()','')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-settings', 'Settings', "launchAjaxRequest('generateSettings.php',Management,'update','false')", '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'false','button', 'instructor', 'all', 'pictures/buttons/toolbar-delete', 'Delete', 'doDelete()', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true', 'fixSpace', 'all', 'all', '', '', '', '', '')); -$menubar->append_child(liveclassroom_create_menu_element($xmldoc,'true','search', 'all','all', "", "", "", "","")); - -$tbelementParameters->append_child($menubar); -$toolbar->append_child($tbelementParameters); - -$windows->append_child($toolbar); - -// MESSAGE BAR -if (isset($params['messageType'])) { - $windows->append_child(liveclassroom_create_message($xmldoc, liveclassroom_get_message($params['messageType']))); +else +{ + + $session=new WimbaMoodleSession($params); + if(isset($params["messageProduct"]) && isset($params["messageAction"])) + $message=get_string("message_" . $params["messageProduct"] . "_start", "liveclassroom")." ".$params["messageProductName"]." ".get_string("message_" . $params["messageAction"] . "_end","liveclassroom"); + $api=new LCAction($session,$CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword,$CFG->dataroot); + + $uiManager=new WimbaUI($session,$api); + if($session->error==false)//good + { + $display=$uiManager->getLCPrincipalView($message); + } + else{ + if($session->error=="session") + $display=$uiManager->setError(get_string ('error_session', 'liveclassroon')); + else if($session->error=="signature") + $display=$uiManager->setError(get_string ('error_signature', 'liveclassroon')); + } } - -// LIST -$list = $xmldoc->create_element('windowsElement'); -$typeWindowsElement = $xmldoc->create_element('type'); -$typeWindowsElement->append_child($xmldoc->create_text_node("list")); -$list->append_child($typeWindowsElement); - -$elementParameters = $xmldoc->create_element('windowsElementParameters'); - -$products = $xmldoc->create_element('products'); - -// LIST PRODUCTS - -$listProducts = $xmldoc->create_element('listProducts'); - -$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'1','toggleimgmain','productType','Lecture rooms')); -$listProducts->append_child(liveclassroom_create_product_information($xmldoc,'2','toggleimgbreakout','productType','Discussion rooms')); - -$products->append_child($listProducts); - -// PRODUCTS CONTENT - - -$products->append_child(liveclassroom_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); - -$elementParameters->append_child($products); - -$list->append_child($elementParameters); - -$windows->append_child($list); - -$root->append_child($windows); - -$xmldoc->append_child($root); - -if(LCAPI_DEBUG) { - $xmldoc->dump_file($CFG->dataroot . "/roomlist.xml", false, true); -} - -$xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string - -$finalstring = str_replace("\n", '', $xmlstring); - -echo $xmlstring; -?> \ No newline at end of file +echo $display; +?> Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-05-11 15:16:38 UTC (rev 192) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-08-01 14:04:16 UTC (rev 193) @@ -30,1195 +30,77 @@ /// This page is to generate the settings of a room or archive require_once("../../config.php"); require_once("lib.php"); +require_once("lib/lc/LCAction.php"); +require_once("lib/common/WimbaXml.php"); +require_once("lib/common/WimbaCommons.php"); +require_once("lib/common/WimbaUI.php"); if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + require_once('lib/common/domxml-php4-php5.php'); } -$courseid = required_param('enc_course_id', PARAM_INT); -$signature = required_param('signature', PARAM_ALPHANUM); -$action = required_param('action', PARAM_ALPHA); - - $MAINLECTURE = 'MainLecture'; - $DISCUSSIONROOM = 'Discussion'; - $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom'; - - if (!liveclassroom_init_session($_GET)) { - error("ExpiredSessionException"); - } - - if($action == 'update') { - $roomId = required_param('id', PARAM_SAFEDIR ); - $room_info = lcapi_get_room_info($roomId); - - if(liveclassroom_is_lecturehall($roomId,$courseid)) { - $isLectureRoom = true; - } - else { - $isLectureRoom = false; - } - session_start(); // session to store the previous types of the room - } - else { - $room_info = array(); - } - $contextDisplay='all'; - - $xmldoc = domxml_new_doc("1.0"); - - $root = $xmldoc->create_element('root'); - - $root->append_child(liveclassroom_get_session_params($xmldoc,$_GET)); - - $windows = $xmldoc->create_element('windows'); +$action = optional_param('action', PARAM_ALPHA); - //HEADER BAR - $windows->append_child(liveclassroom_create_headerbar($xmldoc)); + $currentIdtab= optional_param('idtab', '',PARAM_ALPHA); +$params = array (); +if (!empty ($_POST) ) { + while (list ($key, $val) = each($_POST)) { + $params[$key] = $val; + } + +} +if (!empty ($_GET) ) { + while (list ($key, $val) = each($_GET)) { + $params[$key] = $val; + } + +} - // CONTEXT BAR - - $contextbar = $xmldoc->create_element('windowsElement'); - $cbtype = $xmldoc->create_element('type'); - $cbtype->append_child($xmldoc->create_text_node("contextBar")); - $contextbar->append_child($cbtype); - $cbelementParameters = $xmldoc->create_element("windowsElementParameters"); - $contextbarinformations = $xmldoc->create_element("contextBarInformations"); - $cbname = $xmldoc->create_element("name"); - if($action=="update") { - $cbname->append_child($xmldoc->create_text_node($room_info[LCAPI_ATTR_LONGNAME])); - } - else $cbname->append_child($xmldoc->create_text_node("New room")); - $contextbarinformations->append_child($cbname); - $cbcontext = $xmldoc->create_element("context"); - $cbcontext->append_child($xmldoc->create_text_node(liveclassroom_get_message("Settings"))); - $contextbarinformations->append_child($cbcontext); - $cbproduct = $xmldoc->create_element("product"); - $cbproduct->append_child($xmldoc->create_text_node(liveclassroom_get_message("Live Classroom"))); - $contextbarinformations->append_child($cbproduct); - - $cbelementParameters->append_child($contextbarinformations); - - $contextbar->append_child($cbelementParameters); - - $windows->append_child($contextbar); - - // SETTINGS - - $settings = $xmldoc->create_element('windowsElement'); - $settingstype = $xmldoc->create_element('type'); - $settingstype->append_child($xmldoc->create_text_node("settings")); - $settings->append_child($settingstype); - - $settingsElementParameters = $xmldoc->create_element("windowsElementParameters"); - - - $panelsSettings = $xmldoc->create_element('panelsSettings'); - - // -------------- ROOM INFO ------------------- - $panelSettings = $xmldoc->create_element('panelSettings'); - // ROOM INFO PANEL INFO +$session=new WimbaMoodleSession($params); +if($session->error==false)//good +{ + if($action == 'update') { + $api=new LCAction($session,$CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword,$CFG->dataroot); + $roomId = required_param('id', PARAM_SAFEDIR ); + $room_info = $api->getRoom($roomId); + if($room_info!=false){ + + $uiManager=new WimbaUI($session,$api,$currentIdtab); + $uiManager->setCurrentProduct("liveclassroom",$room_info); + } + else { + //problem to get the vt resource + $display=$uiManager->setError(get_string ('error_connection_lc', 'liveclassroon')); - $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', liveclassroom_get_message('Room Info'), "1", "block")); - // ROOM INFO CONTENT - $panelContent = $xmldoc->create_element('panelContent'); - - // FIRST LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", - $parameters=array("class" => "alert", "value" => "*") )); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", - $parameters=array("value" => liveclassroom_get_message("Title: ")) )); - $panelLine->append_child($linepart); - - $parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text"); - if($action=="update"){ - $parameters['value'] = $room_info[LCAPI_ATTR_LONGNAME]; - } - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters)); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - // SECOND LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", - $parameters=array("value" => liveclassroom_get_message("Description: ")))); - $panelLine->append_child($linepart); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", - $parameters=array("cols" => "40", "id" => "description", - "value" => $room_info[LCAPI_ATTR_DESCR], - "name" => "description", "rows" => "4") )); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - - if(($room_info[LCAPI_ATTR_ARCHIVE]!=1) || ($roomId == "")) { - // THIRD LINE - $panelLine = $xmldoc->create_element('panelLine'); - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($panelLineStyle); - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("right")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", - $parameters=array("value" => liveclassroom_get_message("Type : ")))); - $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", - "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - if(($action=="update") && ($isLectureRoom==true)) - { - $_SESSION['led']='instructor'; - $parameters['checked']=true; - } - else if($action=="new") - { - $parameters['checked']=true; - } - else - { - $parameters['checked']=true; - } - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters)); - $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", - "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters)); - $panelLine->append_child($linepart); - - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", - $parameters=array("for" => "led_instructor", "valign" => "top", "value" => liveclassroom_get_message("Lecture room") ) )); - $panelLine->append_child($linepart); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); - $panelLine->append_child($linepart); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Instructors lead the presentation")))); - $panelLine->append_child($linepart); - - $panelContent->append_child($panelLine); - - // FOURTH LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); - - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node("")); - $linepart->append_child($style); - - - $colspan = $xmldoc->create_element('colspan'); - $colspan->append_child($xmldoc->create_text_node("0")); - $linepart->append_child($colspan); - - $align = $xmldoc->create_element('align'); - $align->append_child($xmldoc->create_text_node("")); - $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>""))); - $panelLine->append_child($linepart); - - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $x... [truncated message content] |